summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2018-06-12 19:39:37 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-06-12 19:39:37 +0300
commit6e55236c0a72e8f49a240c4e080591994042b0e4 (patch)
tree4bb2f438004db3dbba5f88f5e4b00aacfd5c1cec /scripts
parentaa59ecec89d89a29f7272352471a4064aa6db28c (diff)
parent215d652c66474c4578b0476385d055e7feae2d3a (diff)
downloadmariadb-git-6e55236c0a72e8f49a240c4e080591994042b0e4.tar.gz
Merge branch '10.0-galera' into 10.1
Diffstat (limited to 'scripts')
-rw-r--r--scripts/CMakeLists.txt17
-rw-r--r--scripts/wsrep_sst_common.sh35
-rw-r--r--scripts/wsrep_sst_mysqldump.sh2
3 files changed, 38 insertions, 16 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 880458c1517..b994c9f67b5 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -366,6 +366,22 @@ ELSE()
COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH()
+ SET (wsrep_sst_rsync_wan ${CMAKE_CURRENT_BINARY_DIR}/wsrep_sst_rsync_wan)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${wsrep_sst_rsync_wan}
+ COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink
+ wsrep_sst_rsync
+ wsrep_sst_rsync_wan
+ )
+ ADD_CUSTOM_TARGET(symlink_wsrep_sst_rsync
+ ALL
+ DEPENDS ${wsrep_sst_rsync_wan}
+ )
+ INSTALL(
+ FILES ${wsrep_sst_rsync_wan}
+ DESTINATION ${INSTALL_BINDIR}
+ COMPONENT Server
+ )
FOREACH(file ${WSREP_SOURCE})
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
@@ -379,7 +395,6 @@ ELSE()
COMPONENT ${${file}_COMPONENT}
)
ENDFOREACH()
-
ENDIF()
# Install libgcc as mylibgcc.a
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 47d9021fe55..50264fe560a 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -35,18 +35,25 @@ case "$1" in
#
# Break address string into host:port/path parts
#
- readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*}
- if [ ${WSREP_SST_OPT_HOST:0:1} = '[' ]
- then
- # IPv6 notation
- readonly WSREP_SST_OPT_HOST_UNESCAPED=${WSREP_SST_OPT_HOST:1:-1}
- else
- readonly WSREP_SST_OPT_HOST_UNESCAPED=${WSREP_SST_OPT_HOST}
- fi
- readonly WSREP_SST_OPT_ADDR_PORT=$(echo $WSREP_SST_OPT_ADDR | \
- cut -d ']' -f 2 | cut -s -d ':' -f 2 | cut -d '/' -f 1)
+ case "${WSREP_SST_OPT_ADDR}" in
+ \[*)
+ # IPv6
+ 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
+ readonly WSREP_SST_OPT_ADDR_PORT=${remain%%/*}
+ remain=${remain#*/}
+ readonly WSREP_SST_OPT_MODULE=${remain%%/*}
readonly WSREP_SST_OPT_PATH=${WSREP_SST_OPT_ADDR#*/}
- readonly WSREP_SST_OPT_MODULE=${WSREP_SST_OPT_PATH%%/*}
remain=${WSREP_SST_OPT_PATH#*/}
readonly WSREP_SST_OPT_LSN=${remain%%/*}
remain=${remain#*/}
@@ -126,10 +133,10 @@ done
readonly WSREP_SST_OPT_BYPASS
readonly WSREP_SST_OPT_BINLOG
-if [ -n "${WSREP_SST_OPT_ADDR:-}" ]; then
+if [ -n "${WSREP_SST_OPT_ADDR_PORT:-}" ]; then
if [ -n "${WSREP_SST_OPT_PORT:-}" ]; then
- if [ -n "$WSREP_SST_OPT_ADDR_PORT" -a "$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"
+ if [ "$WSREP_SST_OPT_PORT" != "$WSREP_SST_OPT_ADDR_PORT" ]; then
+ echo "WSREP_SST: [ERROR] port in --port=$WSREP_SST_OPT_PORT differs from port in --address=$WSREP_SST_OPT_ADDR" >&2
exit 2
fi
else
diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh
index 46edefd4829..fe49279a680 100644
--- a/scripts/wsrep_sst_mysqldump.sh
+++ b/scripts/wsrep_sst_mysqldump.sh
@@ -131,7 +131,7 @@ SET_GTID_BINLOG_STATE=""
SQL_LOG_BIN_OFF=""
# Safety check
-if echo $SERVER_VERSION | grep '^10.1' > /dev/null
+if [ ${SERVER_VERSION%%.*} != '5' ]
then
# If binary logging is enabled on the joiner node, we need to copy donor's
# gtid_binlog_state to joiner. In order to do that, a RESET MASTER must be