diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-16 10:01:29 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-06-16 10:01:29 +0300 |
commit | 5bb90cb2ac7b93f40c8ca4672ec7e2c18f0ea238 (patch) | |
tree | e8a9e88c26d07f9915c93362934feb1910de4049 | |
parent | e99ba4ac8d13c4203f307ec2b477f1ef891866f5 (diff) | |
parent | 27309fc6b0833d7a74baab4afaeef1dcb14307c8 (diff) | |
download | mariadb-git-5bb90cb2ac7b93f40c8ca4672ec7e2c18f0ea238.tar.gz |
Merge 10.5 into 10.6
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index adb13a7c119..ad902bdee59 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -4614,32 +4614,32 @@ fail: reread_log_header: dberr_t err = recv_find_max_checkpoint(&max_cp_field); - if (err != DB_SUCCESS) { + if (err != DB_SUCCESS) msg("Error: cannot read redo log header"); -unlock_and_fail: - mysql_mutex_unlock(&log_sys.mutex); - } - - if (log_sys.log.format == 0) { + else if (log_sys.log.format == 0) { msg("Error: cannot process redo log before MariaDB 10.2.2"); - goto unlock_and_fail; + err = DB_ERROR; } + else { + byte* buf = log_sys.checkpoint_buf; + checkpoint_lsn_start = log_sys.log.get_lsn(); + checkpoint_no_start = log_sys.next_checkpoint_no; - byte* buf = log_sys.checkpoint_buf; - checkpoint_lsn_start = log_sys.log.get_lsn(); - checkpoint_no_start = log_sys.next_checkpoint_no; - - log_sys.log.read(max_cp_field, {buf, OS_FILE_LOG_BLOCK_SIZE}); - - if (checkpoint_no_start != mach_read_from_8(buf + LOG_CHECKPOINT_NO) - || checkpoint_lsn_start - != mach_read_from_8(buf + LOG_CHECKPOINT_LSN) - || log_sys.log.get_lsn_offset() - != mach_read_from_8(buf + LOG_CHECKPOINT_OFFSET)) - goto reread_log_header; + log_sys.log.read(max_cp_field, {buf, OS_FILE_LOG_BLOCK_SIZE}); + if (checkpoint_no_start + != mach_read_from_8(buf + LOG_CHECKPOINT_NO) + || checkpoint_lsn_start + != mach_read_from_8(buf + LOG_CHECKPOINT_LSN) + || log_sys.log.get_lsn_offset() + != mach_read_from_8(buf + LOG_CHECKPOINT_OFFSET)) + goto reread_log_header; + } mysql_mutex_unlock(&log_sys.mutex); + if (err != DB_SUCCESS) + goto fail; + xtrabackup_init_datasinks(); if (!select_history()) { |