A nonrepeatable read occurs when one transaction reads the same data item twice but receives different values because another transaction committed an update between the reads. section 11.2.1
Changed value during one transaction
Transaction 1 reads the highest bid. Transaction 2 updates and commits that bid. When Transaction 1 reads it again, the value has changed, producing a nonrepeatable read. section 11.2.1
Shows the highest bid changing while the first transaction remains in execution. section 11.2.1
Isolation levels address this anomaly at different costs:
- READ_COMMITTED permits nonrepeatable reads. section 11.2.1
- REPEATABLE_READ prevents nonrepeatable reads, while SERIALIZABLE also prevents phantom reads. section 11.2.1
