summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-06-25 06:48:17 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-06-25 07:09:54 +0200
commit4ad148b148cfbb6f78b33ad9a7662f47c24cb759 (patch)
tree1b87e1c0e94aa21030cf63ab381da7790add6ed4 /scripts
parent9258cfa4b469ab0d841e32ced7e501e04043637f (diff)
downloadmariadb-git-4ad148b148cfbb6f78b33ad9a7662f47c24cb759.tar.gz
MDEV-26019: Upgrading MariaDB breaks TLS mariabackup SST
Fixed typo in variable name that breaks SST in some scenatios. Also fixed one small inaccuracy after MDEV-25978 which leads to the use of an uninitialized variable when the --log-bin option is specified without an argument.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_common.sh11
-rw-r--r--scripts/wsrep_sst_mariabackup.sh2
-rw-r--r--scripts/wsrep_sst_xtrabackup-v2.sh2
3 files changed, 7 insertions, 8 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index bb9a3b9f1b6..562f9dc3aac 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -456,7 +456,7 @@ if [ -n "${MYSQLD_OPT_LOG_BASENAME:-}" -a \
fi
# If the --log-bin option is present without a value, then
-# setting WSREP_SST_OPT_BINLOG by using other arguments:
+# set WSREP_SST_OPT_BINLOG value using other arguments:
if [ -z "$WSREP_SST_OPT_BINLOG" -a -n "${MYSQLD_OPT_LOG_BIN+x}" ]; then
if [ -n "$WSREP_SST_OPT_LOG_BASENAME" ]; then
# If the WSREP_SST_OPT_BINLOG variable is not set, but
@@ -465,9 +465,8 @@ if [ -z "$WSREP_SST_OPT_BINLOG" -a -n "${MYSQLD_OPT_LOG_BIN+x}" ]; then
# the "-bin" suffix:
readonly WSREP_SST_OPT_BINLOG="$WSREP_SST_OPT_LOG_BASENAME-bin"
else
- # the default name, note that base of this name
- # is already defined above
- readonly WSREP_SST_OPT_BINLOG_INDEX="$WSREP_SST_OPT_BINLOG.index"
+ # Take the default name:
+ readonly WSREP_SST_OPT_BINLOG='mysql-bin'
fi
fi
@@ -550,8 +549,8 @@ get_binlog()
# the "-bin" suffix:
readonly WSREP_SST_OPT_BINLOG_INDEX="$WSREP_SST_OPT_LOG_BASENAME-bin.index"
else
- # the default name, note that base of this name
- # is already defined above
+ # the default name (note that base of this name
+ # is already defined above):
readonly WSREP_SST_OPT_BINLOG_INDEX="$WSREP_SST_OPT_BINLOG.index"
fi
fi
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 339a8fcf4a5..46804c9dce4 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -386,7 +386,7 @@ get_transfer()
elif is_local_ip "$WSREP_SST_OPT_HOST_UNESCAPED"; then
CN_option=',commonname=localhost'
else
- CN_option=",commonname='$WSREP_SST_OPT_HOST_UNSECAPED'"
+ CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'"
fi
tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'$CN_option$sockopt"
wsrep_log_info "$action with cert=$tpem, key=$tkey, cafile=$tcert"
diff --git a/scripts/wsrep_sst_xtrabackup-v2.sh b/scripts/wsrep_sst_xtrabackup-v2.sh
index d76dc346a82..9600848dc77 100644
--- a/scripts/wsrep_sst_xtrabackup-v2.sh
+++ b/scripts/wsrep_sst_xtrabackup-v2.sh
@@ -388,7 +388,7 @@ get_transfer()
elif is_local_ip "$WSREP_SST_OPT_HOST_UNESCAPED"; then
CN_option=',commonname=localhost'
else
- CN_option=",commonname='$WSREP_SST_OPT_HOST_UNSECAPED'"
+ CN_option=",commonname='$WSREP_SST_OPT_HOST_UNESCAPED'"
fi
tcmd="$tcmd,cert='$tpem',key='$tkey',cafile='$tcert'$CN_option$sockopt"
wsrep_log_info "$action with cert=$tpem, key=$tkey, cafile=$tcert"