diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-19 20:36:05 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-10-19 20:36:05 +0300 |
commit | 1066312a12023d2558eecde84739c4bbb60eb509 (patch) | |
tree | ee2f5b7393a6e28d1e5b02f7d0e34d15a8c71596 | |
parent | f4f00e7c408a1e6603f5dac7f6fae83df50cad96 (diff) | |
download | mariadb-git-1066312a12023d2558eecde84739c4bbb60eb509.tar.gz |
MDEV-23982: Mariabackup hangs on backup
MDEV-13318 introduced a condition to Mariabackup that can cause it to
hang if the server goes idle after writing a log block that has no
payload after the 12-byte header. Normal recovery in log0recv.cc would
allow blocks with exactly 12 bytes of length, and only reject blocks
where the length field is shorter than that.
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 33a64356366..162efebbd9f 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2723,7 +2723,7 @@ static lsn_t xtrabackup_copy_log(lsn_t start_lsn, lsn_t end_lsn, bool last) scanned_lsn += data_len; } else if (data_len >= OS_FILE_LOG_BLOCK_SIZE - LOG_BLOCK_TRL_SIZE - || data_len <= LOG_BLOCK_HDR_SIZE) { + || data_len < LOG_BLOCK_HDR_SIZE) { /* We got a garbage block (abrupt end of the log). */ msg(0,"garbage block: " LSN_PF ",%zu",scanned_lsn, data_len); break; |