From 05a33978e4a3c6ddda584ed6b5e5e40bd11d62b6 Mon Sep 17 00:00:00 2001 From: Sven Sandberg Date: Mon, 30 Jun 2008 13:06:41 +0200 Subject: [PATCH] BUG#37200: rpl_switch_stm_row_mixed fails sporadically in pushbuild Problem: rpl_switch_stm_row_mixed did not wait until row events generated by INSERT DELAYED were written to the master binlog before it synchronized slave with master. This caused sporadic errors where these rows were missing on slave. Fix: wait until all rows appear on the slave. This is a backport, applying the same to 5.1-bugteam as was previously applied to 6.0-rpl --- mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test index 8e6a04104bd..548dd0f1d62 100644 --- a/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test +++ b/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test @@ -293,8 +293,16 @@ insert delayed into t2 values(rand()); set @a=2.345; insert delayed into t2 values(@a); +# With INSERT DELAYED, rows are written to the binlog after they are +# written to the table. Therefore, it is not enough to wait until the +# rows make it to t2 on the master (the rows may not be in the binlog +# at that time, and may still not be in the binlog when +# sync_slave_with_master is later called). Instead, we wait until the +# rows make it to t2 on the slave. +connection slave; let $wait_condition= SELECT COUNT(*) = 19 FROM t2; --source include/wait_condition.inc +connection master; # If you want to do manual testing of the mixed mode regarding UDFs (not # testable automatically as quite platform- and compiler-dependent),