Hello
I have MySQL 5.0.51a-3 on debian and mysql-proxy 0.6.1
I have succesfully used proxy in order to do a few things such as injecting queries and filtering the returned result sets, but I have a problem retrieving the resultset rows inside the proxy.
I tried to use the example script (ie copy-paste) of the last code example from
http://dev.mysql.com/doc/refman/5.0/en/mysql-proxy-scripting-read-query-result.html
1) I run the proxy and then I connect with the mysql command-line client
2)In the proxy I get:
$mysql-proxy --proxy-backend-addresses=127.0.0.1:3306 --proxy-lua-script=example_.lua
(read_query_result) example_.lua:15: attempt to concatenate field '?' (a nil value)
query-time: 0.43ms
response-time: 0.44ms
network-mysqld-proxy.c.2144: got asked to send a resultset, but ignoring it as we already have sent 1 resultset(s). injection-id: 1
(read_query_result) example_.lua:15: attempt to concatenate field '?' (a nil value)
network-mysqld-proxy.c.2144: got asked to send a resultset, but ignoring it as we already have sent 2 resultset(s). injection-id: 2
3) in the client I get
$ mysql --no-defaults --user=root -p --host=127.0.0.1 --port=4040
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.0.51a-3 2008-04-10 17:22:48
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
Then whatever query I enter in the client I get the return of NOW(). Notice that the same happens in the above output of the mysql client: "Server version: 5.0.51a-3 2008-04-10 17:22:48" instead of "Server version: 5.0.51a $server_version"
mysql> show databases;
+---------------------+
| NOW() |
+---------------------+
| 2008-04-10 17:16:29 |
+---------------------+
1 row in set (0.00 sec)
Any ideas of what is getting wrong?
Edited 1 time(s). Last edit at 04/10/2008 08:34AM by Vangelis Katsikaros.