Debian Codegraph @

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

raw
1 --echo #
2 --echo # Bug#31365127 DROP A PARTITION RESULT IN OOM
3 --echo #
4
5 --source include/big_test.inc
6 --source include/not_valgrind.inc
7
8 # Case 1 : Test create and drop large number of partitions in
9 # system table-space.
10
11 set global innodb_file_per_table = off;
12
13 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
14 PARTITION BY HASH(a) PARTITIONS 1024;
15
16 DROP TABLE t1;
17
18 # Case 2 : Test create, rename and drop large number of partitions in
19 # system table-space.
20
21 set global innodb_file_per_table = off;
22
23 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
24 PARTITION BY HASH(a) PARTITIONS 1024;
25
26 RENAME TABLE t1 TO t2;
27 DROP TABLE t2;
28
29 # Case 3 : Test create, truncate and drop large number of partitions in
30 # system table-space.
31
32 set global innodb_file_per_table = off;
33
34 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
35 PARTITION BY HASH(a) PARTITIONS 1024;
36
37 TRUNCATE TABLE t1;
38 DROP TABLE t1;
39
40 set global innodb_file_per_table = on;
41
42 # Case 4 : Test create and drop max number of partitions in
43 # file per table-space.
44
45 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
46 PARTITION BY HASH(a) PARTITIONS 1024;
47
48 DROP TABLE t1;
49
50 # Case 5 : Test create, rename and drop max number of partitions in
51 # file per table-space.
52
53 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
54 PARTITION BY HASH(a) PARTITIONS 1024;
55
56 RENAME TABLE t1 TO t2;
57 DROP TABLE t2;
58
59 # Case 6 : Test create, truncate and drop large number of partitions in
60 # file per table-space.
61
62 CREATE TABLE t1(a INT NOT NULL, PRIMARY KEY(a)) ENGINE=INNODB
63 PARTITION BY HASH(a) PARTITIONS 1024;
64
65 TRUNCATE TABLE t1;
66 DROP TABLE t1;