MySQL gap lock, next key lock by example
MySQL gap lock, next key lock by example
MySQL’s gap lock or next key lock is a specific mechanism to guarantee it’s isolation level.
Gap lock is set on before or after values of the accessed record. Next key lock is the accessed row lock + gap lock. Therefore they have similar features.
Gap lock is activated in the following conditions.
Isolation level is Repeatable read (default value)
Storage engine is innodb
The query is executed in…
View On WordPress









