From 567fbce735dfe5b842f9c130227354702ce30914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 15 Jun 2017 11:00:57 +0300 Subject: [PATCH] MXS-1287: Assign Slave status for all external slaves Whenever a server which is a slave of an external master is detected, it will be assigned the slave status. This will allow the status to be used the way it was intended to be used. --- server/modules/monitor/mysqlmon/mysql_mon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/monitor/mysqlmon/mysql_mon.c b/server/modules/monitor/mysqlmon/mysql_mon.c index 664706d9c..fb15f9b59 100644 --- a/server/modules/monitor/mysqlmon/mysql_mon.c +++ b/server/modules/monitor/mysqlmon/mysql_mon.c @@ -592,7 +592,7 @@ static MXS_MONITOR_SERVERS *build_mysql51_replication_tree(MXS_MONITOR *mon) (database->server->master_id <= 0 || database->server->master_id != handle->master->server->node_id)) { - monitor_clear_pending_status(database, SERVER_SLAVE); + monitor_set_pending_status(database, SERVER_SLAVE); monitor_set_pending_status(database, SERVER_SLAVE_OF_EXTERNAL_MASTER); } database = database->next; @@ -1804,7 +1804,7 @@ static MXS_MONITOR_SERVERS *get_replication_tree(MXS_MONITOR *mon, int num_serve /* this server is slave of another server not in MaxScale configuration * we cannot use it as a real slave. */ - monitor_clear_pending_status(ptr, SERVER_SLAVE); + monitor_set_pending_status(ptr, SERVER_SLAVE); monitor_set_pending_status(ptr, SERVER_SLAVE_OF_EXTERNAL_MASTER); } }