Tag

Repeatable Read

0 views collected around this technical thread.

Aikesheng Open Source Community
Aikesheng Open Source Community
Nov 13, 2024 · Databases

InnoDB Locking Analysis for INSERT … ON DUPLICATE KEY under REPEATABLE‑READ and READ‑COMMITTED

This article examines how InnoDB acquires row‑level locks during INSERT … ON DUPLICATE KEY operations under REPEATABLE‑READ and READ‑COMMITTED isolation levels, explains the lock types on primary and unique indexes, and shows the rollback and lock‑conversion process with concrete SQL examples.

InnoDBMySQLRead Committed
0 likes · 11 min read
InnoDB Locking Analysis for INSERT … ON DUPLICATE KEY under REPEATABLE‑READ and READ‑COMMITTED
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 23, 2024 · Databases

Analyzing InnoDB Locking Behavior under REPEATABLE‑READ and READ‑COMMITTED Isolation Levels

This article demonstrates how InnoDB acquires and releases row‑level locks for a sample table under REPEATABLE‑READ and READ‑COMMITTED isolation levels, showing the SQL statements used, the lock types observed in the performance_schema, and the reasons behind the observed locking patterns.

InnoDBMySQLRead Committed
0 likes · 10 min read
Analyzing InnoDB Locking Behavior under REPEATABLE‑READ and READ‑COMMITTED Isolation Levels
Aikesheng Open Source Community
Aikesheng Open Source Community
Oct 16, 2024 · Databases

MySQL InnoDB Lock Behavior under Repeatable Read and Read Committed Isolation Levels

This article demonstrates how InnoDB handles row, next‑key, and gap locks for a SELECT … FOR SHARE query under REPEATABLE‑READ and READ‑COMMITTED isolation levels, showing the preparation steps, SQL examples, lock inspection queries, and a concise summary of the differences.

InnoDBIsolation LevelsLocks
0 likes · 8 min read
MySQL InnoDB Lock Behavior under Repeatable Read and Read Committed Isolation Levels
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.

InnoDBMySQLRead Committed
0 likes · 9 min read
Understanding InnoDB Locking: Repeatable Read vs. Read Committed Isolation Levels
Aikesheng Open Source Community
Aikesheng Open Source Community
Sep 25, 2024 · Databases

Analysis of Lock Behavior under REPEATABLE-READ and READ-COMMITTED Isolation Levels

This tutorial demonstrates, using MySQL 8.0.32 InnoDB source code, how REPEATABLE-READ and READ-COMMITTED isolation levels affect the locking behavior of SELECT ... FOR SHARE statements on primary‑key rows, including preparation, execution, and detailed lock analysis.

InnoDBMySQLRead Committed
0 likes · 7 min read
Analysis of Lock Behavior under REPEATABLE-READ and 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.

InnoDBMVCCMySQL
0 likes · 19 min read
Phantom Read Verification and Analysis in InnoDB REPEATABLE‑READ Isolation
Zhuanzhuan Tech
Zhuanzhuan Tech
Aug 30, 2024 · Databases

Investigating Phantom Reads in InnoDB REPEATABLE-READ Isolation Level: Experiments and Analysis

This article examines whether the REPEATABLE‑READ isolation level in InnoDB fully prevents phantom reads by conducting systematic current‑read and snapshot‑read experiments, analyzing lock mechanisms, MVCC behavior, and presenting detailed SQL scripts, results, and recommendations for avoiding phantom reads.

InnoDBMVCCMySQL
0 likes · 18 min read
Investigating Phantom Reads in InnoDB REPEATABLE-READ Isolation Level: Experiments and Analysis
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.

DatabaseJDBCOceanBase
0 likes · 8 min read
Understanding Repeatable Read in OceanBase Oracle Mode and the Correct JDBC Configuration
Aikesheng Open Source Community
Aikesheng Open Source Community
Jun 25, 2024 · Databases

Analyzing a BenchmarkSQL‑Induced Infinite Loop in MySQL under REPEATABLE‑READ Isolation

This article investigates why BenchmarkSQL stalls during MySQL performance testing, tracing the issue to REPEATABLE‑READ isolation causing a dead‑loop in delete‑select transactions, and demonstrates how switching to READ‑COMMITTED resolves the problem through detailed code inspection and experimental verification.

BenchmarkSQLMySQLPerformance Testing
0 likes · 8 min read
Analyzing a BenchmarkSQL‑Induced Infinite Loop in MySQL under REPEATABLE‑READ Isolation
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.

InnoDBMySQLRead 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 InternalsInnoDBMySQL
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?
Aikesheng Open Source Community
Aikesheng Open Source Community
Aug 20, 2021 · Databases

Understanding Phantom Reads and Isolation Levels in ANSI SQL and MySQL

This article explains the concept of phantom reads, distinguishes them from non‑repeatable reads, critiques the ANSI SQL isolation‑level definitions, and shows how MySQL implements repeatable‑read using locks and MVCC to prevent both strict and loosely defined phantom anomalies.

ANSI SQLIsolation LevelMySQL
0 likes · 14 min read
Understanding Phantom Reads and Isolation Levels in ANSI SQL and MySQL
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.

InnoDBMySQLPerformance Testing
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.

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