From 87a452f6d5839f9702d41d00137350fe9a38a774 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 4 Apr 2013 11:35:10 +0200 Subject: MDEV-4088 Replication 10.0 -> 5.5 fails update 5.1 to replicate from 10.0 and to show the server version (as of 10.0) correctly sql-common/client.c: mdev:4088 sql/slave.cc: use the version number, not just the first character of the version string (we want 10 > 4 not "10" < "4"). --- sql-common/client.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sql-common/client.c') diff --git a/sql-common/client.c b/sql-common/client.c index 53642b65be7..a1f3909c023 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2264,6 +2264,12 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, strmov(mysql->server_version,(char*) net->read_pos+1); mysql->port=port; + /* remove the rpl hack from the version string, see RPL_VERSION_HACK comment */ + if (mysql->server_capabilities & CLIENT_PLUGIN_AUTH && + strncmp(mysql->server_version, RPL_VERSION_HACK, + sizeof(RPL_VERSION_HACK) - 1) == 0) + mysql->server_version+= sizeof(RPL_VERSION_HACK) - 1; + /* Part 2: format and send client info to the server for access check */ -- cgit v1.2.1