Fix to MXS-288: https://mariadb.atlassian.net/browse/MXS-288 Added MySQL 5.7 authentication

The change to the mysql.user table in MySQL 5.7 caused MaxScale to stop
working with it. This commit adds functionality that checks which version of
the user data query should be made. It also moves common code related to
server version strings to server.c
This commit is contained in:
Markus Makela
2015-11-12 11:57:29 +02:00
parent bdfd72404b
commit 5efd564573
7 changed files with 120 additions and 39 deletions

View File

@ -643,10 +643,9 @@ monitorDatabase(MONITOR *mon, MONITOR_SERVERS *database)
/* get server version string */
server_string = (char *)mysql_get_server_info(database->con);
if (server_string) {
database->server->server_string = realloc(database->server->server_string, strlen(server_string)+1);
if (database->server->server_string)
strcpy(database->server->server_string, server_string);
if (server_string)
{
server_set_version_string(database->server, server_string);
}
/* get server_id form current node */