2006-09-21 13:04:33 +02:00
--echo #
--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
--echo #
2006-07-05 16:58:56 +02:00
--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));
2008-07-07 17:38:47 +02:00
sync_slave_with_master;
connection master;
2006-07-05 21:17:00 +02:00
let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')";
2006-07-08 06:15:24 +02:00
--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";"
2006-07-05 16:58:56 +02:00
2006-07-21 12:39:06 +02:00
# Wait until all the 5000 inserts has been inserted into the table
2007-12-06 18:27:10 +03:00
let $wait_condition= SELECT COUNT(*) = 5000 FROM mysqlslap.t1;
2008-04-01 14:40:23 +02:00
source include/wait_condition.inc;
2006-07-05 16:58:56 +02:00
SELECT COUNT(*) FROM mysqlslap.t1;
2008-04-01 14:40:23 +02:00
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;
2006-07-05 16:58:56 +02:00
SELECT COUNT(*) FROM mysqlslap.t1;
2006-09-21 13:04:33 +02:00
--echo #
--echo # Cleanup
--echo #
2006-07-05 16:58:56 +02:00
connection master;
2006-09-21 13:04:33 +02:00
USE test;
DROP SCHEMA mysqlslap;
2006-07-05 16:58:56 +02:00
sync_slave_with_master;