快照读的幻读-mvcc 解决
当前读的幻读-gap 锁解决
首先读分为:
快照读
select * from table where ?;
当前读:特殊的读操作,插入/更新/删除操作,属于当前读,需要加锁。
select * from table where ? lock in share mode;
select * from table where ? for update;
insert into table values (…);
update table set ? where ?;
delete from table where ?;
对于快照读来说,幻读的解决是依赖mvcc解决。而对于当前读则依赖于gap-lock解决。
---------------------
作者:impbb
来源:CSDN
原文:https://blog.csdn.net/qq_27007251/article/details/70016787
版权声明:本文为博主原创文章,转载请附上博文链接!
原文:https://www.cnblogs.com/twoheads/p/10703023.html