Tagged articles
13 articles
Page 1 of 1
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Feb 20, 2025 · Databases

Mastering Database Concurrency: Dirty Read, Non‑Repeatable Read, and Phantom Read

The article explains ACID properties, details how inadequate isolation levels cause dirty reads, non‑repeatable reads, and phantom reads, illustrates each with transaction scenarios and diagrams, and shows how MySQL’s lock types and isolation settings prevent these anomalies, noting the trade‑off between isolation and concurrency.

databasedirty readlocking
0 likes · 9 min read
Mastering Database Concurrency: Dirty Read, Non‑Repeatable Read, and Phantom Read
Architect
Architect
Sep 19, 2024 · Databases

Phantom Read Verification and Analysis in InnoDB REPEATABLE‑READ Isolation

This article investigates whether the REPEATABLE‑READ isolation level in InnoDB fully prevents phantom reads by conducting a series of current‑read and snapshot‑read experiments, analyzing transaction behavior, MVCC mechanisms, and offering recommendations to avoid phantom anomalies.

InnoDBMVCCRepeatable Read
0 likes · 19 min read
Phantom Read Verification and Analysis in InnoDB REPEATABLE‑READ Isolation
dbaplus Community
dbaplus Community
Jul 25, 2024 · Databases

Is MySQL Insert Truly Concurrent? Experiments Reveal the Truth

Through a series of MySQL 8.0 experiments, the article demonstrates that InnoDB inserts run concurrently, explains why phantom reads can appear, and details how MVCC, insert‑intention locks, and the ReadView mechanism together prevent phantom read anomalies.

MVCCReadViewmysql
0 likes · 10 min read
Is MySQL Insert Truly Concurrent? Experiments Reveal the Truth
IT Services Circle
IT Services Circle
Aug 20, 2023 · Databases

Understanding MySQL Transaction Isolation Levels and Their Practical Implications

This article explains MySQL's four transaction isolation levels—READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE—detailing their definitions, associated phenomena such as dirty reads, non‑repeatable reads, and phantom reads, and demonstrates how to query and set isolation levels with practical SQL examples.

Database ConcurrencySQLdirty read
0 likes · 12 min read
Understanding MySQL Transaction Isolation Levels and Their Practical Implications
ITPUB
ITPUB
Apr 19, 2023 · Databases

Can InnoDB’s REPEATABLE READ Truly Prevent Phantom Reads? A Deep Dive

This article explains how InnoDB’s REPEATABLE READ isolation level uses MVCC and gap locks to prevent most phantom reads, illustrates the mechanisms with SQL examples and diagrams, and outlines the remaining edge cases and best practices for fully avoiding phantom reads.

Gap LockInnoDBMVCC
0 likes · 9 min read
Can InnoDB’s REPEATABLE READ Truly Prevent Phantom Reads? A Deep Dive
Practical DevOps Architecture
Practical DevOps Architecture
Sep 21, 2022 · Databases

Understanding MySQL Transaction Isolation Levels: Dirty Read, Non-Repeatable Read, and Phantom Read

This article explains MySQL's four transaction isolation levels, illustrating how concurrent transactions can cause dirty reads, non‑repeatable reads, and phantom reads through detailed examples of two transactions interacting via SELECT, UPDATE, and INSERT operations, and summarizes the consistency issues each scenario creates.

databasesdirty readmysql
0 likes · 4 min read
Understanding MySQL Transaction Isolation Levels: Dirty Read, Non-Repeatable Read, and Phantom Read
Programmer DD
Programmer DD
Apr 22, 2021 · Databases

How MySQL Implements Repeatable Read and Prevents Phantom Reads

This article explains MySQL's four transaction isolation levels, focusing on the default Repeatable Read, how MVCC enables snapshot reads to avoid phantom reads, the differences between snapshot and current reads, and practical techniques such as serializable isolation and next‑key locking to fully prevent phantom anomalies.

MVCCRepeatable Readmysql
0 likes · 11 min read
How MySQL Implements Repeatable Read and Prevents Phantom Reads
Selected Java Interview Questions
Selected Java Interview Questions
Sep 27, 2020 · Databases

Understanding How MySQL InnoDB Solves Phantom Reads

This article explains the four transaction isolation levels, defines phantom reads, and details how MySQL's InnoDB engine uses MVCC snapshot reads and next‑key locking (including the next‑key principle and lock composition) to prevent phantom reads under the REPEATABLE READ isolation level.

InnoDBIsolation LevelMVCC
0 likes · 2 min read
Understanding How MySQL InnoDB Solves Phantom Reads
Programmer DD
Programmer DD
Sep 21, 2020 · Databases

How MySQL Prevents Phantom Reads: MVCC and Next‑Key Locks Explained

This article explains why phantom reads occur under MySQL's REPEATABLE READ isolation, how InnoDB uses MVCC for snapshot reads and next‑key locks for current reads, and demonstrates the mechanisms with code examples and version‑tracking diagrams.

Isolation LevelMVCCNext-key Lock
0 likes · 7 min read
How MySQL Prevents Phantom Reads: MVCC and Next‑Key Locks Explained
Selected Java Interview Questions
Selected Java Interview Questions
Mar 13, 2020 · Databases

Can Repeatable Read Prevent Phantom Reads? A Deep Dive into MySQL Transaction Isolation Levels

This article explains MySQL’s transaction isolation levels, clarifies the differences between dirty reads, non‑repeatable reads and phantom reads, and demonstrates through experiments why the REPEATABLE READ level can prevent phantom reads, while also discussing its limitations, MVCC, and locking mechanisms.

MVCCRepeatable Readlocking
0 likes · 14 min read
Can Repeatable Read Prevent Phantom Reads? A Deep Dive into MySQL Transaction Isolation Levels