Debian Codegraph @

mysql-test/suite/innodb/r/discarded_partition_create.result

raw
1 select case when @@version like "5.7.30%" then '5730'
2 when @@version like "8.0.20%" then '8020'
3 else 'none' end as VERSION into @current_server_version;
4 # Starting server with keyring plugin
5 # restart: --early-plugin-load=keyring_file=keyring_file.so --loose-keyring_file_data=MYSQL_TMP_DIR/mysecret_keyring --plugin-dir=KEYRING_PLUGIN_PATH
6 CREATE DATABASE partitions;
7 CREATE TABLE partitions.export1(c1 INT,c2 INT) PARTITION BY KEY(c1) PARTITIONS 4;
8 FLUSH TABLE partitions.export1 FOR EXPORT;
9 UNLOCK TABLES;
10 CREATE TABLE partitions.t1(c1 INT,c2 INT) PARTITION BY KEY(c1) PARTITIONS 4;
11 ALTER TABLE partitions.t1 DISCARD PARTITION p0 TABLESPACE;
12 CREATE TABLE partitions.t2(c1 INT,c2 INT) PARTITION BY KEY(c1) PARTITIONS 4;
13 ALTER TABLE partitions.t2 DISCARD PARTITION p0, p1 TABLESPACE;
14 ALTER TABLE partitions.t2 IMPORT PARTITION p0 TABLESPACE;
15 ALTER TABLE partitions.t2 IMPORT PARTITION p1 TABLESPACE;
16 CREATE TABLE partitions.t3(c1 INT,c2 INT) PARTITION BY KEY(c1) PARTITIONS 4;
17 ALTER TABLE partitions.t3 DISCARD PARTITION p0, p1 TABLESPACE;
18 ALTER TABLE partitions.t3 IMPORT PARTITION p1 TABLESPACE;
19 CREATE TABLE partitions.export2 (c1 INT, c2 INT)
20 PARTITION BY RANGE( c2)
21 SUBPARTITION BY HASH( c2 )
22 SUBPARTITIONS 2 (
23 PARTITION p0 VALUES LESS THAN (10),
24 PARTITION p1 VALUES LESS THAN (20),
25 PARTITION p2 VALUES LESS THAN (30),
26 PARTITION p3 VALUES LESS THAN MAXVALUE
27 );
28 FLUSH TABLE partitions.export2 FOR EXPORT;
29 UNLOCK TABLES;
30 CREATE TABLE partitions.t4 (c1 INT, c2 INT)
31 PARTITION BY RANGE( c2 )
32 SUBPARTITION BY HASH( c2 )
33 SUBPARTITIONS 2 (
34 PARTITION p0 VALUES LESS THAN (10),
35 PARTITION p1 VALUES LESS THAN (20),
36 PARTITION p2 VALUES LESS THAN (30),
37 PARTITION p3 VALUES LESS THAN MAXVALUE
38 );
39 ALTER TABLE partitions.t4 DISCARD PARTITION p0sp0 TABLESPACE;
40 ALTER TABLE partitions.t4 DISCARD PARTITION p0sp1 TABLESPACE;
41 ALTER TABLE partitions.t4 DISCARD PARTITION p1sp0 TABLESPACE;
42 CREATE TABLE partitions.t5 (c1 INT, c2 INT)
43 PARTITION BY RANGE( c2 )
44 SUBPARTITION BY HASH( c2 )
45 SUBPARTITIONS 2 (
46 PARTITION p0 VALUES LESS THAN (10),
47 PARTITION p1 VALUES LESS THAN (20),
48 PARTITION p2 VALUES LESS THAN (30),
49 PARTITION p3 VALUES LESS THAN MAXVALUE
50 );
51 ALTER TABLE partitions.t5 DISCARD PARTITION p0sp0 TABLESPACE;
52 ALTER TABLE partitions.t5 DISCARD PARTITION p0sp1 TABLESPACE;
53 ALTER TABLE partitions.t5 DISCARD PARTITION p1sp0 TABLESPACE;
54 ALTER TABLE partitions.t5 DISCARD PARTITION p1sp1 TABLESPACE;
55 ALTER TABLE partitions.t5 DISCARD PARTITION p2sp0 TABLESPACE;
56 ALTER TABLE partitions.t5 IMPORT PARTITION p0sp0 TABLESPACE;
57 ALTER TABLE partitions.t5 IMPORT PARTITION p0sp1 TABLESPACE;
58 ALTER TABLE partitions.t5 IMPORT PARTITION p1sp0 TABLESPACE;
59 ALTER TABLE partitions.t5 IMPORT PARTITION p2sp0 TABLESPACE;
60 CREATE TABLE partitions.t6 (c1 INT, c2 INT)
61 PARTITION BY RANGE( c2 )
62 SUBPARTITION BY HASH( c2 )
63 SUBPARTITIONS 2 (
64 PARTITION p0 VALUES LESS THAN (10),
65 PARTITION p1 VALUES LESS THAN (20),
66 PARTITION p2 VALUES LESS THAN (30),
67 PARTITION p3 VALUES LESS THAN MAXVALUE
68 );
69 ALTER TABLE partitions.t6 DISCARD PARTITION p0 TABLESPACE;
70 ALTER TABLE partitions.t6 DISCARD PARTITION p1sp1 TABLESPACE;
71 CREATE TABLE partitions.t7 (c1 INT, c2 INT)
72 PARTITION BY RANGE( c2 )
73 SUBPARTITION BY HASH( c2 )
74 SUBPARTITIONS 2 (
75 PARTITION p0 VALUES LESS THAN (10),
76 PARTITION p1 VALUES LESS THAN (20),
77 PARTITION p2 VALUES LESS THAN (30),
78 PARTITION p3 VALUES LESS THAN MAXVALUE
79 );
80 ALTER TABLE partitions.t7 DISCARD PARTITION p0 TABLESPACE;
81 ALTER TABLE partitions.t7 DISCARD PARTITION p1sp0 TABLESPACE;
82 ALTER TABLE partitions.t7 IMPORT PARTITION p0sp0 TABLESPACE;
83 ALTER TABLE partitions.t7 IMPORT PARTITION p0sp1 TABLESPACE;
84 ALTER TABLE partitions.t7 IMPORT PARTITION p1sp0 TABLESPACE;
85
86 # Stop DB server which was created by MTR default
87 # Copy and zip old version data directory.
88 # Cleanup: Restart with default options.
89 # restart
90 DROP TABLE partitions.t1;
91 DROP TABLE partitions.t2;
92 DROP TABLE partitions.t3;
93 DROP TABLE partitions.t4;
94 DROP TABLE partitions.t5;
95 DROP TABLE partitions.t6;
96 DROP TABLE partitions.t7;
97 DROP DATABASE partitions;
98 call mtr.add_suppression("\\[Warning\\].* Tablespace .*, name '.*', file '.*' is missing");
99 call mtr.add_suppression("\\[Warning\\].* Tablespace for table `.*`\\.`.*` /\\* Partition `.*` \\*/ is set as discarded");