summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-11-29 10:33:06 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-11-29 10:33:06 +0200
commit289721de9aca8cdf3bdef1a010477e2d38eebb8d (patch)
tree50a9f9ea56a7a0b68210e1061ced47951298d2d9 /scripts
parent9962cda52722b77c2a7e0314bbaa2e4f963f55c1 (diff)
parentf5441ef4dac9f3fd5dfe1bfa25a514715fee649f (diff)
downloadmariadb-git-289721de9aca8cdf3bdef1a010477e2d38eebb8d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh6
-rw-r--r--scripts/wsrep_sst_common.sh24
-rw-r--r--scripts/wsrep_sst_mariabackup.sh12
-rw-r--r--scripts/wsrep_sst_rsync.sh4
4 files changed, 34 insertions, 12 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 67a6eba59d5..f8a953f2d90 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -582,8 +582,7 @@ then
fi
echo
- echo "See the MariaDB Knowledgebase at http://mariadb.com/kb or the"
- echo "MySQL manual for more instructions."
+ echo "See the MariaDB Knowledgebase at http://mariadb.com/kb"
if test "$in_rpm" -eq 0
then
@@ -599,8 +598,7 @@ then
echo "Please report any problems at http://mariadb.org/jira"
echo
echo "The latest information about MariaDB is available at http://mariadb.org/."
- echo "You can find additional information about the MySQL part at:"
- echo "http://dev.mysql.com"
+ echo
echo "Consider joining MariaDB's strong and vibrant community:"
echo "https://mariadb.org/get-involved/"
echo
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index a1293fcb749..dbd639595df 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -44,6 +44,7 @@ WSREP_SST_OPT_HOST_ESCAPED=""
INNODB_DATA_HOME_DIR="${INNODB_DATA_HOME_DIR:-}"
INNODB_LOG_GROUP_HOME="${INNODB_LOG_GROUP_HOME:-}"
INNODB_UNDO_DIR="${INNODB_UNDO_DIR:-}"
+INNODB_FORCE_RECOVERY=""
INNOEXTRA=""
while [ $# -gt 0 ]; do
@@ -229,7 +230,7 @@ case "$1" in
shift
;;
'--binlog-index'|'--log-bin-index')
- readonly WSREP_SST_OPT_BINLOG_INDEX="$2"
+ WSREP_SST_OPT_BINLOG_INDEX="$2"
shift
;;
'--log-basename')
@@ -382,6 +383,14 @@ case "$1" in
fi
skip_mysqld_arg=1
;;
+ '--innodb-force-recovery')
+ if [ -n "$value" ]; then
+ if [ "$value" -ne 0 ]; then
+ INNODB_FORCE_RECOVERY="$value"
+ fi
+ fi
+ skip_mysqld_arg=1
+ ;;
'--log-bin')
if [ -z "$WSREP_SST_OPT_BINLOG" ]; then
MYSQLD_OPT_LOG_BIN="$value"
@@ -444,7 +453,7 @@ if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \
fi
if [ -n "${MYSQLD_OPT_LOG_BIN_INDEX:-}" -a \
-z "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
- readonly WSREP_SST_OPT_BINLOG_INDEX="$MYSQLD_OPT_LOG_BIN_INDEX"
+ WSREP_SST_OPT_BINLOG_INDEX="$MYSQLD_OPT_LOG_BIN_INDEX"
fi
if [ -n "${MYSQLD_OPT_DATADIR:-}" -a \
-z "$WSREP_SST_OPT_DATA" ]; then
@@ -499,6 +508,7 @@ if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
fi
fi
+readonly INNODB_FORCE_RECOVERY
readonly WSREP_SST_OPT_MYSQLD
get_binlog()
@@ -553,6 +563,16 @@ get_binlog()
# is already defined above):
readonly WSREP_SST_OPT_BINLOG_INDEX="$WSREP_SST_OPT_BINLOG.index"
fi
+ else
+ # Remove all directories from the index file path:
+ local filename="${WSREP_SST_OPT_BINLOG_INDEX##*/}"
+ # Check if the index file name contains the extension:
+ if [ "${filename%.*}" = "$filename" ]; then
+ # Let's add the default extension (".index"):
+ readonly WSREP_SST_OPT_BINLOG_INDEX="$WSREP_SST_OPT_BINLOG_INDEX.index"
+ else
+ readonly WSREP_SST_OPT_BINLOG_INDEX
+ fi
fi
fi
}
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 3fe3bf5c206..b429a9effd5 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -951,7 +951,11 @@ setup_commands()
if [ -n "$WSREP_SST_OPT_MYSQLD" ]; then
mysqld_args="--mysqld-args $WSREP_SST_OPT_MYSQLD"
fi
- INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY"
+ if [ -z "$INNODB_FORCE_RECOVERY" ]; then
+ INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY"
+ else
+ INNOAPPLY="$BACKUP_BIN --prepare $disver $iapts $INNOEXTRA --innodb-force-recovery=$INNODB_FORCE_RECOVERY --target-dir='$DATA' --datadir='$DATA' $mysqld_args $INNOAPPLY"
+ fi
INNOMOVE="$BACKUP_BIN $WSREP_SST_OPT_CONF --move-back $disver $impts --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE"
INNOBACKUP="$BACKUP_BIN $WSREP_SST_OPT_CONF --backup $disver $iopts $tmpopts $INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA' $mysqld_args $INNOBACKUP"
}
@@ -1245,8 +1249,8 @@ then
cd "$binlog_dir"
wsrep_log_info "Cleaning the binlog directory $binlog_dir as well"
rm -fv "$WSREP_SST_OPT_BINLOG".[0-9]* 1>&2 \+ || true
- binlog_index="${WSREP_SST_OPT_BINLOG_INDEX%.index}.index"
- [ -f "$binlog_index" ] && rm -fv "$binlog_index" 1>&2 \+ || true
+ [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ] && \
+ rm -fv "$WSREP_SST_OPT_BINLOG_INDEX" 1>&2 \+ || true
cd "$OLD_PWD"
fi
@@ -1321,7 +1325,7 @@ then
cd "$BINLOG_DIRNAME"
for bfile in $(ls -1 "$BINLOG_FILENAME".[0-9]*); do
- echo "$BINLOG_DIRNAME/$bfile" >> "${WSREP_SST_OPT_BINLOG_INDEX%.index}.index"
+ echo "$BINLOG_DIRNAME/$bfile" >> "$WSREP_SST_OPT_BINLOG_INDEX"
done
cd "$OLD_PWD"
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index ad9688011e1..29c9cd43470 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -392,7 +392,7 @@ EOF
# Prepare binlog files
cd "$BINLOG_DIRNAME"
- binlog_files_full=$(tail -n $BINLOG_N_FILES "${WSREP_SST_OPT_BINLOG_INDEX%.index}.index")
+ binlog_files_full=$(tail -n $BINLOG_N_FILES "$WSREP_SST_OPT_BINLOG_INDEX")
binlog_files=""
for ii in $binlog_files_full
@@ -732,7 +732,7 @@ EOF
if [ -f "$BINLOG_TAR_FILE" ]; then
cd "$BINLOG_DIRNAME"
- binlog_index="${WSREP_SST_OPT_BINLOG_INDEX%.index}.index"
+ binlog_index="$WSREP_SST_OPT_BINLOG_INDEX"
# Clean up old binlog files first
rm -f "$BINLOG_FILENAME".[0-9]*