Slave status removed of 1 server only

Slave status removed of 1 server only
This commit is contained in:
MassimilianoPinto
2014-11-18 13:07:49 +01:00
parent e2fd2c422e
commit 91f65072a2

View File

@ -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;