Current Path : /compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/proc/3760/cwd/usr/opt/mysql57/mysql-test/r/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //compat/linux/proc/68247/root/compat/linux/proc/68247/root/compat/linux/proc/3760/cwd/usr/opt/mysql57/mysql-test/r/partition_innodb_tablespace.result |
SET default_storage_engine=InnoDB; # # TABLESPACE related tests for the partition engine and InnoDB. # # The partition engine can send DATA DIRECTORY to InnoDB. # In strict mode, it is an error if innodb_file_per_table = OFF # or INDEX DIRECTORY is used. SET SESSION innodb_strict_mode = ON; SET GLOBAL innodb_file_per_table = OFF; CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) (PARTITION p0 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data' INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', PARTITION p1 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data' INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data'); ERROR HY000: Table storage engine for 't1' doesn't have this option SHOW WARNINGS; Level Code Message Warning 1478 InnoDB: DATA DIRECTORY requires innodb_file_per_table. Warning 1478 InnoDB: INDEX DIRECTORY is not supported Error 1031 Table storage engine for 't1' doesn't have this option # Try again with innodb_file_per_table = ON and no INDEX DIRECTORY. SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) (PARTITION p0 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', PARTITION p1 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2'); SHOW WARNINGS; Level Code Message SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` text, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0 test/t1#p#p0 97 5 Dynamic 0 Single test/t1#p#p1 test/t1#p#p1 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t1#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd # Verifying .frm, .isl & .ibd files # Verifying that there are no MyISAM files # Test TRUNCATE TABLE with partitioned InnoDB tables INSERT INTO t1 VALUES (1, "red"); INSERT INTO t1 VALUES (2, "green"); INSERT INTO t1 VALUES (3, "blue"); SELECT * FROM t1; a b 2 green 1 red 3 blue TRUNCATE TABLE t1; SELECT * FROM t1; a b SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` text, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0 test/t1#p#p0 97 5 Dynamic 0 Single test/t1#p#p1 test/t1#p#p1 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t1#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd # Verifying .frm and InnoDB files (.isl, .ibd) # Test RENAME TABLE with partitioned InnoDB tables RENAME TABLE t1 TO t11; SHOW CREATE TABLE t11; Table Create Table t11 CREATE TABLE `t11` ( `a` int(11) NOT NULL, `b` text, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t11#p#p0 test/t11#p#p0 97 5 Dynamic 0 Single test/t11#p#p1 test/t11#p#p1 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t11#p#p0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t11#p#p0.ibd test/t11#p#p1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t11#p#p1.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t11#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t11#p#p0.ibd test/t11#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t11#p#p1.ibd # Verifying .frm and InnoDB files (.isl, .ibd) DROP TABLE t11; # Test the previous DDL as a prepared statement. SET GLOBAL innodb_file_per_table = ON; PREPARE stmt1 FROM "CREATE TABLE t1 (a int KEY, b text) ENGINE = InnoDB PARTITION BY HASH (a) (PARTITION p0 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', PARTITION p1 engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2')"; EXECUTE stmt1; SHOW WARNINGS; Level Code Message DEALLOCATE PREPARE stmt1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` text, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0 test/t1#p#p0 97 5 Dynamic 0 Single test/t1#p#p1 test/t1#p#p1 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t1#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0.ibd test/t1#p#p1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1.ibd DROP TABLE t1; # Test DATA DIRECTORY with Sub-partitions. SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (id INT, purchased DATE) engine=InnoDB PARTITION BY RANGE( YEAR(purchased) ) SUBPARTITION BY HASH( TO_DAYS(purchased) ) ( PARTITION p0 VALUES LESS THAN (1990) ( SUBPARTITION s0 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ), PARTITION p1 VALUES LESS THAN (2000) ( SUBPARTITION s2 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s3 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ), PARTITION p2 VALUES LESS THAN MAXVALUE ( SUBPARTITION s4 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s5 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ) ); SHOW WARNINGS; Level Code Message INSERT INTO t1 VALUES(1,'1980-05-31'); INSERT INTO t1 VALUES(2,'2090-05-31'); INSERT INTO t1 VALUES(3,'2012-05-31'); INSERT INTO t1 VALUES(4,'1970-05-31'); INSERT INTO t1 VALUES(5,'1985-05-31'); INSERT INTO t1 VALUES(6,'2006-05-31'); SELECT * FROM t1; id purchased 4 1970-05-31 1 1980-05-31 5 1985-05-31 2 2090-05-31 3 2012-05-31 6 2006-05-31 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) DEFAULT NULL, `purchased` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ( YEAR(purchased)) SUBPARTITION BY HASH ( TO_DAYS(purchased)) (PARTITION p0 VALUES LESS THAN (1990) (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (2000) (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN MAXVALUE (SUBPARTITION s4 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s5 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB)) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0#sp#s0 test/t1#p#p0#sp#s0 97 5 Dynamic 0 Single test/t1#p#p0#sp#s1 test/t1#p#p0#sp#s1 97 5 Dynamic 0 Single test/t1#p#p1#sp#s2 test/t1#p#p1#sp#s2 97 5 Dynamic 0 Single test/t1#p#p1#sp#s3 test/t1#p#p1#sp#s3 97 5 Dynamic 0 Single test/t1#p#p2#sp#s4 test/t1#p#p2#sp#s4 97 5 Dynamic 0 Single test/t1#p#p2#sp#s5 test/t1#p#p2#sp#s5 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t1#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0#sp#s0.ibd test/t1#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p0#sp#s1.ibd test/t1#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p1#sp#s2.ibd test/t1#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1#sp#s3.ibd test/t1#p#p2#sp#s4 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p2#sp#s4.ibd test/t1#p#p2#sp#s5 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p2#sp#s5.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t1#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0#sp#s0.ibd test/t1#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p0#sp#s1.ibd test/t1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p1#sp#s2.ibd test/t1#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1#sp#s3.ibd test/t1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p2#sp#s4.ibd test/t1#p#p2#sp#s5 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p2#sp#s5.ibd # Verifying .frm, .isl & .ibd files DROP TABLE t1; # Same as above except with ROW_FORMAT=Dyamic. SET GLOBAL innodb_file_per_table = ON; CREATE TABLE t1 (id INT, purchased DATE) engine = innodb row_format = dynamic PARTITION BY RANGE( YEAR(purchased) ) SUBPARTITION BY HASH( TO_DAYS(purchased) ) ( PARTITION p0 VALUES LESS THAN (1990) ( SUBPARTITION s0 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ), PARTITION p1 VALUES LESS THAN (2000) ( SUBPARTITION s2 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s3 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ), PARTITION p2 VALUES LESS THAN MAXVALUE ( SUBPARTITION s4 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data', SUBPARTITION s5 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data2' ) ); SHOW WARNINGS; Level Code Message INSERT INTO t1 VALUES(1,'1980-05-31'); INSERT INTO t1 VALUES(2,'2090-05-31'); INSERT INTO t1 VALUES(3,'2012-05-31'); INSERT INTO t1 VALUES(4,'1970-05-31'); INSERT INTO t1 VALUES(5,'1985-05-31'); INSERT INTO t1 VALUES(6,'2006-05-31'); SELECT * FROM t1; id purchased 4 1970-05-31 1 1980-05-31 5 1985-05-31 2 2090-05-31 3 2012-05-31 6 2006-05-31 SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `id` int(11) DEFAULT NULL, `purchased` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC /*!50100 PARTITION BY RANGE ( YEAR(purchased)) SUBPARTITION BY HASH ( TO_DAYS(purchased)) (PARTITION p0 VALUES LESS THAN (1990) (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (2000) (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN MAXVALUE (SUBPARTITION s4 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data/' ENGINE = InnoDB, SUBPARTITION s5 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data2/' ENGINE = InnoDB)) */ === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0#sp#s0 test/t1#p#p0#sp#s0 97 5 Dynamic 0 Single test/t1#p#p0#sp#s1 test/t1#p#p0#sp#s1 97 5 Dynamic 0 Single test/t1#p#p1#sp#s2 test/t1#p#p1#sp#s2 97 5 Dynamic 0 Single test/t1#p#p1#sp#s3 test/t1#p#p1#sp#s3 97 5 Dynamic 0 Single test/t1#p#p2#sp#s4 test/t1#p#p2#sp#s4 97 5 Dynamic 0 Single test/t1#p#p2#sp#s5 test/t1#p#p2#sp#s5 97 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path test/t1#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0#sp#s0.ibd test/t1#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p0#sp#s1.ibd test/t1#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p1#sp#s2.ibd test/t1#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1#sp#s3.ibd test/t1#p#p2#sp#s4 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p2#sp#s4.ibd test/t1#p#p2#sp#s5 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p2#sp#s5.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path test/t1#p#p0#sp#s0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p0#sp#s0.ibd test/t1#p#p0#sp#s1 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p0#sp#s1.ibd test/t1#p#p1#sp#s2 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p1#sp#s2.ibd test/t1#p#p1#sp#s3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p1#sp#s3.ibd test/t1#p#p2#sp#s4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data/test/t1#p#p2#sp#s4.ibd test/t1#p#p2#sp#s5 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data2/test/t1#p#p2#sp#s5.ibd # Verifying .frm, .isl & .ibd files # # Cleanup # DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE = InnoDB DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_table' PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION sp0, SUBPARTITION sp1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data_subpart', SUBPARTITION sp2), PARTITION p1 VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part' (SUBPARTITION sp3, SUBPARTITION sp4 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data_subpart', SUBPARTITION sp5), PARTITION p2 VALUES LESS THAN (30) (SUBPARTITION sp6, SUBPARTITION sp7 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/data_subpart', SUBPARTITION sp8)); # Verifying .frm, .isl & .ibd files SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (10) (SUBPARTITION sp0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_table/' ENGINE = InnoDB, SUBPARTITION sp1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_subpart/' ENGINE = InnoDB, SUBPARTITION sp2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_table/' ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (20) (SUBPARTITION sp3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part/' ENGINE = InnoDB, SUBPARTITION sp4 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_subpart/' ENGINE = InnoDB, SUBPARTITION sp5 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part/' ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (30) (SUBPARTITION sp6 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_table/' ENGINE = InnoDB, SUBPARTITION sp7 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_subpart/' ENGINE = InnoDB, SUBPARTITION sp8 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_table/' ENGINE = InnoDB)) */ DROP TABLE t1; # Test of table where the engine returns the DATA DIR. CREATE TABLE t1 (a int not null, primary key (a)) ENGINE=InnoDB PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY 'MYSQL_TMP_DIR/alternate_dir/data_part', PARTITION p1); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part/' ENGINE = InnoDB, PARTITION p1 ENGINE = InnoDB) */ # Test TABLESPACE (and restart) CREATE TABLESPACE `ts_part1` ADD DATAFILE 'ts_part1.ibd'; CREATE TABLESPACE `ts part2` ADD DATAFILE 'ts_part2.ibd'; CREATE TABLESPACE `ts_part3` ADD DATAFILE 'ts_part3.ibd'; CREATE TABLESPACE `ts_part4` ADD DATAFILE 'ts_part4.ibd'; CREATE TABLE t2 (a int) ENGINE = InnoDB TABLESPACE `ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!`; ERROR 42000: Identifier name 'ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!' is too long CREATE TABLE t2 (a int) ENGINE = InnoDB PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN (10) TABLESPACE `ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!` ); ERROR 42000: Identifier name 'ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!' is too long CREATE TABLE t2 (a int not null auto_increment primary key, b varchar(128)) ENGINE = InnoDB TABLESPACE ts_part1 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION p0 VALUES LESS THAN (0) TABLESPACE `ts part2` (SUBPARTITION sp0 TABLESPACE ts_part3, SUBPARTITION sp1, SUBPARTITION sp2 TABLESPACE ts_part4), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3, SUBPARTITION sp4 TABLESPACE innodb_file_per_table, SUBPARTITION sp5), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE innodb_system, SUBPARTITION sp7, SUBPARTITION sp8), PARTITION p3 VALUES LESS THAN (300) TABLESPACE innodb_file_per_table (SUBPARTITION sp9 TABLESPACE ts_part4, SUBPARTITION sp10, SUBPARTITION sp11)); Warnings: Warning 1681 'InnoDB : A table partition in a shared tablespace' is deprecated and will be removed in a future release. SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) /*!50100 TABLESPACE `ts_part1` */ ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = `ts_part3` ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = `ts_part4` ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 TABLESPACE = `ts_part1` ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp5 TABLESPACE = `ts_part1` ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = `innodb_system` ENGINE = InnoDB, SUBPARTITION sp7 TABLESPACE = `ts_part1` ENGINE = InnoDB, SUBPARTITION sp8 TABLESPACE = `ts_part1` ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = `ts_part4` ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB)) */ call mtr.add_suppression("InnoDB: Table .* Partition .* Subpartition .* does not exist in the InnoDB internal data dictionary"); ALTER TABLE t2 ADD PARTITION (PARTITION p4 VALUES LESS THAN (400) TABLESPACE `ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!`); ERROR 42000: Identifier name 'ts_part1_a_very_long_tablespace_name_longer_than_64_characters!!!' is too long # Same but without table level tablespace defined CREATE TABLE t3 (a int not null auto_increment primary key, b varchar(128)) ENGINE = InnoDB PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) SUBPARTITIONS 3 (PARTITION p0 VALUES LESS THAN (0) TABLESPACE `ts part2` (SUBPARTITION sp0 TABLESPACE ts_part3, SUBPARTITION sp1, SUBPARTITION sp2 TABLESPACE ts_part4), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3, SUBPARTITION sp4 TABLESPACE innodb_file_per_table, SUBPARTITION sp5), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE innodb_system, SUBPARTITION sp7, SUBPARTITION sp8), PARTITION p3 VALUES LESS THAN (300) TABLESPACE innodb_file_per_table (SUBPARTITION sp9 TABLESPACE ts_part4, SUBPARTITION sp10, SUBPARTITION sp11)); Warnings: Warning 1681 'InnoDB : A table partition in a shared tablespace' is deprecated and will be removed in a future release. SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = `ts_part3` ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = `ts_part4` ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp5 ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = `innodb_system` ENGINE = InnoDB, SUBPARTITION sp7 ENGINE = InnoDB, SUBPARTITION sp8 ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = `ts_part4` ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB)) */ SET @@global.innodb_file_per_table = ON; CREATE TABLE t_file_per_table_on (a int not null auto_increment primary key, b varchar(128)) ENGINE = InnoDB; SET @@global.innodb_file_per_table = OFF; CREATE TABLE t_file_per_table_off (a int not null auto_increment primary key, b varchar(128)) ENGINE = InnoDB; SHOW CREATE TABLE t_file_per_table_on; Table Create Table t_file_per_table_on CREATE TABLE `t_file_per_table_on` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t_file_per_table_off; Table Create Table t_file_per_table_off CREATE TABLE `t_file_per_table_off` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SET @@global.innodb_file_per_table = ON; SHOW CREATE TABLE t_file_per_table_on; Table Create Table t_file_per_table_on CREATE TABLE `t_file_per_table_on` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t_file_per_table_off; Table Create Table t_file_per_table_off CREATE TABLE `t_file_per_table_off` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 # Restart to get DATA DIRECTORY read from the engine (InnoDB dictionary) # restart ALTER TABLE t1 COALESCE PARTITION 1; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part' ENGINE = InnoDB) */ SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) /*!50100 TABLESPACE `ts_part1` */ ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = `ts_part3` ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = `ts_part4` ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 TABLESPACE = `ts_part1` ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp5 TABLESPACE = `ts_part1` ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = `innodb_system` ENGINE = InnoDB, SUBPARTITION sp7 TABLESPACE = `ts_part1` ENGINE = InnoDB, SUBPARTITION sp8 TABLESPACE = `ts_part1` ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = `ts_part4` ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB)) */ SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE `t3` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = `ts_part3` ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = `ts_part4` ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp5 ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = `innodb_system` ENGINE = InnoDB, SUBPARTITION sp7 ENGINE = InnoDB, SUBPARTITION sp8 ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = `ts_part4` ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = `innodb_file_per_table` ENGINE = InnoDB)) */ SET @old_sql_quote_show_create=@@sql_quote_show_create; SET @@sql_quote_show_create=0; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE t1 ( a int(11) NOT NULL, PRIMARY KEY (a) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alternate_dir/data_part' ENGINE = InnoDB) */ SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE t2 ( a int(11) NOT NULL AUTO_INCREMENT, b varchar(128) DEFAULT NULL, PRIMARY KEY (a) ) /*!50100 TABLESPACE ts_part1 */ ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = ts_part3 ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = ts_part4 ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 TABLESPACE = ts_part1 ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = innodb_file_per_table ENGINE = InnoDB, SUBPARTITION sp5 TABLESPACE = ts_part1 ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = innodb_system ENGINE = InnoDB, SUBPARTITION sp7 TABLESPACE = ts_part1 ENGINE = InnoDB, SUBPARTITION sp8 TABLESPACE = ts_part1 ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = ts_part4 ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = innodb_file_per_table ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = innodb_file_per_table ENGINE = InnoDB)) */ SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE t3 ( a int(11) NOT NULL AUTO_INCREMENT, b varchar(128) DEFAULT NULL, PRIMARY KEY (a) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) SUBPARTITION BY HASH (a) (PARTITION p0 VALUES LESS THAN (0) (SUBPARTITION sp0 TABLESPACE = ts_part3 ENGINE = InnoDB, SUBPARTITION sp1 TABLESPACE = `ts part2` ENGINE = InnoDB, SUBPARTITION sp2 TABLESPACE = ts_part4 ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (100) (SUBPARTITION sp3 ENGINE = InnoDB, SUBPARTITION sp4 TABLESPACE = innodb_file_per_table ENGINE = InnoDB, SUBPARTITION sp5 ENGINE = InnoDB), PARTITION p2 VALUES LESS THAN (200) (SUBPARTITION sp6 TABLESPACE = innodb_system ENGINE = InnoDB, SUBPARTITION sp7 ENGINE = InnoDB, SUBPARTITION sp8 ENGINE = InnoDB), PARTITION p3 VALUES LESS THAN (300) (SUBPARTITION sp9 TABLESPACE = ts_part4 ENGINE = InnoDB, SUBPARTITION sp10 TABLESPACE = innodb_file_per_table ENGINE = InnoDB, SUBPARTITION sp11 TABLESPACE = innodb_file_per_table ENGINE = InnoDB)) */ SET @@sql_quote_show_create=@old_sql_quote_show_create; === information_schema.innodb_sys_tables and innodb_sys_tablespaces === Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type test/t1#p#p0 test/t1#p#p0 97 4 Dynamic 0 Single test/t2#p#p0#sp#sp0 ts_part3 161 5 Dynamic 0 General test/t2#p#p0#sp#sp1 ts part2 161 5 Dynamic 0 General test/t2#p#p0#sp#sp2 ts_part4 161 5 Dynamic 0 General test/t2#p#p1#sp#sp3 ts_part1 161 5 Dynamic 0 General test/t2#p#p1#sp#sp4 test/t2#p#p1#sp#sp4 33 5 Dynamic 0 Single test/t2#p#p1#sp#sp5 ts_part1 161 5 Dynamic 0 General test/t2#p#p2#sp#sp6 innodb_system 161 5 Dynamic 0 System test/t2#p#p2#sp#sp7 ts_part1 161 5 Dynamic 0 General test/t2#p#p2#sp#sp8 ts_part1 161 5 Dynamic 0 General test/t2#p#p3#sp#sp10 test/t2#p#p3#sp#sp10 33 5 Dynamic 0 Single test/t2#p#p3#sp#sp11 test/t2#p#p3#sp#sp11 33 5 Dynamic 0 Single test/t2#p#p3#sp#sp9 ts_part4 161 5 Dynamic 0 General test/t3#p#p0#sp#sp0 ts_part3 161 5 Dynamic 0 General test/t3#p#p0#sp#sp1 ts part2 161 5 Dynamic 0 General test/t3#p#p0#sp#sp2 ts_part4 161 5 Dynamic 0 General test/t3#p#p1#sp#sp3 test/t3#p#p1#sp#sp3 33 5 Dynamic 0 Single test/t3#p#p1#sp#sp4 test/t3#p#p1#sp#sp4 33 5 Dynamic 0 Single test/t3#p#p1#sp#sp5 test/t3#p#p1#sp#sp5 33 5 Dynamic 0 Single test/t3#p#p2#sp#sp6 innodb_system 161 5 Dynamic 0 System test/t3#p#p2#sp#sp7 test/t3#p#p2#sp#sp7 33 5 Dynamic 0 Single test/t3#p#p2#sp#sp8 test/t3#p#p2#sp#sp8 33 5 Dynamic 0 Single test/t3#p#p3#sp#sp10 test/t3#p#p3#sp#sp10 33 5 Dynamic 0 Single test/t3#p#p3#sp#sp11 test/t3#p#p3#sp#sp11 33 5 Dynamic 0 Single test/t3#p#p3#sp#sp9 ts_part4 161 5 Dynamic 0 General test/t_file_per_table_off innodb_system 33 5 Dynamic 0 System test/t_file_per_table_on test/t_file_per_table_on 33 5 Dynamic 0 Single === information_schema.innodb_sys_tablespaces and innodb_sys_datafiles === Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path ts_part1 General DEFAULT 0 Any MYSQLD_DATADIR/ts_part1.ibd ts part2 General DEFAULT 0 Any MYSQLD_DATADIR/ts_part2.ibd ts_part3 General DEFAULT 0 Any MYSQLD_DATADIR/ts_part3.ibd ts_part4 General DEFAULT 0 Any MYSQLD_DATADIR/ts_part4.ibd test/t2#p#p1#sp#sp4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t2#p#p1#sp#sp4.ibd test/t2#p#p3#sp#sp10 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t2#p#p3#sp#sp10.ibd test/t2#p#p3#sp#sp11 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t2#p#p3#sp#sp11.ibd test/t3#p#p1#sp#sp3 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p1#sp#sp3.ibd test/t3#p#p1#sp#sp4 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p1#sp#sp4.ibd test/t3#p#p1#sp#sp5 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p1#sp#sp5.ibd test/t3#p#p2#sp#sp7 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p2#sp#sp7.ibd test/t3#p#p2#sp#sp8 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p2#sp#sp8.ibd test/t3#p#p3#sp#sp10 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p3#sp#sp10.ibd test/t3#p#p3#sp#sp11 Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t3#p#p3#sp#sp11.ibd test/t_file_per_table_on Single DEFAULT 0 Dynamic MYSQLD_DATADIR/test/t_file_per_table_on.ibd test/t1#p#p0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alternate_dir/data_part/test/t1#p#p0.ibd === information_schema.files === Space_Name File_Type Engine Status Tablespace_Name Path ts_part1 TABLESPACE InnoDB NORMAL ts_part1 MYSQLD_DATADIR/ts_part1.ibd ts part2 TABLESPACE InnoDB NORMAL ts part2 MYSQLD_DATADIR/ts_part2.ibd ts_part3 TABLESPACE InnoDB NORMAL ts_part3 MYSQLD_DATADIR/ts_part3.ibd ts_part4 TABLESPACE InnoDB NORMAL ts_part4 MYSQLD_DATADIR/ts_part4.ibd test/t2#p#p1#sp#sp4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2#p#p1#sp#sp4.ibd test/t2#p#p3#sp#sp10 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2#p#p3#sp#sp10.ibd test/t2#p#p3#sp#sp11 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t2#p#p3#sp#sp11.ibd test/t3#p#p1#sp#sp3 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p1#sp#sp3.ibd test/t3#p#p1#sp#sp4 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p1#sp#sp4.ibd test/t3#p#p1#sp#sp5 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p1#sp#sp5.ibd test/t3#p#p2#sp#sp7 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p2#sp#sp7.ibd test/t3#p#p2#sp#sp8 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p2#sp#sp8.ibd test/t3#p#p3#sp#sp10 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p3#sp#sp10.ibd test/t3#p#p3#sp#sp11 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t3#p#p3#sp#sp11.ibd test/t_file_per_table_on TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQLD_DATADIR/test/t_file_per_table_on.ibd test/t1#p#p0 TABLESPACE InnoDB NORMAL innodb_file_per_table.## MYSQL_TMP_DIR/alternate_dir/data_part/test/t1#p#p0.ibd DROP TABLE t1,t2,t3; DROP TABLESPACE ts_part1; DROP TABLESPACE `ts part2`; DROP TABLESPACE ts_part3; DROP TABLESPACE ts_part4; SET @@global.innodb_file_per_table = ON; SHOW CREATE TABLE t_file_per_table_on; Table Create Table t_file_per_table_on CREATE TABLE `t_file_per_table_on` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t_file_per_table_off; Table Create Table t_file_per_table_off CREATE TABLE `t_file_per_table_off` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SET @@global.innodb_file_per_table = OFF; SHOW CREATE TABLE t_file_per_table_on; Table Create Table t_file_per_table_on CREATE TABLE `t_file_per_table_on` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE t_file_per_table_off; Table Create Table t_file_per_table_off CREATE TABLE `t_file_per_table_off` ( `a` int(11) NOT NULL AUTO_INCREMENT, `b` varchar(128) DEFAULT NULL, PRIMARY KEY (`a`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t_file_per_table_on; DROP TABLE t_file_per_table_off;