Comments (4)
@Yahook Seems like you have a 3rd-party Lua module named table.new
in your LuaJIT's search paths?
from lua-resty-mysql.
table.new
should be a standard Lua module provided by LuaJIT and the module itself is a Lua function instead of a table.
from lua-resty-mysql.
Hello,
Thank you for your answer. I checked which modules I have:
[root@s2316 /opt/lua/resty]# grep -r new_tab /opt /opt/lua/resty/cookie.lua:local ok, new_tab = pcall(require, "table.new") /opt/lua/resty/cookie.lua: new_tab = function () return {} end /opt/lua/resty/cookie.lua:local _M = new_tab(0, 2) /opt/lua/resty/cookie.lua: local cookie_table = new_tab(0, n + 1) /opt/lua/resty/cookie.lua: return setmetatable({ _cookie = _cookie, set_cookie_table = new_tab(4, 0) }, /opt/lua/resty/mysql.lua:local ok, new_tab = pcall(require, "table.new") /opt/lua/resty/mysql.lua: new_tab = function (narr, nrec) return {} end /opt/lua/resty/mysql.lua:local converters = new_tab(0, 8) /opt/lua/resty/mysql.lua: local bytes = new_tab(len, 0) /opt/lua/resty/mysql.lua: local bytes = new_tab(len, 0) /opt/lua/resty/mysql.lua: local bytes = new_tab(n, 0) /opt/lua/resty/mysql.lua: local res = new_tab(0, 5) /opt/lua/resty/mysql.lua: local col = new_tab(0, 2) /opt/lua/resty/mysql.lua: row = new_tab(ncols, 0) /opt/lua/resty/mysql.lua: row = new_tab(0, ncols) /opt/lua/resty/mysql.lua: local cols = new_tab(field_count, 0) /opt/lua/resty/mysql.lua: local rows = new_tab(est_nrows or 4, 0) /opt/lua/resty/redis.lua:local ok, new_tab = pcall(require, "table.new") /opt/lua/resty/redis.lua: new_tab = function (narr, nrec) return {} end /opt/lua/resty/redis.lua:local _M = new_tab(0, 151) /opt/lua/resty/redis.lua: local vals = new_tab(n, 0); /opt/lua/resty/redis.lua: local req = new_tab(nargs + 1, 0) /opt/lua/resty/redis.lua: local array = new_tab(n, 0) /opt/lua/resty/redis.lua: self._reqs = new_tab(n or 4, 0) /opt/lua/resty/redis.lua: local vals = new_tab(nreqs, 0) /opt/lua/resty/redis.lua: local h = new_tab(0, n / 2)
There is no table.new anywhere.
[root@s2316 ~]# luajit -v LuaJIT 2.0.4
from lua-resty-mysql.
@Yahook You need LuaJIT 2.1. Better use OpenResty directly to avoid such problems. See https://openresty.org. Sorry, I do not have the time to diagnose your own setup issues.
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.