Debian Codegraph @

mysql-test/suite/encryption/t/recovery_memory.test

raw
1 --source include/have_debug.inc
2 --source include/have_innodb.inc
3 --source include/have_sequence.inc
4 --source filekeys_plugin.inc
5
6 let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
7 let MYSQLD_DATADIR=`select @@datadir`;
8 # Encrypt the change buffer root page
9 SET GLOBAL innodb_encrypt_tables=ON,innodb_encryption_threads=1;
10 SET GLOBAL innodb_saved_page_number_debug=4,innodb_fil_make_page_dirty_debug=0;
11
12 CREATE TABLE t1(f1 text, index idx(f1(20))) ENGINE INNODB;
13
14 # No checkpoint happens during this restart
15
16 let $shutdown_timeout=;
17 set global innodb_fast_shutdown=0;
18 let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
19 --source include/restart_mysqld.inc
20 set global debug_dbug="+d,ib_log_checkpoint_avoid_hard";
21
22 --disable_result_log
23 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
24 --enable_result_log
25
26 INSERT INTO t1 SELECT repeat('a', 8000) FROM seq_1_to_1280;
27 DELETE FROM t1;
28 SET GLOBAL innodb_max_purge_lag_wait=0;
29 INSERT INTO t1 VALUES('a');
30
31 --echo # XTRABACKUP PREPARE
32 exec $XTRABACKUP --prepare --target-dir=$basedir;
33
34 let $shutdown_timeout=0;
35 --source include/shutdown_mysqld.inc
36
37 # Since there is no checkpoint during previous run, we can
38 # Copy the datafile from t1.ibd and start the server
39
40 remove_file $MYSQLD_DATADIR/test/t1.ibd;
41 copy_file $basedir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
42 --enable_result_log
43 let $restart_parameters=;
44 --source include/start_mysqld.inc
45
46 SELECT COUNT(*) FROM t1;
47 ALTER TABLE t1 FORCE;
48 DROP TABLE t1;
49
50 --rmdir $basedir