MXS-1249: Take mxs_mysql_set_server_version into use

The function should actually be in include/maxscale/protocol/mysql.h
and the implementation in MySQLCommon, but the monitors do not link
to that yet.

All MySQL related should be moved to MySQLCommon and the core
refactored so that no MySQL knowledge is needed there.
This commit is contained in:
Johan Wikman
2017-06-16 14:14:29 +03:00
parent d927f1d3c6
commit c94d9c76fb
4 changed files with 14 additions and 50 deletions

View File

@ -524,8 +524,7 @@ static bool check_server_permissions(SERVICE *service, SERVER* server,
if (server->version_string[0] == 0)
{
const char *version_string = mysql_get_server_info(mysql);
server_set_version_string(server, version_string);
mxs_mysql_set_server_version(mysql, server);
}
const char *template = "SELECT user, host, %s, Select_priv FROM mysql.user limit 1";
@ -730,8 +729,7 @@ int get_users_from_server(MYSQL *con, SERVER_REF *server_ref, SERVICE *service,
{
if (server_ref->server->version_string[0] == 0)
{
const char *version_string = mysql_get_server_info(con);
server_set_version_string(server_ref->server, version_string);
mxs_mysql_set_server_version(con, server_ref->server);
}
char *query = get_new_users_query(server_ref->server->version_string, service->enable_root);