Debian Codegraph @

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

raw
1 # Check if a tablespace is discoverable during crash recovery
2
3 --source include/have_innodb_max_16k.inc
4
5 --source include/not_valgrind.inc
6 --source include/have_debug.inc
7
8 let MYSQLD_DATADIR= `select @@datadir`;
9
10 SET GLOBAL innodb_file_per_table=ON;
11
12 CREATE DATABASE discover;
13 use discover;
14
15 # Stop the once a second checkpoint
16 SET GLOBAL debug="+d,periodical_checkpoint_disabled";
17
18 # Do not perform background activities in master thread
19 SET GLOBAL innodb_master_thread_disabled_debug=1;
20
21 # Check if we can recover from a crash when a full checkpoint happens
22 # between the CREATE redo logging and the tablespace page init.
23
24 SET SESSION debug="+d,fil_ibd_create_log";
25
26 --source include/expect_crash.inc
27
28 --error 2013
29 CREATE TABLE discover.t1(c INT) engine=InnoDB;
30
31 --source include/start_mysqld.inc
32
33 CREATE TABLE discover.t2(c INT) ENGINE=InnoDB;
34
35 BEGIN;
36 INSERT INTO t2 VALUES(1);
37 INSERT INTO t2 SELECT * FROM t2;
38 INSERT INTO t2 SELECT * FROM t2;
39 INSERT INTO t2 SELECT * FROM t2;
40
41 --source include/kill_mysqld.inc
42 --source include/start_mysqld.inc
43
44 # Should be empty, transaction should be rolled back and the tablespace
45 # should be found in the right place.
46 SELECT * FROM t2;
47
48 DROP DATABASE discover;