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 … Continue reading MySQL gap lock, next key lock by example
Tag: mysql
The difference of Isolation level – Read Committed vs Repeatable Read
MySQL's default isolation level is "Repeatable Read". But Oracle's default isolation level is "Read Committed". In this post, I will show you the difference by example. Test environment : MySQL 5.7 Test table Test scenario 1 - Read Committed Seq Session 1 Session 2 1 set session transaction isolation level read committed; start transaction; set … Continue reading The difference of Isolation level – Read Committed vs Repeatable Read