Description:
Some error messages show (or try to) show the name of the Lua script file you are using, but if the path to this file is long, the filename is not shown on the error
(critical) proxy-plugin.c:1386: (connect_server) [string "/Applications/mysql/enterprise/mysql-proxy-..."]:90: attempt to compare number with nil
How to repeat:
1- Start the proxy
2- Save this file as bug.lua
function read_query(packet)
printed
end
3- Start the proxy like this:
./sbin/mysql-proxy --proxy-lua-script=delete.lua
4- Send a query through port 4040
5- On the terminal where you started the proxy, you will see:
(critical) network-mysqld-lua.c:232: lua_load_file(/Applications/mysql/enterprise/mysql-proxy-0.8.0-osx10.5-x86-64bit/delete.lua) failed: [string "/Applications/mysql/enterprise/mysql-proxy-0.8.0-osx10.5-x86-64..."]:4: '=' expected near 'end'
While from lua_load_file, you can see the fileame, the second time the file is mentioned, the name is not shown.
There are many cases where lua_load_file() is not part of the error.
Suggested fix:
Show the full path + name of the file, or at least show the "end" of the filename, (truncate from the beginning of the path, do not truncate the end)