diff options
Diffstat (limited to 'sql-common')
-rw-r--r-- | sql-common/client.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |