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.
This commit is contained in:
Markus Makela 2015-12-09 19:02:45 +02:00 committed by Johan Wikman
parent 000a044da6
commit 3139be8e5a

View File

@ -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 : "");