summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_common.sh
diff options
context:
space:
mode:
authorAlexey Yurchenko <ayurchen@gmail.com>2015-06-06 01:08:41 +0300
committerNirbhay Choubey <nirbhay@mariadb.com>2015-09-09 22:29:03 -0400
commit86ee30cea95b4a3c8b34398e75e4fc62d0501616 (patch)
tree62b43cc16417537c889584356b48ae50030ba46a /scripts/wsrep_sst_common.sh
parent197e9d2559907b97905f7d1536b481bba2e9ffe3 (diff)
downloadmariadb-git-86ee30cea95b4a3c8b34398e75e4fc62d0501616.tar.gz
Refs codership/mysql-wsrep#141: this commit
1. Passes wsrep_sst_auth_value to SST scripts via WSREP_SST_OPT_AUTH envronmental variable, so it never appears on the command line 2. In mysqldump and xtrabackup* SST scripts which rely on MySQL authentication, instead of passing password on the command line, SST script sets MYSQL_PWD environment variable, so that password also never appears on the mysqldump/innobackupex command line.
Diffstat (limited to 'scripts/wsrep_sst_common.sh')
-rw-r--r--scripts/wsrep_sst_common.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 0aa338510e0..f7cd9e91849 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -143,8 +143,8 @@ readonly WSREP_SST_OPT_AUTH
if ! wsrep_auth_not_set
then
readonly AUTH_VEC=(${WSREP_SST_OPT_AUTH//:/ })
- WSREP_SST_OPT_USER="${AUTH_VEC[0]:-}"
- WSREP_SST_OPT_PSWD="${AUTH_VEC[1]:-}"
+ [ -n "${AUTH_VEC[0]}" ] && WSREP_SST_OPT_USER="${AUTH_VEC[0]}"
+ [ -n "${AUTH_VEC[1]}" ] && WSREP_SST_OPT_PSWD="${AUTH_VEC[1]}"
fi
readonly WSREP_SST_OPT_USER
readonly WSREP_SST_OPT_PSWD