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

事务的隔离级别(图文详解) #1649

Open
WT-AHA opened this issue Mar 29, 2022 · 3 comments
Open

事务的隔离级别(图文详解) #1649

WT-AHA opened this issue Mar 29, 2022 · 3 comments

Comments

@WT-AHA
Copy link
Contributor

WT-AHA commented Mar 29, 2022

image

在文章最后的实际情况演示中:没有演示出幻读出现的场景,幻读在可重复读的隔离级别下只有使用当前读才会出现幻读的情况,幻读在可重复读的隔离级别下直接使用 update 关键字是没有办法解决的,因为 update 在走索引的情况下是行锁,不走索引的情况下才是表锁,我看文末最后一个图说的意思是直接使用这个解决。应该是使用next-key lock 解决的,next-key lock 是行锁加间隙锁,我感觉我可以帮忙完善一下这个点。
@Snailclimb
Copy link
Owner

image

在文章最后的实际情况演示中:没有演示出幻读出现的场景,幻读在可重复读的隔离级别下只有使用当前读才会出现幻读的情况,幻读在可重复读的隔离级别下直接使用 update 关键字是没有办法解决的,因为 update 在走索引的情况下是行锁,不走索引的情况下才是表锁,我看文末最后一个图说的意思是直接使用这个解决。应该是使用next-key lock 解决的,next-key lock 是行锁加间隙锁,我感觉我可以帮忙完善一下这个点。

可以的,欢迎帮忙完善,不过,一定要尽量确保内容的准确性。

@helloannali
Copy link

哈哈,感觉找到知己了,snail,哈哈哈

@Snailclimb
Copy link
Owner

哈哈,感觉找到知己了,snail,哈哈哈

蜗牛蜗牛向上爬,嘿嘿

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

3 participants