[MINOR] add better support to "mysql-check"
authorHervé COMMOWICK <vr@exosec.fr>
Mon, 18 Oct 2010 13:58:36 +0000 (15:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 30 Oct 2010 17:04:35 +0000 (19:04 +0200)
commit8776f1b3a0260c7b4a5970bf0fbaf4c94f710f7d
treea6e27249c145470d1f650f1625a98669ee67b89a
parentaa2f389cbb6f4dc5af038ef77335415c6141d2fc
[MINOR] add better support to "mysql-check"

The MySQL check has been revamped to be able to send real MySQL data,
and to avoid Aborted connects on MySQL side.
It is however backward compatible with older version, but it is highly
recommended to use the new mode, by adding "user <username>" on the
"mysql-check" line.

The new check consists in sending two MySQL packet, one Client
Authentication packet, with "haproxy" username (by default), and one
QUIT packet, to correctly close MySQL session. We then parse the Mysql
Handshake Initialisation packet and/or Error packet. It is a basic but
useful test which does not produce error nor aborted connect on the
server.
(cherry picked from commit a1e4dcfe5718311b7653d7dabfad65c005d0439b)
doc/configuration.txt
src/cfgparse.c
src/checks.c
tests/test-sql.cfg