Comments (7)
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.
Can i help you somehow to fix this ASAP?
from lua-resty-mysql.
@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.
@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.
@agentzh thanks, will try it now
from lua-resty-mysql.
@agentzh well, error disapeared, thank a lot for your help. Hope this fix find its way to next release
from lua-resty-mysql.
@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)
- TODO: support specify pool_size and backlog in connect method. HOT 1
- create_db, create_user, grant and switch_user
- _recv_packet 函数 遇到错误返回,read_result并没有设置mysql. state=1 而是直接返回nil,导致下一次query失败 HOT 5
- lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/mysql.lua:571: bad request
- 腾讯云服务器上mysql,使用lua不能访问数据库 HOT 2
- 为什么查询结果不支持返回number类型,而是将number类型也按string类型返回?
- Hardcoded query works but API disabled in the current context when using a variable HOT 3
- world.sql.gz page was not found, resulting in a CI error HOT 5
- schedule for SQL prepare statement support
- /usr/local/openresty/lualib/resty/mysql.lua:373: attempt to perform arithmetic on field 'packet_no' (a nil value)
- mysql查询是否串行 HOT 1
- bad result: Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
- install by luarocks error HOT 3
- can not use "not res" to judge if the 'res' is empty table
- The connect function is thrown incorrectly
- using lua-resty-mysql query table contents, returned body incorrect
- connect() to unix:/var/lib/mysql/mysql.sock failed (11: Resource temporarily unavailable)
- Client does not support authentication protocol requested by server; consider upgrading MySQL client: 1251 08004 HOT 1
- Why not release the latest version on opm ?
- Connection pooling for php-fpm with nginx unix sockets and resty mysql HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-resty-mysql.