mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
a23414dd32
When the log is stored in persistent memory, log_sys.buf[] is a ring buffer that directly maps to the circular ib_logfile0 file. There were several errors that could occur in the special case when a log record ends exactly at the end of the log file and the next record would start at log_sys.buf[log_sys.START_OFFSET]. mariabackup.huge_lsn,strict_full_crc32: Write the first record at the very end of the circular file, to reproduce the failure scenarios. recv_sys_t::parse(): On PMEM, wrap the end offset of the record from log_sys.file_size to log_sys.START_OFFSET if needed. Otherwise, both InnoDB recovery and mariadb-backup would try to parse the next record from an invalid address. filename_to_spacename(): Remove an assumption about the format of file names. While the server currently writes file names like ./databasename/tablename.ibd we might want to stop writing the redundant ./ prefix in the future. The test mariabackup.huge_lsn is generating such file names. xtrabackup_copy_logfile(): Correctly copy a record that ends at the very end of the log_sys.buf[]. The errors in mariadb-backup were reproduced with the test mariabackup.huge_lsn,strict_full_crc32 and an additional patch to use the start checkpoint of the test: diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc index 27dce5fa17d..e17a1692d6f 100644 --- a/storage/innobase/log/log0recv.cc +++ b/storage/innobase/log/log0recv.cc @@ -1796,7 +1796,8 @@ dberr_t recv_sys_t::find_checkpoint() continue; } - if (checkpoint_lsn >= log_sys.next_checkpoint_lsn) + if (checkpoint_lsn >= log_sys.next_checkpoint_lsn && + checkpoint_lsn != 0x1000fffffe10) { log_sys.next_checkpoint_lsn= checkpoint_lsn; log_sys.next_checkpoint_no= field == log_t::CHECKPOINT_1; |
||
---|---|---|
.. | ||
quicklz | ||
backup_copy.cc | ||
backup_copy.h | ||
backup_debug.h | ||
backup_mysql.cc | ||
backup_mysql.h | ||
backup_wsrep.h | ||
changed_page_bitmap.cc | ||
changed_page_bitmap.h | ||
CMakeLists.txt | ||
common.h | ||
datasink.cc | ||
datasink.h | ||
ds_buffer.cc | ||
ds_buffer.h | ||
ds_compress.cc | ||
ds_compress.h | ||
ds_local.cc | ||
ds_local.h | ||
ds_stdout.cc | ||
ds_stdout.h | ||
ds_tmpfile.cc | ||
ds_tmpfile.h | ||
ds_xbstream.cc | ||
ds_xbstream.h | ||
fil_cur.cc | ||
fil_cur.h | ||
innobackupex.cc | ||
innobackupex.h | ||
read_filt.cc | ||
read_filt.h | ||
write_filt.cc | ||
write_filt.h | ||
wsrep.cc | ||
xb_plugin.cc | ||
xb_plugin.h | ||
xb_regex.h | ||
xbcloud.cc | ||
xbstream.cc | ||
xbstream.h | ||
xbstream_read.cc | ||
xbstream_write.cc | ||
xtrabackup.cc | ||
xtrabackup.h |