13. Understanding the Locking System : User-Controlled Locking--SET LOCKMODE : Isolation Levels : Inconsistencies During Concurrent Transactions
 
Share this page                  
Inconsistencies During Concurrent Transactions
The ANSI/ISO specifies three inconsistencies that can occur during the execution of concurrent transactions:
Dirty Read
Transaction T1 modifies a row.
Transaction T2 reads that row before T1 performs a commit.
If T1 performs a rollback, T2 reads a row that was never committed and is considered to have never existed.
Non-repeatable Read
Transaction T1 reads a row.
Transaction T2 modifies or deletes that row and performs a commit.
If T1 attempts to reread the row, it can receive the modified value or discover that the row has been deleted.
Phantom Rows
Transaction T1 reads the set of rows N that satisfy some search condition.
Transaction T2 executes SQL statements that generate one or more rows that satisfy the search condition used by transaction T1.
If transaction T1 repeats the initial read with the same search condition, it obtains a different collection of rows.