首页 > 数据库技术 > 详细

MYSQL LOCK IN SHARE MODE&FOR UPDATE

时间:2016-04-16 18:16:26      阅读:131      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!