diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-03-24 14:55:07 +0100 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-03-24 14:55:07 +0100 |
commit | 909cd1a6ba52b28a705190d7576a15cd38ebea9e (patch) | |
tree | 7ad88d2d125ad45a2f4a42f3b28ed866653f63af | |
parent | dec14dcffe08c0284daac4f93cd750956b15ca47 (diff) | |
download | mariadb-git-10.5-MDEV-21951.tar.gz |
MDEV-21951: mariabackup SST fail if data-directory have lost+found directory10.5-MDEV-21951
To fix this, it is necessary to add an option to exclude the
database with the name "lost+found" from processing (the database
name will be checked by the check_if_skip_database_by_path() or
by the check_if_skip_database() function, and as a result
"lost+found" will be skipped).
In addition, it is necessary to slightly modify the verification
logic in the check_if_skip_database() function.
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 2 | ||||
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 6896205238b..c0f76f43b4a 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2270,7 +2270,7 @@ check_if_skip_database( if (databases_exclude_hash && find_filter_in_hashtable(name, databases_exclude_hash, &database) && - !database->has_tables) { + (!database->has_tables || !databases_include_hash)) { /* Database is found and there are no tables specified, skip entire db. */ return DATABASE_SKIP; diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index 799276258f2..8bd3ef9d10b 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -699,9 +699,11 @@ if ${INNOBACKUPEX_BIN} /tmp --help 2>/dev/null | grep -q -- '--version-check'; t disver="--no-version-check" fi +iopts+=" --databases-exclude=\"lost+found\"" + if [[ ${FORCE_FTWRL:-0} -eq 1 ]];then wsrep_log_info "Forcing FTWRL due to environment variable FORCE_FTWRL equal to $FORCE_FTWRL" - iopts+=" --no-backup-locks " + iopts+=" --no-backup-locks" fi INNOEXTRA=$WSREP_SST_OPT_MYSQLD |