Functionality added or changed:
Support for using a configuration file, in addition to the
command-line options, has been added. You can specify the file
to use by using the --defaults-file
command
line option. See Section 14.6.3, “MySQL Proxy Configuration Options”.
(Bug#30206)
A number of the internal structures used during developing Lua scripts for work with MySQL proxy have been updated and harmonised to make their meaning and contents easier to use and consistent across multiple locations.
The address information has been updated so that 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 item
.address
, you now have items,
name
(the combined
ip:port
) and address
(the IP address) and port
(port number).
In addition, all addresses now supply both the
src
(source) and dst
(destination) socket information for both ends of the
connections.
Some familiar strucgtures have been updated to acommodate this information:
proxy.connection.client.address
is
proxy.connection.client.src.name
proxy.connection.server.address
is
proxy.connection.server.dst.name
proxy.backends
is now in
proxy.global.backends
The
.address
field of each backend is a
address-object as described above. For example,
proxy.backends[1].address
is
proxy.global.backends[1].dst.name
.
The read_auth()
and
read_handshake()
functions no longer
receive an auth
parameter. Instead, all
the data is available in the connection tables.
In read_handshake() you access the informaiton through the
global proxy.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 function proxy.queries:append()
a 3rd parameter is an (optional) table with options specific
to the this packet. Specifically, if you want to have access
to the resultset in the
read_query_result()
hook, you have to
set the resultset_is_needed
flag:
proxy.queries:append( 1, ..., { resultset_is_needed = true } )
For more information, see proxy.queries.
proxy.backends
is now in
proxy.global.backends
.
Bugs fixed:
Security Enhancement: Accessing mysql-proxy using a client or backend with a MySQL protocol less than MySQL 5.0 would result in mysql-proxy aborting with an assertion. This is because mysql-proxy only supports MySQL Protocol 5.0 or higher. The proxy will now report a fault. (Bug#31419)
MySQL Proxy would be configured with the
LUA_PATH
and LUA_CPATH
n
directory locations according to the build, not 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 datasets from queries, with or without manipulate of the dataset within the Lua engine could cause a crash. (Bug#39332)
If a submitted packet was smaller than expected by the protocol, MySQL Proxy would terminate. (Bug#36743)
When using mysql-proxy in a master-master replication scenario, a failure in one of the replication masters would fail to be identified by the proxy and connections would not be redirected to the other master. (Bug#35295)
User Comments
Add your own comment.