Debian Codegraph @

mysql-test/suite/innodb/t/undo_truncate_recover.test

raw
1 #
2 # WL#6965: Truncate UNDO logs.
3 #
4
5 --source include/big_test.inc
6 --source include/not_valgrind.inc
7 # With larger innodb_page_size, the undo log tablespaces do not grow enough.
8 --source include/innodb_page_size_small.inc
9 --source include/have_innodb.inc
10 --source include/have_debug.inc
11 # Tests with embedded server do not support restarting
12 --source include/not_embedded.inc
13
14 # Re-create the undo log tablespaces after slow shutdown
15 SET GLOBAL innodb_fast_shutdown=0;
16 let $restart_parameters=--innodb_undo_tablespaces=2;
17 --source include/restart_mysqld.inc
18
19 SET GLOBAL innodb_undo_log_truncate = 1;
20
21 let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err;
22
23 create table t1(keyc int primary key, c char(100)) engine = innodb;
24 begin;
25 --disable_query_log
26 let $i=30000;
27 while ($i) {
28 eval insert into t1 values(30000-$i, '');
29 dec $i;
30 }
31 --enable_query_log
32 commit;
33
34 let $checksum_algorithm = `SELECT @@GLOBAL.innodb_checksum_algorithm`;
35 let SEARCH_PATTERN = ib_undo_trunc;
36 begin;
37 update t1 set c = 'MariaDB';
38 update t1 set c = 'InnoDB';
39 eval set global debug_dbug = '+d,$SEARCH_PATTERN';
40 commit;
41 drop table t1;
42 call mtr.add_suppression("InnoDB: innodb_undo_tablespaces=0 disables dedicated undo log tablespaces");
43 SET GLOBAL innodb_fast_shutdown=0;
44 --source include/shutdown_mysqld.inc
45 --source include/search_pattern_in_file.inc
46 --let $restart_parameters= --innodb-undo-tablespaces=1
47 --let $restart_noprint=1
48 if ($checksum_algorithm == "strict_full_crc32")
49 {
50 let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_crc32;
51 }
52
53 if ($checksum_algorithm == "strict_crc32")
54 {
55 let $restart_parameters= $restart_parameters --innodb_checksum_algorithm=strict_full_crc32;
56 }
57 --source include/start_mysqld.inc