| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/count_sessions.inc |
| 3 |
--source include/have_debug.inc |
| 4 |
--source include/have_debug_sync.inc |
| 5 |
|
| 6 |
--disable_query_log |
| 7 |
call mtr.add_suppression("InnoDB: Transaction was aborted due to "); |
| 8 |
--enable_query_log |
| 9 |
|
| 10 |
CREATE TABLE t(a INT PRIMARY KEY) ENGINE=InnoDB; |
| 11 |
INSERT INTO t VALUES (3); |
| 12 |
|
| 13 |
BEGIN; |
| 14 |
UPDATE t SET a = 2; |
| 15 |
|
| 16 |
connect con1,localhost,root; |
| 17 |
SET DEBUG_SYNC="lock_wait_start SIGNAL del_locked"; |
| 18 |
send DELETE FROM t; |
| 19 |
|
| 20 |
connection default; |
| 21 |
SET DEBUG_SYNC="now WAIT_FOR del_locked"; |
| 22 |
UPDATE t SET a = 1; |
| 23 |
COMMIT; |
| 24 |
|
| 25 |
connection con1; |
| 26 |
error ER_LOCK_DEADLOCK; |
| 27 |
reap; |
| 28 |
disconnect con1; |
| 29 |
|
| 30 |
connection default; |
| 31 |
--echo # The above DELETE must delete all the rows in the table, so the |
| 32 |
--echo # following SELECT must show 0 rows. |
| 33 |
SELECT count(*) FROM t; |
| 34 |
SET DEBUG_SYNC="reset"; |
| 35 |
DROP TABLE t; |
| 36 |
--source include/wait_until_count_sessions.inc |