Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 --source include/have_sequence.inc
3
4 # We will kill and restart the server.
5 --source include/not_embedded.inc
6 FLUSH TABLES;
7
8 --echo #
9 --echo # MDEV-21217 innodb_force_recovery=2 may wrongly abort the rollback
10 --echo # of recovered transactions
11 --echo #
12
13 connect (con0,localhost,root);
14 CREATE TABLE t0 (a INT PRIMARY KEY) ENGINE=InnoDB;
15 # Create enough undo log so that the rollback may take enough time.
16 BEGIN;
17 INSERT INTO t0 SELECT * FROM seq_1_to_1000;
18
19 connection default;
20 # Persist the above incomplete transaction.
21 SET GLOBAL innodb_flush_log_at_trx_commit=1;
22 CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
23
24 --let $restart_parameters= --innodb-force-recovery=2
25 --let $shutdown_timeout=0
26 --source include/restart_mysqld.inc
27 --let $restart_parameters=
28 --let $shutdown_timeout=
29
30 disconnect con0;
31 connection default;
32 # If the rollback was aborted, we would end up in a lock wait here.
33 # The LIMIT 0 works around MDEV-22889 InnoDB occasionally breaks ACID
34 SELECT * FROM t0 LIMIT 0 LOCK IN SHARE MODE;
35 DROP TABLE t0,t1;