Description:
Read uncommitted isolation was not work in different transactions. in one transaction, one record was deleted, this record can still be queried by another transition. If even this transaction is committed.
How to repeat:
1. Data Preparation :
CREATE TABLE t (a INT PRIMARY KEY, b INT);
INSERT INTO t VALUES (1, 2);
INSERT INTO t VALUES (2, 4);
2. The detail operations for the bug:
/*TXN1*/ BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@transaction_isolation;
/*TXN2*/ BEGIN;
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT @@transaction_isolation;
/*TXN2*/ DELETE FROM t WHERE a = 1;
/*TXN1*/ SELECT * FROM t WHERE a = 1; /*This record for a=1 should be deleted as expected . however it is not , The query for a=1, b=2 was returned*/
/*TXN2*/ commit;
/*TXN1*/ SELECT * FROM t WHERE a = 1; /*This record for a=1 should be deleted as expected . however it is not , The query for a=1, b=2 was returned*/