https://dev.mysql.com/doc/refman/5.5/en/innodb-locking-reads.html
If you query data and then insert or update related data within the same transaction, the regular SELECT statement does not give enough protection. Other transactions can update or delete the same rows you just queried. InnoDBsupports two types of locking reads that offer extra safety:
1)SELECT ... LOCK IN SHARE MODE
ok Innodb transaction select lock Read 解决~~。
本文介绍了MySQL InnoDB存储引擎中两种锁定读取的方法:SELECT ... LOCK IN SHARE MODE 和 SELECT ... FOR UPDATE。这两种方法可以防止其他事务修改刚查询过的数据,从而提供额外的安全保障。

1429

被折叠的 条评论
为什么被折叠?



