- 使用 Innodb 引擎
- 主键明确 与否
主键明确where id = #{id} for update
行锁
主键不明确where id <> #{ id} for update
发生表锁
主键不明确where id like #{id} for update
发生表锁
无主键where name =#{name} for update
name 不是主键,发生表锁
使用 MySQL的行锁要注意的地方
猜你喜欢
转载自blog.csdn.net/Andy86869/article/details/88958264
今日推荐
周排行