summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2011-05-31 12:16:02 +0200
committerunknown <knielsen@knielsen-hq.org>2011-05-31 12:16:02 +0200
commit8d086ec7597c8c1f26a681bc53eeafa437ef3951 (patch)
treedd928aed48bca801c24e9cfc430bdba1a2e0d7b5
parent0cf912c23f5c5bec885e0a35e2511b5b83327433 (diff)
parent3b724a050500d9582cb740dd58fa9bd38c5af391 (diff)
downloadmariadb-git-8d086ec7597c8c1f26a681bc53eeafa437ef3951.tar.gz
automerge
-rw-r--r--mysql-test/suite/rpl/t/rpl_corruption.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_corruption.test b/mysql-test/suite/rpl/t/rpl_corruption.test
index 3bb5c9f90e3..f43df8c5348 100644
--- a/mysql-test/suite/rpl/t/rpl_corruption.test
+++ b/mysql-test/suite/rpl/t/rpl_corruption.test
@@ -79,6 +79,16 @@ SET GLOBAL debug="-d,corrupt_read_log_event_char";
# Emulate corruption on master with crc checking on master
--echo # 3. Master read a corrupted event from binlog and send the error to slave
+
+# We have a rare but nasty potential race here: if the dump thread on
+# the master for the _old_ slave connection has not yet discovered
+# that the slave has disconnected, we will inject the corrupt event on
+# the wrong connection, and the test will fail
+# (+d,corrupt_read_log_event2 corrupts only one event).
+let $wait_condition=
+ SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE command = 'Binlog Dump';
+--source include/wait_condition.inc
+
SET GLOBAL debug="+d,corrupt_read_log_event2";
--connection slave
START SLAVE IO_THREAD;