Bug #119564 for REPEATABLE READ TRANSACTION ISOLATION, data should not be read if deleted

Submitted: 16 Dec 2025 12:51 Modified: 30 Jan 1:11
Reporter: ximin liang (OCA) Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:9.5.0 OS:Any
Assigned to: CPU Architecture:Any

[16 Dec 2025 12:51] ximin liang
Description:
Hello MySQL team:
  This is a case about data consistency.

How to repeat:
Init data:
DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 INT primary key);
INSERT INTO t0 VALUES (1);
INSERT INTO t0 VALUES (-1);

-- session1:
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
BEGIN;
SELECT * FROM t0;

-- session2:
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
BEGIN; 
SELECT * FROM t0;

--- session 1 
UPDATE t0 SET c0 = 2 where c0 = 1;
SELECT * FROM t0;
COMMIT;

-- session 2
DELETE FROM t0;
Query OK, 2 rows affected (0.00 sec) -- seems all data has been deleted

SELECT * FROM t0; -- seems should not read data here ?
+----+
| c0 |
+----+
|  1 |
+----+

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.