Tag

metadata lock

0 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
May 8, 2024 · Databases

When Can MySQL Locks Block Queries? A Deep Dive into Table‑Level and Metadata Locks

This article explains how MySQL table‑level locks and metadata locks (MDL) can block both reads and writes, describes the two lock implementations, their types, the interaction with LOCK TABLES and FLUSH TABLES, and provides practical queries for diagnosing lock‑related blocking issues.

LocksMySQLSQL
0 likes · 10 min read
When Can MySQL Locks Block Queries? A Deep Dive into Table‑Level and Metadata Locks
Aikesheng Open Source Community
Aikesheng Open Source Community
May 17, 2023 · Databases

Diagnosing and Resolving DDL Blocking in MySQL Using sys.schema_table_lock_waits

This article explains how to identify when a MySQL DDL operation is blocked, locate the blocking session using the sys.schema_table_lock_waits view, and resolve the issue by enabling necessary instruments and killing the appropriate connection, with examples for MySQL 5.7 and 8.0.

DDLDatabaseMySQL
0 likes · 10 min read
Diagnosing and Resolving DDL Blocking in MySQL Using sys.schema_table_lock_waits
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 26, 2022 · Databases

Understanding MySQL Metadata Locks (MDL) and Their Impact on DDL/DML Operations

The article explains MySQL's metadata lock (MDL) mechanism, shows how to enable its instrumentation, demonstrates various lock scenarios with SELECT, INSERT and ALTER statements, and provides guidance on diagnosing and resolving MDL‑related blocking issues.

DDLDMLMDL
0 likes · 12 min read
Understanding MySQL Metadata Locks (MDL) and Their Impact on DDL/DML Operations
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 29, 2021 · Databases

Impact of Adjusting System Time on MySQL Runtime Behavior

The article investigates how changing the operating system clock while MySQL is running influences functions such as SLEEP, metadata lock (MDL) wait calculations, and other timing‑related mechanisms, demonstrating that forward or backward adjustments can cause premature exits or inaccurate wait measurements.

MySQLdatabase performancelock_wait_timeout
0 likes · 4 min read
Impact of Adjusting System Time on MySQL Runtime Behavior
Selected Java Interview Questions
Selected Java Interview Questions
Jan 6, 2021 · Databases

Using SHOW FULL PROCESSLIST to Diagnose and Resolve MySQL Table Locks

This article explains how to use MySQL's SHOW FULL PROCESSLIST command, interpret its output, kill problematic threads, and address metadata lock issues by inspecting InnoDB transactions and adjusting lock_wait_timeout, providing practical code examples for database administrators.

Database TroubleshootingInnoDBMySQL
0 likes · 8 min read
Using SHOW FULL PROCESSLIST to Diagnose and Resolve MySQL Table Locks
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 18, 2020 · Databases

How to Query MySQL Metadata Locks Using the MySQL Shell Plugin

This article explains MySQL's metadata lock mechanism and demonstrates how to use the ext.check.get_locks() function from the MySQL Shell plugin—along with a supporting SQL query—to list lock owners, statements, and lock types, including setup steps for MySQL 5.7.

MySQLPerformance SchemaSQL Query
0 likes · 3 min read
How to Query MySQL Metadata Locks Using the MySQL Shell Plugin
Aikesheng Open Source Community
Aikesheng Open Source Community
Apr 14, 2020 · Databases

Understanding MySQL MDL Locks: Types, Structures, and Debugging Techniques

This article provides an in-depth analysis of MySQL's Metadata Lock (MDL) system, detailing lock types, data structures, acquisition, upgrade, downgrade processes, compatibility matrices, and practical debugging via custom print functions, with code examples and performance schema observations.

Database InternalsMDLMySQL
0 likes · 28 min read
Understanding MySQL MDL Locks: Types, Structures, and Debugging Techniques
Qunar Tech Salon
Qunar Tech Salon
Aug 30, 2018 · Databases

Understanding MySQL Lock Mechanisms: Metadata Locks, InnoDB Locks, and Source Code Insights

This article provides a comprehensive overview of MySQL's lock architecture, covering the two‑layer server/storage engine design, metadata (MDL) locks, InnoDB row and gap locks, transaction isolation levels, and practical debugging techniques using source‑code entry points and real‑world examples.

Database InternalsInnoDBLocks
0 likes · 18 min read
Understanding MySQL Lock Mechanisms: Metadata Locks, InnoDB Locks, and Source Code Insights
Ctrip Technology
Ctrip Technology
Mar 14, 2018 · Databases

Understanding MySQL Metadata Locks and InnoDB Lock Mechanisms

This article explains MySQL's architecture, details the various metadata lock types, their acquisition and release processes, lock levels, and relationships, and then examines InnoDB's transaction isolation levels, lock types, lock levels, gap locks, and relevant source‑code structures.

InnoDBLock LevelsMySQL
0 likes · 15 min read
Understanding MySQL Metadata Locks and InnoDB Lock Mechanisms
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 HashMDLMySQL
0 likes · 25 min read
MySQL Metadata Lock (MDL): Usage, Implementation, Deadlock Detection, and Lock‑Free Optimizations