Code AnalysisHard 60s
Phantom read with range predicate
What anomaly permits double booking?
Starter code
-- SERIALIZABLE expected but engine is REPEATABLE READ (MySQL) BEGIN; SELECT COUNT(*) FROM bookings WHERE room=5 AND day='2026-01-01'; -- 0 INSERT INTO bookings(room, day) VALUES (5, '2026-01-01'); COMMIT; -- allowed; race with another txn
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.