暂无图片
MYSQL的事务隔离性疑问
我来答
分享
junior
2022-03-25
MYSQL的事务隔离性疑问

1、事务A begin ; 在RR隔离级别
2、事务A 执行select user_name from user where id= 1; 结果: user_name = "shabi"
3、事务B begin;在RR隔离级别
4、事务B执行,update user set user_name="junior" where id= 1;
5、事务B commit;
6、事务A 执行 select user_name from user for update ; 结果: user_name = "junior"

看起来事务A的数据一致性被破坏了,请问mysql的这种行为是否符合 事务的标准定义?????

我来答
添加附件
收藏
分享
问题补充
1条回答
默认
最新
chengang

你事物a最后要求的当前读,所以没走 事物a刚才的read view 当然读出来是 junior

暂无图片 评论
暂无图片 有用 0
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
暂无图片墨值悬赏