Slave status removed of 1 server only
Slave status removed of 1 server only
This commit is contained in:
@ -44,6 +44,8 @@
|
|||||||
* This means both IO and SQL threads are not working on slaves.
|
* This means both IO and SQL threads are not working on slaves.
|
||||||
* This option is not enabled by default.
|
* This option is not enabled by default.
|
||||||
* 10/11/14 Massimiliano Pinto Addition of setNetworkTimeout for connect, read, write
|
* 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
|
* @endverbatim
|
||||||
*/
|
*/
|
||||||
@ -696,7 +698,12 @@ size_t nrounds = 0;
|
|||||||
if (num_servers == 1) {
|
if (num_servers == 1) {
|
||||||
if (SERVER_IS_RUNNING(ptr->server)) {
|
if (SERVER_IS_RUNNING(ptr->server)) {
|
||||||
ptr->server->depth = 0;
|
ptr->server->depth = 0;
|
||||||
|
/* status cleanup */
|
||||||
|
monitor_clear_pending_status(ptr, SERVER_SLAVE);
|
||||||
|
|
||||||
|
/* master status set */
|
||||||
monitor_set_pending_status(ptr, SERVER_MASTER);
|
monitor_set_pending_status(ptr, SERVER_MASTER);
|
||||||
|
|
||||||
ptr->server->depth = 0;
|
ptr->server->depth = 0;
|
||||||
handle->master = ptr;
|
handle->master = ptr;
|
||||||
root_master = ptr;
|
root_master = ptr;
|
||||||
|
Reference in New Issue
Block a user