Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11, 11.4, 11.8, 12.3, 12.3.2
-
OS: Ubuntu-20.04 LTS
Description
Isolation Level: Repeatable Read & Serializable
DELETE statement does not acquire any locks, but deadlock occurs when "UPDATE t SET c1=1 WHERE 3;" executes, resulting in incorrect final database state.
/*init*/ CREATE TABLE t(c1 INT PRIMARY KEY); |
/*init*/ INSERT INTO t(c1) VALUES (3); |
 |
/* t1 */ BEGIN; |
/* t1 */ UPDATE t SET c1=2 WHERE -5; |
/* t2 */ BEGIN; |
/* t2 */ DELETE FROM t WHERE -3; -- blocked |
/* t1 */ UPDATE t SET c1=1 WHERE 3; |
/* t2 */ Error 1213: Deadlock found when trying to get lock; try restarting transaction |
/* t1 */ COMMIT; |
/* t2 */ COMMIT; |
/* t2 */ SELECT * FROM t; -- [(1)] |
We expect deadlock not to occur, and the final database state to be [ ].
Attachments
Issue Links
- relates to
-
MDEV-37974 Improper deadlock with DELETE/DELETE/INSERT
-
- In Review
-