Commit 34ebf981 authored by Sergei Golubchik's avatar Sergei Golubchik

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.
parent 3b3f8709
......@@ -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 -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment