Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2
3 #
4 # BUG#30226841 ASSERTION FAILURE: SRV0START.CC:NNN:TRX_SYS_ANY_ACTIVE_TRANSACTIONS() == 0
5 #
6
7 CREATE TABLE t (a INT);
8
9 --echo # 0. Disable checkpoints and page cleaners.
10 SET GLOBAL innodb_checkpoint_disabled = 1;
11 SET GLOBAL innodb_purge_stop_now = 1;
12 SET GLOBAL innodb_page_cleaner_disabled_debug = 1;
13
14 --echo # 1. Commit transaction.
15 BEGIN;
16 INSERT INTO t(a) VALUES(1);
17 COMMIT;
18
19 --echo # 2. Crash trying to execute next transaction.
20 BEGIN;
21 INSERT INTO t(a) VALUES(2);
22
23 SET GLOBAL innodb_log_flush_now = ON;
24 --source include/kill_mysqld.inc
25
26 --echo # 3. Start MySQL after crash but pause trx_recovery_rollback thread to simulate delay.
27 let $restart_parameters = "restart: --innodb-fast-shutdown=1 --debug=d,pause_rollback_on_recovery";
28 --source include/start_mysqld.inc
29
30 --echo # 4. Stop MySQL using fast shutdown.
31 # This failed on assertion ut_a(trx_sys_any_active_transactions() == 0) in srv_pre_dd_shutdown()
32 # during the shutdown (fast shutdown).
33 --source include/shutdown_mysqld.inc
34
35 --echo # Verifying that recovery found transactions which need rollback
36 let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
37 let SEARCH_PATTERN= MY-013023;
38 --source include/search_pattern.inc
39
40 --echo # 5. Restart MySQL and restore defaults (clean up for next tests).
41 let $restart_parameters = restart;
42 --source include/start_mysqld.inc
43
44 DROP TABLE t;