summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-10-16 17:49:52 +0200
committerSergei Golubchik <serg@mariadb.org>2018-03-23 00:55:19 +0100
commit89b0d5cb6e3db2736cdc5b66fd1f24e4455bc634 (patch)
treeacf46757ded7d7cadee73e77e11697b956614d85 /scripts
parentde55a7d1f923849e221ca44d9f8e375569ffe5f0 (diff)
downloadmariadb-git-89b0d5cb6e3db2736cdc5b66fd1f24e4455bc634.tar.gz
MDEV-13968 sst fails with "WSREP_SST_OPT_PORT: readonly variable"
Backport from 10.2: 4c2c057d404 and f7090df712d
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_common.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index a8f671de224..db0543a4d0f 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -43,7 +43,7 @@ case "$1" in
else
readonly WSREP_SST_OPT_HOST_UNESCAPED=${WSREP_SST_OPT_HOST}
fi
- readonly WSREP_SST_OPT_PORT=$(echo $WSREP_SST_OPT_ADDR | \
+ readonly WSREP_SST_OPT_ADDR_PORT=$(echo $WSREP_SST_OPT_ADDR | \
cut -d ']' -f 2 | cut -s -d ':' -f 2 | cut -d '/' -f 1)
readonly WSREP_SST_OPT_PATH=${WSREP_SST_OPT_ADDR#*/}
readonly WSREP_SST_OPT_MODULE=${WSREP_SST_OPT_PATH%%/*}
@@ -126,6 +126,17 @@ done
readonly WSREP_SST_OPT_BYPASS
readonly WSREP_SST_OPT_BINLOG
+if [ -n "${WSREP_SST_OPT_ADDR_PORT:-}" ]; then
+ if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
+ if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
+ wsrep_log_error "port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR"
+ exit 2
+ fi
+ else
+ readonly WSREP_SST_OPT_PORT="$WSREP_SST_OPT_ADDR_PORT"
+ fi
+fi
+
# try to use my_print_defaults, mysql and mysqldump that come with the sources
# (for MTR suite)
SCRIPTS_DIR="$(cd $(dirname "$0"); pwd -P)"