| 1 |
--source include/not_embedded.inc |
| 2 |
--source include/have_debug_sync.inc |
| 3 |
--source include/have_binlog_format_mixed_or_statement.inc |
| 4 |
--source include/master-slave.inc |
| 5 |
|
| 6 |
# MDEV-359: There was a server crash when the code first checks if semisync |
| 7 |
# is enabled without lock, then if so takes the lock and tests again. |
| 8 |
# If semisync was disabled in-between the first and the second test, an |
| 9 |
# assert was incorrectly made that referenced a NULL pointer. |
| 10 |
# |
| 11 |
# This tests uses debug_sync to pause one thread at the critical point in |
| 12 |
# the code, disable the semisync, and then continue the paused thread. |
| 13 |
|
| 14 |
CREATE TABLE t1 (a INT) ENGINE=MyISAM; |
| 15 |
SET GLOBAL rpl_semi_sync_master_enabled = ON; |
| 16 |
--connection master1 |
| 17 |
SET DEBUG_SYNC = "rpl_semisync_master_commit_trx_before_lock SIGNAL m1_ready WAIT_FOR m1_cont"; |
| 18 |
--send |
| 19 |
INSERT INTO t1 SELECT * FROM t1; |
| 20 |
--connection master |
| 21 |
SET DEBUG_SYNC= "now WAIT_FOR m1_ready"; |
| 22 |
SET GLOBAL rpl_semi_sync_master_enabled = OFF; |
| 23 |
SET DEBUG_SYNC= "now SIGNAL m1_cont"; |
| 24 |
--connection master1 |
| 25 |
--reap |
| 26 |
|
| 27 |
connection master; |
| 28 |
DROP TABLE t1; |
| 29 |
SET DEBUG_SYNC= "RESET"; |
| 30 |
|
| 31 |
--source include/rpl_end.inc |