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

@ -18,10 +18,11 @@
#define MXS_MODULE_NAME "mysqlmon"
#include "../mysqlmon.h"
#include <maxscale/dcb.h>
#include <maxscale/modutil.h>
#include <maxscale/alloc.h>
#include <maxscale/dcb.h>
#include <maxscale/debug.h>
#include <maxscale/modutil.h>
#include <maxscale/mysql_utils.h>
#define DEFAULT_JOURNAL_MAX_AGE "28800"
@ -726,11 +727,8 @@ monitorDatabase(MXS_MONITOR *mon, MXS_MONITOR_SERVERS *database)
server_version = mysql_get_server_version(database->con);
/* get server version string */
server_string = (char *) mysql_get_server_info(database->con);
if (server_string)
{
server_set_version_string(database->server, server_string);
}
mxs_mysql_set_server_version(database->con, database->server);
server_string = database->server->server_string;
MYSQL_SERVER_INFO *serv_info = hashtable_fetch(handle->server_info, database->server->unique_name);
ss_dassert(serv_info);