小结: 1.注意使用限制 Locking reads are only possible when autocommit is disabled (either by beginning transaction with START TRANSACTION or by setting autocommit to 0. SELECT ... FOR UPDATE or SELECT ... FOR SHARE MySQL :: MySQL 8.0 Reference Manual :: 15.7.…
原文: http://dev.mysql.com/doc/refman/5.0/en/innodb-locking-reads.html In some circumstances, a consistent (nonlocking) read is not convenient and a locking read is required instead. InnoDB supports two types of locking reads: SELECT ... LOCK IN SHARE…