Youzan Coder
Feb 13, 2019 · Databases
When INSERT Triggers a Deadlock: Decoding MySQL Gap and Intention Locks
This article walks through MySQL InnoDB lock mechanisms, demonstrates how concurrent INSERTs on a unique key generate intention and gap locks, and uses detailed engine status logs to explain why those locks can cause deadlocks.
Gap LockInnoDBInsert Lock
0 likes · 14 min read
