Debian Codegraph @

mysql-test/suite/mariabackup/full_backup.test

raw
1 --source include/innodb_page_size.inc
2
3 CREATE TABLE t(i INT) ENGINE INNODB;
4 INSERT INTO t VALUES(1);
5 SET GLOBAL innodb_max_purge_lag_wait=0;
6 echo # xtrabackup backup;
7 let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
8 --let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log
9
10 --disable_result_log
11 --error 1
12 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --parallel=10 --innodb-log-write-ahead-size=4095 > $backup_log 2>&1;
13 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --parallel=10 --innodb-log-write-ahead-size=10000 --innodb_log_checkpoint_now=1 > $backup_log 2>&1;
14 --enable_result_log
15
16 # The following warning must not appear after MDEV-27343 fix
17 --let SEARCH_PATTERN=InnoDB: Allocated tablespace ID
18 --let SEARCH_FILE=$backup_log
19 --source include/search_pattern_in_file.inc
20 --remove_file $backup_log
21
22 SELECT variable_value FROM information_schema.global_status
23 WHERE variable_name = 'INNODB_BUFFER_POOL_PAGES_DIRTY';
24 INSERT INTO t VALUES(2);
25
26
27 echo # xtrabackup prepare;
28 --disable_result_log
29 exec $XTRABACKUP --prepare --target-dir=$targetdir;
30 -- source include/restart_and_restore.inc
31 --enable_result_log
32
33 SELECT * FROM t;
34 DROP TABLE t;
35 rmdir $targetdir;
36
37 --echo #
38 --echo # MDEV-27121 mariabackup incompatible with disabled dedicated
39 --echo # undo log tablespaces
40 --echo #
41 call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
42 call mtr.add_suppression("InnoDB: Cannot change innodb_undo_tablespaces=0 because previous shutdown was not with innodb_fast_shutdown=0");
43 call mtr.add_suppression("Found 1 prepared XA transactions");
44
45 CREATE TABLE t(f1 INT NOT NULL)ENGINE=InnoDB;
46 XA START 'zombie';
47 INSERT INTO t VALUES(1);
48 XA END 'zombie';
49 XA PREPARE 'zombie';
50
51 let $restart_parameters=--innodb_undo_tablespaces=0;
52 --source include/restart_mysqld.inc
53
54 echo # xtrabackup backup;
55 --disable_result_log
56 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
57 --enable_result_log
58
59 echo # xtrabackup prepare;
60 --disable_result_log
61 exec $XTRABACKUP --prepare --target-dir=$targetdir;
62 -- source include/restart_and_restore.inc
63 --enable_result_log
64
65 --echo # Display undo log files from target directory
66 list_files $targetdir undo*;
67
68 XA COMMIT 'zombie';
69 DROP TABLE t;
70 rmdir $targetdir;