]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUG] checks: fix support of Mysqld >= 5.5 for mysql-check
authorHervé COMMOWICK <hcommowick@exosec.net>
Fri, 10 Jun 2011 12:05:59 +0000 (14:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 17 Jun 2011 09:18:52 +0000 (11:18 +0200)
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
src/cfgparse.c

index b22ac989350f80c7556229d67742d380e55e5fdb..dde0c5411c67adb0825319dd8b5396f70a088bc1 100644 (file)
@@ -3583,7 +3583,7 @@ option mysql-check [ user <username> ]
   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.
index 7a572fbdf1362d557ec80d8365e6815b37eb44c0..2a085944407063fab110de0b0dece11fd6c456ca 100644 (file)
@@ -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;