Commit 58386ca0 authored by sjaakola's avatar sjaakola Committed by Nirbhay Choubey

refs codership/mysql-wsrep#239

Synced xtrabackup SST scripts from PXC source tree as of PXC 5.6.27-25.13
- PXC#480: xtrabackup-v2 SST fails with multiple log_bin directives in my.cn
- PXC#460: wsrep_sst_auth don't work in Percona-XtraDB-Cluster-56-5.6.25-25.
- PXC-416: Fix SST related issues.
- PXC-389: Merge remote-tracking branch 'wsrep/5.6' into 5.6-wsrep-pxc389
- Bug #1431101: SST does not clobber backup-my.cnf
parent 9f211d49
......@@ -134,7 +134,7 @@ if $MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -q "wsrep_sst_auth"
then
if wsrep_auth_not_set
then
WSREP_SST_OPT_AUTH=$(MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
WSREP_SST_OPT_AUTH=$($MY_PRINT_DEFAULTS -c $WSREP_SST_OPT_CONF sst | grep -- "--wsrep_sst_auth" | cut -d= -f2)
fi
fi
readonly WSREP_SST_OPT_AUTH
......@@ -176,7 +176,7 @@ wsrep_log_info()
wsrep_cleanup_progress_file()
{
[ -n "$SST_PROGRESS_FILE" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null
[ -n "${SST_PROGRESS_FILE:-}" ] && rm -f "$SST_PROGRESS_FILE" 2>/dev/null || true
}
wsrep_check_program()
......
......@@ -674,6 +674,7 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
usrst=0
if [[ -z $sst_ver ]];then
wsrep_log_error "Upgrade joiner to 5.6.21 or higher for backup locks support"
wsrep_log_error "The joiner is not supported for this version of donor"
......@@ -689,13 +690,14 @@ then
itmpdir=$(mktemp -d)
wsrep_log_info "Using $itmpdir as innobackupex temporary directory"
if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
else
elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi
......
......@@ -436,15 +436,17 @@ then
if [ $WSREP_SST_OPT_BYPASS -eq 0 ]
then
usrst=0
TMPDIR="${TMPDIR:-/tmp}"
if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
if [[ -n "${WSREP_SST_OPT_USER:-}" && "$WSREP_SST_OPT_USER" != "(null)" ]]; then
INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
usrst=1
fi
if [ -n "${WSREP_SST_OPT_PSWD:-}" ]; then
INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
else
elif [[ $usrst -eq 1 ]];then
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment