summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_insert.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/rpl/t/rpl_insert.test
parentInitial commit. (diff)
downloadmariadb-10.5-upstream.tar.xz
mariadb-10.5-upstream.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_insert.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_insert.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_insert.test b/mysql-test/suite/rpl/t/rpl_insert.test
new file mode 100644
index 00000000..48814508
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_insert.test
@@ -0,0 +1,45 @@
+--echo #
+--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
+--echo #
+
+--source include/not_embedded.inc
+--source include/not_windows.inc
+--source include/master-slave.inc
+
+disable_query_log;
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+enable_query_log;
+
+--disable_warnings
+CREATE SCHEMA IF NOT EXISTS mysqlslap;
+USE mysqlslap;
+--enable_warnings
+
+CREATE TABLE t1 (id INT, name VARCHAR(64)) ENGINE=MyISAM;
+
+sync_slave_with_master;
+connection master;
+
+let $query = "INSERT DELAYED INTO t1 VALUES (1, 'Dr. No'), (2, 'From Russia With Love'), (3, 'Goldfinger'), (4, 'Thunderball'), (5, 'You Only Live Twice')";
+--exec $MYSQL_SLAP --silent --concurrency=5 --iterations=200 --query=$query --delimiter=";"
+
+# 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;
+SELECT COUNT(*) FROM mysqlslap.t1;
+
+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;
+SELECT COUNT(*) FROM mysqlslap.t1;
+
+--echo #
+--echo # Cleanup
+--echo #
+
+connection master;
+USE test;
+DROP SCHEMA mysqlslap;
+sync_slave_with_master;
+--source include/rpl_end.inc