Debian Codegraph @

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

raw
1 --source include/have_debug.inc
2
3 connect(con1,localhost,root,,);
4 connect(con2,localhost,root,,);
5
6 connection con1;
7 set global table_definition_cache=400;
8 set global table_open_cache= 1024;
9
10 use test;
11 SET SESSION innodb_strict_mode = OFF;
12 CREATE TABLE t1(c1 INT PRIMARY KEY) COMPRESSION="zlibX";
13 SHOW WARNINGS;
14 SHOW CREATE TABLE t1;
15 SELECT TABLE_NAME, CREATE_OPTIONS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
16 SELECT NAME, ROW_FORMAT, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE NAME = 'test/t1';
17 INSERT INTO t1 VALUES(1);
18 commit;
19
20 connection con2;
21 use test;
22 SELECT * FROM t1;
23
24 connection con1;
25 select sleep(10);
26
27 --echo # Flush tables, so that the table can be evicted by master thread.
28 flush tables;
29
30 --echo # Create 1000 tables, try the best to evict the table.
31 --disable_query_log
32 let $loop=1000;
33 while ($loop > 1) {
34 eval CREATE TABLE t_$loop (id int) ENGINE=innodb;
35 dec $loop;
36 }
37
38 select sleep(20);
39
40 DROP TABLE t1;
41 SHOW WARNINGS;
42
43 let $loop=1000;
44 while($loop > 1)
45 {
46 eval DROP TABLE t_$loop;
47 dec $loop;
48 }
49
50 --enable_query_log
51 set global table_definition_cache=default;
52 set global table_open_cache= default;
53
54 disconnect con1;
55 disconnect con2;
56