summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2016-01-11 22:43:27 +0200
committerNirbhay Choubey <nirbhay@mariadb.com>2016-08-21 16:16:58 -0400
commit58386ca04dffd5fc9006d8f70a44a3a82f385b96 (patch)
treec1a90b8f6045a2ded39de22507b0b1e445fa9b31 /scripts
parent9f211d49562da522c8b1dec35ff871fa20f5d89f (diff)
downloadmariadb-git-58386ca04dffd5fc9006d8f70a44a3a82f385b96.tar.gz
refs codership/mysql-wsrep#239
Synced xtrabackup SST scripts from PXC source tree as of PXC 5.6.27-25.13 - PXC#480: xtrabackup-v2 SST fails with multiple log_bin directives in my.cn - PXC#460: wsrep_sst_auth don't work in Percona-XtraDB-Cluster-56-5.6.25-25. - PXC-416: Fix SST related issues. - PXC-389: Merge remote-tracking branch 'wsrep/5.6' into 5.6-wsrep-pxc389 - Bug #1431101: SST does not clobber backup-my.cnf
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_common.sh4
-rw-r--r--scripts/wsrep_sst_xtrabackup-v2.sh6
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh6
3 files changed, 10 insertions, 6 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 0aa338510e0..25ec0baae80 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -134,7 +134,7 @@ if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth"
then
if wsrep_auth_not_set
then
- WSREP_SST_OPT_AUTH=$(MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
+ WSREP_SST_OPT_AUTH=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
fi
fi
readonly WSREP_SST_OPT_AUTH
@@ -176,7 +176,7 @@ wsrep_log_info()
wsrep_cleanup_progress_file()
{
- [ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null
+ [ -n "${SST_PROGRESS_FILE:-}" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true
}
wsrep_check_program()
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index 074f36a11e9..b5556c60c64 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -674,6 +674,7 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
+ usrst=0
if [[ -z $sst_ver ]];then
wsrep_log_error "Upgrade joiner to 5.6.21 or higher for backup locks support"
wsrep_log_error "The joiner is not supported for this version of donor"
@@ -689,13 +690,14 @@ then
itmpdir=$(mktemp -d)
wsrep_log_info "Using $itmpdir as innobackupex temporary directory"
- if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
+ if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
+ usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- else
+ elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index 4acf2854301..b40be208be7 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -436,15 +436,17 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
+ usrst=0
TMPDIR="${TMPDIR:-/tmp}"
- if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
+ if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
+ usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- else
+ elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi