diff --git a/lualib/skynet/db/mysql.lua b/lualib/skynet/db/mysql.lua index fc8ffcfd..711ba39d 100644 --- a/lualib/skynet/db/mysql.lua +++ b/lualib/skynet/db/mysql.lua @@ -4,6 +4,8 @@ -- The license is under the BSD license. -- Modified by Cloud Wu (remove bit32 for lua 5.3) +-- protocol detail: https://mariadb.com/kb/en/clientserver-protocol/ + local socketchannel = require "skynet.socketchannel" local crypt = require "skynet.crypt" @@ -100,7 +102,10 @@ local function _get_byte1(data, i) return strbyte(data, i), i + 1 end -local function _get_int1(data, i) +local function _get_int1(data, i, is_signed) + if not is_signed then + return strunpack("