From 3139be8e5a516ea0fb1598f7b0f32dace75bed1a Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Wed, 9 Dec 2015 19:02:45 +0200 Subject: [PATCH] Fixed SHOW SLAVE STATUS showing obsolete slaves If SHOW SLAVE STATUS was executed after DISCONNECT ALL it was possible that some of the disconnected slaves were used when printing slave hosts. --- server/modules/routing/binlog/blr_slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/binlog/blr_slave.c b/server/modules/routing/binlog/blr_slave.c index ee8f6c2ea..8f27f6425 100644 --- a/server/modules/routing/binlog/blr_slave.c +++ b/server/modules/routing/binlog/blr_slave.c @@ -1577,7 +1577,7 @@ ROUTER_SLAVE *sptr; sptr = router->slaves; while (sptr) { - if (sptr->state != 0) + if (sptr->state == BLRS_DUMPING || sptr->state == BLRS_REGISTERED) { sprintf(server_id, "%d", sptr->serverid); sprintf(host, "%s", sptr->hostname ? sptr->hostname : "");