mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-31251 MDEV-30968 breaks running mariabackup on older mariadb (opendir(NULL))
The problem happened when running mariabackup agains a pre-MDEV-30971 server, i.e. not having yet the system variable @@aria_log_dir_path. As a result, backup_start() called the function backup_files_from_datadir() with a NULL value, which further caused a crash. Fix: Perform this call: backup_files_from_datadir(.., aria_log_dir_path, ..) only if aria_log_dir_path is not NULL. Otherwise, assume that Aria log files are in their default location, so they've just copied by the previous call: backup_files_from_datadir(.., fil_path_to_mysql_datadir, ..) Thanks to Walter Doekes for a patch proposal.
This commit is contained in:
parent
73291de74e
commit
11986ec654
1 changed files with 4 additions and 3 deletions
|
@ -1439,9 +1439,10 @@ bool backup_start(ds_ctxt *ds_data, ds_ctxt *ds_meta,
|
|||
|
||||
if (!backup_files_from_datadir(ds_data, fil_path_to_mysql_datadir,
|
||||
"aws-kms-key") ||
|
||||
(aria_log_dir_path &&
|
||||
!backup_files_from_datadir(ds_data,
|
||||
aria_log_dir_path,
|
||||
"aria_log")) {
|
||||
"aria_log"))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue