diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-21 16:39:23 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-09-21 16:39:23 +0300 |
commit | 2cf489d4305227115177b435ec536fe8f84daa6b (patch) | |
tree | 67e7e8c38e3bd3ffd12cda7c727b8d6310fe6a57 /extra | |
parent | fba6ffe433fdba7aa397f1de8eb4ee0a74f55800 (diff) | |
parent | e05650e6868eab2dbb9f58c4786bcc71afc4ffce (diff) | |
download | mariadb-git-2cf489d4305227115177b435ec536fe8f84daa6b.tar.gz |
Merge 10.2 into 10.3
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 0529cb18f23..529f4dbb7bb 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2770,6 +2770,7 @@ static bool xtrabackup_copy_logfile(bool last = false) ut_a(dst_log_file != NULL); ut_ad(recv_sys != NULL); + bool overwritten_block = false; lsn_t start_lsn; lsn_t end_lsn; @@ -2795,6 +2796,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); @@ -2805,9 +2812,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); |