Transaction isolation level IsolationLevel

Lock the shared S, locking, other services can overlay S; exclusive lock X, after having exclusive lock, other transactions can not lock added.
① ReadUnCommitted
not locked or accept an exclusive lock, in this transaction isolation level can read dirty data (data has not been submitted after the expiration or read rollback), of course, including non-repeatable reads and phantom data.
② ReadCommitted
before reading shared locks, read on release, to avoid dirty reads, but the data may be changed before the end of the transaction, resulting in non-repeatable reads (since been modified scene can not be reproduced) or phantom data (to be inserted or deleted).
③ RepeatableRead
added before reading shared lock is released before the completion of the transaction, reproducibly read, there will produce phantom lines.
④ Serializable
exclusive lock, you can ensure that does not happen in all cases.

Reproduced in: https: //www.cnblogs.com/aswordok/p/3705795.html

Guess you like

Origin blog.csdn.net/weixin_34152820/article/details/93726736