diff --git a/lib/resty/mysql.lua b/lib/resty/mysql.lua index 7b88b3b..517a394 100644 --- a/lib/resty/mysql.lua +++ b/lib/resty/mysql.lua @@ -764,7 +764,8 @@ _M.send_query = send_query local function read_result(self, est_nrows) if self.state ~= STATE_COMMAND_SENT then - return nil, "cannot read result in the current context: " .. self.state + return nil, "cannot read result in the current context: " + .. (self.state or "nil") end local sock = self.sock