事务A | 事务B |
---|---|
start transaction with consistent snapshot; | |
start transaction with consistent snapshot; | |
select * from table; | |
insert into table values (1); | |
commit; | |
update table set value = 2 where value =1; | |
select * from table; |
这样事务A的两次查询查出来的结果是不一样的。
为什么有的人说mysql的innodb的rr级别下可以防止幻读呢