ITPUB
Feb 8, 2023 · Databases
Why Does One MySQL UPDATE Block While Another Doesn’t? A Deep Dive into Row‑Level Locks
This article explains why an UPDATE on a MySQL row that changes a regular column proceeds without blocking, while an UPDATE that modifies the primary‑key value gets blocked, by analyzing the locks set by preceding transactions, the B+‑tree index structure, and the delete‑plus‑insert rewrite performed by InnoDB.
B+TreeGap LockNext-key Lock
0 likes · 9 min read
