当前位置:网站首页>[MySQL learning notes 32] mvcc

[MySQL learning notes 32] mvcc

2022-07-06 07:19:00 yqs_ two hundred and eighty-one million eight hundred and seven

redo log Redo log

redo log It records the physical modification of the data page when the transaction is committed , It is used to achieve the persistence of transactions
The log is divided into two parts : Redo log buffer and redo log file , The former is in memory , The latter is on disk . After the transaction is committed, all modification information will be saved to the log file , Used to refresh dirty pages ( That is, uncommitted data ) Restore data usage when disk errors occur .

undo log Rollback log

 Insert picture description here

MVCC

 Insert picture description here

Implicit fields

Field name meaning
DB_TRX_ID Recently modified transactions ID, Record the transaction that inserted this record or last modified it ID
DR_ROLL_PTR rollback pointer , Record the last version of this record , Used for coordination undo log, Point to the previous version
DB_ROW_ID Hide primary key , If the table structure does not specify a primary key , Hidden primary keys will be automatically generated

Version chain

 Insert picture description here

readview

 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[yqs_ two hundred and eighty-one million eight hundred and seven]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060713326450.html