Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.8.3
-
None
Description
Isolation Level: Serializable.
At the serializable isolation level, the second SELECT statement reports "Record has changed since last read in table 't'" error when the WHERE condition of the first SELECT statement is evaluated as false.
/* init */ DROP TABLE IF EXISTS t; |
/* init */ CREATE TABLE t (c1 INT); |
/* init */ INSERT INTO t(c1) VALUES (1); |
|
/* t1 */ BEGIN; |
/* t2 */ BEGIN; |
/* t2 */ SELECT * FROM t WHERE FALSE; |
/* t1 */ INSERT INTO t(c1) VALUES (2); |
/* t1 */ COMMIT; |
/* t2 */ SELECT * FROM t ; |
ERROR 1020 (HY000): Record has changed since last read in table 't' |
/* t2 */ COMMIT; |
The expectation is that the second SELECT statement can retrieve [(1), (2)]. However, in actual execution, the second SELECT statement in transaction t2 failed to execute and reported an error "Record has changed since last read in table 't'" when the WHERE condition of the first SELECT statement was evaluated as false.