summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_mysqldump.sh
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-04-15 13:53:28 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-05-03 18:08:13 +0200
commite0324bf300a57e84e5fdeca995c91b9efa3dc62c (patch)
treeb9dc6091e71e281e99ee610fab7ace98975bb4c6 /scripts/wsrep_sst_mysqldump.sh
parent562c88257f574d297ca0d9c284ed80390a3c927b (diff)
downloadmariadb-git-e0324bf300a57e84e5fdeca995c91b9efa3dc62c.tar.gz
wsrep sst scripts: removing extra blank lines and spaces
Removed numerous extra blank lines and spaces that interfere with reading and understanding program code, making it more difficult to find errors in scripts. I also removed all extra trailing spaces at the ends of lines, which lead to marking extra lines as changes (in subsequent changes). The amount of indentation in some parts of the code has also been normalized.
Diffstat (limited to 'scripts/wsrep_sst_mysqldump.sh')
-rw-r--r--scripts/wsrep_sst_mysqldump.sh32
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh
index 664fd2c04f9..19fca2df024 100644
--- a/scripts/wsrep_sst_mysqldump.sh
+++ b/scripts/wsrep_sst_mysqldump.sh
@@ -100,12 +100,12 @@ SET_START_POSITION="SET GLOBAL wsrep_start_position='$WSREP_SST_OPT_GTID';"
SET_WSREP_GTID_DOMAIN_ID=""
if [ -n $WSREP_SST_OPT_GTID_DOMAIN_ID ]
then
- SET_WSREP_GTID_DOMAIN_ID="
- SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0);
- SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0');
- PREPARE stmt FROM @stmt;
- EXECUTE stmt;
- DROP PREPARE stmt;"
+ SET_WSREP_GTID_DOMAIN_ID="
+ SET @val = (SELECT GLOBAL_VALUE FROM INFORMATION_SCHEMA.SYSTEM_VARIABLES WHERE VARIABLE_NAME = 'WSREP_GTID_STRICT_MODE' AND GLOBAL_VALUE > 0);
+ SET @stmt = IF (@val IS NOT NULL, 'SET GLOBAL WSREP_GTID_DOMAIN_ID=$WSREP_SST_OPT_GTID_DOMAIN_ID', 'SET @dummy = 0');
+ PREPARE stmt FROM @stmt;
+ EXECUTE stmt;
+ DROP PREPARE stmt;"
fi
MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF "\
@@ -132,16 +132,16 @@ SQL_LOG_BIN_OFF=""
# Safety check
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
- # executed to erase binary logs (if any). Binary logging should also be
- # turned off for the session so that gtid state does not get altered while
- # the dump gets replayed on joiner.
- if [[ "$LOG_BIN" == 'ON' ]]; then
- RESET_MASTER="RESET MASTER;"
- SET_GTID_BINLOG_STATE="SET @@global.gtid_binlog_state='$GTID_BINLOG_STATE';"
- SQL_LOG_BIN_OFF="SET @@session.sql_log_bin=OFF;"
- fi
+ # 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
+ # executed to erase binary logs (if any). Binary logging should also be
+ # turned off for the session so that gtid state does not get altered while
+ # the dump gets replayed on joiner.
+ if [[ "$LOG_BIN" == 'ON' ]]; then
+ RESET_MASTER="RESET MASTER;"
+ SET_GTID_BINLOG_STATE="SET @@global.gtid_binlog_state='$GTID_BINLOG_STATE';"
+ SQL_LOG_BIN_OFF="SET @@session.sql_log_bin=OFF;"
+ fi
fi
# NOTE: we don't use --routines here because we're dumping mysql.proc table