From 212f778d6a7ffe270cdeaed7fc9a29891c4962cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=E9=20COMMOWICK?= Date: Fri, 10 Jun 2011 14:05:59 +0200 Subject: [PATCH] [BUG] checks: fix support of Mysqld >= 5.5 for mysql-check mysqld >= 5.5 want the client to announce 4.1+ authentication support, even if we have no password, so we do this. I also check on a debian potato mysqld 3.22 and it works too so i assume we are good from 3.22 to 5.5. [WT: this must be backported to 1.4] --- doc/configuration.txt | 2 +- src/cfgparse.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/configuration.txt b/doc/configuration.txt index b22ac9893..dde0c5411 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -3583,7 +3583,7 @@ option mysql-check [ user ] Remember that this does not check database presence nor database consistency. To do this, you can use an external check with xinetd for example. - The check requires MySQL >=4.0, for older version, please use TCP check. + The check requires MySQL >=3.22, for older version, please use TCP check. Most often, an incoming MySQL server needs to see the client's IP address for various purposes, including IP privilege matching and connection logging. diff --git a/src/cfgparse.c b/src/cfgparse.c index 7a572fbdf..2a0859444 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -3476,6 +3476,7 @@ stats_error_parsing: ((unsigned char) (packetlen >> 16) & 0xff)); curproxy->check_req[3] = 1; + curproxy->check_req[5] = 128; curproxy->check_req[8] = 1; memcpy(&curproxy->check_req[9], mysqluser, userlen); curproxy->check_req[9 + userlen + 1 + 1] = 1;