Tagged articles
2 articles
Page 1 of 1
Youzan Coder
Youzan Coder
Jan 30, 2019 · Operations

Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking

This article examines two MySQL deadlock scenarios under REPEATABLE READ isolation—one with a non‑unique index and another with a unique index—by presenting table definitions, test data, raw deadlock logs, and step‑by‑step analysis of lock acquisition and waiting, ultimately offering practical recommendations to avoid such deadlocks.

Database operationsInnoDBRR Isolation
0 likes · 12 min read
Why Do MySQL RR Transactions Deadlock? A Deep Dive into Index Locking