diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-10-16 17:49:52 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-10-18 22:15:26 +0200 |
commit | 4c2c057d4044364a27fb8c217f804f6fb25fcc02 (patch) | |
tree | 61080920c1bd7bc3a71d2c201c5de7010bd3c7bf | |
parent | 30faf331b8ec86211581f040f17a5b8ee37e46f2 (diff) | |
download | mariadb-git-4c2c057d4044364a27fb8c217f804f6fb25fcc02.tar.gz |
MDEV-13968 sst fails with "WSREP_SST_OPT_PORT: readonly variable"
-rw-r--r-- | scripts/wsrep_sst_common.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index 0333a2db882..3ffaf8b10ef 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -45,7 +45,7 @@ case "$1" in # "traditional" notation readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*} 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#*/} shift @@ -124,6 +124,17 @@ readonly WSREP_SST_OPT_BYPASS readonly WSREP_SST_OPT_BINLOG readonly WSREP_SST_OPT_CONF_SUFFIX +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)" |