mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-26064: mariabackup SST fails when starting with --innodb-force-recovery
If the server is started with the --innodb-force-recovery argument on the command line, then during SST this argument can be passed to mariabackup only at the --prepare stage, and accordingly it must be removed from the --mysqld-args list (and it is not should be passed to mariabackup otherwise). This commit fixes a flaw in the SST scripts and add a test that checks the ability to run the joiner node in a configuration that uses --innodb-force-recovery=1.
This commit is contained in:
@@ -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
|
||||
@@ -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"
|
||||
@@ -499,6 +508,7 @@ if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
readonly INNODB_FORCE_RECOVERY
|
||||
readonly WSREP_SST_OPT_MYSQLD
|
||||
|
||||
get_binlog()
|
||||
|
@@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user