| 1 |
CREATE TABLE t (a int PRIMARY KEY, b int NOT NULL UNIQUE) engine = InnoDB, STATS_PERSISTENT=0; |
| 2 |
InnoDB 0 transactions not purged |
| 3 |
connect prevent_purge,localhost,root,,; |
| 4 |
start transaction with consistent snapshot; |
| 5 |
connect con_del_1,localhost,root,,; |
| 6 |
INSERT INTO t VALUES (20,20); |
| 7 |
SET DEBUG_SYNC = 'innodb_row_search_for_mysql_exit SIGNAL first_del_row_search_mvcc_finished WAIT_FOR first_del_cont'; |
| 8 |
DELETE FROM t WHERE b = 20 # trx_1; |
| 9 |
connect con_ins_1,localhost,root,,; |
| 10 |
SET DEBUG_SYNC = 'now WAIT_FOR first_del_row_search_mvcc_finished'; |
| 11 |
SET DEBUG_SYNC = 'lock_wait_start SIGNAL first_ins_locked'; |
| 12 |
SET DEBUG_SYNC = 'ib_after_row_insert SIGNAL first_ins_row_inserted WAIT_FOR first_ins_cont'; |
| 13 |
INSERT INTO t VALUES(10, 20) # trx_2; |
| 14 |
connect con_del_2,localhost,root,,; |
| 15 |
SET TRANSACTION ISOLATION LEVEL READ COMMITTED; |
| 16 |
SET DEBUG_SYNC = 'now WAIT_FOR first_ins_locked'; |
| 17 |
SET DEBUG_SYNC = 'lock_wait_start SIGNAL second_del_locked'; |
| 18 |
DELETE FROM t WHERE b = 20 # trx_3; |
| 19 |
connection default; |
| 20 |
SET DEBUG_SYNC = 'now WAIT_FOR second_del_locked'; |
| 21 |
SET @saved_dbug = @@GLOBAL.debug_dbug; |
| 22 |
SET @@GLOBAL.debug_dbug="d,enable_row_purge_del_mark_exit_sync_point"; |
| 23 |
SET DEBUG_SYNC = 'now SIGNAL first_del_cont'; |
| 24 |
SET DEBUG_SYNC = 'now WAIT_FOR first_ins_row_inserted'; |
| 25 |
connection con_del_1; |
| 26 |
connection default; |
| 27 |
disconnect prevent_purge; |
| 28 |
SET DEBUG_SYNC = 'now WAIT_FOR row_purge_del_mark_finished'; |
| 29 |
SET @@GLOBAL.debug_dbug = @saved_dbug; |
| 30 |
SET DEBUG_SYNC = 'now SIGNAL first_ins_cont'; |
| 31 |
connection con_del_2; |
| 32 |
connection con_ins_1; |
| 33 |
connection default; |
| 34 |
INSERT INTO t VALUES(30, 20); |
| 35 |
disconnect con_ins_1; |
| 36 |
disconnect con_del_1; |
| 37 |
disconnect con_del_2; |
| 38 |
connection default; |
| 39 |
SET DEBUG_SYNC = 'RESET'; |
| 40 |
DROP TABLE t; |