Debian Codegraph @

mysql-test/suite/mariabackup/unencrypted_page_compressed.test

raw
1 call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to read page 3 from file '.*test/t1\\.ibd'");
2 call mtr.add_suppression("\\[ERROR\\] InnoDB: File '.*test/t1\\.ibd' is corrupted");
3 call mtr.add_suppression("InnoDB: Table `test`.`t1` has an unreadable root page");
4 CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT, c char(200))
5 ENGINE=InnoDB PAGE_COMPRESSED=YES STATS_PERSISTENT=0;
6 insert into t1(b, c) values("mariadb", "mariabackup");
7 --source ../innodb/include/wait_all_purged.inc
8
9 let $MYSQLD_DATADIR=`select @@datadir`;
10 let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
11 let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
12
13 --source include/shutdown_mysqld.inc
14
15 --echo # Corrupt the table
16
17 perl;
18 use strict;
19 use warnings;
20 use Fcntl qw(:DEFAULT :seek);
21
22 my $ibd_file = $ENV{'t1_IBD'};
23
24 my $chunk;
25 my $page_size = $ENV{'INNODB_PAGE_SIZE'};
26
27 sysopen IBD_FILE, $ibd_file, O_RDWR || die "Unable to open $ibd_file";
28 sysseek IBD_FILE, 16384 * 3 + 75, SEEK_CUR;
29 $chunk = '\xAA\xAA\xAA\xAA';
30 syswrite IBD_FILE, $chunk, 4;
31
32 close IBD_FILE;
33 EOF
34
35 --let $restart_parameters= --skip-innodb-buffer-pool-load-at-startup
36 --source include/start_mysqld.inc
37
38 echo # xtrabackup backup;
39 --disable_result_log
40 let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
41 let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log;
42 --error 1
43 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --core-file > $backuplog;
44 --enable_result_log
45
46 --let SEARCH_PATTERN=Database page corruption detected.*
47 --let SEARCH_FILE=$backuplog
48 --source include/search_pattern_in_file.inc
49 remove_file $backuplog;
50
51 drop table t1;
52 rmdir $targetdir;