Skip to content

Commit 3b1cdfe

Browse files
committed
WL#6378: New data dictionary.
Improve SQL layer handling of tablespace names: 1. Split tablespace name validation into length checks and name checks. 2. Do length checks early, before acquiring MDL on the names. 3. For tables, do tablespace name checks after the table has been opened, because we need to know which engine it belongs to (see next item). 4. Introduce an SE specific check of tablespace names as part of the handlerton API, and provide an implementation for InnoDB. 5. Invoke the name checks as early as possible to avoid unnecessary execution which will just be rolled back. 6. Iterate over indexes and partition indexes when retrieving tablespace names relevant for a given table, e.g. in the context of acquiring meta data locks for DDL statements. This patch is needed by InnoDB.
1 parent 25df0f9 commit 3b1cdfe

16 files changed

+696
-135
lines changed

mysql-test/r/tablespace.result

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,198 @@ ERROR HY000: The path specified for DATAFILE is too long.
254254
ALTER TABLESPACE ts DROP DATAFILE 'no_such_file.ibd';
255255
ERROR HY000: Incorrect File Name 'no_such_file.ibd'.
256256
DROP TABLESPACE ts;
257+
#
258+
# Validate tablespace names in the SE.
259+
#
260+
# 1. Tablespace DDL.
261+
# 1.1 Create/drop predefined tablespaces.
262+
CREATE TABLESPACE innodb_system ADD DATAFILE 'f.ibd' ENGINE InnoDB;
263+
ERROR 42000: InnoDB: `innodb_system` is a reserved tablespace name.
264+
CREATE TABLESPACE innodb_file_per_table ADD DATAFILE 'f.ibd' ENGINE InnoDB;
265+
ERROR 42000: InnoDB: `innodb_file_per_table` is a reserved tablespace name.
266+
CREATE TABLESPACE innodb_temporary ADD DATAFILE 'f.ibd' ENGINE InnoDB;
267+
ERROR 42000: InnoDB: `innodb_temporary` is a reserved tablespace name.
268+
CREATE TABLESPACE mysql ADD DATAFILE 'f.ibd' ENGINE InnoDB;
269+
ERROR 42000: InnoDB: `mysql` is a reserved tablespace name.
270+
DROP TABLESPACE innodb_system;
271+
ERROR 42000: InnoDB: `innodb_system` is a reserved tablespace name.
272+
DROP TABLESPACE innodb_file_per_table;
273+
ERROR 42000: InnoDB: `innodb_file_per_table` is a reserved tablespace name.
274+
DROP TABLESPACE innodb_temporary;
275+
ERROR 42000: InnoDB: `innodb_temporary` is a reserved tablespace name.
276+
DROP TABLESPACE mysql;
277+
ERROR 42000: InnoDB: `mysql` is a reserved tablespace name.
278+
# 1.2 Create/drop implicit tablespaces.
279+
CREATE TABLESPACE `innodb_file_per_table.2` ADD DATAFILE 'f.ibd' ENGINE InnoDB;
280+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
281+
DROP TABLESPACE `innodb_file_per_table.2`;
282+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
283+
CREATE TABLESPACE innodb_file_per_table_whatever ADD DATAFILE 'f.ibd' ENGINE InnoDB;
284+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
285+
DROP TABLESPACE innodb_file_per_table_whatever;
286+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
287+
CREATE TABLESPACE innodb_file_per_table ADD DATAFILE 'f.ibd' ENGINE InnoDB;
288+
ERROR 42000: InnoDB: `innodb_file_per_table` is a reserved tablespace name.
289+
DROP TABLESPACE innodb_file_per_table;
290+
ERROR 42000: InnoDB: `innodb_file_per_table` is a reserved tablespace name.
291+
# 2. Non partitioned table DDL.
292+
# 2.1 Create table.
293+
CREATE TABLE t1 (i INTEGER) TABLESPACE innodb_file_per_table ENGINE InnoDB;
294+
CREATE TABLE t2 (i INTEGER) TABLESPACE innodb_system ENGINE InnoDB;
295+
SHOW CREATE TABLE t1;
296+
Table Create Table
297+
t1 CREATE TABLE `t1` (
298+
`i` int(11) DEFAULT NULL
299+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
300+
SHOW CREATE TABLE t2;
301+
Table Create Table
302+
t2 CREATE TABLE `t2` (
303+
`i` int(11) DEFAULT NULL
304+
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
305+
CREATE TABLE t_bad (i INTEGER) TABLESPACE `innodb_file_per_table.2` ENGINE InnoDB;
306+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
307+
# 2.2 Alter table.
308+
ALTER TABLE t2 TABLESPACE `innodb_file_per_table.2`;
309+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
310+
# This is valid since MyISAM does not care:
311+
ALTER TABLE t2 TABLESPACE `innodb_file_per_table.2` ENGINE MyISAM;
312+
SHOW CREATE TABLE t2;
313+
Table Create Table
314+
t2 CREATE TABLE `t2` (
315+
`i` int(11) DEFAULT NULL
316+
) /*!50100 TABLESPACE `innodb_file_per_table.2` */ ENGINE=MyISAM DEFAULT CHARSET=latin1
317+
# Table t1 is carried over to MyISAM using the dummy 'innodb_file_per_table':
318+
ALTER TABLE t1 ENGINE MyISAM;
319+
SHOW CREATE TABLE t1;
320+
Table Create Table
321+
t1 CREATE TABLE `t1` (
322+
`i` int(11) DEFAULT NULL
323+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=MyISAM DEFAULT CHARSET=latin1
324+
# Changing only engine back to InnoDB now will be rejected for t2:
325+
ALTER TABLE t2 ENGINE InnoDB;
326+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
327+
SHOW CREATE TABLE t2;
328+
Table Create Table
329+
t2 CREATE TABLE `t2` (
330+
`i` int(11) DEFAULT NULL
331+
) /*!50100 TABLESPACE `innodb_file_per_table.2` */ ENGINE=MyISAM DEFAULT CHARSET=latin1
332+
# For t1, changing engine back to InnoDB will re-establish usage of the implicit tablespace:
333+
ALTER TABLE t1 ENGINE InnoDB;
334+
SHOW CREATE TABLE t1;
335+
Table Create Table
336+
t1 CREATE TABLE `t1` (
337+
`i` int(11) DEFAULT NULL
338+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
339+
# Changing both engine and tablespace works:
340+
ALTER TABLE t1 TABLESPACE innodb_system ENGINE InnoDB;
341+
SHOW CREATE TABLE t1;
342+
Table Create Table
343+
t1 CREATE TABLE `t1` (
344+
`i` int(11) DEFAULT NULL
345+
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
346+
ALTER TABLE t2 TABLESPACE innodb_file_per_table ENGINE InnoDB;
347+
SHOW CREATE TABLE t2;
348+
Table Create Table
349+
t2 CREATE TABLE `t2` (
350+
`i` int(11) DEFAULT NULL
351+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
352+
# Keeping a valid tablespace through ALTER TABLE:
353+
ALTER TABLE t1 ADD COLUMN (j INTEGER);
354+
CREATE TABLESPACE ts ADD DATAFILE 'f.ibd' ENGINE InnoDB;
355+
ALTER TABLE t1 TABLESPACE ts;
356+
ALTER TABLE t1 ENGINE MyISAM;
357+
SHOW CREATE TABLE t1;
358+
Table Create Table
359+
t1 CREATE TABLE `t1` (
360+
`i` int(11) DEFAULT NULL,
361+
`j` int(11) DEFAULT NULL
362+
) /*!50100 TABLESPACE `ts` */ ENGINE=MyISAM DEFAULT CHARSET=latin1
363+
ALTER TABLE t1 ENGINE InnoDB;
364+
SHOW CREATE TABLE t1;
365+
Table Create Table
366+
t1 CREATE TABLE `t1` (
367+
`i` int(11) DEFAULT NULL,
368+
`j` int(11) DEFAULT NULL
369+
) /*!50100 TABLESPACE `ts` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
370+
DROP TABLE t1;
371+
DROP TABLE t2;
372+
DROP TABLESPACE ts;
373+
# 3. Partitioned table DDL.
374+
# 3.1 Create table.
375+
CREATE TABLE t_part_bad (i INTEGER) PARTITION BY RANGE(i)
376+
PARTITIONS 2 (
377+
PARTITION p0 VALUES LESS THAN(100) TABLESPACE `innodb_file_per_table.2`,
378+
PARTITION p1 VALUES LESS THAN(200));
379+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
380+
CREATE TABLE t_part (i INTEGER) TABLESPACE innodb_file_per_table PARTITION BY RANGE(i)
381+
PARTITIONS 2 (
382+
PARTITION p0 VALUES LESS THAN(100),
383+
PARTITION p1 VALUES LESS THAN(200));
384+
SHOW CREATE TABLE t_part;
385+
Table Create Table
386+
t_part CREATE TABLE `t_part` (
387+
`i` int(11) DEFAULT NULL
388+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
389+
/*!50100 PARTITION BY RANGE (i)
390+
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
391+
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB) */
392+
CREATE TABLE t_subpart (i INTEGER) PARTITION BY RANGE(i)
393+
PARTITIONS 2 SUBPARTITION BY HASH(i) (
394+
PARTITION p0 VALUES LESS THAN(100) (
395+
SUBPARTITION sp00,
396+
SUBPARTITION sp01),
397+
PARTITION p1 VALUES LESS THAN(200) (
398+
SUBPARTITION sp10,
399+
SUBPARTITION sp11));
400+
SHOW CREATE TABLE t_subpart;
401+
Table Create Table
402+
t_subpart CREATE TABLE `t_subpart` (
403+
`i` int(11) DEFAULT NULL
404+
) ENGINE=InnoDB DEFAULT CHARSET=latin1
405+
/*!50100 PARTITION BY RANGE (i)
406+
SUBPARTITION BY HASH (i)
407+
(PARTITION p0 VALUES LESS THAN (100)
408+
(SUBPARTITION sp00 ENGINE = InnoDB,
409+
SUBPARTITION sp01 ENGINE = InnoDB),
410+
PARTITION p1 VALUES LESS THAN (200)
411+
(SUBPARTITION sp10 ENGINE = InnoDB,
412+
SUBPARTITION sp11 ENGINE = InnoDB)) */
413+
# 2.3 Alter table.
414+
ALTER TABLE t_part TABLESPACE innodb_system;
415+
SHOW CREATE TABLE t_part;
416+
Table Create Table
417+
t_part CREATE TABLE `t_part` (
418+
`i` int(11) DEFAULT NULL
419+
) /*!50100 TABLESPACE `innodb_system` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
420+
/*!50100 PARTITION BY RANGE (i)
421+
(PARTITION p0 VALUES LESS THAN (100) ENGINE = InnoDB,
422+
PARTITION p1 VALUES LESS THAN (200) ENGINE = InnoDB) */
423+
ALTER TABLE t_subpart TABLESPACE innodb_file_per_table;
424+
SHOW CREATE TABLE t_subpart;
425+
Table Create Table
426+
t_subpart CREATE TABLE `t_subpart` (
427+
`i` int(11) DEFAULT NULL
428+
) /*!50100 TABLESPACE `innodb_file_per_table` */ ENGINE=InnoDB DEFAULT CHARSET=latin1
429+
/*!50100 PARTITION BY RANGE (i)
430+
SUBPARTITION BY HASH (i)
431+
(PARTITION p0 VALUES LESS THAN (100)
432+
(SUBPARTITION sp00 ENGINE = InnoDB,
433+
SUBPARTITION sp01 ENGINE = InnoDB),
434+
PARTITION p1 VALUES LESS THAN (200)
435+
(SUBPARTITION sp10 ENGINE = InnoDB,
436+
SUBPARTITION sp11 ENGINE = InnoDB)) */
437+
ALTER TABLE t_part TABLESPACE `innodb_file_per_table.2`;
438+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
439+
ALTER TABLE t_subpart TABLESPACE `innodb_file_per_table.2`;
440+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
441+
ALTER TABLE t_part REORGANIZE PARTITION p1 INTO
442+
(PARTITION p1 VALUES LESS THAN (300) TABLESPACE `innodb_file_per_table.2`);
443+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
444+
ALTER TABLE t_subpart REORGANIZE PARTITION p1 INTO
445+
(PARTITION p1 VALUES LESS THAN (300) TABLESPACE `innodb_file_per_table.2`);
446+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
447+
ALTER TABLE t_subpart REORGANIZE PARTITION s11 INTO
448+
(PARTITION s11 TABLESPACE `innodb_file_per_table.2`);
449+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
450+
DROP TABLE t_part;
451+
DROP TABLE t_subpart;

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

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
7575
DROP TABLESPACE s-bad;
7676
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-bad' at line 1
7777
DROP TABLESPACE `test/s_bad`;
78-
ERROR HY000: Tablespace test/s_bad doesn't exist.
78+
ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
7979
DROP TABLESPACE s_does_not_exist;
8080
ERROR HY000: Tablespace s_does_not_exist doesn't exist.
8181
#
@@ -86,8 +86,7 @@ ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
8686
SHOW WARNINGS;
8787
Level Code Message
8888
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
89-
Error 1528 Failed to create TABLESPACE test/s_bad
90-
Error 1031 Table storage engine for 'test/s_bad' doesn't have this option
89+
Error 3119 Incorrect tablespace name `test/s_bad`
9190
CREATE TABLESPACE `s_ !@#$%^&*()_+-={}[]|\?<>,. ` ADD DATAFILE 's_utf8.ibd';
9291
CREATE TABLE `t !@#$%^&*()_+-={}[]|\?<>,.` (a int, b text) TABLESPACE `s_ !@#$%^&*()_+-={}[]|\?<>,. `;
9392
INSERT INTO `t !@#$%^&*()_+-={}[]|\?<>,.` VALUES(1,'one');
@@ -192,14 +191,13 @@ DROP TABLESPACE `s_வணக்கம்`;
192191
# Try to create a tablespace with the reserved case-sensitive prefix 'innodb_'
193192
#
194193
CREATE TABLESPACE `innodb_system` ADD DATAFILE 's_bad.ibd';
195-
ERROR HY000: Tablespace 'innodb_system' exists.
194+
ERROR 42000: InnoDB: `innodb_system` is a reserved tablespace name.
196195
DROP TABLESPACE `innodb_system`;
197196
ERROR 42000: InnoDB: `innodb_system` is a reserved tablespace name.
198197
SHOW WARNINGS;
199198
Level Code Message
200199
Error 3119 InnoDB: `innodb_system` is a reserved tablespace name.
201-
Error 1529 Failed to drop TABLESPACE innodb_system
202-
Error 1031 Table storage engine for 'innodb_system' doesn't have this option
200+
Error 3119 Incorrect tablespace name `innodb_system`
203201
CREATE TABLESPACE `InnoDB_System` ADD DATAFILE 's_InnoDB_System.ibd';
204202
DROP TABLESPACE `InnoDB_System`;
205203
CREATE TABLESPACE `InnoDB_System` ADD DATAFILE 'ibdata1';
@@ -217,22 +215,19 @@ ERROR 42000: InnoDB: `innodb_temporary` is a reserved tablespace name.
217215
SHOW WARNINGS;
218216
Level Code Message
219217
Error 3119 InnoDB: `innodb_temporary` is a reserved tablespace name.
220-
Error 1813 InnoDB: A tablespace named `innodb_temporary` already exists.
221-
Error 1528 Failed to create TABLESPACE innodb_temporary
222-
Error 1813 Tablespace 'innodb_temporary' exists.
218+
Error 3119 Incorrect tablespace name `innodb_temporary`
223219
DROP TABLESPACE `innodb_temporary`;
224-
ERROR HY000: Tablespace innodb_temporary doesn't exist.
220+
ERROR 42000: InnoDB: `innodb_temporary` is a reserved tablespace name.
225221
CREATE TABLESPACE `InnoDB_Temporary` ADD DATAFILE 's_InnoDB_Temporary.ibd';
226222
DROP TABLESPACE `InnoDB_Temporary`;
227223
CREATE TABLESPACE `innodb_custom` ADD DATAFILE 's_bad.ibd';
228224
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
229225
SHOW WARNINGS;
230226
Level Code Message
231227
Error 3119 InnoDB: A general tablespace name cannot start with `innodb_`.
232-
Error 1528 Failed to create TABLESPACE innodb_custom
233-
Error 1031 Table storage engine for 'innodb_custom' doesn't have this option
228+
Error 3119 Incorrect tablespace name `innodb_custom`
234229
DROP TABLESPACE `innodb_custom`;
235-
ERROR HY000: Tablespace innodb_custom doesn't exist.
230+
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
236231
CREATE TABLESPACE `InnoDB_Custom` ADD DATAFILE 's_InnoDB_Custom.ibd';
237232
DROP TABLESPACE `InnoDB_Custom`;
238233
CREATE TABLESPACE `INNODB_CUSTOM` ADD DATAFILE 's_INNODB_CUSTOM.ibd';
@@ -376,10 +371,11 @@ test/t_single TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/t
376371
CREATE TABLE t_general (a int, b text) TABLESPACE test/t_single engine=InnoDB;
377372
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/t_single engine=InnoDB' at line 1
378373
CREATE TABLE t_general (a int, b text) TABLESPACE `test/t_single` engine=InnoDB;
379-
ERROR HY000: Tablespace test/t_single doesn't exist.
374+
ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
380375
SHOW WARNINGS;
381376
Level Code Message
382-
Error 3510 Tablespace test/t_single doesn't exist.
377+
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
378+
Error 3119 Incorrect tablespace name `test/t_single`
383379
CREATE TABLE t_general (a int, b text) TABLESPACE `S_Def` engine=InnoDB;
384380
ERROR HY000: Tablespace S_Def doesn't exist.
385381
SHOW WARNINGS;
@@ -395,23 +391,19 @@ ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
395391
SHOW WARNINGS;
396392
Level Code Message
397393
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
398-
Error 1813 InnoDB: A tablespace named `test/t_single` already exists.
399-
Error 1528 Failed to create TABLESPACE test/t_single
400-
Error 1813 Tablespace 'test/t_single' exists.
394+
Error 3119 Incorrect tablespace name `test/t_single`
401395
CREATE TABLESPACE `Test/t_Single` ADD DATAFILE 's_single.ibd';
402396
ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
403397
SHOW WARNINGS;
404398
Level Code Message
405399
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
406-
Error 1528 Failed to create TABLESPACE Test/t_Single
407-
Error 1031 Table storage engine for 'Test/t_Single' doesn't have this option
400+
Error 3119 Incorrect tablespace name `Test/t_Single`
408401
CREATE TABLESPACE `TEST/T_SINGLE` ADD DATAFILE 's_single.ibd';
409402
ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
410403
SHOW WARNINGS;
411404
Level Code Message
412405
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
413-
Error 1528 Failed to create TABLESPACE TEST/T_SINGLE
414-
Error 1031 Table storage engine for 'TEST/T_SINGLE' doesn't have this option
406+
Error 3119 Incorrect tablespace name `TEST/T_SINGLE`
415407
DROP TABLE t_single;
416408
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
417409
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
@@ -521,10 +513,11 @@ SHOW WARNINGS;
521513
Level Code Message
522514
Error 3510 Tablespace s_single doesn't exist.
523515
CREATE TABLE t_second (a int, b text) TABLESPACE=`test/s_single`;
524-
ERROR HY000: Tablespace test/s_single doesn't exist.
516+
ERROR 42000: InnoDB: A general tablespace name cannot contain '/'.
525517
SHOW WARNINGS;
526518
Level Code Message
527-
Error 3510 Tablespace test/s_single doesn't exist.
519+
Error 3119 InnoDB: A general tablespace name cannot contain '/'.
520+
Error 3119 Incorrect tablespace name `test/s_single`
528521
=== information_schema.innodb_sys_tablespaces and innodb_sys_datafiles ===
529522
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
530523
s_def General DEFAULT 0 Any MYSQLD_DATADIR/s_def.ibd
@@ -1254,26 +1247,26 @@ ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
12541247
SHOW WARNINGS;
12551248
Level Code Message
12561249
Error 3119 InnoDB: A general tablespace name cannot start with `innodb_`.
1257-
Error 1031 Table storage engine for 't_data' doesn't have this option
1250+
Error 3119 Incorrect tablespace name `innodb_redo_log`
12581251
CREATE TABLE t_data (a int, b text) TABLESPACE=`innodb_anything`;
12591252
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
12601253
SHOW WARNINGS;
12611254
Level Code Message
12621255
Error 3119 InnoDB: A general tablespace name cannot start with `innodb_`.
1263-
Error 1031 Table storage engine for 't_data' doesn't have this option
1256+
Error 3119 Incorrect tablespace name `innodb_anything`
12641257
CREATE TABLE t_data (a int, b text) TABLESPACE s_def;
12651258
ALTER TABLE t_data TABLESPACE=`innodb_redo_log`;
12661259
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
12671260
SHOW WARNINGS;
12681261
Level Code Message
12691262
Error 3119 InnoDB: A general tablespace name cannot start with `innodb_`.
1270-
Error 1478 Table storage engine 'InnoDB' does not support the create option 'TABLESPACE'
1263+
Error 3119 Incorrect tablespace name `innodb_redo_log`
12711264
ALTER TABLE t_data TABLESPACE=`innodb_anything`;
12721265
ERROR 42000: InnoDB: A general tablespace name cannot start with `innodb_`.
12731266
SHOW WARNINGS;
12741267
Level Code Message
12751268
Error 3119 InnoDB: A general tablespace name cannot start with `innodb_`.
1276-
Error 1478 Table storage engine 'InnoDB' does not support the create option 'TABLESPACE'
1269+
Error 3119 Incorrect tablespace name `innodb_anything`
12771270
DROP TABLE t_data;
12781271
#
12791272
# Move a table from a Single-Table tablespace into a General Tablespace.

0 commit comments

Comments
 (0)