修复mysql.execute的变长参数最后一个为nil时的NULL位图错误 (#1829)

Co-authored-by: wfl <felove_2008@qq.com>
This commit is contained in:
felove
2023-12-01 11:28:59 +08:00
committed by GitHub
parent 89b47f9372
commit 4b0937cc19

View File

@@ -584,7 +584,7 @@ local function _compose_stmt_execute(self, stmt, cursor_type, args)
for i = 1, null_count do
local byte = 0
for j = 0, 7 do
if field_index < arg_num then
if field_index <= arg_num then
if args[field_index] == nil then
byte = byte | (1 << j)
else