Functionality added or changed:
Support for using a configuration file, in addition to the command-line options, has been added. To specify such a file, use the
--defaults-file=
command-line option. See Section 14.6.3, “MySQL Proxy Command Options”. (Bug#30206)file_name
A number of the internal structures developed for use with Lua scripts that work with MySQL Proxy have been updated and harmonized to make their meaning and contents easier to use and consistent across multiple locations.
The address information has been updated. Instead of a combined
ip:port
structure that you had to parse to extract the individual informaiton, you can now access that information directly. For example, instead of structures providing a single.address
item, you now have these items:name
(the combinedip:port
),address
(the IP address), andport
(port number). In addition, all addresses now supply both thesrc
(source) anddst
(destination) socket information for both ends of connections.Some familiar strucgtures have been updated to acommodate this information:
proxy.connection.client.address
isproxy.connection.client.src.name
proxy.connection.server.address
isproxy.connection.server.dst.name
proxy.backends
is now inproxy.global.backends
The.address
field of each backend is an address-object as described earlier. For example,proxy.backends[1].address
isproxy.global.backends[1].dst.name
.The
read_auth()
andread_handshake()
functions no longer receive anauth
parameter. Instead, all the data is available in the connection tables.In
read_handshake()
, you access the information through the globalproxy.connction
table:0.6 0.7 auth.thread_id
proxy.connection.server.thread_id
auth.mysqld_version
proxy.connection.server.mysqld_version
auth.server_addr
proxy.connection.server.dst.name
auth.client_addr
proxy.connection.client.src.name
auth.scramble
proxy.connection.server.scramble_buffer
In
read_auth()
, you can use the following:0.6 0.7 auth.username
proxy.connection.client.username
auth.password
proxy.connection.client.scrambled_password
auth.default_db
proxy.connection.client.default_db
auth.server_addr
proxy.connection.server.dst.name
auth.client_addr
proxy.connection.client.src.name
In the
proxy.queries:append()
function, a third parameter is an (optional) table with options specific to the this packet. Specifically, if you want to have access to the result set in theread_query_result()
hook, you must set theresultset_is_needed
flag:proxy.queries:append( 1, ..., { resultset_is_needed = true } )
For more information, see proxy.queries.
proxy.backends
is now inproxy.global.backends
.
Bugs fixed:
Security Enhancement: Accessing MySQL Proxy using a client or backend from earlier than MySQL 4.1 resulted in Proxy aborting with an assertion. This is because Proxy supports only MySQL 4.1 or higher. Proxy now reports a fault. (Bug#31419)
MySQL Proxy was configured with the
LUA_PATH
andLUA_CPATH
directory locations according to the build host rather than the execution host. In addition, during installation, certain Lua source files could be installed into the incorrect locations. (Bug#44877, Bug#44497)Using MySQL Proxy with very large return data sets from queries could cause a crash, with or without manipulation of the data set within the Lua engine. (Bug#39332)
MySQL Proxy terminated if a submitted packet was smaller than expected by the protocol. (Bug#36743)
When using MySQL Proxy in a master-master replication scenario, Proxy failed to identify failure in one of the replication masters and did not redirect connections to the other master. (Bug#35295)