Phantom reads Example
Phantom reads Example
Trans.1 | Trans.2 |
---|---|
|
|
|
|
|
In the SERIALIZABLE isolation mode, Query 1 would result in all records with age in the range 10 to 30 being locked, thus Query 2 would block until the first transaction was committed.
In REPEATABLE READ mode, the range would not be locked, allowing the record to be inserted and the second execution of Query 1 to include the new row in its results.
Login in to like
Login in to comment