Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 --source include/have_debug.inc
3 --source include/not_embedded.inc
4 call mtr.add_suppression("Checksum mismatch in the first page of file");
5 let INNODB_PAGE_SIZE=`select @@innodb_page_size`;
6 let MYSQLD_DATADIR=`select @@datadir`;
7
8 show variables like 'innodb_doublewrite';
9 create table t1(f1 int not null, f2 int not null)engine=innodb;
10 insert into t1 values (1, 1);
11
12 # Slow shutdown and restart to make sure ibuf merge is finished
13 SET GLOBAL innodb_fast_shutdown = 0;
14 let $shutdown_timeout=;
15 let $restart_parameters=--debug_dbug=+d,ib_log_checkpoint_avoid_hard --innodb_flush_sync=0;
16 --source include/restart_mysqld.inc
17
18 --source ../include/no_checkpoint_start.inc
19 --echo # Make the first page dirty for undo tablespace
20 set global innodb_saved_page_number_debug = 0;
21 set global innodb_fil_make_page_dirty_debug = 1;
22
23 SET GLOBAL innodb_buf_flush_list_now = 1;
24
25 --let CLEANUP_IF_CHECKPOINT=drop table t1;
26 --source ../include/no_checkpoint_end.inc
27
28 perl;
29 use IO::Handle;
30 my $fname= "$ENV{'MYSQLD_DATADIR'}/undo001";
31 my $page_size = $ENV{INNODB_PAGE_SIZE};
32 die unless open(FILE, "+<", $fname);
33 sysread(FILE, $page, $page_size)==$page_size||die "Unable to read $name\n";
34 substr($page, 49, 4) = pack("N", 1000);
35 sysseek(FILE, 0, 0)||die "Unable to seek $fname\n";
36 die unless syswrite(FILE, $page, $page_size) == $page_size;
37 close FILE;
38 EOF
39
40 --source include/start_mysqld.inc
41 let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
42 let SEARCH_PATTERN= Recovered page \\[page id: space=1, page number=0\\] to '.*undo001' from the doublewrite buffer\\.;
43 --source include/search_pattern_in_file.inc
44
45 check table t1;
46 drop table t1;