MySQL Deadlock Case Study: Auxiliary Index Update vs Primary‑Key Delete
This article analyzes a MySQL 8.0 deadlock caused by an update that locks an auxiliary index followed by a delete that locks the primary key, explains the lock sequence that leads to a circular wait, and offers a practical solution of using primary‑key updates to avoid the deadlock.
