rpl_insert.test 1.08 KB
Newer Older
1 2 3
--echo #
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo #
4 5 6 7 8 9 10 11 12 13 14 15

--source include/master-slave.inc
--source include/not_embedded.inc
--source include/not_windows.inc

--disable_warnings
CREATE SCHEMA IF NOT EXISTS mysqlslap;
USE mysqlslap;
--enable_warnings

CREATE TABLE t1 (id INT, name VARCHAR(64));

16
let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')";
17
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";"
18

19
# Wait until all the 5000 inserts has been inserted into the table
20
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
21
source include/wait_condition.inc;
22
SELECT COUNT(*) FROM mysqlslap.t1;
23 24 25 26 27

connection slave;
# Wait until all the 5000 inserts has been inserted into the table
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
source include/wait_condition.inc;
28 29
SELECT COUNT(*) FROM mysqlslap.t1;

30 31 32 33
--echo #
--echo # Cleanup
--echo #

34
connection master;
35 36
USE test;
DROP SCHEMA mysqlslap;
37
sync_slave_with_master;