diff options
author | Alexander Barkov <bar@mariadb.com> | 2023-04-24 10:27:55 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2023-04-24 10:27:55 +0400 |
commit | d7e86fbd3bd3e3e08c4b8faeeca5aef7dcd570d8 (patch) | |
tree | 1eadda4454cfcc35d3ae29073e102fdc13e8483d | |
parent | 6dc6c22c14fe204dbac43b6132c5bd130c69aba1 (diff) | |
download | mariadb-git-bb-10.4-bar-MDEV-31085.tar.gz |
A cleanup for MDEV-31085 Crash when processing multi-update using view with optimizer_trace onbb-10.4-bar-MDEV-31085
Fixing buildbot failures on mariabackup.aria_log_dir_path_rel.
The problem was that directory_exists() was called with the
relative aria_log_dir_path value, while the current directory
in mariadb-backup is not necessarily equal to datadir when MTR is running.
Fix:
- Moving building the absolute path un level upper:
from the function copy_back_aria_logs() to the function copy_back().
- Passing the built absolute path to both directory_exists() and
copy_back_aria_logs() as a parameter.
-rw-r--r-- | extra/mariabackup/backup_copy.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index 8ab52fa983b..05acc1e6765 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -1849,10 +1849,8 @@ is_aria_log_dir_file(const datadir_node_t &node) bool -copy_back_aria_logs() +copy_back_aria_logs(const char *dstdir) { - Copy_back_dst_dir dst_dir_buf; - const char *dstdir= dst_dir_buf.make(aria_log_dir_path); std::unique_ptr<ds_ctxt_t, void (&)(ds_ctxt_t*)> ds_ctxt_aria_log_dir_path(ds_create(dstdir, DS_TYPE_LOCAL), ds_destroy); @@ -1907,8 +1905,11 @@ copy_back() && !directory_exists(srv_log_group_home_dir, true)) { return(false); } + + Copy_back_dst_dir aria_log_dir_path_dst; + const char *aria_log_dir_path_abs= aria_log_dir_path_dst.make(aria_log_dir_path); if (aria_log_dir_path && *aria_log_dir_path - && !directory_exists(aria_log_dir_path, true)) { + && !directory_exists(aria_log_dir_path_abs, true)) { return false; } @@ -1919,7 +1920,7 @@ copy_back() return(false); } - if (!copy_back_aria_logs()) + if (!copy_back_aria_logs(aria_log_dir_path_abs)) return false; /* parse data file path */ |