您的位置:首页 > 数据库 > MySQL

mysql Innodb 事务使用

2014-03-07 17:49 253 查看
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.
InnoDB
supports
two types of locking
reads that offer extra safety:

1)
SELECT
... LOCK IN SHARE MODE


2)SELECT
... FOR UPDATE


ok Innodb transaction select lock Read 解决~~。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: