Commit 238798d9 authored by Julius Goryavsky's avatar Julius Goryavsky

MDEV-32158: wsrep_sst_mariabackup use /tmp dir during SST rather then user defined tmpdir

wsrep_sst_mariabackup should use the tmpdir defined by
the user under the '[mysqld]' section of the configuration
file rather than the default '/tmp' directory.
parent 654f6ece
......@@ -714,7 +714,7 @@ cleanup_at_exit()
fi
# Final cleanup
pgid=$(ps -o pgid= $$ 2>/dev/null | grep -o -E '[0-9]+' || :)
pgid=$(ps -o 'pgid=' $$ 2>/dev/null | grep -o -E '[0-9]+' || :)
# This means no setsid done in mysqld.
# We don't want to kill mysqld here otherwise.
......@@ -1086,17 +1086,19 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
tmpdir=$(parse_cnf "$encgroups" 'tmpdir')
if [ -z "$tmpdir" ]; then
xtmpdir="$(mktemp -d)"
itmpdir="$(mktemp -d)"
elif [ "$OS" = 'Linux' ]; then
xtmpdir=$(mktemp '-d' "--tmpdir=$tmpdir")
xtmpdir=$(mktemp -d "--tmpdir=$tmpdir")
itmpdir=$(mktemp -d "--tmpdir=$tmpdir")
else
xtmpdir=$(TMPDIR="$tmpdir"; mktemp '-d')
xtmpdir=$(TMPDIR="$tmpdir"; mktemp -d)
itmpdir=$(TMPDIR="$tmpdir"; mktemp -d)
fi
wsrep_log_info "Using '$xtmpdir' as mariadb-backup temporary directory"
tmpopts=" --tmpdir='$xtmpdir'"
itmpdir="$(mktemp -d)"
wsrep_log_info "Using '$itmpdir' as mariadb-abackup working directory"
wsrep_log_info "Using '$itmpdir' as mariadb-backup working directory"
usrst=0
if [ -n "$WSREP_SST_OPT_USER" ]; then
......
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