summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-11 19:35:39 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-11 19:35:39 +0200
commitea4a417a8d456e8e09b6b4306f22c7c20b3e594c (patch)
tree01f9700b021029f4d6b878a3a0feab7ab8b8a458 /sql-common
parent5d9e50fc950502698d3beb95577bc5fe441b38b7 (diff)
parent61ed0ebe7388d8302f2de7144de41da32bf085ba (diff)
downloadmariadb-git-ea4a417a8d456e8e09b6b4306f22c7c20b3e594c.tar.gz
5.2 merge
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index e18af7d85b4..6cd6e25ee15 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2947,6 +2947,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;
+
if (pkt_end >= end + SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323 + 1)
{
/*