码迷,mamicode.com
首页 > 数据库 > 详细

MYSQL LOCK IN SHARE MODE&FOR UPDATE

时间:2016-04-16 18:17:52      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:

SELECT ... LOCK IN SHARE MODE sets a shared mode lock on the rows read. A shared mode lock enables other sessions to read the rows but not to modify them. The rows read are the latest available, so if they belong to another transaction that has not yet committed, the read blocks until that transaction ends. 

SELECT ... FOR UPDATE sets an exclusive lock on the rows read. An exclusive lock prevents other sessions from accessing the rows for reading or writing. 

MYSQL LOCK IN SHARE MODE&FOR UPDATE

标签:

原文地址:http://www.cnblogs.com/crossapply/p/5398785.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!