Tag

Database Internals

0 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
Mar 5, 2025 · Databases

Overview of MySQL Transaction, Lock, and Undo Modules – Article Index

This article provides a comprehensive index of a MySQL internals series covering the transaction, lock, and undo modules, detailing each sub‑topic such as transaction initialization, two‑phase commit, various lock types, deadlock handling, and undo log management across numerous linked articles.

Database InternalsInnoDBLock
0 likes · 7 min read
Overview of MySQL Transaction, Lock, and Undo Modules – Article Index
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 26, 2025 · Databases

MySQL InnoDB Transaction Commit: Undo Segment State Changes and Cleanup Process

The article explains how InnoDB handles transaction commit by modifying Insert and Update Undo segment states, generating a transaction commit number, adding rollback segments to the purge queue, and finally cleaning or caching Undo segments based on their usage and state.

Database InternalsInnoDBMySQL
0 likes · 11 min read
MySQL InnoDB Transaction Commit: Undo Segment State Changes and Cleanup Process
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 18, 2025 · Databases

Parsing Delete Undo Log in MySQL 8.0.32 InnoDB

This article explains how to read and parse the Undo log generated by a DELETE operation in MySQL 8.0.32 InnoDB, covering preparation, log extraction, detailed field parsing, locating the primary index record, and the step‑by‑step rollback of secondary and primary index records.

Database InternalsInnoDBMySQL
0 likes · 10 min read
Parsing Delete Undo Log in MySQL 8.0.32 InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 12, 2025 · Databases

Understanding the Delete Undo Log Format in MySQL 8.0 InnoDB

This article explains how MySQL 8.0 InnoDB generates and stores Delete Undo logs, detailing the log structure, field meanings, type_flag and info_bits decoding, address composition via DB_ROLL_PTR, and provides concrete SQL examples and shell calculations to illustrate the process.

Database InternalsDelete OperationInnoDB
0 likes · 11 min read
Understanding the Delete Undo Log Format in MySQL 8.0 InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Feb 5, 2025 · Databases

Thank You, Outlook, and Review of the MySQL Core Modules Series

After publishing 50 installments of the 'MySQL Core Modules' series covering transactions, locks, and undo, the author expresses gratitude to readers and the community, outlines upcoming articles on Undo, MVCC, and Redo, and reviews past content while planning a compiled book.

Database InternalsMVCCMySQL
0 likes · 7 min read
Thank You, Outlook, and Review of the MySQL Core Modules Series
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 22, 2025 · Databases

Parsing and Rolling Back Update Undo Logs in MySQL 8.0.32 (InnoDB)

This article explains how MySQL 8.0.32's InnoDB engine generates, reads, and parses Undo logs for an UPDATE operation, and details the step‑by‑step process of locating the primary record, constructing a rollback record, and restoring both secondary and primary index entries.

Database InternalsInnoDBMySQL
0 likes · 14 min read
Parsing and Rolling Back Update Undo Logs in MySQL 8.0.32 (InnoDB)
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 15, 2025 · Databases

Understanding Update Undo Log Format and Content in MySQL InnoDB

This article explains how MySQL 8.0.32 InnoDB generates and stores Update undo logs, detailing the log format, the meaning of each field, how to interpret the log address, and provides concrete SQL examples and shell calculations for practical insight.

Database InternalsInnoDBMySQL
0 likes · 11 min read
Understanding Update Undo Log Format and Content in MySQL InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Jan 8, 2025 · Databases

How InnoDB Performs Undo Log Rollback and Record Deletion

This article explains the complete InnoDB undo‑log rollback process on MySQL 8.0, covering preparation, reading and parsing undo logs, constructing primary‑key index records, and the detailed steps for deleting secondary and primary index entries during a transaction rollback.

Database InternalsInnoDBMySQL
0 likes · 12 min read
How InnoDB Performs Undo Log Rollback and Record Deletion
Aikesheng Open Source Community
Aikesheng Open Source Community
Dec 25, 2024 · Databases

Understanding the Insert Undo Log Format in MySQL InnoDB

This article explains how MySQL 8.0.32 InnoDB generates and stores Insert Undo logs, detailing their binary format, field meanings, example values, and how the hidden DB_ROLL_PTR field encodes the log address, with accompanying SQL and shell examples.

Database InternalsInnoDBMySQL
0 likes · 6 min read
Understanding the Insert Undo Log Format in MySQL InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 27, 2024 · Databases

Summary of InnoDB Lock Module Articles

