diff --git a/server/modules/monitor/mysql_mon.c b/server/modules/monitor/mysql_mon.c index 3b5672740..171a0d8df 100644 --- a/server/modules/monitor/mysql_mon.c +++ b/server/modules/monitor/mysql_mon.c @@ -44,6 +44,8 @@ * This means both IO and SQL threads are not working on slaves. * This option is not enabled by default. * 10/11/14 Massimiliano Pinto Addition of setNetworkTimeout for connect, read, write + * 18/11/14 Massimiliano Pinto One server only in configuration becomes master. + * servers=server1 must be present in mysql_mon and in router sections as well. * * @endverbatim */ @@ -696,7 +698,12 @@ size_t nrounds = 0; if (num_servers == 1) { if (SERVER_IS_RUNNING(ptr->server)) { ptr->server->depth = 0; + /* status cleanup */ + monitor_clear_pending_status(ptr, SERVER_SLAVE); + + /* master status set */ monitor_set_pending_status(ptr, SERVER_MASTER); + ptr->server->depth = 0; handle->master = ptr; root_master = ptr;