# # MDEV-27025 insert-intention lock conflicts with waiting ORDINARY lock # CREATE TABLE t (a INT PRIMARY KEY, b INT NOT NULL UNIQUE) ENGINE=InnoDB; connect prevent_purge,localhost,root,,; start transaction with consistent snapshot; connection default; INSERT INTO t VALUES (20,20); DELETE FROM t WHERE b = 20; connect con_ins,localhost,root,,; SET DEBUG_SYNC = 'row_ins_sec_index_entry_dup_locks_created SIGNAL ins_set_locks WAIT_FOR ins_cont'; INSERT INTO t VALUES(10, 20); connect con_del,localhost,root,,; SET DEBUG_SYNC = 'now WAIT_FOR ins_set_locks'; SET DEBUG_SYNC = 'lock_wait_suspend_thread_enter SIGNAL del_locked'; DELETE FROM t WHERE b = 20; connection default; SET DEBUG_SYNC = 'now WAIT_FOR del_locked'; SET DEBUG_SYNC = 'now SIGNAL ins_cont'; connection con_ins; disconnect con_ins; connection con_del; disconnect con_del; disconnect prevent_purge; connection default; SET DEBUG_SYNC = 'RESET'; DROP TABLE t;