Tagged articles
21 articles
Page 1 of 1
ITPUB
ITPUB
Oct 17, 2025 · Databases

Why Some Companies Switch MySQL from Repeatable Read to Read Committed

The article explains MySQL's default Repeatable Read isolation level, how its lock and binlog mechanisms affect consistency and replication, and why many high‑traffic internet firms change to Read Committed to boost concurrency and reduce deadlocks despite the need to handle phantom reads.

Isolation LevelRead CommittedRepeatable Read
0 likes · 8 min read
Why Some Companies Switch MySQL from Repeatable Read to Read Committed
Pan Zhi's Tech Notes
Pan Zhi's Tech Notes
Feb 8, 2025 · Databases

How to Choose the Right Database Transaction Isolation Level

This article explains MySQL’s transaction isolation mechanisms, compares the four isolation levels with concrete examples, shows how they affect phenomena like dirty reads, non‑repeatable reads and phantom reads, and provides practical guidance on configuring and avoiding long transactions.

MVCCRead CommittedRepeatable Read
0 likes · 15 min read
How to Choose the Right Database Transaction Isolation Level
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 9, 2024 · Databases

Understanding InnoDB Locking: Repeatable Read vs. Read Committed Isolation Levels

This article demonstrates how InnoDB acquires different types of row and gap locks under REPEATABLE-READ and READ-COMMITTED isolation levels by creating a test table, inserting data, setting transaction isolation, executing SELECT ... FOR SHARE statements, and inspecting lock information from performance_schema.

InnoDBRead CommittedRepeatable Read
0 likes · 9 min read
Understanding InnoDB Locking: Repeatable Read vs. Read Committed Isolation Levels
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
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 27, 2024 · Databases

Understanding Repeatable Read in OceanBase Oracle Mode and the Correct JDBC Configuration

This article explains why the OBOracle "set transaction read only" command provides repeatable‑read semantics, evaluates the behavior of the JDBC conn.setReadOnly(true) setting, and shows how to achieve true repeatable‑read isolation by enabling the oracleChangeReadOnlyToRepeatableRead option in the OceanBase client.

JDBCOceanBaseOracle Mode
0 likes · 8 min read
Understanding Repeatable Read in OceanBase Oracle Mode and the Correct JDBC Configuration
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 21, 2023 · Databases

Demonstrating MySQL Transaction Isolation Levels with Practical Examples

This article explains MySQL's four transaction isolation levels—READ UNCOMMITTED, READ COMMITTED, REPEATABLE READ, and SERIALIZABLE—by creating a simple table, inserting test data, and running step‑by‑step SQL scripts that illustrate the behavior of each level, including phenomena such as dirty reads, non‑repeatable reads, phantom reads, and locking.

InnoDBREAD UNCOMMITTEDRead Committed
0 likes · 11 min read
Demonstrating MySQL Transaction Isolation Levels with Practical Examples
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 6, 2023 · Databases

Why Does Inserting a Record that Triggers a Unique Index Conflict Add a Next‑Key Exclusive Lock on the Primary‑Key Supremum Record?

This article reproduces a MySQL 8.0.32 InnoDB scenario where inserting a row that violates a unique index causes a next‑key exclusive lock on the primary‑key supremum record, explains the underlying implicit‑lock mechanism, walks through the relevant source‑code stack, and details the lock‑conversion and rollback steps under REPEATABLE‑READ isolation.

Database InternalsInnoDBRepeatable Read
0 likes · 25 min read
Why Does Inserting a Record that Triggers a Unique Index Conflict Add a Next‑Key Exclusive Lock on the Primary‑Key Supremum Record?
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
dbaplus Community
dbaplus Community
Aug 29, 2022 · Databases

Why Parallel DELETEs on a MySQL Table Trigger Lock Wait Timeouts

When trying to change a table’s primary key from int to bigint, a 500‑million‑row MySQL table required data archiving and a bulk MODIFY, but parallel DELETE statements caused lock‑wait timeouts; experiments reveal that under REPEATABLE READ the range scan locks the boundary row, leading to contention.

DELETELarge TablesLock
0 likes · 11 min read
Why Parallel DELETEs on a MySQL Table Trigger Lock Wait Timeouts
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
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 12, 2020 · Databases

Evaluating Whether pt-table-checksum Affects Business Performance

This article presents a hands‑on experiment that measures the performance impact of using pt‑table‑checksum on a MySQL master‑slave setup, explains the tool’s design choices such as reduced lock‑wait time and RR isolation, and concludes that its effect on production traffic is minimal when configured properly.

Database ReplicationInnoDBRepeatable Read
0 likes · 4 min read
Evaluating Whether pt-table-checksum Affects Business Performance
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
Java High-Performance Architecture
Java High-Performance Architecture
Jan 12, 2019 · Databases

Why Does Transaction A See 1 While Transaction B Sees 3? Understanding MySQL Repeatable Read

This article demonstrates how MySQL's repeatable-read isolation with consistent snapshots causes transaction A to read the original value 1 while transaction B reads the updated value 3, explaining InnoDB's MVCC versioning, active transaction arrays, and the distinction between consistent and current reads.

InnoDBMVCCRepeatable Read
0 likes · 10 min read
Why Does Transaction A See 1 While Transaction B Sees 3? Understanding MySQL Repeatable Read
Java High-Performance Architecture
Java High-Performance Architecture
Jan 3, 2019 · Databases

Understanding Transaction Isolation Levels: Dirty, Non‑Repeatable, and Phantom Reads Explained

This article explains the three classic concurrency anomalies—dirty read, non‑repeatable read, and phantom read—describes the four standard isolation levels (read uncommitted, read committed, repeatable read, serializable), and shows how databases implement isolation using rollback logs and read‑views.

Database ConcurrencyRepeatable ReadSQL
0 likes · 6 min read
Understanding Transaction Isolation Levels: Dirty, Non‑Repeatable, and Phantom Reads Explained
ITPUB
ITPUB
Apr 26, 2016 · Databases

Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks

This article analyzes a puzzling MySQL deadlock scenario where concurrent DELETE statements on a uniquely indexed row lead to a deadlock, explaining the lock modes, InnoDB's deadlock‑prevention strategy, and the conditions that make such deadlocks possible.

InnoDBRepeatable ReadUnique Index
0 likes · 13 min read
Why Deleting a Single Row by Unique Index Can Still Cause MySQL Deadlocks