Giter VIP home page Giter VIP logo

Comments (7)

moonbingbing avatar moonbingbing commented on August 17, 2024 1

function _from_length_coded_bin() return false here :
https://github.com/openresty/lua-resty-mysql/blob/master/lib/resty/mysql.lua#L289.
I think that's the reason.
Maybe we should add condition for false in this line:
https://github.com/openresty/lua-resty-mysql/blob/master/lib/resty/mysql.lua#L296

2016-08-25 19:07 GMT+08:00 Dmitry Kuzmin [email protected]:

*454 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/mysql.lua:300:
attempt to perform arithmetic on local 'len' (a boolean value) stack
traceback: coroutine 0: /usr/local/openresty/lualib/resty/mysql.lua: in
function '_from_length_coded_str' /usr/local/openresty/lualib/resty/mysql.lua:423:
in function '_parse_row_data_packet' /usr/local/openresty/lualib/resty/mysql.lua:870:
in function 'query'

This error appeared after we migrate to MYSQL 5.7.14, in previous versions
everything was ok.

currently we use:
openresty/1.11.2.1
lua-resty-mysql-0.16


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#50, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAtlfPWC9RS-a5Lr1vq_1pdaTmRcY_w7ks5qjXdfgaJpZM4Js84r
.

from lua-resty-mysql.

th0rb avatar th0rb commented on August 17, 2024

Can i help you somehow to fix this ASAP?

from lua-resty-mysql.

bungle avatar bungle commented on August 17, 2024

@th0rb can you add in this line: https://github.com/openresty/lua-resty-mysql/blob/master/lib/resty/mysql.lua#L288

ngx.log(ngx.ERR, tostring(first))

And report what got logged?

from lua-resty-mysql.

agentzh avatar agentzh commented on August 17, 2024

@th0rb Please try this patch:

diff --git a/lib/resty/mysql.lua b/lib/resty/mysql.lua
index 99a253e..7860192 100644
--- a/lib/resty/mysql.lua
+++ b/lib/resty/mysql.lua
@@ -286,14 +286,14 @@ local function _from_length_coded_bin(data, pos)
         return _get_byte8(data, pos)
     end

-    return false, pos + 1
+    return nil, pos + 1
 end


 local function _from_length_coded_str(data, pos)
     local len
     len, pos = _from_length_coded_bin(data, pos)
-    if len == nil or len == null then
+    if not len or len == null then
         return null, pos
     end

from lua-resty-mysql.

th0rb avatar th0rb commented on August 17, 2024

@agentzh thanks, will try it now

from lua-resty-mysql.

th0rb avatar th0rb commented on August 17, 2024

@agentzh well, error disapeared, thank a lot for your help. Hope this fix find its way to next release

from lua-resty-mysql.

agentzh avatar agentzh commented on August 17, 2024

@th0rb Thanks for the feedback! Just committed to master. And yes, it will get included in the next release.

from lua-resty-mysql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.