Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2 --source include/have_debug_sync.inc
3
4 # This test checks scenario of recovery executed on data directory in which the last redo file is "from future" (flushed_to_disk_lsn has not been advanced to reach it yet)
5
6 --echo # Prepare schema used in the tests.
7 --source include/ib_log_spammer_init.inc
8
9 let MYSQLD_DATADIR = `select @@datadir`;
10
11 --echo # Wait until next redo file is being created...
12
13 --echo # Create connection which generates spam to the redo log.
14 --connect(C1,localhost,root,,test)
15 --send CALL log_spammer()
16 --connect(C2,localhost,root,,test)
17 --send CALL log_spammer()
18 --connection default
19
20 SET GLOBAL DEBUG = '+d,syncpoint_log_before_file_marked_as_full';
21
22 SET DEBUG_SYNC = 'now WAIT_FOR reached_log_before_file_marked_as_full';
23
24 let REDO_PERL_OUT_FILE = $MYSQLTEST_VARDIR/log/perl_out.inc;
25
26 perl;
27 require 'include/ib_redo_log_files.inc';
28 my $fpath = '';
29 for my $f (log_get_non_tmp_files()) {
30 $fpath = $f;
31 }
32 open my $fh, '+>', $ENV{'REDO_PERL_OUT_FILE'} or die "open failed: $!\n";
33 syswrite($fh, "let REDO_FILE=$fpath;\n") > 0 or die "write failed: $!\n";
34 close $fh or die "close failed: $!\n";
35 EOF
36
37 --source $REDO_PERL_OUT_FILE
38
39 let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
40
41 --source include/kill_and_restart_mysqld.inc
42
43 let SEARCH_PATTERN=Marked the current redo log file .* as incomplete;
44 --source include/search_pattern.inc
45
46 let MYSQLD_DATADIR =;
47
48 --echo # Cleanup.
49 SET DEBUG_SYNC = 'RESET';
50 --source include/ib_log_spammer_cleanup.inc