This article provides a concise English recap of the 27 previously published InnoDB lock module articles, covering theoretical concepts such as table and row locks, lock waiting, deadlock handling, and practical scenarios like lock behavior during inserts and duplicate key operations.

Database InternalsInnoDBLocks
0 likes · 6 min read
Summary of InnoDB Lock Module Articles
Selected Java Interview Questions
Selected Java Interview Questions
Sep 21, 2024 · Databases

Understanding InnoDB Storage Engine: Logs, Buffer Pool, and Data Write Process

This article explains the core components of MySQL's InnoDB storage engine—including undo log, redo log, buffer pool, change buffer, and binlog—detailing their roles in data writing, crash recovery, MVCC, and master‑slave synchronization, and describing related flushing strategies and LRU management.

Buffer PoolDatabase InternalsInnoDB
0 likes · 11 min read
Understanding InnoDB Storage Engine: Logs, Buffer Pool, and Data Write Process
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 17, 2024 · Databases

Understanding InnoDB Deadlock Detection Thread and Lock‑Wait Snapshot Construction

This article explains how InnoDB simulates deadlocks, how the ib_srv_lock_to background thread checks for deadlocks, how it builds lock‑wait snapshots, constructs lock‑wait graphs, calculates transaction weights, and finally resolves deadlocks, illustrated with detailed SQL examples and code snippets.

Database InternalsInnoDBMySQL
0 likes · 14 min read
Understanding InnoDB Deadlock Detection Thread and Lock‑Wait Snapshot Construction
Aikesheng Open Source Community
Aikesheng Open Source Community
Jul 10, 2024 · Databases

Understanding InnoDB Lock‑Wait Timeout Thread and Its Processing Logic

This article explains the inner workings of InnoDB’s lock‑wait timeout thread, detailing how it scans waiting slots, identifies timed‑out transactions, processes timeout logic, and notifies the affected transactions, while also covering related data structures and configuration variables.

Database InternalsInnoDBMySQL
0 likes · 8 min read
Understanding InnoDB Lock‑Wait Timeout Thread and Its Processing Logic
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 26, 2024 · Databases

Slow Locking Logic in MySQL InnoDB

This article explains the slow‑path row‑locking algorithm used by InnoDB in MySQL 8.0.32, detailing how the engine checks whether a transaction already holds a lock, determines if it must wait, reuses existing lock structures, and allocates new ones when necessary.

Database InternalsInnoDBMySQL
0 likes · 15 min read
Slow Locking Logic in MySQL InnoDB
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 19, 2024 · Databases

Understanding InnoDB Row Locking: Fast and Slow Locking Mechanisms

This article explains how InnoDB implements row locking by dividing the process into fast and slow paths, describing the hash‑based lock table, token acquisition, lock‑structure creation, bitmap handling, and the conditions that trigger slow‑lock logic.

Database InternalsInnoDBMySQL
0 likes · 13 min read
Understanding InnoDB Row Locking: Fast and Slow Locking Mechanisms
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 5, 2024 · Databases

Understanding the InnoDB Lock Module Structure

This article explains the structure and components of InnoDB's lock module, including the global lock_sys object, its hash tables, latch mechanisms, waiting thread slots, and related attributes, with detailed code examples and diagrams to illustrate how row and table locks are managed.

Database InternalsInnoDBMySQL
0 likes · 15 min read
Understanding the InnoDB Lock Module Structure
Aikesheng Open Source Community
Aikesheng Open Source Community
May 29, 2024 · Databases

Analysis of InnoDB Table and Row Lock Structures in MySQL 8.0.32

This article examines the shared and distinct fields of InnoDB's table‑lock and row‑lock structures in MySQL 8.0.32, explains the layout of the lock_t, lock_table_t and lock_rec_t structs, decodes the type_mode bit‑field, and discusses how InnoDB merges compatible row‑locks using a bitmap memory area.

Database InternalsInnoDBMySQL
0 likes · 13 min read
Analysis of InnoDB Table and Row Lock Structures in MySQL 8.0.32
Aikesheng Open Source Community
Aikesheng Open Source Community
May 15, 2024 · Databases

Understanding InnoDB Table Locks, Intent Locks, and AUTO‑INC Locks in MySQL 8.0

This article explains the architecture of MySQL's InnoDB storage engine locks, covering server‑level metadata locks, table‑level shared and exclusive locks, intent locks, and the three modes of AUTO‑INC locks, with practical SQL examples and performance‑schema queries.

Database InternalsInnoDBIntent Locks
0 likes · 16 min read
Understanding InnoDB Table Locks, Intent Locks, and AUTO‑INC Locks in MySQL 8.0