Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Copy server version string if it hasn't been updated yet
The server version string could be NULL if it hasn't been initialized
yet.
  • Loading branch information
markus456 committed Apr 28, 2016
1 parent 82c3e8b commit b26592c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/core/dbusers.c
Expand Up @@ -2673,6 +2673,12 @@ bool check_service_permissions(SERVICE* service)
return my_errno != ER_ACCESS_DENIED_ERROR;
}

if (server->server->server_string == NULL)
{
const char *server_string = mysql_get_server_info(mysql);
server_set_version_string(server->server, server_string);
}

char query[MAX_QUERY_STR_LEN];
const char* query_pw = strstr(server->server->server_string, "5.7.") ?
MYSQL57_PASSWORD : MYSQL_PASSWORD;
Expand Down

0 comments on commit b26592c

Please sign in to comment.