Phantom reads
Phantom reads
A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first.This can occur when range locks are not acquired on performing a SELECT ... WHERE operation.
This anomaly is a special case of Non-repeatable reads when Trans.1 repeats a ranged SELECT ... WHERE query and, between both operations, Trans.2 creates new rows (in the target table) which fulfill that WHERE clause.
Trans.1 | Trans.2 |
---|---|
|
|
|
|
|
Ввійдіть щоб вподобати
Ввійдіть щоб прокоментувати