summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-03-28 17:06:27 +0200
committerSergei Golubchik <serg@mariadb.org>2018-03-28 17:31:57 +0200
commitb1818dccf772e0fd495502c6dfc1600853e007d0 (patch)
treed9c441c38681d634d50cf36021a3bf439b2e44ca /scripts
parentc34602995894c9a04f4312484cfe6e45c43426e6 (diff)
parentaafb9d44d65e42df72af28c940e5b23b4bc3bd43 (diff)
downloadmariadb-git-b1818dccf772e0fd495502c6dfc1600853e007d0.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_mariabackup.sh18
-rw-r--r--scripts/wsrep_sst_mysqldump.sh4
-rw-r--r--scripts/wsrep_sst_xtrabackup-v2.sh19
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh18
4 files changed, 50 insertions, 9 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 7b7cbab06ca..aee2f0b7f64 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -176,12 +176,26 @@ get_transfer()
wsrep_log_info "Using netcat as streamer"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
if nc -h 2>&1 | grep -q ncat;then
+ # Ncat
tcmd="nc -l ${TSST_PORT}"
- else
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
tcmd="nc -dl ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc -l -p ${TSST_PORT}"
fi
else
- tcmd="nc ${REMOTEIP} ${TSST_PORT}"
+ if nc -h 2>&1 | grep -q ncat;then
+ # Ncat
+ tcmd="nc ${REMOTEIP} ${TSST_PORT}"
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
+ tcmd="nc ${REMOTEIP} ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}"
+ fi
fi
else
tfmt='socat'
diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh
index d28a1c161ce..cfe4838fbc4 100644
--- a/scripts/wsrep_sst_mysqldump.sh
+++ b/scripts/wsrep_sst_mysqldump.sh
@@ -119,11 +119,11 @@ MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF "\
# Check if binary logging is enabled on the joiner node.
# Note: SELECT cannot be used at this point.
-LOG_BIN=$(echo "SHOW VARIABLES LIKE 'log_bin'" | $MYSQL |\
+LOG_BIN=$(echo "set statement wsrep_sync_wait=0 for SHOW VARIABLES LIKE 'log_bin'" | $MYSQL |\
tail -1 | awk -F ' ' '{ print $2 }')
# Check the joiner node's server version.
-SERVER_VERSION=$(echo "SHOW VARIABLES LIKE 'version'" | $MYSQL |\
+SERVER_VERSION=$(echo "set statement wsrep_sync_wait=0 for SHOW VARIABLES LIKE 'version'" | $MYSQL |\
tail -1 | awk -F ' ' '{ print $2 }')
RESET_MASTER=""
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index e7313e4e188..79442d415e9 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -265,13 +265,26 @@ get_transfer()
wsrep_log_info "Using netcat as streamer"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
if nc -h 2>&1 | grep -q ncat; then
+ # Ncat
tcmd="nc $sockopt -l ${TSST_PORT}"
- else
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
tcmd="nc $sockopt -dl ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc $sockopt -l -p ${TSST_PORT}"
fi
else
- # netcat doesn't understand [] around IPv6 address
- tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
+ if nc -h 2>&1 | grep -q ncat;then
+ # Ncat
+ tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
+ tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc -q0 ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
+ fi
fi
else
tfmt='socat'
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index d80677e7a76..3a30f5898db 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -141,12 +141,26 @@ get_transfer()
wsrep_log_info "Using netcat as streamer"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
if nc -h 2>&1 | grep -q ncat;then
+ # Ncat
tcmd="nc -l ${TSST_PORT}"
- else
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
tcmd="nc -dl ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc -l -p ${TSST_PORT}"
fi
else
- tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
+ if nc -h 2>&1 | grep -q ncat;then
+ # Ncat
+ tcmd="nc ${REMOTEIP} ${TSST_PORT}"
+ elif nc -h 2>&1 | grep -q -- '-d\>';then
+ # Debian netcat
+ tcmd="nc ${REMOTEIP} ${TSST_PORT}"
+ else
+ # traditional netcat
+ tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}"
+ fi
fi
else
tfmt='socat'