From 1ecd791887994209eb29e56e1271f8c407cd0cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 21 Feb 2018 09:35:42 +0200 Subject: [PATCH] MXS-1678: Store master_id even when IO thread is stopped When the IO thread of a relay master is stopped, the knowledge that it is not a real master but a relay master is lost. To prevent this loss of information, the master server's server_id value should always be stored if it is available. --- server/modules/monitor/mysqlmon/mysql_mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/monitor/mysqlmon/mysql_mon.c b/server/modules/monitor/mysqlmon/mysql_mon.c index 14226c14b..c8bb5bd22 100644 --- a/server/modules/monitor/mysqlmon/mysql_mon.c +++ b/server/modules/monitor/mysqlmon/mysql_mon.c @@ -457,7 +457,7 @@ static inline void monitor_mysql_db(MXS_MONITOR_SERVERS* database, MYSQL_SERVER_ * root master server. * Please note, there could be no slaves at all if Slave_SQL_Running == 'No' */ - if (serv_info->slave_io && server_version != MYSQL_SERVER_VERSION_51) + if (server_version != MYSQL_SERVER_VERSION_51) { /* Get Master_Server_Id */ master_id = atol(row[i_master_id]);