summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/rpl/t/rpl_mdev359.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/rpl/t/rpl_mdev359.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/rpl/t/rpl_mdev359.test')
-rw-r--r--mysql-test/suite/rpl/t/rpl_mdev359.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/t/rpl_mdev359.test b/mysql-test/suite/rpl/t/rpl_mdev359.test
new file mode 100644
index 00000000..5b02ecd7
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_mdev359.test
@@ -0,0 +1,31 @@
+--source include/not_embedded.inc
+--source include/have_debug_sync.inc
+--source include/have_binlog_format_mixed_or_statement.inc
+--source include/master-slave.inc
+
+# MDEV-359: There was a server crash when the code first checks if semisync
+# is enabled without lock, then if so takes the lock and tests again.
+# If semisync was disabled in-between the first and the second test, an
+# assert was incorrectly made that referenced a NULL pointer.
+#
+# This tests uses debug_sync to pause one thread at the critical point in
+# the code, disable the semisync, and then continue the paused thread.
+
+CREATE TABLE t1 (a INT) ENGINE=MyISAM;
+SET GLOBAL rpl_semi_sync_master_enabled = ON;
+--connection master1
+SET DEBUG_SYNC = "rpl_semisync_master_commit_trx_before_lock SIGNAL m1_ready WAIT_FOR m1_cont";
+--send
+INSERT INTO t1 SELECT * FROM t1;
+--connection master
+SET DEBUG_SYNC= "now WAIT_FOR m1_ready";
+SET GLOBAL rpl_semi_sync_master_enabled = OFF;
+SET DEBUG_SYNC= "now SIGNAL m1_cont";
+--connection master1
+--reap
+
+connection master;
+DROP TABLE t1;
+SET DEBUG_SYNC= "RESET";
+
+--source include/rpl_end.inc