InnoDB 事务模型旨在将 多版本 数据库的最佳特性与传统的两段锁结合起来。InnoDB 在行级执行锁定,默认以类似 Oracle 的方式将查询作为非锁定的 一致性读取 运行。InnoDB 中的锁信息以节省空间的方式存储,因此不需要锁升级。通常,多个用户被允许锁定 InnoDB 表中的每一行,或任意随机子集的行,而不会导致 InnoDB 内存耗尽。The InnoDB transaction model aims to combine
the best properties of a
multi-versioning database with
traditional two-phase locking. InnoDB performs
locking at the row level and runs queries as nonlocking
consistent reads by
default, in the style of Oracle. The lock information in
InnoDB is stored space-efficiently so that lock
escalation is not needed. Typically, several users are permitted
to lock every row in InnoDB tables, or any
random subset of the rows, without causing
InnoDB memory exhaustion.