From 6aa22eaf62ab6cd78073efbddbc2ff3b5f11883d Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Wed, 7 Mar 2018 14:36:40 +1100 Subject: wsrep_sst_common: fix per shellcheck shellcheck -s sh wsrep_sst_common.sh In wsrep_sst_common.sh line 258: [ -n $3 ] && reval=$3 ^-- SC2070: -n doesn't work with unquoted arguments. Quote or use [[ ]]. ^-- SC2086: Double quote to prevent globbing and word splitting. --- scripts/wsrep_sst_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index b9d9d04fef6..7f3fe23e0c4 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -255,7 +255,7 @@ parse_cnf() # use default if we haven't found a value if [ -z $reval ]; then - [ -n $3 ] && reval=$3 + [ -n "$3" ] && reval=$3 fi echo $reval } -- cgit v1.2.1 From cf648afd5b336ea61eacb3d0c0e52e0777d12c16 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 14 Jun 2018 15:12:13 +0200 Subject: fix galera sst tests note that ${A#foo} is $A if there's no prefix foo. That's why galera nodes tried to connect to 127.0.0.1:127.0.0.1 if there was no port in the address Followup for 2b35db5ac4e --- scripts/wsrep_sst_common.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index d20e3bc36c9..1f57f3ebbc2 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -41,15 +41,14 @@ case "$1" in addr_no_bracket=${WSREP_SST_OPT_ADDR#\[} readonly WSREP_SST_OPT_HOST_UNESCAPED=${addr_no_bracket%%\]*} readonly WSREP_SST_OPT_HOST="[${WSREP_SST_OPT_HOST_UNESCAPED}]" - remain=${WSREP_SST_OPT_ADDR#*\]} - remain=${remain#*:} ;; *) readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*} readonly WSREP_SST_OPT_HOST_UNESCAPED=$WSREP_SST_OPT_HOST - remain=${WSREP_SST_OPT_ADDR#*:} ;; esac + remain=${WSREP_SST_OPT_ADDR#${WSREP_SST_OPT_HOST}} + remain=${remain#:} readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*} remain=${remain#*/} readonly WSREP_SST_OPT_MODULE=${remain%%/*} -- cgit v1.2.1 From 62e290923e0d9caedeb91e40d16b5dcef983048f Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 16 Jul 2018 09:41:37 +0200 Subject: Put one filter per line in wsrep_sst_rsync.sh This way it is more readable and easy to change, also if a new entry is added or one removed, the diff will be easier to read. --- scripts/wsrep_sst_rsync.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 5617142ea99..89afaa6ecbd 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -120,8 +120,14 @@ fi # --exclude '*.[0-9][0-9][0-9][0-9][0-9][0-9]' --exclude '*.index') # New filter - exclude everything except dirs (schemas) and innodb files -FILTER=(-f '- /lost+found' -f '- /.fseventsd' -f '- /.Trashes' - -f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' -f '+ /*/' -f '- /*') +FILTER=(-f '- /lost+found' + -f '- /.fseventsd' + -f '- /.Trashes' + -f '+ /wsrep_sst_binlog.tar' + -f '+ /ib_lru_dump' + -f '+ /ibdata*' + -f '+ /*/' + -f '- /*') if [ "$WSREP_SST_OPT_ROLE" = "donor" ] then -- cgit v1.2.1 From 3f0cd66a2bf5a1addfa2b020305ebc4e93ce51d1 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 16 Jul 2018 09:42:53 +0200 Subject: Also include InnoDB undo tablespaces in rsync sst If --innodb-undo-tablespaces is used, then InnoDB stores undo in a separate file(s) which whould also be replicated. This fixes Issue#337 This filter will cause sst failed at applying undo... https://github.com/codership/mysql-wsrep/issues/337 --- scripts/wsrep_sst_rsync.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 89afaa6ecbd..7dd78dd86d3 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -126,6 +126,7 @@ FILTER=(-f '- /lost+found' -f '+ /wsrep_sst_binlog.tar' -f '+ /ib_lru_dump' -f '+ /ibdata*' + -f '+ /undo*' -f '+ /*/' -f '- /*') -- cgit v1.2.1