File: log_upgrade_empty_log_fast_shutdown.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (45 lines) | stat: -rw-r--r-- 1,692 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--source include/big_test.inc
--source include/have_innodb_16k.inc

--let $MYSQLD_DATADIR1= $MYSQL_TMP_DIR/data
# This is a file created by mysql-8.0.28 on Windows using following steps:
#   mysqld --initialize-insecure --lower-case-table-names=1 --innodb-log-file-size=4194304
#   start the server
#   CREATE DATABASE test;
#   use test;
#   CREATE TABLE t(id INT PRIMARY KEY);
#   INSERT INTO t VALUES (42);
#   wait for empty redo
#   fast shutdown
#   manually edit binlog.index to replace .\ with ./ so it is portable
# The idea is that the flushed_lsn is much smaller than checkpoint_lsn, but the log is empty.
--let $ZIP_FILE= $MYSQLTEST_VARDIR/std_data/upgrade/data_80028_empty_log_fast_shutdown.zip
--let $MYSQLD_LOG = $MYSQLD_DATADIR1/mysqld.err
--let SEARCH_FILE= $MYSQLD_LOG
let $args=--datadir=$MYSQLD_DATADIR1 --log-error=$MYSQLD_LOG --log-error-verbosity=3 --lower-case-table-names=1;

# Stop current instance
--source include/kill_mysqld.inc
# Unpack the zipped datadir:
--exec unzip -qo $ZIP_FILE -d $MYSQL_TMP_DIR
--list_files $MYSQLD_DATADIR1 ib_logfile*
# Now, perform the upgrade:

--let $restart_parameters = restart: $args
--replace_result $MYSQLD_DATADIR1 MYSQLD_DATADIR1
--source include/start_mysqld.inc
SHOW TABLES FROM test;
# We should be able to see 42.
# Also there should be no assertion failures complaining about a "page from future" (>flushed_lsn)
SELECT * FROM t;

--source include/kill_mysqld.inc

--echo # Expect found
let SEARCH_PATTERN= Upgrading redo log: .* LSN=[0-9]+;
--source include/search_pattern.inc
--force-rmdir $MYSQLD_DATADIR1

# Start the server with original settings
let $restart_parameters = restart:;
--source include/start_mysqld.inc