mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
Use table.pack to support nil in table, See #1505
This commit is contained in:
@@ -565,7 +565,7 @@ store_types["nil"] = function(v)
|
||||
end
|
||||
|
||||
local function _compose_stmt_execute(self, stmt, cursor_type, args)
|
||||
local arg_num = #args
|
||||
local arg_num = args.n
|
||||
if arg_num ~= stmt.param_count then
|
||||
error("require stmt.param_count " .. stmt.param_count .. " get arg_num " .. arg_num)
|
||||
end
|
||||
@@ -1034,7 +1034,7 @@ end
|
||||
err
|
||||
]]
|
||||
function _M.execute(self, stmt, ...)
|
||||
local querypacket, er = _compose_stmt_execute(self, stmt, CURSOR_TYPE_NO_CURSOR, {...})
|
||||
local querypacket, er = _compose_stmt_execute(self, stmt, CURSOR_TYPE_NO_CURSOR, table.pack(...))
|
||||
if not querypacket then
|
||||
return {
|
||||
badresult = true,
|
||||
|
||||
Reference in New Issue
Block a user