MySQL 中,刷臟頁是一項非常重要的操作。但是,有些人是否會擔心在進行刷臟頁的過程中,是否會記錄下相關的操作信息?
實際上,在 MySQL 中,刷臟頁的操作是有相應的記錄的。
InnoDB: Checkpoint age sn1226 checkpoint age 6 InnoDB: Starting InnoDB... InnoDB: Log sequence number 24654880 InnoDB: Checkpoint was forced InnoDB: Starting recovery for XA transactions... InnoDB: Transaction 1850443 in prepared state after recovery InnoDB: Transaction contains changes to 2 rows InnoDB: 1 transactions in prepared state after recovery InnoDB: Last MySQL binlog file position 0 17455, file name /usr/local/mysql/data/binlog/mysql-bin.000249 InnoDB: Starting an apply batch of log records to the database... InnoDB: Apply batch completed InnoDB: Starting in background the rollback of uncommitted transactions InnoDB: Rolling back trx with id 1850443, 2 rows to undo InnoDB: Rolling back of trx id 1850443 completed
可以看出,在進行刷臟頁操作時,MySQL 會記錄一些與其相關的操作信息,比如檢查點,在啟動 InnoDB,啟動 recovery,應用日志記錄等等。對于那些使用 MySQL 數據庫的開發者們來說,這些信息記錄的存在,為其開發和維護工作提供了很大的便利。