From 34ebf981abaa8a0b9e5557a56d17e8daa0273bdf Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 24 May 2013 17:35:30 +0200 Subject: [PATCH] MDEV-4575 MySQL client doesn't strip off 5.5.5- prefix while connecting to 10.x server extend 5.1 client library to read 4 byte capabilities from the first handshake packet. two higher bytes are always zeros for 5.1 servers. --- sql-common/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sql-common/client.c b/sql-common/client.c index a1f3909c023..55c73eb382c 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2221,6 +2221,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, /* New protocol with 16 bytes to describe server characteristics */ mysql->server_language=end[2]; mysql->server_status=uint2korr(end+3); + mysql->server_capabilities|= uint2korr(end+5) << 16; } end+= 18; if (pkt_length >= (uint) (end + SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323 + 1 -