mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +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
|
end
|
||||||
|
|
||||||
local function _compose_stmt_execute(self, stmt, cursor_type, args)
|
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
|
if arg_num ~= stmt.param_count then
|
||||||
error("require stmt.param_count " .. stmt.param_count .. " get arg_num " .. arg_num)
|
error("require stmt.param_count " .. stmt.param_count .. " get arg_num " .. arg_num)
|
||||||
end
|
end
|
||||||
@@ -1034,7 +1034,7 @@ end
|
|||||||
err
|
err
|
||||||
]]
|
]]
|
||||||
function _M.execute(self, stmt, ...)
|
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
|
if not querypacket then
|
||||||
return {
|
return {
|
||||||
badresult = true,
|
badresult = true,
|
||||||
|
|||||||
Reference in New Issue
Block a user