1. 程式人生 > >走進官方手冊系列 --- 關於LSN的研究(更新中)

走進官方手冊系列 --- 關於LSN的研究(更新中)

https://dev.mysql.com/doc/refman/5.6/en/glossary.html#glos_lsn

https://www.devarticles.com/c/a/MySQL/How-Logs-Work-On-MySQL-With-InnoDB-Tables/

http://happytest.blog.51cto.com/324097/62848

http://blog.csdn.net/yunhua_lee/article/details/6567869

LSN
Acronym for “log sequence number”. This arbitrary, ever-increasing value represents a point in time corresponding to operations recorded in the redo log. (This point in time is regardless of transaction boundaries; it can fall in the middle of one or more transactions.) It is used internally by InnoDB during crash recovery and for managing the buffer pool.


Prior to MySQL 5.6.3, the LSN was a 4-byte unsigned integer. The LSN became an 8-byte unsigned integer in MySQL 5.6.3 when the redo log file size limit increased from 4GB to 512GB, as additional bytes were required to store extra size information. Applications built on MySQL 5.6.3 or later that use LSN values should use 64-bit rather than 32-bit variables to store and compare LSN values.


In the MySQL Enterprise Backup product, you can specify an LSN to represent the point in time from which to take an incremental backup. The relevant LSN is displayed by the output of the mysqlbackup command. Once you have the LSN corresponding to the time of a full backup, you can specify that value to take a subsequent incremental backup, whose output contains another LSN for the next incremental backup.


See Also buffer pool, crash recovery, incremental backup, MySQL Enterprise Backup, redo log, transaction.
 

何登成博士畫的一張log block的結構圖