-
Marko Mäkelä authored
In mariadb-backup --backup, we only have to invoke the undo_space_trunc and log_file_op callbacks as well as validate the mini-transaction checksums. There is absolutely no need to access recv_sys.pages or recv_spaces. This is what the new mode recv_sys_t::store::BACKUP will do. In the skip_the_rest: loop, the minimum that needs to be done is to process all FILE_ records until the end of the log is reached. Additionally, in case we invoked file_name_t::add_freed_page() for a FREE_PAGE record before switching to the skip_the_rest: loop, we must invoke file_name_t::remove_freed_page() for any INIT_PAGE record. Any other records that we encounter during this parsing can be ignored; they will eventually be processed on a subsequent call to recv_scan_log() with store=true. This was measured to reduce the CPU time between the messages "InnoDB: Multi-batch recovery needed at LSN" and "InnoDB: End of log at LSN" by some 20%. recv_sys_t::store: A ternary enumeration that specifies how records should be stored: NO, BACKUP, or YES. recv_sys_t::parse(), recv_sys_t::parse_mtr(), recv_sys_t::parse_pmem(): Replace template<bool store> with template<store storing>. store_freed_or_init_rec(): Simplify some logic. We can look up also the system tablespace.
4683c2fe