Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于mysql锁篇lock_phantom里面的最后一张贴图 #239

Open
keepstumz opened this issue Apr 16, 2024 · 0 comments
Open

关于mysql锁篇lock_phantom里面的最后一张贴图 #239

keepstumz opened this issue Apr 16, 2024 · 0 comments

Comments

@keepstumz
Copy link

8ca41a795ff6b61346a500a2bcee62c

next-key锁(19-正无穷),插入19,主键id自增应该是id = 10了,在19里面要插到最后一个19后面,要检查下一个有没有加锁,21是加锁的,所以事务F应该也是阻塞的吧?
除非插入的是id为2或3的19才能插进去,但是从图里看id不能等于2或者3了吧,主键索引不能重复
能否解答疑问。感谢!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant