diff --git a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result index 68e8b22dd02..fddb07c9cbf 100644 --- a/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result +++ b/mysql-test/suite/rpl/r/rpl_mariadb_slave_capability.result @@ -6,6 +6,11 @@ connection slave; include/stop_slave.inc CHANGE MASTER TO MASTER_USE_GTID=NO; include/start_slave.inc +connection master; +# Ensure only the new binlog dump thread is alive (wait for the old one +# to complete its kill) +# And that it has already sent its fake rotate +connection slave; include/stop_slave.inc # Test slave with no capability gets dummy event, which is ignored. set @old_dbug= @@global.debug_dbug; diff --git a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test index 2ad9124d886..ee890a8fd03 100644 --- a/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test +++ b/mysql-test/suite/rpl/t/rpl_mariadb_slave_capability.test @@ -18,6 +18,18 @@ connection slave; CHANGE MASTER TO MASTER_USE_GTID=NO; --source include/start_slave.inc +--connection master +--echo # Ensure only the new binlog dump thread is alive (wait for the old one +--echo # to complete its kill) +--let $wait_condition= select count(*)=1 from information_schema.processlist where command='Binlog Dump' +--source include/wait_condition.inc + +--echo # And that it has already sent its fake rotate +--let $wait_condition= select count(*)=1 from information_schema.processlist where state LIKE '%Master has sent all binlog to slave%' and command='Binlog Dump' +--source include/wait_condition.inc + + +--connection slave --source include/stop_slave.inc --echo # Test slave with no capability gets dummy event, which is ignored. set @old_dbug= @@global.debug_dbug;