Commit 4ba20e0a authored by Julius Goryavsky's avatar Julius Goryavsky

Improved handling of subdirectories in the xtrabackup-v2 SST scripts (similar...

Improved handling of subdirectories in the xtrabackup-v2 SST scripts (similar to MDEV-18863) for more predictable test results (related to xtrabackup-v2 SST)
parent d4866c7d
...@@ -834,7 +834,7 @@ then ...@@ -834,7 +834,7 @@ then
-z $(parse_cnf --mysqld tmpdir "") && \ -z $(parse_cnf --mysqld tmpdir "") && \
-z $(parse_cnf xtrabackup tmpdir "") ]]; then -z $(parse_cnf xtrabackup tmpdir "") ]]; then
xtmpdir=$(mktemp -d) xtmpdir=$(mktemp -d)
tmpopts=" --tmpdir=$xtmpdir " tmpopts=" --tmpdir=$xtmpdir"
wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory" wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory"
fi fi
...@@ -1049,7 +1049,7 @@ then ...@@ -1049,7 +1049,7 @@ then
tempdir=$LOG_BIN_ARG tempdir=$LOG_BIN_ARG
if [ -z "$tempdir" ]; then if [ -z "$tempdir" ]; then
tempdir=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE log-bin "") tempdir=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE log-bin "")
fi fi
if [ -z "$tempdir" ]; then if [ -z "$tempdir" ]; then
tempdir=$(parse_cnf --mysqld log-bin "") tempdir=$(parse_cnf --mysqld log-bin "")
......
...@@ -906,7 +906,10 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then ...@@ -906,7 +906,10 @@ if [ ! -z "$INNODB_DATA_HOME_DIR_ARG" ]; then
fi fi
# if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf # if INNODB_DATA_HOME_DIR env. variable is not set, try to get it from my.cnf
if [ -z "$INNODB_DATA_HOME_DIR" ]; then if [ -z "$INNODB_DATA_HOME_DIR" ]; then
INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir "") INNODB_DATA_HOME_DIR=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE innodb-data-home-dir '')
fi
if [ -z "$INNODB_DATA_HOME_DIR" ]; then
INNODB_DATA_HOME_DIR=$(parse_cnf --mysqld innodb-data-home-dir '')
fi fi
if [ ! -z "$INNODB_DATA_HOME_DIR" ]; then if [ ! -z "$INNODB_DATA_HOME_DIR" ]; then
INNOEXTRA+=" --innodb-data-home-dir=$INNODB_DATA_HOME_DIR" INNOEXTRA+=" --innodb-data-home-dir=$INNODB_DATA_HOME_DIR"
...@@ -937,9 +940,11 @@ then ...@@ -937,9 +940,11 @@ then
exit 93 exit 93
fi fi
if [[ -z $(parse_cnf --mysqld tmpdir "") && -z $(parse_cnf xtrabackup tmpdir "") ]];then if [[ -z $(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE tmpdir "") && \
-z $(parse_cnf --mysqld tmpdir "") && \
-z $(parse_cnf xtrabackup tmpdir "") ]]; then
xtmpdir=$(mktemp -d) xtmpdir=$(mktemp -d)
tmpopts=" --tmpdir=$xtmpdir " tmpopts=" --tmpdir=$xtmpdir"
wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory" wsrep_log_info "Using $xtmpdir as xtrabackup temporary directory"
fi fi
...@@ -1057,8 +1062,24 @@ then ...@@ -1057,8 +1062,24 @@ then
[[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE [[ -n $SST_PROGRESS_FILE ]] && touch $SST_PROGRESS_FILE
ib_home_dir=$INNODB_DATA_HOME_DIR ib_home_dir=$INNODB_DATA_HOME_DIR
ib_log_dir=$(parse_cnf --mysqld innodb-log-group-home-dir "")
ib_undo_dir=$(parse_cnf --mysqld innodb-undo-directory "") # Try to set ib_log_dir from the command line:
ib_log_dir=$INNODB_LOG_GROUP_HOME_ARG
if [ -z "$ib_log_dir" ]; then
ib_log_dir=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE innodb-log-group-home-dir "")
fi
if [ -z "$ib_log_dir" ]; then
ib_log_dir=$(parse_cnf --mysqld innodb-log-group-home-dir "")
fi
# Try to set ib_undo_dir from the command line:
ib_undo_dir=$INNODB_UNDO_DIR_ARG
if [ -z "$ib_undo_dir" ]; then
ib_undo_dir=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE innodb-undo-directory "")
fi
if [ -z "$ib_undo_dir" ]; then
ib_undo_dir=$(parse_cnf --mysqld innodb-undo-directory "")
fi
stagemsg="Joiner-Recv" stagemsg="Joiner-Recv"
...@@ -1124,7 +1145,13 @@ then ...@@ -1124,7 +1145,13 @@ then
find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -prune -regex $cpat -o -exec rm -rfv {} 1>&2 \+ find $ib_home_dir $ib_log_dir $ib_undo_dir $DATA -mindepth 1 -prune -regex $cpat -o -exec rm -rfv {} 1>&2 \+
fi fi
tempdir=$(parse_cnf --mysqld log-bin "") tempdir=$LOG_BIN_ARG
if [ -z "$tempdir" ]; then
tempdir=$(parse_cnf mysqld$WSREP_SST_OPT_SUFFIX_VALUE log-bin "")
fi
if [ -z "$tempdir" ]; then
tempdir=$(parse_cnf --mysqld log-bin "")
fi
if [[ -n ${tempdir:-} ]];then if [[ -n ${tempdir:-} ]];then
binlog_dir=$(dirname $tempdir) binlog_dir=$(dirname $tempdir)
binlog_file=$(basename $tempdir) binlog_file=$(basename $tempdir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment