In increasing order of protection
1. READ UNCOMMITTED :
- "dirty read"
- shows "phantom rows", i.e. rows from even the uncommitted transactions are returned.
- if someone tries to modify a phantom row, he will be locked till that row is committed.
2. READ COMMITTED :
- "phantom rows are not shown"
3. REPEATABLE READ :
- All SELECT statements within a transaction see consistent results.
- even if someone else updates/inserts a row in between.
- "consistent read"
- default isolation level for InnoDB
4. SERIALIZABLE :
- blocks other threads from even modifying the information that has merely been viewed
with a SELECT statement.
No comments:
Post a Comment