Talk:MySQL Proxy Cookbook
[edit] v0.7.0: Problem recognizing multiple backends
I've compiled v0.7.0 and try to get mysql-proxy/rw-splitting.lua to work.
My problem is that it does not seem to accept more than a single backend. Invoked with "--proxy-lua-script=share/mysql-proxy/rw-splitting.lua --proxy-backend-addresses=db1:3306 --proxy-read-only-backend-addresses=db2:3306 --proxy-read-only-backend-addresses=db3:3306", on the first client connection the LUA function connect_server() only lists one backend, db1.
I have stepped through invocations of network-backend.c:network_backends_add() in gdb and it is in fact invoked three times with the three backends and type BACKEND_TYPE_RW for db1 and BACKEND_TYPE_RO for db2 and db3.
Why are the three backends not put into proxy.global.backends ?