summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2009-09-13 21:52:14 +0100
committerLuis Soares <luis.soares@sun.com>2009-09-13 21:52:14 +0100
commit3c916057ad772fe613c294fb654f9a70b65b1b5a (patch)
tree98c6df4eab2a4df1402b04e8c60a647e80171e97
parent23dc8abe2b5b25ddac3dc9f7381a1ce1fa5616ea (diff)
downloadmariadb-git-3c916057ad772fe613c294fb654f9a70b65b1b5a.tar.gz
BUG#47014: rpl_drop_temp fails on PB-2 with results mismatch
The test case creates two temporary tables, then closes the connection, waits for it to disconnect, then syncs the slave with the master, checks for remaining opened temporary tables on slave (which should be 0) and finally drops the used database (mysqltest). Unfortunately, sometimes, the test fails with one open table on the slave. This seems to be caused by the fact that waiting for the connection to be closed is not sufficient. The test needs to wait for the DROP event to be logged and only then synchronize the slave with the master and proceed with the check. This is caused by the asynchronous nature of the disconnect wrt binlogging of the DROP temporary table statement. We fix this by deploying a call to wait_for_binlog_event.inc on the test case, which makes execution to wait for the DROP temp tables event before synchronizing master and slave.
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_temp.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test
index df162d3b244..7827e16e45f 100644
--- a/mysql-test/suite/rpl/t/rpl_drop_temp.test
+++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test
@@ -23,6 +23,8 @@ disconnect con_temp;
--source include/wait_until_disconnected.inc
connection master;
+-- let $wait_binlog_event= DROP
+-- source include/wait_for_binlog_event.inc
sync_slave_with_master;
connection slave;