现在的位置: 首页 > 综合 > 正文

数据库的事物处理ISOLATION LEVEL

2013年09月07日 ⁄ 综合 ⁄ 共 820字 ⁄ 字号 评论关闭
Serializable
Repeatable read
Read committed
Read uncommitted
 
Serializable
This level prohibits the following types of reads:
– Dirty reads: A transaction reads a database row containing uncommitted
changes from a second transaction.
– Nonrepeatable reads: One transaction reads a row, a second transaction
changes the same row, and the first transaction rereads the row and gets
a different value.
– Phantom reads: One transaction reads all rows that satisfy an SQL
WHERE condition, a second transaction inserts a row that also satisfies
the WHERE condition, and the first transaction applies the same WHERE
condition and gets the row inserted by the second transaction.
 
Repeatable read
This level prohibits dirty reads and nonrepeatable reads, but it allows
phantom reads.
 
Read committed
This level prohibits dirty reads, but allows nonrepeatable reads and phantom
reads.
Read uncommitted
This level allows dirty reads, nonrepeatable reads, and phantom reads.

抱歉!评论已关闭.