Added libmysqld support to mysql_mon.c, removed comment from router.c

This commit is contained in:
vraatikka
2013-07-09 14:24:00 +03:00
parent 6f8c595871
commit 443e709227
2 changed files with 15 additions and 6 deletions

View File

@ -20,6 +20,9 @@
#include <monitor.h>
#include <mysqlmon.h>
#include <thread.h>
#include <mysql.h>
#include <skygw_utils.h>
#include <log_manager.h>
static void monitorMain(void *);
@ -207,12 +210,21 @@ monitorMain(void *arg)
MYSQL_MONITOR *handle = (MYSQL_MONITOR *)arg;
MONITOR_SERVERS *ptr;
if (mysql_thread_init()) {
skygw_log_write_flush(NULL,
LOGFILE_ERROR,
"Fatal : mysql_init_thread failed in monitor "
"module. Exiting.\n");
return ;
}
while (1)
{
thread_millisleep(1000);
if (handle->shutdown)
if (handle->shutdown) {
mysql_thread_done();
return;
}
ptr = handle->databases;
while (ptr)
{

View File

@ -49,9 +49,6 @@ static void vilhos_test_for_query_classifier(void)
bool failp;
MYSQL* mysql = NULL;
/**
* Init libmysqld.
*/
ss_dassert(mysql_thread_safe());
mysql_thread_init();