Tagged articles

MDL

5 articles · Page 1 of 1
IoT Full-Stack Technology
IoT Full-Stack Technology
Aug 17, 2026 · Databases

Does Adding an Index Lock the Table? JD Interview Deep Dive (Full Score Edition)

The article explains that whether adding an index locks a MySQL table depends on the version and DDL algorithm—MySQL 5.5 and earlier lock the whole table, 5.6‑5.7 use Online DDL with brief metadata locks, and 8.0+ can create secondary indexes instantly without locking, while primary, unique, and full‑text indexes always require locking.

COPYINPLACEINSTANT
0 likes · 10 min read
Does Adding an Index Lock the Table? JD Interview Deep Dive (Full Score Edition)
Tencent Database Technology
Tencent Database Technology
Nov 24, 2017 · Databases

MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations

This article explains MySQL's Metadata Lock (MDL) subsystem, describing how MDL protects metadata, the lock types and modes, the transaction‑level implementation introduced in MySQL 5.5 and refined in 5.7, the lock acquisition and release algorithms, deadlock detection mechanisms, and the lock‑free hash table used to store lock objects.

Lock-Free HashMDLMetadata Lock
0 likes · 25 min read
MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations