InnoDB事务级别Serializable level的时候find一个不存的数据会加什么锁。
阿神2017-04-17 15:20:43
The manual says it very clearly This level is like REPEATABLE READ, but InnoDB implicitly converts all plain SELECT statements to SELECT ... LOCK IN SHARE MODE
.
This means that SELECT will be implicitly converted into SELECT...LOCK IN SHARE MODE, which is a shared lock.
天蓬老师2017-04-17 15:20:43
Serializable level
This level is very simple to understand. Read plus shared lock, write plus exclusive lock, and read and write mutually exclusive. The pessimistic locking theory used is simple to implement and the data is very safe, but the concurrency capability is very poor.