The MySQL Proxy was split into

  • a chassis which handles cmdline, service, logging, plugin loading
  • a core library for the life-cycle, network handling and protocol decoding
  • a lua layer wrapping around the internals
  • a set of plugins: proxy, admin, debug, replicant

It also contains a few tools that reuse the above libraries:

  • mysql-binlog-dump
  • mysql-myisam-dump

We dropped libcheck in favour of glib 2.16's g_test_* functions.

Changelog:

Chassis

  • added support for SIGHUP to reopen logfiles
  • added win32-service support
  • added --basedir
  • added experimental --log-backtrace-on-crash
  • added DTrace probes
  • added a angel to keep the chasses alive
  • added --user option to change the system user the proxy runs as
  • added config-file support that maps cmdline options to configfile options

Core

  • fixed handling of RBR for long multi-byte CHAR() fields (#37426)
  • fixed assertions when COM_TIME, COM_PROCESS_INFO or COM_DEBUG are received
  • replaced assertions in protocol decoders by proper error-codes
  • added handling of the 4.0 auth packets
  • added parser for master.info files
  • added a writev() network backend

Lua Layer

  • expose chassis_log_* functions to lua
  • added the posix and lpeg module from luaforge
  • use the LPEG lua-module to parse statements
  • added memory profiling
  • added { resultset_is_needed = false } as default
  • moved proxy.backends.* to proxy.global.backends.*
  • added a lua-wrapper around some glib-2.0 functions
  • added a script cache
  • removed explicit call to lua_gc() to improve the speed

Proxy Plugin

  • track rows and bytes of a resultset
  • fixed quoting of SQL commands like COMMIT and ROLLBACK
  • added test-cases for connection-pooling, fail-over, ...
  • refactored the SQL tokenizer into a lua module
  • fixed handling -- comments in the SQL tokenizer
  • fixed backend state cache

Admin Plugin

  • replaced the hardcoded admin commands by a lua script interface
  • added authentication support

Debug Plugin

  • return "number" as DOUBLE or INTs

MySQL Binlog Dump

  • added a library and cmdline interface to dump binlogs incl. MySQL 5.1 RBR

MyISAM Dump

  • added mysql-myisam-dump to dump the content of a .FRM files and .MYD files

4 Responses to “MySQL Proxy: from 0.6.1 to 0.7.0”

  1. Paul Annesley Says:
    Congratulations on the great MySQL Proxy work, Jan. It's often a great tool to have handy. Cheers, Paul
  2. Olav Schettler Says:
    Jan, 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 ?
  3. Claudio Nanni Says:
    Hi Jan, great job, would you recommend the use of MySQL proxy with high load (hundreds of thousands statements per second) production servers? is it multithreaded ? thanks Claudio
  4. Rob Says:
    I am waiting for 0.7.0 for a long time now, when will it e released for community??

Sorry, comments are closed for this article.