diff --git a/lualib/skynet/db/mysql.lua b/lualib/skynet/db/mysql.lua index 8c8d600f..4c3c2a45 100644 --- a/lualib/skynet/db/mysql.lua +++ b/lualib/skynet/db/mysql.lua @@ -21,8 +21,6 @@ local sha1= crypt.sha1 local setmetatable = setmetatable local error = error local tonumber = tonumber -local new_tab = function (narr, nrec) return {} end - local _M = { _VERSION = '0.14' } -- constants @@ -33,7 +31,7 @@ local SERVER_MORE_RESULTS_EXISTS = 8 local mt = { __index = _M } -- mysql field value type converters -local converters = new_tab(0, 8) +local converters = {} for i = 0x01, 0x05 do -- tiny, short, long, float, double @@ -46,22 +44,22 @@ converters[0xf6] = tonumber -- newdecimal local function _get_byte2(data, i) - return strunpack("