--source include/have_debug_sync.inc # This test checks scenario of recovery executed on data directory with a redo # file that has invalid metadata. # Scenario-2. Create scenario based on at least two redo files, in which the # second redo file has start_lsn different than end_lsn of the first file. # According to perl's documentation, 'Q' in (un)pack() is supported only if perl # has been compiled with support for 64bit integers. # The log_file_get_start_lsn(), which is used in this test, uses unpack('Q>'). --source include/have_perl_64bit_int.inc --let $INNODB_PAGE_SIZE = `select @@innodb_page_size` --let MYSQLD_IB_REDO_LOG_NON_TMP_FILES_COUNT_MIN = 2 --source include/log_multiple_files_test_begin.inc perl; require 'include/ib_redo_log_files.inc'; my $fpath = ''; my $n = 0; for my $f (log_get_non_tmp_files()) { if ($n++ > 0) { $fpath = $f; last; } } my $start_lsn = 0; my $start_lsn_orig = 0; my $result_file_path = "$ENV{'MYSQLD_DATADIR'}/found.inc"; if ($fpath ne '') { $start_lsn = log_file_get_start_lsn($fpath); $start_lsn_orig = $start_lsn; $start_lsn += 512; my $packed_start_lsn = pack('Q>', $start_lsn); log_file_set_start_lsn($fpath, $start_lsn); open my $fh, '+>', $result_file_path or die "open failed: $!\n"; syswrite($fh, "let REDO_FILE=$fpath;\n") > 0 or die "write failed: $!\n"; syswrite($fh, "let REDO_FILE_NEW_START_LSN=$start_lsn;\n") > 0 or die "write failed: $!\n"; syswrite($fh, "let REDO_FILE_OLD_START_LSN=$start_lsn_orig;\n") > 0 or die "write failed: $!\n"; close $fh or die "close failed: $!\n"; } else { open my $fh, '+>', $result_file_path or die "open failed: $!\n"; syswrite($fh, "--skip The required number of redo files was decreased just before MySQL was killed.\n") > 0 or die "write failed: $!\n"; close $fh or die "close failed: $!\n"; } EOF --source $MYSQLD_DATADIR/found.inc let MYSQLD_EXTRA_ARGS = --debug="d,log_header_checksum_disabled" --innodb_page_size=$INNODB_PAGE_SIZE; let SEARCH_FILE = $MYSQLD_ERROR_LOG; --error 1,42 --exec $MYSQLD --no-defaults $MYSQLD_ARGS $MYSQLD_EXTRA_ARGS --innodb-unknown-param=y let SEARCH_PATTERN = The redo log file .* has start_lsn $REDO_FILE_NEW_START_LSN but expected $REDO_FILE_OLD_START_LSN \(end_lsn of the previous redo log file\); --replace_result $REDO_FILE_NEW_START_LSN REDO_FILE_NEW_START_LSN $REDO_FILE_OLD_START_LSN REDO_FILE_OLD_START_LSN $INNODB_PAGE_SIZE INNODB_PAGE_SIZE --source include/search_pattern.inc --source include/log_multiple_files_test_end.inc