Skip to content

Commit fabadf6

Browse files
committed
Docs(mysql-questions-01.md) fix typos
1 parent 79dd9f8 commit fabadf6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/database/mysql/mysql-questions-01.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ COMMIT;
452452

453453
一个事务读取数据并且对数据进行了修改,这个修改对其他事务来说是可见的,即使当前事务没有提交。这时另外一个事务读取了这个还未提交的数据,但第一个事务突然回滚,导致数据并没有被提交到数据库,那第二个事务读取到的就是脏数据,这也就是脏读的由来。
454454

455-
例如:事务 1 读取某表中的数据 A=20,事务 1 修改 A=A-1,事务 2 读取到 A = 19,事务 1 回滚导致对 A 的修改并为提交到数据库, A 的值还是 20。
455+
例如:事务 1 读取某表中的数据 A=20,事务 1 修改 A=A-1,事务 2 读取到 A = 19,事务 1 回滚导致对 A 的修改并未提交到数据库, A 的值还是 20。
456456

457457
![脏读](./images/concurrency-consistency-issues-dirty-reading.png)
458458

0 commit comments

Comments
 (0)