Skip to content

Commit 83e2919

Browse files
author
wangtong
committed
[修改]:修改 MySQL事务隔离级别详解 关于幻读的案例演示和解决方案
1 parent 5490ca6 commit 83e2919

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/database/mysql/transaction-isolation-level.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,14 @@ SET [SESSION|GLOBAL] TRANSACTION ISOLATION LEVEL [READ UNCOMMITTED|READ COMMITTE
127127
<div align="center">
128128
<img src="https://my-blog-to-use.oss-cn-beijing.aliyuncs.com/2019-33-2可重复读.jpg"/>
129129
</div>
130+
130131
#### 幻读
131132

132133
##### 演示幻读出现的情况
133134

134-
![](http://101.43.132.98:98/images/phantom_read.png)
135+
<div align="center">
136+
<img src="http://101.43.132.98:98/images/phantom_read.png"/>
137+
</div>
135138

136139
sql 脚本1 在第一次查询工资为 500 的记录时只有一条,sql 脚本 2 插入了一条工资为 500 的记录,提交之后;sql 脚本 1 在同一个事务中再次使用当前读查询发现出现了两条工资为 500 的记录这种就是幻读。
137140

0 commit comments

Comments
 (0)