updated documentation?

Asked by Matthew

This page seems out of date:
http://dev.mysql.com/doc/refman/5.0/en/mysql-proxy-scripting-structures.html

It lists just a few internal members of proxy.global.backends but reading ro-pooling.lua, there are clearly many more.

Such as proxy.global.backends[i].pool
and then pool.users[]

etc.

I'm trying to find out the state of a connection, (ie. if it is COM_SLEEP or whatever)

Question information

Language:
English Edit question
Status:
Answered
For:
MySQL Proxy Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Kay Roepke (kay-roepke) said :
#1

The documentation team is aware of this, but I'm not sure when the changes will be made.

It sounds lame, but currently the best way to find out which fields are exposed is the source code:
That's actually not as bad as it sounds. The Lua interfaces are in files name <something>-lua.c where <something>
is 'network-backends' for example.
To pick the proxy.global.backends structure as an example:

The annotated source file for network-backend-lua.c is at http://bazaar.launchpad.net/%7Emysql-proxy-developers/mysql-proxy/trunk/annotate/head%3A/src/network-backend-lua.c
Very close to the top of the file, there's the function proxy_backend_get, that handles the access to the Lua 'table' proxy.global.backends[i].
You can easily see which structures are accessible from there.

The common naming scheme for various structures in MySQL Proxy is network-'something'.c for the actual low-level implementation and network-'something'-lua.c for the Lua interface code.

I realize it's inconvenient to look at code rather than documentation, but given the pace we still change interfaces we cannot expect the documentation team to pick up as quickly (given their other responsibilities).
This will naturally change with a GA release.

Can you help with this problem?

Provide an answer of your own, or ask Matthew for more information if necessary.

To post a message you must log in.