Databases 7 min read

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.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Overview of MySQL Transaction, Lock, and Undo Modules – Article Index

Author's Note

Author: Cao Shengchun, technical expert at iKexing, author of the public account "Yi Shu Yi Xi", focusing on MySQL and OceanBase source code analysis. The series has been running for a year, completing three major modules with plans for MVCC and Redo.

1. Transaction Module

Articles 01‑15 explore the fundamentals of transaction processing in InnoDB, including transaction pool and manager initialization, the effect of BEGIN statements, transaction object allocation, transaction start preparation, read/write transaction variations, binlog handling before commit, the three‑phase of two‑phase commit (prepare, commit, flush/sync/commit sub‑phases), savepoint creation and rollback, and a final transaction summary.

2. Lock Module

Articles 16‑32 cover InnoDB lock mechanisms: table locks, row lock types and modes, lock structures in memory, global lock object attributes, procedures for acquiring table and row locks (fast and slow paths), lock waiting and timeout handling, deadlock detection and resolution (pre‑work, detection, and solving), lock release timing for row and AUTO‑INC locks, and detailed explanations of lock‑related logs such as deadlock logs and implicit locks.

3. Undo Module

Articles 44‑54 discuss the undo subsystem, introducing undo tablespace, rollback segments, undo segment allocation, and undo page structures. They detail how undo segments are allocated from the insert_undo_cached and update_undo_cached caches, the format of undo logs generated by INSERT, UPDATE, and DELETE statements, and the procedures for rolling back these operations. The series also explains how undo logs are handled during transaction commit.

The series is produced by the iKexing open‑source community and is intended for readers interested in deep MySQL/InnoDB internals.

TransactionInnoDBMySQLLockDatabase Internalsundo
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.