Skip to content

Commit

Permalink
# add mysql-mvcc doc
Browse files Browse the repository at this point in the history
  • Loading branch information
chengleia committed Oct 9, 2020
1 parent a36ed9a commit 56c3854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/mysql-mvcc.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Multi-Version Concurrency Control,翻译为中文即多版本并发控制,使

![mvcc解决幻读](imgs/mysql-mvcc-4.png)

以我们的认知可重复不解决幻读问题,此时事务B的数据应该是能插入的,但实际上被阻塞了,这是因为事务A在执行update的时候加上了间隙锁
![mvcc解决幻读](imgs/mysql-mvcc-5.png)
以我们的认知可重复不解决幻读问题,此时事务B的数据应该是能插入的,但实际上被阻塞了,这是因为事务A在执行update的时候加上了间隙锁
![mvcc解决幻读](imgs/mysql-mvcc-5.png)

导致此时无法插入,需等事务A提交后释放锁(2PL第二步)才能插入。

0 comments on commit 56c3854

Please sign in to comment.