Browse Source

MDEV-18611: mariabackup silently ended during xtrabackup_copy_logfile()

log_group_read_log_seg(): Always return false when returning
before reading end_lsn.

xtrabackup_copy_logfile(): On error, indicate whether
a corrupt log record was encountered.

Only xtrabackup_copy_logfile() in Mariabackup cared about the
return value of the function. InnoDB crash recovery was not
affected by this bug.
pull/1213/head
Marko Mäkelä 7 years ago
parent
commit
ca76fc4a3a
  1. 5
      extra/mariabackup/xtrabackup.cc
  2. 11
      storage/innobase/log/log0recv.cc

5
extra/mariabackup/xtrabackup.cc

@ -2756,7 +2756,10 @@ static bool xtrabackup_copy_logfile(bool last = false)
log_mutex_exit();
if (!start_lsn) {
die("xtrabackup_copy_logfile() failed.");
msg(recv_sys->found_corrupt_log
? "xtrabackup_copy_logfile() failed: corrupt log."
: "xtrabackup_copy_logfile() failed.");
return true;
}
} while (start_lsn == end_lsn);

11
storage/innobase/log/log0recv.cc

@ -2,7 +2,7 @@
Copyright (c) 1997, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
Copyright (c) 2013, 2018, MariaDB Corporation.
Copyright (c) 2013, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@ -807,7 +807,9 @@ loop:
happen when InnoDB was killed while it was
writing redo log. We simply treat this as an
abrupt end of the redo log. */
fail:
end_lsn = *start_lsn;
success = false;
break;
}
@ -829,9 +831,7 @@ loop:
<< log_block_get_checkpoint_no(buf)
<< " expected: " << crc
<< " found: " << cksum;
end_lsn = *start_lsn;
success = false;
break;
goto fail;
}
if (group->is_encrypted()) {
@ -845,8 +845,7 @@ loop:
|| (dl > OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE
&& dl != OS_FILE_LOG_BLOCK_SIZE)) {
recv_sys->found_corrupt_log = true;
end_lsn = *start_lsn;
break;
goto fail;
}
}

Loading…
Cancel
Save