I play with scripts for mysql-proxy. What I'm trying to do does not matter. However, I found that the lua interface elements seemed to be undocumented. Big "smoking gun" I have a disconnect_client() hook. I can not find it documented in the official documentation , although it was used in the example to explain the admin interface . It is also widely used in sample documents. Quick grep shows its use in the following scripts included in the 5.5.8 distribution:
active-queries.lua
active transactions.lua
multi.lua loads
ro-pooling.lua
RW-splitting.lua
tutorial-keepalive.lua
Another example, in my opinion, is a list of attributes for entries in the proxy.global.backends table. The documentation lists the following attributes:
dst.name dst.address dst.port connected_clients state type
However, several sample scripts refer to a rather complex element called a pool. Take tutorial-keepalive.lua for example:
local s = proxy.global.backends[i] local pool = s.pool local cur_idle = pool.users[proxy.connection.client.username].cur_idle_connections
At first I thought it was being added somewhere else in lua, but I looked and I could not find the code assigned in proxy.global.backends [i] .pool.
So, the two questions I assume are:
- Am I nuts? Please feel free to demonstrate how I overlooked the obvious and the documentation is really clear.
- Assuming I'm right, is there any place to find the full documentation? A good link would be great (although I could not do google alone), but even “take a look at this .c file from the mysql-proxy distribution that defines the interface”. At least this will give me something to poke.
thanks
mysql-proxy
jj33
source share