summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-03-25 13:02:52 +0200
committerSergei Golubchik <serg@mariadb.org>2018-03-25 13:02:52 +0200
commitc764bc0a78e9359fa208e074bd327f7a852c7cb7 (patch)
treeeeb5d56d225d1fdf97a016c3eae7b93c4e1f6927 /scripts
parentd702e463902bca7d94ff8a1a49468a5b7bdb4ba0 (diff)
parent15795b9f9a850d9587f17ef18e1ac7b5af31ec1e (diff)
downloadmariadb-git-c764bc0a78e9359fa208e074bd327f7a852c7cb7.tar.gz
Merge branch '10.1' into 10.2
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 6f0218fcc88..20a4a63c204 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -179,12 +179,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 9104daf19bc..00efdaeebcf 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -268,13 +268,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 867aab622ed..628c1f8b06c 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -144,12 +144,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'