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
parent 80df75757c
commit 64fe629252

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