mysql
一、快照读
1. 定义
快照读 即:snapshot read,官方叫法是:Consistent Nonlocking Reads,即:一致性非锁定读,官方的解释是:
A consistent read means that InnoDB uses multi-versioning to present to a query a snapshot of the database at a point in time.
The query sees the changes made by transactions that committed before that point of time, and no changes made by later or uncommitted transactions.
即:
快照读 是: InnoDB 通过 MVCC(多版本控制)将数据库在过去某个时刻的快照应用在查询上,使得:
这次查询 只能看到 别的事务生成快照前提交的数据,而不能看到 别的事务生成快照后提交的数据或者未提交的数据。
2. 存在的问题
The exception to this rule is that the query sees the changes made by earlier statements within the same transaction.
If you update some rows in a table, a SELECT s