Skip to content

Commit 83280a1

Browse files
authored
fix(database): correct MVCC write mechanism description (#2849)
Correct the misleading statement that MVCC creates snapshots instead of modifying data rows. InnoDB actually uses update-in-place: it directly updates the current row and saves old versions to Undo Log. Read operations achieve consistent reads via ReadView and Undo Log version chain.
2 parents 93f3962 + 87d3079 commit 83280a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/database/mysql/innodb-implementation-of-mvcc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ head:
1212

1313
## 多版本并发控制 (Multi-Version Concurrency Control)
1414

15-
MVCC 是一种并发控制机制,用于在多个并发事务同时读写数据库时保持数据的一致性和隔离性。它是通过在每个数据行上维护多个版本的数据来实现的。当一个事务要对数据库中的数据进行修改时,MVCC 会为该事务创建一个数据快照,而不是直接修改实际的数据行
15+
MVCC 是一种并发控制机制,用于在多个并发事务同时读写数据库时保持数据的一致性和隔离性。它是通过在每个数据行上维护多个版本的数据来实现的。当一个事务对数据进行修改时,InnoDB 会**直接更新当前数据行**(原地更新),并将**旧版本数据保存到 Undo Log** 中。其他事务在进行快照读(Snapshot Read)时,会根据 **ReadView****Undo Log** 中的版本链,读取到该数据在某一时刻的一致性视图,从而避免读操作被写操作阻塞
1616

1717
1、读操作(SELECT):
1818

0 commit comments

Comments
 (0)