Debian Codegraph @

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

raw
1 CREATE TABLESPACE s1 ADD DATAFILE 's1.ibd' ENGINE InnoDB;
2 CREATE TABLE t1 (col1 INT, col2 INT) ENGINE = InnoDB TABLESPACE innodb_file_per_table PARTITION BY KEY(col1) PARTITIONS 3;
3 === information_schema.innodb_tables and innodb_tablespaces ===
4 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
5 test/t1#p#p0 test/t1#p#p0 33 5 Dynamic 0 Single
6 test/t1#p#p1 test/t1#p#p1 33 5 Dynamic 0 Single
7 test/t1#p#p2 test/t1#p#p2 33 5 Dynamic 0 Single
8 === information_schema.innodb_tablespaces and innodb_datafiles ===
9 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
10 s1 General DEFAULT 0 Any s1.ibd
11 test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p0.ibd
12 test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p1.ibd
13 test/t1#p#p2 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p2.ibd
14 === information_schema.files ===
15 Space_Name File_Type Engine Status Tablespace_Name Path
16 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
17 test/t1#p#p0 TABLESPACE InnoDB NORMAL test/t1#p#p0 MYSQLD_DATADIR/test/t1#p#p0.ibd
18 test/t1#p#p1 TABLESPACE InnoDB NORMAL test/t1#p#p1 MYSQLD_DATADIR/test/t1#p#p1.ibd
19 test/t1#p#p2 TABLESPACE InnoDB NORMAL test/t1#p#p2 MYSQLD_DATADIR/test/t1#p#p2.ibd
20 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE s1;
21 SHOW CREATE TABLE t1;
22 Table Create Table
23 t1 CREATE TABLE `t1` (
24 `col1` int(11) DEFAULT NULL,
25 `col2` int(11) DEFAULT NULL
26 ) /*!50100 TABLESPACE `s1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
27 /*!50100 PARTITION BY KEY (col1)
28 PARTITIONS 3 */
29 === information_schema.innodb_tables and innodb_tablespaces ===
30 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
31 test/t1#p#p0 test/t1#p#p0 33 5 Dynamic 0 Single
32 test/t1#p#p1 test/t1#p#p1 33 5 Dynamic 0 Single
33 test/t1#p#p2 test/t1#p#p2 33 5 Dynamic 0 Single
34 === information_schema.innodb_tablespaces and innodb_datafiles ===
35 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
36 s1 General DEFAULT 0 Any s1.ibd
37 test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p0.ibd
38 test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p1.ibd
39 test/t1#p#p2 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p2.ibd
40 === information_schema.files ===
41 Space_Name File_Type Engine Status Tablespace_Name Path
42 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
43 test/t1#p#p0 TABLESPACE InnoDB NORMAL test/t1#p#p0 MYSQLD_DATADIR/test/t1#p#p0.ibd
44 test/t1#p#p1 TABLESPACE InnoDB NORMAL test/t1#p#p1 MYSQLD_DATADIR/test/t1#p#p1.ibd
45 test/t1#p#p2 TABLESPACE InnoDB NORMAL test/t1#p#p2 MYSQLD_DATADIR/test/t1#p#p2.ibd
46 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE innodb_file_per_table;
47 SHOW CREATE TABLE t1;
48 Table Create Table
49 t1 CREATE TABLE `t1` (
50 `col1` int(11) DEFAULT NULL,
51 `col2` int(11) DEFAULT NULL
52 ) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
53 /*!50100 PARTITION BY KEY (col1)
54 PARTITIONS 3 */
55 === information_schema.innodb_tables and innodb_tablespaces ===
56 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
57 test/t1#p#p0 test/t1#p#p0 33 5 Dynamic 0 Single
58 test/t1#p#p1 test/t1#p#p1 33 5 Dynamic 0 Single
59 test/t1#p#p2 test/t1#p#p2 33 5 Dynamic 0 Single
60 === information_schema.innodb_tablespaces and innodb_datafiles ===
61 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
62 s1 General DEFAULT 0 Any s1.ibd
63 test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p0.ibd
64 test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p1.ibd
65 test/t1#p#p2 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t1#p#p2.ibd
66 === information_schema.files ===
67 Space_Name File_Type Engine Status Tablespace_Name Path
68 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
69 test/t1#p#p0 TABLESPACE InnoDB NORMAL test/t1#p#p0 MYSQLD_DATADIR/test/t1#p#p0.ibd
70 test/t1#p#p1 TABLESPACE InnoDB NORMAL test/t1#p#p1 MYSQLD_DATADIR/test/t1#p#p1.ibd
71 test/t1#p#p2 TABLESPACE InnoDB NORMAL test/t1#p#p2 MYSQLD_DATADIR/test/t1#p#p2.ibd
72 DROP TABLE t1;
73 CREATE TABLE t1 (col1 INT, col2 INT) ENGINE = InnoDB TABLESPACE innodb_system PARTITION BY KEY(col1) PARTITIONS 3;
74 === information_schema.innodb_tables and innodb_tablespaces ===
75 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
76 test/t1#p#p0 innodb_system 161 5 Dynamic 0 System
77 test/t1#p#p1 innodb_system 161 5 Dynamic 0 System
78 test/t1#p#p2 innodb_system 161 5 Dynamic 0 System
79 === information_schema.innodb_tablespaces and innodb_datafiles ===
80 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
81 s1 General DEFAULT 0 Any s1.ibd
82 === information_schema.files ===
83 Space_Name File_Type Engine Status Tablespace_Name Path
84 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
85 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE s1;
86 SHOW CREATE TABLE t1;
87 Table Create Table
88 t1 CREATE TABLE `t1` (
89 `col1` int(11) DEFAULT NULL,
90 `col2` int(11) DEFAULT NULL
91 ) /*!50100 TABLESPACE `s1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
92 /*!50100 PARTITION BY KEY (col1)
93 PARTITIONS 3 */
94 === information_schema.innodb_tables and innodb_tablespaces ===
95 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
96 test/t1#p#p0 innodb_system 161 5 Dynamic 0 System
97 test/t1#p#p1 innodb_system 161 5 Dynamic 0 System
98 test/t1#p#p2 innodb_system 161 5 Dynamic 0 System
99 === information_schema.innodb_tablespaces and innodb_datafiles ===
100 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
101 s1 General DEFAULT 0 Any s1.ibd
102 === information_schema.files ===
103 Space_Name File_Type Engine Status Tablespace_Name Path
104 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
105 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE innodb_system;
106 SHOW CREATE TABLE t1;
107 Table Create Table
108 t1 CREATE TABLE `t1` (
109 `col1` int(11) DEFAULT NULL,
110 `col2` int(11) DEFAULT NULL
111 ) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
112 /*!50100 PARTITION BY KEY (col1)
113 PARTITIONS 3 */
114 === information_schema.innodb_tables and innodb_tablespaces ===
115 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
116 test/t1#p#p0 innodb_system 161 5 Dynamic 0 System
117 test/t1#p#p1 innodb_system 161 5 Dynamic 0 System
118 test/t1#p#p2 innodb_system 161 5 Dynamic 0 System
119 === information_schema.innodb_tablespaces and innodb_datafiles ===
120 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
121 s1 General DEFAULT 0 Any s1.ibd
122 === information_schema.files ===
123 Space_Name File_Type Engine Status Tablespace_Name Path
124 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
125 DROP TABLE t1;
126 CREATE TABLE t1 (col1 INT, col2 INT) ENGINE = InnoDB TABLESPACE s1 PARTITION BY KEY(col1) PARTITIONS 3;
127 === information_schema.innodb_tables and innodb_tablespaces ===
128 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
129 test/t1#p#p0 s1 161 5 Dynamic 0 General
130 test/t1#p#p1 s1 161 5 Dynamic 0 General
131 test/t1#p#p2 s1 161 5 Dynamic 0 General
132 === information_schema.innodb_tablespaces and innodb_datafiles ===
133 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
134 s1 General DEFAULT 0 Any s1.ibd
135 === information_schema.files ===
136 Space_Name File_Type Engine Status Tablespace_Name Path
137 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
138 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE innodb_file_per_table;
139 SHOW CREATE TABLE t1;
140 Table Create Table
141 t1 CREATE TABLE `t1` (
142 `col1` int(11) DEFAULT NULL,
143 `col2` int(11) DEFAULT NULL
144 ) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
145 /*!50100 PARTITION BY KEY (col1)
146 PARTITIONS 3 */
147 === information_schema.innodb_tables and innodb_tablespaces ===
148 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
149 test/t1#p#p0 s1 161 5 Dynamic 0 General
150 test/t1#p#p1 s1 161 5 Dynamic 0 General
151 test/t1#p#p2 s1 161 5 Dynamic 0 General
152 === information_schema.innodb_tablespaces and innodb_datafiles ===
153 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
154 s1 General DEFAULT 0 Any s1.ibd
155 === information_schema.files ===
156 Space_Name File_Type Engine Status Tablespace_Name Path
157 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
158 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE s1;
159 SHOW CREATE TABLE t1;
160 Table Create Table
161 t1 CREATE TABLE `t1` (
162 `col1` int(11) DEFAULT NULL,
163 `col2` int(11) DEFAULT NULL
164 ) /*!50100 TABLESPACE `s1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
165 /*!50100 PARTITION BY KEY (col1)
166 PARTITIONS 3 */
167 === information_schema.innodb_tables and innodb_tablespaces ===
168 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
169 test/t1#p#p0 s1 161 5 Dynamic 0 General
170 test/t1#p#p1 s1 161 5 Dynamic 0 General
171 test/t1#p#p2 s1 161 5 Dynamic 0 General
172 === information_schema.innodb_tablespaces and innodb_datafiles ===
173 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
174 s1 General DEFAULT 0 Any s1.ibd
175 === information_schema.files ===
176 Space_Name File_Type Engine Status Tablespace_Name Path
177 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
178 DROP TABLE t1;
179 CREATE TABLE t1 (col1 INT, col2 INT) ENGINE = InnoDB TABLESPACE s1 PARTITION BY KEY(col1) PARTITIONS 3;
180 === information_schema.innodb_tables and innodb_tablespaces ===
181 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
182 test/t1#p#p0 s1 161 5 Dynamic 0 General
183 test/t1#p#p1 s1 161 5 Dynamic 0 General
184 test/t1#p#p2 s1 161 5 Dynamic 0 General
185 === information_schema.innodb_tablespaces and innodb_datafiles ===
186 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
187 s1 General DEFAULT 0 Any s1.ibd
188 === information_schema.files ===
189 Space_Name File_Type Engine Status Tablespace_Name Path
190 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
191 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE innodb_system;
192 SHOW CREATE TABLE t1;
193 Table Create Table
194 t1 CREATE TABLE `t1` (
195 `col1` int(11) DEFAULT NULL,
196 `col2` int(11) DEFAULT NULL
197 ) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
198 /*!50100 PARTITION BY KEY (col1)
199 PARTITIONS 3 */
200 === information_schema.innodb_tables and innodb_tablespaces ===
201 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
202 test/t1#p#p0 s1 161 5 Dynamic 0 General
203 test/t1#p#p1 s1 161 5 Dynamic 0 General
204 test/t1#p#p2 s1 161 5 Dynamic 0 General
205 === information_schema.innodb_tablespaces and innodb_datafiles ===
206 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
207 s1 General DEFAULT 0 Any s1.ibd
208 === information_schema.files ===
209 Space_Name File_Type Engine Status Tablespace_Name Path
210 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
211 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE s1;
212 SHOW CREATE TABLE t1;
213 Table Create Table
214 t1 CREATE TABLE `t1` (
215 `col1` int(11) DEFAULT NULL,
216 `col2` int(11) DEFAULT NULL
217 ) /*!50100 TABLESPACE `s1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
218 /*!50100 PARTITION BY KEY (col1)
219 PARTITIONS 3 */
220 === information_schema.innodb_tables and innodb_tablespaces ===
221 Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
222 test/t1#p#p0 s1 161 5 Dynamic 0 General
223 test/t1#p#p1 s1 161 5 Dynamic 0 General
224 test/t1#p#p2 s1 161 5 Dynamic 0 General
225 === information_schema.innodb_tablespaces and innodb_datafiles ===
226 Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
227 s1 General DEFAULT 0 Any s1.ibd
228 === information_schema.files ===
229 Space_Name File_Type Engine Status Tablespace_Name Path
230 s1 TABLESPACE InnoDB NORMAL s1 MYSQLD_DATADIR/s1.ibd
231 DROP TABLE t1;
232 DROP TABLESPACE s1;
233 #
234 # Check if tablespace id of general tablespace or system tablespace
235 # are set properly
236 #
237 CREATE TABLESPACE gt1 ADD DATAFILE '1.ibd' FILE_BLOCK_SIZE = 16k ENGINE = InnoDB;
238 CREATE TABLE t1 (col1 INT) ENGINE = InnoDB TABLESPACE gt1;
239 ALTER TABLE t1 ENGINE = InnoDB PARTITION BY RANGE(col1 * 2)
240 ( PARTITION p3 VALUES LESS THAN MAXVALUE );
241 SHOW CREATE TABLE t1;
242 Table Create Table
243 t1 CREATE TABLE `t1` (
244 `col1` int(11) DEFAULT NULL
245 ) /*!50100 TABLESPACE `gt1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
246 /*!50100 PARTITION BY RANGE ((`col1` * 2))
247 (PARTITION p3 VALUES LESS THAN MAXVALUE TABLESPACE = `gt1` ENGINE = InnoDB) */
248 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE innodb_system;
249 SHOW CREATE TABLE t1;
250 Table Create Table
251 t1 CREATE TABLE `t1` (
252 `col1` int(11) DEFAULT NULL
253 ) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
254 /*!50100 PARTITION BY RANGE ((`col1` * 2))
255 (PARTITION p3 VALUES LESS THAN MAXVALUE TABLESPACE = `gt1` ENGINE = InnoDB) */
256 TRUNCATE TABLE t1;
257 SHOW CREATE TABLE t1;
258 Table Create Table
259 t1 CREATE TABLE `t1` (
260 `col1` int(11) DEFAULT NULL
261 ) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
262 /*!50100 PARTITION BY RANGE ((`col1` * 2))
263 (PARTITION p3 VALUES LESS THAN MAXVALUE TABLESPACE = `gt1` ENGINE = InnoDB) */
264 ALTER TABLE t1 ENGINE = InnoDB TABLESPACE gt1;
265 SHOW CREATE TABLE t1;
266 Table Create Table
267 t1 CREATE TABLE `t1` (
268 `col1` int(11) DEFAULT NULL
269 ) /*!50100 TABLESPACE `gt1` */ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
270 /*!50100 PARTITION BY RANGE ((`col1` * 2))
271 (PARTITION p3 VALUES LESS THAN MAXVALUE TABLESPACE = `gt1` ENGINE = InnoDB) */
272 DROP TABLE t1;
273 DROP TABLESPACE gt1;