Which anomaly did T1 experience?
T1: SELECT price FROM item WHERE id = 7; -- 10 T2: UPDATE item SET price = 12 WHERE id = 7; T2: COMMIT; T1: SELECT price FROM item WHERE id = 7; -- 12
- Non-repeatable read
- Phantom read
- Uncommitted dirty read
- Write skew on two rows
Re-reading the same row inside one transaction gave a different committed value;
Play SQL & Databases ▸
REPEATABLE READ prevents it.