om/数据库/mysql/MVCC.md

27 lines
546 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# LBCC
Lock Base Concurrency Control 基于锁的并发控制。
# MVCC
Multi-Version Concurrency Control即多版本并发控制
生成快照read view
隐藏字段redolog
# 处理幻读
在一个事物中同时出现快照读,当前读和数据插入(另一个事物)会出现事物。
## 串行化
## 间隙锁
select * from user where age = 18 for update;
show engine innodb status\G;(需要开启参数innodb_status_output和innodb_status_output_lock)
# 锁根据索引处理
记录锁(行锁),间隙锁,临界锁