diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 4845f51e6b2..231e3c04f16 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2773,6 +2773,7 @@ static bool xtrabackup_copy_logfile(bool last = false) ut_a(dst_log_file != NULL); ut_ad(recv_sys != NULL); + bool overwritten_block; lsn_t start_lsn; lsn_t end_lsn; @@ -2799,6 +2800,12 @@ static bool xtrabackup_copy_logfile(bool last = false) } if (lsn == start_lsn) { + overwritten_block= !recv_sys->found_corrupt_log + && (innodb_log_checksums || log_sys->log.is_encrypted()) + && log_block_calc_checksum_crc32(log_sys->buf) == + log_block_get_checksum(log_sys->buf) + && log_block_get_hdr_no(log_sys->buf) > + log_block_convert_lsn_to_no(start_lsn); start_lsn = 0; } else { mutex_enter(&recv_sys->mutex); @@ -2809,9 +2816,15 @@ static bool xtrabackup_copy_logfile(bool last = false) log_mutex_exit(); if (!start_lsn) { - die(recv_sys->found_corrupt_log - ? "xtrabackup_copy_logfile() failed: corrupt log." - : "xtrabackup_copy_logfile() failed."); + const char *reason = recv_sys->found_corrupt_log + ? "corrupt log." + : (overwritten_block + ? "redo log block is overwritten, please increase redo log size with innodb_log_file_size parameter." + : ((innodb_log_checksums || log_sys->log.is_encrypted()) + ? "redo log block checksum does not match." + : "unknown reason as innodb_log_checksums is switched off and redo" + " log is not encrypted.")); + die("xtrabackup_copy_logfile() failed: %s", reason); return true; } } while (start_lsn == end_lsn); |