diff --git a/mysql-test/suite/rpl/r/rpl_parallel.result b/mysql-test/suite/rpl/r/rpl_parallel.result index e1672872386..a3b423a49c9 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel.result +++ b/mysql-test/suite/rpl/r/rpl_parallel.result @@ -983,7 +983,10 @@ SET GLOBAL slave_parallel_threads=0; SET GLOBAL slave_parallel_threads=10; INSERT INTO t2 VALUES (41); INSERT INTO t2 VALUES (42); +SET @old_format= @@binlog_format; +SET binlog_format= statement; DELETE FROM t2 WHERE a=40; +SET binlog_format= @old_format; INSERT INTO t2 VALUES (43); INSERT INTO t2 VALUES (44); FLUSH LOGS; diff --git a/mysql-test/suite/rpl/t/rpl_parallel.test b/mysql-test/suite/rpl/t/rpl_parallel.test index b1b8792acf6..a56d45848a5 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel.test +++ b/mysql-test/suite/rpl/t/rpl_parallel.test @@ -1560,7 +1560,11 @@ SET GLOBAL slave_parallel_threads=10; # Setup some transaction for the slave to replicate. INSERT INTO t2 VALUES (41); INSERT INTO t2 VALUES (42); +# Need to log the DELETE in statement format, so we can see it in processlist. +SET @old_format= @@binlog_format; +SET binlog_format= statement; DELETE FROM t2 WHERE a=40; +SET binlog_format= @old_format; INSERT INTO t2 VALUES (43); INSERT INTO t2 VALUES (44); # Force the slave to switch to a new relay log file. @@ -1581,6 +1585,11 @@ SELECT * FROM t2 WHERE a=40 FOR UPDATE; --connection server_2 --source include/start_slave.inc +# Wait for a worker thread to start on the DELETE that will be blocked +# temporarily by the SELECT FOR UPDATE. +--let $wait_condition= SELECT count(*) > 0 FROM information_schema.processlist WHERE state='updating' and info LIKE '%DELETE FROM t2 WHERE a=40%' +--source include/wait_condition.inc + # The DBUG injection set above will make the worker thread signal the following # debug_sync when the GTID 0-1-100 has been reached by a worker thread. # Thus, at this point, the SQL driver thread has reached the next