Debian Codegraph @

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

raw
1 --source include/big_test.inc
2 --source include/have_innodb_16k.inc
3
4 --let $MYSQLD_DATADIR1= $MYSQL_TMP_DIR/data
5 # This is a file created by mysql-8.0.28 on Windows using following steps:
6 # mysqld --initialize-insecure --lower-case-table-names=1 --innodb-log-file-size=4194304
7 # start the server
8 # CREATE DATABASE test;
9 # use test;
10 # CREATE TABLE t(id INT PRIMARY KEY);
11 # INSERT INTO t VALUES (42);
12 # wait for empty redo
13 # fast shutdown
14 # manually edit binlog.index to replace .\ with ./ so it is portable
15 # The idea is that the flushed_lsn is much smaller than checkpoint_lsn, but the log is empty.
16 --let $ZIP_FILE= $MYSQLTEST_VARDIR/std_data/upgrade/data_80028_empty_log_fast_shutdown.zip
17 --let $MYSQLD_LOG = $MYSQLD_DATADIR1/mysqld.err
18 --let SEARCH_FILE= $MYSQLD_LOG
19 let $args=--datadir=$MYSQLD_DATADIR1 --log-error=$MYSQLD_LOG --log-error-verbosity=3 --lower-case-table-names=1;
20
21 # Stop current instance
22 --source include/kill_mysqld.inc
23 # Unpack the zipped datadir:
24 --exec unzip -qo $ZIP_FILE -d $MYSQL_TMP_DIR
25 --list_files $MYSQLD_DATADIR1 ib_logfile*
26 # Now, perform the upgrade:
27
28 --let $restart_parameters = restart: $args
29 --replace_result $MYSQLD_DATADIR1 MYSQLD_DATADIR1
30 --source include/start_mysqld.inc
31 SHOW TABLES FROM test;
32 # We should be able to see 42.
33 # Also there should be no assertion failures complaining about a "page from future" (>flushed_lsn)
34 SELECT * FROM t;
35
36 --source include/kill_mysqld.inc
37
38 --echo # Expect found
39 let SEARCH_PATTERN= Upgrading redo log: .* LSN=[0-9]+;
40 --source include/search_pattern.inc
41 --force-rmdir $MYSQLD_DATADIR1
42
43 # Start the server with original settings
44 let $restart_parameters = restart:;
45 --source include/start_mysqld.inc