summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-02-24 01:21:40 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2016-02-24 01:21:40 -0500
commitcceec7858f260be23b50265fb026ea68c6aefc20 (patch)
tree52251df59c4a69527435c8d682505537fb6e9692 /scripts
parent88576b3a805f97be44d98143b6cdfc9b820fcc84 (diff)
parentf67d6fccacfb8a2963f23448cabb67c6178d2a10 (diff)
downloadmariadb-git-cceec7858f260be23b50265fb026ea68c6aefc20.tar.gz
Merge branch '10.0-galera' into bb-10.1-serg
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_xtrabackup-v2.sh11
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh5
2 files changed, 9 insertions, 7 deletions
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index 2b432cb1089..4cd21d3c216 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -250,7 +250,11 @@ parse_cnf()
{
local group=$1
local var=$2
- reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2-)
+ # print the default settings for given group using my_print_default.
+ # normalize the variable names specified in cnf file (user can use _ or - for example log-bin or log_bin)
+ # then grep for needed variable
+ # finally get the variable value (if variables has been specified multiple time use the last value only)
+ reval=$($MY_PRINT_DEFAULTS $group | awk -F= '{if ($1 ~ /_/) { gsub(/_/,"-",$1); print $1"="$2 } else { print $0 }}' | grep -- "--$var=" | cut -d= -f2- | tail -1)
if [[ -z $reval ]];then
[[ -n $3 ]] && reval=$3
fi
@@ -699,9 +703,8 @@ then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
fi
- if [ -n "$WSREP_SST_OPT_PSWD" ]; then
-# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
+ if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
+ INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
else
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index 1ef3c3f3ce1..2247edec7fd 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -442,9 +442,8 @@ then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
fi
- if [ -n "$WSREP_SST_OPT_PSWD" ]; then
-# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
- export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
+ if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
+ INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
else
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="