Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.7.8
-
None
-
OS: Ubuntu-20.04 LTS
Description
Isolation Level: Read Uncommitted & Read Committed.
UPDATE statement is not blocked by the INSERT statement of another transaction, while DELETE statement that has the same WHERE clause as the UPDATE statement is blocked by the same INSERT statement of another transaction.
Test Case 1:
/* init */ CREATE TABLE t0(c0 DOUBLE); |
/* init */ INSERT INTO t0(c0) VALUES (9.1); |
/* t1 */ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
/* t2 */ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
 |
/* t1 */ BEGIN; |
/* t1 */ INSERT INTO t0(c0) VALUES (2.5); |
/* t2 */ BEGIN; |
/* t2 */ UPDATE t0 SET c0=3.3 WHERE c0 = 2.5; |
/* t1 */ COMMIT; |
/* t2 */ COMMIT; |
Test Case 2:
/* init */ CREATE TABLE t0(c0 DOUBLE); |
/* init */ INSERT INTO t0(c0) VALUES (9.1); |
/* t1 */ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
/* t2 */ SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED; |
 |
/* t1 */ BEGIN; |
/* t1 */ INSERT INTO t0(c0) VALUES (2.5); |
/* t2 */ BEGIN; |
/* t2 */ DELETE FROM t0 WHERE c0 = 2.5; -- blocked |
/* t1 */ COMMIT; |
/* t2 */ COMMIT; |
We expect UPDATE statement in test case 1 to be blocked.
Attachments
Issue Links
- relates to
-
MDEV-16232 Use fewer mini-transactions
- Stalled