mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-15682 mariabackup.unsupported_redo fails in buildbot with wrong result code
Skip the test mariabackup.unsupported_redo if a checkpoint occurred before mariabackup --backup completed. Remove the slow shutdowns and restarts which were attempting to prevent the checkpoints from occurring.
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
# Check that the latest checkpoint in the redo log files
|
||||
# is not newer than the checkpoint sampled by no_checkpoint_start.inc
|
||||
|
||||
if (!$no_checkpoint_kill) {
|
||||
--source include/kill_mysqld.inc
|
||||
}
|
||||
|
||||
perl;
|
||||
my $cp = $ENV{CHECKPOINT_LSN};
|
||||
@ -22,7 +24,8 @@ my $cp2 = $cp2hi << 32 | $cp2lo;
|
||||
open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die;
|
||||
|
||||
if ($cp1 > $cp || $cp2 > $cp) {
|
||||
print OUT "--source include/start_mysqld.inc\n";
|
||||
print OUT "--source include/start_mysqld.inc\n"
|
||||
unless $ENV{no_checkpoint_kill};
|
||||
print OUT "$ENV{CLEANUP_IF_CHECKPOINT}\n";
|
||||
print OUT "--skip Extra checkpoint 1 after $cp";
|
||||
print OUT " ($no1hi:$no1lo=$cp1,$no2hi:$no2lo=$cp2)\n";
|
||||
|
@ -5,8 +5,10 @@ call mtr.add_suppression("InnoDB: If you are installing InnoDB, remember that yo
|
||||
call mtr.add_suppression("InnoDB: Ignoring tablespace for `test`\\.`t21` because it could not be opened");
|
||||
call mtr.add_suppression("InnoDB: Cannot open datafile for read-only: ");
|
||||
call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace id .*, but tablespace with that id or name does not exist");
|
||||
SELECT @@GLOBAL.innodb_flush_log_at_trx_commit;
|
||||
@@GLOBAL.innodb_flush_log_at_trx_commit
|
||||
1
|
||||
CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
# Fails during full backup
|
||||
DROP TABLE t1;
|
||||
@ -14,7 +16,6 @@ CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
|
||||
INSERT INTO t1(a) select 1 union select 2 union select 3;
|
||||
# Create full backup , modify table, then fails during creation of
|
||||
# incremental/differential backup
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(i INT) ENGINE INNODB;
|
||||
@ -22,7 +23,6 @@ INSERT INTO t1 VALUES(1);
|
||||
CREATE TABLE t21(i INT) ENGINE INNODB;
|
||||
INSERT INTO t21 VALUES(1);
|
||||
CREATE TABLE t2(i int) ENGINE INNODB;
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
|
||||
# Create partial backup (excluding table t21), Ignore the
|
||||
# unsupported redo log for the table t21.
|
||||
|
@ -10,11 +10,9 @@ call mtr.add_suppression("Table .* in the InnoDB data dictionary has tablespace
|
||||
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||
|
||||
SELECT @@GLOBAL.innodb_flush_log_at_trx_commit;
|
||||
CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
--source ../../suite/innodb/include/no_checkpoint_start.inc
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
|
||||
# Below mariabackup operation may complete successfully if checkpoint happens
|
||||
@ -22,11 +20,25 @@ ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
|
||||
echo # Fails during full backup;
|
||||
--disable_result_log
|
||||
--error 1
|
||||
--error 0,1
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
||||
--enable_result_log
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--let MYSQLD_DATADIR=$basedir/
|
||||
perl;
|
||||
open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die;
|
||||
print OUT '
|
||||
--let no_checkpoint_end=1
|
||||
--let CLEANUP_IF_CHECKPOINT=rmdir $basedir;
|
||||
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
||||
--exit Backup failed to fail despite MLOG_INDEX_LOAD record
|
||||
' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info");
|
||||
close(OUT);
|
||||
EOF
|
||||
--source $MYSQLTEST_VARDIR/log/check.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/log/check.txt
|
||||
rmdir $basedir;
|
||||
|
||||
CREATE TABLE t1(i INT PRIMARY KEY auto_increment, a int) ENGINE INNODB;
|
||||
@ -39,18 +51,30 @@ INSERT INTO t1(a) select 1 union select 2 union select 3;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
||||
--enable_result_log
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
--source include/restart_mysqld.inc
|
||||
--source ../../suite/innodb/include/no_checkpoint_start.inc
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
|
||||
--disable_result_log
|
||||
--error 1
|
||||
--error 0,1
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
--enable_result_log
|
||||
|
||||
DROP TABLE t1;
|
||||
rmdir $basedir;
|
||||
rmdir $incremental_dir;
|
||||
|
||||
--let MYSQLD_DATADIR=$incremental_dir/
|
||||
perl;
|
||||
open(OUT, ">$ENV{MYSQLTEST_VARDIR}/log/check.txt") || die;
|
||||
print OUT '
|
||||
--let no_checkpoint_end=1
|
||||
--let CLEANUP_IF_CHECKPOINT=rmdir $basedir;rmdir $incremental_dir;
|
||||
--source ../../suite/innodb/include/no_checkpoint_end.inc
|
||||
--exit Backup failed to fail despite MLOG_INDEX_LOAD record
|
||||
' if (-f "$ENV{MYSQLD_DATADIR}/xtrabackup_info");
|
||||
close(OUT);
|
||||
EOF
|
||||
--source $MYSQLTEST_VARDIR/log/check.txt
|
||||
--remove_file $MYSQLTEST_VARDIR/log/check.txt
|
||||
rmdir $basedir;rmdir $incremental_dir;
|
||||
|
||||
CREATE TABLE t1(i INT) ENGINE INNODB;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
@ -62,8 +86,6 @@ let $targetdir=$MYSQLTEST_VARDIR/tmp/bk;
|
||||
|
||||
CREATE TABLE t2(i int) ENGINE INNODB;
|
||||
|
||||
SET GLOBAL INNODB_FAST_SHUTDOWN = 0;
|
||||
--source include/restart_mysqld.inc
|
||||
ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
|
||||
|
||||
--echo # Create partial backup (excluding table t21), Ignore the
|
||||
|
Reference in New Issue
Block a user