[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.98.43: ~ $
SET default_storage_engine=InnoDB;
#
# TABLESPACE related tests.
#
#
# CREATE TABLE ... DATA DIRECTORY
# Innodb does not support INDEX DIRECTORY.
#
SET SESSION innodb_strict_mode = ON;
CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alt_dir';
ERROR HY000: Table storage engine for 't1' doesn't have this option
SHOW WARNINGS;
Level	Code	Message
Warning	1478	InnoDB: INDEX DIRECTORY is not supported
Error	1031	Table storage engine for 't1' doesn't have this option
#
# Without strict mode, INDEX DIRECTORY is just ignored
#
SET SESSION innodb_strict_mode = OFF;
CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alt_dir';
Warnings:
Warning	1618	<INDEX DIRECTORY> option ignored
SHOW WARNINGS;
Level	Code	Message
Warning	1618	<INDEX DIRECTORY> option ignored
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
DROP TABLE t1;
#
# Innodb does not support DATA DIRECTORY without innodb_file_per_table=ON.
#
SET SESSION innodb_strict_mode = ON;
SET GLOBAL innodb_file_per_table=OFF;
CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
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.
Error	1031	Table storage engine for 't1' doesn't have this option
#
# Without strict mode, DATA DIRECTORY without innodb_file_per_table=ON is just ignored.
#
SET SESSION innodb_strict_mode = OFF;
CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
Warnings:
Warning	1478	InnoDB: DATA DIRECTORY requires innodb_file_per_table.
Warning	1618	<DATA DIRECTORY> option ignored
SHOW WARNINGS;
Level	Code	Message
Warning	1478	InnoDB: DATA DIRECTORY requires innodb_file_per_table.
Warning	1618	<DATA DIRECTORY> option ignored
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
DROP TABLE t1;
# Now set innodb_file_per_table so that DATA DIRECTORY can be tested.
SET GLOBAL innodb_file_per_table=ON;
#
# Create the tablespace in MYSQL_TMP_DIR/alt_dir
# InnoDB will create the sub-directories if needed.
#
CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
SHOW WARNINGS;
Level	Code	Message
INSERT INTO t1 VALUES (1, "Create the tablespace");
SELECT * FROM t1;
a	b
1	Create the tablespace
#
# Check if link file exists  in MYSQLD_DATADIR
#
---- MYSQLD_DATADIR/test
t1.frm
t1.isl
# Check if tablespace file exists where we specified in DATA DIRECTORY
---- MYSQL_TMP_DIR/alt_dir/test
t1.ibd
#
# Check that DATA DIRECTORY shows up in the SHOW CREATE TABLE results.
#
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 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
# Show that the new system tables have this table in them correctly
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
name	n_cols	file_format	row_format
test/t1	5	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/t1	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t1.ibd
#
# Show that the system tables are updated on drop table
#
DROP TABLE t1;
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
#
# Create the same table a second time in the same place
#
CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
INSERT INTO t1 VALUES (2, "Create the same table a second time in the same place");
SELECT * FROM t1;
a	b
2	Create the same table a second time in the same place
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 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/t1	5	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/t1	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t1.ibd
---- MYSQLD_DATADIR/test
t1.frm
t1.isl
---- MYSQL_TMP_DIR/alt_dir/test
t1.ibd
#
# Truncate the table, then insert and verify
#
TRUNCATE TABLE t1;
INSERT INTO t1 VALUES (3, "Truncate the table, then insert");
SELECT * FROM t1;
a	b
3	Truncate the table, then insert
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/t1	5	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/t1	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t1.ibd
---- MYSQLD_DATADIR/test
t1.frm
t1.isl
---- MYSQL_TMP_DIR/alt_dir/test
t1.ibd
#
# Rename the table, then insert and verify
#
RENAME TABLE t1 TO t2;
INSERT INTO t2 VALUES (4, "Rename the table, then insert");
SELECT * FROM t2;
a	b
3	Truncate the table, then insert
4	Rename the table, then insert
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/t2	5	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/t2	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t2.ibd
---- MYSQLD_DATADIR/test
t2.frm
t2.isl
---- MYSQL_TMP_DIR/alt_dir/test
t2.ibd
#
# CREATE TABLE LIKE does not retain DATA DIRECTORY automatically.
#
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 VALUES (5, "CREATE TABLE LIKE");
SELECT * FROM t3;
a	b
5	CREATE TABLE LIKE
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/t2	5	Antelope	Compact
test/t3	5	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/t2	Antelope	Compact or Redundant
test/t3	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t2.ibd
MYSQLD_DATADIR/test/t3.ibd
---- MYSQLD_DATADIR/test
t2.frm
t2.isl
t3.frm
t3.ibd
#
# Now make sure the tables can be fully dropped.
#
DROP TABLE t2, t3;
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
---- MYSQLD_DATADIR/test
---- MYSQL_TMP_DIR/alt_dir/test
#
# Be sure SQL MODE "NO_DIR_IN_CREATE" prevents the use of DATA DIRECTORY
#
SET @org_mode=@@sql_mode;
SET @@sql_mode='NO_DIR_IN_CREATE';
SELECT @@sql_mode;
@@sql_mode
NO_DIR_IN_CREATE
CREATE TABLE t1 (a int, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
Warnings:
Warning	1618	<DATA DIRECTORY> option ignored
SHOW WARNINGS;
Level	Code	Message
Warning	1618	<DATA DIRECTORY> option ignored
INSERT INTO t1 VALUES (6, "SQL MODE NO_DIR_IN_CREATE prevents DATA DIRECTORY");
DROP TABLE t1;
set @@sql_mode=@org_mode;
#
# MySQL engine does not allow DATA DIRECTORY to be
# within --datadir for any engine, including InnoDB
#
CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY 'MYSQLD_DATADIR/test';
ERROR HY000: Incorrect arguments to DATA DIRECTORY
# TEMPORARY tables are incompatible with DATA DIRECTORY
SET SESSION innodb_strict_mode = ON;
CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
ERROR HY000: Table storage engine for 't1' doesn't have this option
SHOW WARNINGS;
Level	Code	Message
Warning	1478	InnoDB: DATA DIRECTORY cannot be used for TEMPORARY tables.
Error	1031	Table storage engine for 't1' doesn't have this option
SET SESSION innodb_strict_mode = OFF;
CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
Warnings:
Warning	1478	InnoDB: DATA DIRECTORY cannot be used for TEMPORARY tables.
Warning	1618	<DATA DIRECTORY> option ignored
SHOW WARNINGS;
Level	Code	Message
Warning	1478	InnoDB: DATA DIRECTORY cannot be used for TEMPORARY tables.
Warning	1618	<DATA DIRECTORY> option ignored
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TEMPORARY TABLE `t1` (
  `a` int(11) NOT NULL,
  `b` text,
  PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
---- MYSQLD_DATADIR/test
---- MYSQL_TMP_DIR/alt_dir/test
#
# Create the remote table via static DDL statements in a stored procedure
#
CREATE PROCEDURE static_proc() BEGIN CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'; END |
CALL static_proc;
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t1.ibd
INSERT INTO t1 VALUES (7, "Create the remote table via static DDL statements");
SELECT * FROM t1;
a	b
7	Create the remote table via static DDL statements
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 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
---- MYSQLD_DATADIR/test
t1.frm
t1.isl
---- MYSQL_TMP_DIR/alt_dir/test
t1.ibd
DROP PROCEDURE static_proc;
DROP TABLE t1;
#
# Create the remote table via dynamic DDL statements in a stored procedure
#
CREATE PROCEDURE dynamic_proc() BEGIN PREPARE stmt1 FROM "CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'"; EXECUTE stmt1; END |
CALL dynamic_proc;
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir/test/t1.ibd
INSERT INTO t1 VALUES (8, "Create the remote table via dynamic DDL statements");
SELECT * FROM t1;
a	b
8	Create the remote table via dynamic DDL statements
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 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
---- MYSQLD_DATADIR/test
t1.frm
t1.isl
---- MYSQL_TMP_DIR/alt_dir/test
t1.ibd
DROP PROCEDURE dynamic_proc;
DROP TABLE t1;
#
# CREATE, DROP, ADD and TRUNCATE PARTITION with DATA DIRECTORY
#
CREATE TABLE emp (
id INT NOT NULL,
store_name VARCHAR(30),
parts VARCHAR(30),
store_id INT
)
PARTITION BY LIST(store_id) (
PARTITION east VALUES IN (10,20,30)
DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east',
PARTITION north VALUES IN (40,50,60)
DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north',
PARTITION west VALUES IN (70,80,100)
DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west'
);
INSERT INTO emp values(1,'Oracle','NUTT',10);
INSERT INTO emp values(2,'HUAWEI','BOLT',40);
INSERT INTO emp values(3,'IBM','NAIL',70);
SHOW CREATE TABLE emp;
Table	Create Table
emp	CREATE TABLE `emp` (
  `id` int(11) NOT NULL,
  `store_name` varchar(30) DEFAULT NULL,
  `parts` varchar(30) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (store_id)
(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
 PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
 PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/emp#p#east	7	Antelope	Compact
test/emp#p#north	7	Antelope	Compact
test/emp#p#west	7	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/emp#p#east	Antelope	Compact or Redundant
test/emp#p#north	Antelope	Compact or Redundant
test/emp#p#west	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
SELECT * FROM emp;
id	store_name	parts	store_id
1	Oracle	NUTT	10
2	HUAWEI	BOLT	40
3	IBM	NAIL	70
---- MYSQLD_DATADIR/test
emp#p#east.isl
emp#p#north.isl
emp#p#west.isl
emp.frm
emp.par
---- MYSQL_TMP_DIR/alt_dir_east/test
emp#p#east.ibd
---- MYSQL_TMP_DIR/alt_dir_north/test
emp#p#north.ibd
---- MYSQL_TMP_DIR/alt_dir_west/test
emp#p#west.ibd
#
# DROP one PARTITION.
#
ALTER TABLE emp DROP PARTITION west;
SHOW CREATE TABLE emp;
Table	Create Table
emp	CREATE TABLE `emp` (
  `id` int(11) NOT NULL,
  `store_name` varchar(30) DEFAULT NULL,
  `parts` varchar(30) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (store_id)
(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
 PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB) */
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/emp#p#east	7	Antelope	Compact
test/emp#p#north	7	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/emp#p#east	Antelope	Compact or Redundant
test/emp#p#north	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
SELECT * FROM emp;
id	store_name	parts	store_id
1	Oracle	NUTT	10
2	HUAWEI	BOLT	40
---- MYSQLD_DATADIR/test
emp#p#east.isl
emp#p#north.isl
emp.frm
emp.par
---- MYSQL_TMP_DIR/alt_dir_east/test
emp#p#east.ibd
---- MYSQL_TMP_DIR/alt_dir_north/test
emp#p#north.ibd
---- MYSQL_TMP_DIR/alt_dir_west/test
#
# ADD the PARTITION back.
#
ALTER TABLE emp ADD PARTITION (
PARTITION west VALUES IN (70,80,100)
DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west');
SHOW CREATE TABLE emp;
Table	Create Table
emp	CREATE TABLE `emp` (
  `id` int(11) NOT NULL,
  `store_name` varchar(30) DEFAULT NULL,
  `parts` varchar(30) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (store_id)
(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
 PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
 PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/emp#p#east	7	Antelope	Compact
test/emp#p#north	7	Antelope	Compact
test/emp#p#west	7	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/emp#p#east	Antelope	Compact or Redundant
test/emp#p#north	Antelope	Compact or Redundant
test/emp#p#west	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
INSERT INTO emp VALUES(3,'IBM','NAIL',70);
SELECT * FROM emp;
id	store_name	parts	store_id
1	Oracle	NUTT	10
2	HUAWEI	BOLT	40
3	IBM	NAIL	70
---- MYSQLD_DATADIR/test
emp#p#east.isl
emp#p#north.isl
emp#p#west.isl
emp.frm
emp.par
---- MYSQL_TMP_DIR/alt_dir_east/test
emp#p#east.ibd
---- MYSQL_TMP_DIR/alt_dir_north/test
emp#p#north.ibd
---- MYSQL_TMP_DIR/alt_dir_west/test
emp#p#west.ibd
#
# TRUNCATE one PARTITION.
#
ALTER TABLE emp TRUNCATE PARTITION west;
SHOW CREATE TABLE emp;
Table	Create Table
emp	CREATE TABLE `emp` (
  `id` int(11) NOT NULL,
  `store_name` varchar(30) DEFAULT NULL,
  `parts` varchar(30) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!50100 PARTITION BY LIST (store_id)
(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
 PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
 PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
SELECT name,n_cols,file_format,row_format
FROM information_schema.innodb_sys_tables
WHERE name LIKE 'test%'
       ORDER BY name;
name	n_cols	file_format	row_format
test/emp#p#east	7	Antelope	Compact
test/emp#p#north	7	Antelope	Compact
test/emp#p#west	7	Antelope	Compact
SELECT name,file_format,row_format
FROM information_schema.innodb_sys_tablespaces
ORDER BY name;
name	file_format	row_format
mysql/innodb_index_stats	Antelope	Compact or Redundant
mysql/innodb_table_stats	Antelope	Compact or Redundant
mysql/slave_master_info	Antelope	Compact or Redundant
mysql/slave_relay_log_info	Antelope	Compact or Redundant
mysql/slave_worker_info	Antelope	Compact or Redundant
test/emp#p#east	Antelope	Compact or Redundant
test/emp#p#north	Antelope	Compact or Redundant
test/emp#p#west	Antelope	Compact or Redundant
SELECT path FROM information_schema.innodb_sys_datafiles
WHERE path LIKE '%test%' ORDER BY space;
path
MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
SELECT * FROM emp;
id	store_name	parts	store_id
1	Oracle	NUTT	10
2	HUAWEI	BOLT	40
INSERT INTO emp VALUES(3,'IBM','NAIL',70);
SELECT * FROM emp;
id	store_name	parts	store_id
1	Oracle	NUTT	10
2	HUAWEI	BOLT	40
3	IBM	NAIL	70
---- MYSQLD_DATADIR/test
emp#p#east.isl
emp#p#north.isl
emp#p#west.isl
emp.frm
emp.par
---- MYSQL_TMP_DIR/alt_dir_east/test
emp#p#east.ibd
---- MYSQL_TMP_DIR/alt_dir_north/test
emp#p#north.ibd
---- MYSQL_TMP_DIR/alt_dir_west/test
emp#p#west.ibd
DROP TABLE emp;
#
# Cleanup
#

Filemanager

Name Type Size Permission Actions
add_foreign_key.result File 1.28 KB 0644
alter_rename_existing.result File 2.96 KB 0644
analyze_table.result File 538 B 0644
autoinc_debug.result File 2.52 KB 0644
blob-update-debug.result File 489 B 0644
blob_redo.result File 1.1 KB 0644
bulk_create_index_online.result File 760 B 0644
checksum.result File 372 B 0644
create-index.result File 1.17 KB 0644
create_isl_with_direct.result File 328 B 0644
dropdb.result File 222 B 0644
end_range_check.result File 1.53 KB 0644
events-merge-tmp-path.result File 1.33 KB 0644
flush-hang.result File 1.27 KB 0644
foreign_key.result File 3.24 KB 0644
ibuf_not_empty.result File 1.01 KB 0644
import.result File 1.79 KB 0644
import_tablespace_schema_missmatch.result File 2.14 KB 0644
import_update_stats.result File 2.86 KB 0644
index_length.result File 1.44 KB 0644
index_tree_operation.result File 1.65 KB 0644
innodb-2byte-collation.result File 3.28 KB 0644
innodb-ac-non-locking-select.result File 861 B 0644
innodb-alter-autoinc.result File 4.46 KB 0644
innodb-alter-debug.result File 2.66 KB 0644
innodb-alter-discard.result File 1.18 KB 0644
innodb-alter-nullable.result File 1.59 KB 0644
innodb-alter-tempfile.result File 1.42 KB 0644
innodb-alter.result File 32.02 KB 0644
innodb-analyze.result File 58 B 0644
innodb-autoinc-18274.result File 805 B 0644
innodb-autoinc-44030.result File 722 B 0644
innodb-autoinc-56228.result File 847 B 0644
innodb-autoinc-optimize.result File 321 B 0644
innodb-autoinc.result File 39.22 KB 0644
innodb-blob.result File 3.76 KB 0644
innodb-bug-14068765.result File 3 KB 0644
innodb-bug-14084530.result File 898 B 0644
innodb-bug12552164.result File 1.73 KB 0644
innodb-bug14219515.result File 244 B 0644
innodb-change-buffer-recovery.result File 1.04 KB 0644
innodb-consistent.result File 670 B 0644
innodb-double-write.result File 8.72 KB 0644
innodb-index-debug.result File 2.87 KB 0644
innodb-index-online-delete.result File 642 B 0644
innodb-index-online-fk.result File 23.42 KB 0644
innodb-index-online-norebuild.result File 897 B 0644
innodb-index-online-purge.result File 1.2 KB 0644
innodb-index-online.result File 13.59 KB 0644
innodb-index.result File 34.22 KB 0644
innodb-index_ucs2.result File 2.74 KB 0644
innodb-lock-inherit-read_commited.result File 3.36 KB 0644
innodb-lock.result File 2.86 KB 0644
innodb-log-file-size-1.result File 4.91 KB 0644
innodb-log-file-size.result File 1.18 KB 0644
innodb-multiple-tablespaces.result File 13.19 KB 0644
innodb-read-view.result File 2.06 KB 0644
innodb-replace.result File 445 B 0644
innodb-semi-consistent.result File 1.35 KB 0644
innodb-status-output.result File 2.2 KB 0644
innodb-system-table-view.result File 5.26 KB 0644
innodb-table-online.result File 12.88 KB 0644
innodb-tablespace.result File 21.6 KB 0644
innodb-timeout.result File 953 B 0644
innodb-truncate.result File 2.28 KB 0644
innodb-ucs2.result File 15.36 KB 0644
innodb-update-insert.result File 948 B 0644
innodb-use-sys-malloc.result File 1.47 KB 0644
innodb-wl5522-1.result File 28.06 KB 0644
innodb-wl5522-debug.result File 32.19 KB 0644
innodb-wl5522.result File 20.52 KB 0644
innodb-wl5980-alter.result File 35.51 KB 0644
innodb-wl5980-debug.result File 1.33 KB 0644
innodb-wl5980-discard.result File 28.63 KB 0644
innodb-wl5980-linux.result File 5.29 KB 0644
innodb-wl5980-windows.result File 5.77 KB 0644
innodb-wl6445-1.result File 68.57 KB 0644
innodb-wl6445-2.result File 3.9 KB 0644
innodb-wl6445.result File 1.78 KB 0644
innodb.result File 97.48 KB 0644
innodb_autoinc_lock_mode_zero.result File 1.22 KB 0644
innodb_autoinc_reset.result File 423 B 0644
innodb_blob_unrecoverable_crash.result File 764 B 0644
innodb_buffer_pool_load.result File 978 B 0644
innodb_bug-13628249.result File 973 B 0644
innodb_bug11754376.result File 180 B 0644
innodb_bug11766634.result File 396 B 0644
innodb_bug11789106.result File 394 B 0644
innodb_bug11933790.result File 229 B 0644
innodb_bug12400341.result File 1 KB 0644
innodb_bug12429573.result File 708 B 0644
innodb_bug12661768.result File 524 B 0644
innodb_bug13635833.result File 1.61 KB 0644
innodb_bug13867871.result File 3.71 KB 0644
innodb_bug14006907.result File 934 B 0644
innodb_bug14007109.result File 223 B 0644
innodb_bug14007649.result File 1.17 KB 0644
innodb_bug14147491.result File 1.29 KB 0644
innodb_bug14169459.result File 1.51 KB 0644
innodb_bug14676111.result File 1.99 KB 0644
innodb_bug14704286.result File 1.12 KB 0644
innodb_bug21704.result File 2.69 KB 0644
innodb_bug30423.result File 3.04 KB 0644
innodb_bug30919.result File 17.44 KB 0644
innodb_bug34053.result File 35 B 0644
innodb_bug34300.result File 173 B 0644
innodb_bug35220.result File 35 B 0644
innodb_bug38231.result File 35 B 0644
innodb_bug39438.result File 35 B 0644
innodb_bug40360.result File 134 B 0644
innodb_bug40565.result File 311 B 0644
innodb_bug41904.result File 195 B 0644
innodb_bug42101-nonzero.result File 810 B 0644
innodb_bug42101.result File 704 B 0644
innodb_bug42419.result File 858 B 0644
innodb_bug44032.result File 313 B 0644
innodb_bug44369.result File 300 B 0644
innodb_bug44571.result File 334 B 0644
innodb_bug45357.result File 290 B 0644
innodb_bug46000.result File 905 B 0644
innodb_bug46676.result File 362 B 0644
innodb_bug47167.result File 990 B 0644
innodb_bug47621.result File 777 B 0644
innodb_bug47622.result File 748 B 0644
innodb_bug47777.result File 516 B 0644
innodb_bug48024.result File 592 B 0644
innodb_bug49164.result File 633 B 0644
innodb_bug51378.result File 2.19 KB 0644
innodb_bug51920.result File 316 B 0644
innodb_bug52199.result File 175 B 0644
innodb_bug52663.result File 857 B 0644
innodb_bug53046.result File 1016 B 0644
innodb_bug53290.result File 771 B 0644
innodb_bug53592.result File 1.54 KB 0644
innodb_bug53674.result File 234 B 0644
innodb_bug53756.result File 2.39 KB 0644
innodb_bug54044.result File 678 B 0644
innodb_bug56143.result File 73.65 KB 0644
innodb_bug56716.result File 168 B 0644
innodb_bug56947.result File 406 B 0644
innodb_bug57252.result File 89 B 0644
innodb_bug57255.result File 501 B 0644
innodb_bug57904.result File 1.3 KB 0644
innodb_bug59307.result File 476 B 0644
innodb_bug59410.result File 529 B 0644
innodb_bug59641.result File 898 B 0644
innodb_bug59733.result File 802 B 0644
innodb_bug60049.result File 430 B 0644
innodb_bug60196.result File 2.9 KB 0644
innodb_bug60229.result File 955 B 0644
innodb_bug70867.result File 171 B 0644
innodb_copy_col_in_partition.result File 976 B 0644
innodb_corrupt_bit.result File 2.97 KB 0644
innodb_ctype_ldml.result File 27.54 KB 0644
innodb_deadlock_with_autoinc.result File 565 B 0644
innodb_file_format.result File 1.68 KB 0644
innodb_file_limit_check.result File 319 B 0644
innodb_force_recovery.result File 3.22 KB 0644
innodb_gis.result File 25.08 KB 0644
innodb_i_s_innodb_locks.result File 4.33 KB 0644
innodb_i_s_innodb_trx.result File 2.85 KB 0644
innodb_information_schema_buffer.result File 2.23 KB 0644
innodb_io_pf.result File 407 B 0644
innodb_lock_wait_timeout_1.result File 8.29 KB 0644
innodb_misc1.result File 28.04 KB 0644
innodb_multi_update.result File 1.58 KB 0644
innodb_mysql.result File 77.3 KB 0644
innodb_mysql_rbk.result File 629 B 0644
innodb_notembedded.result File 637 B 0644
innodb_page_size_func.result File 1.48 KB 0644
innodb_prefix_index_restart_server.result File 2.91 KB 0644
innodb_replace.result File 2.33 KB 0644
innodb_stats.result File 11.62 KB 0644
innodb_stats_auto_recalc.result File 1.33 KB 0644
innodb_stats_auto_recalc_ddl.result File 1.13 KB 0644
innodb_stats_auto_recalc_lots.result File 2.07 KB 0644
innodb_stats_auto_recalc_on_nonexistent.result File 2.19 KB 0644
innodb_stats_create_on_corrupted.result File 893 B 0644
innodb_stats_create_table.result File 1.1 KB 0644
innodb_stats_del_mark.result File 2.81 KB 0644
innodb_stats_drop_locked.result File 1.55 KB 0644
innodb_stats_external_pages.result File 880 B 0644
innodb_stats_fetch.result File 3.35 KB 0644
innodb_stats_fetch_corrupted.result File 1.2 KB 0644
innodb_stats_fetch_nonexistent.result File 980 B 0644
innodb_stats_flag_global_off.result File 7.34 KB 0644
innodb_stats_flag_global_on.result File 7.34 KB 0644
innodb_stats_rename_table.result File 1.48 KB 0644
innodb_stats_rename_table_if_exists.result File 1.89 KB 0644
innodb_stats_sample_pages.result File 1023 B 0644
innodb_stats_table_flag_auto_recalc.result File 3 KB 0644
innodb_stats_table_flag_sample_pages.result File 4.27 KB 0644
innodb_sys_var_valgrind.result File 2.35 KB 0644
innodb_timeout_rollback.result File 570 B 0644
innodb_trx_weight.result File 35 B 0644
innodb_upd_stats_if_needed_not_inited.result File 457 B 0644
innodb_ut_format_name.result File 140 B 0644
insert_debug.result File 380 B 0644
monitor.result File 22.89 KB 0644
monitor_debug.result File 569 B 0644
sp_temp_table.result File 5.72 KB 0644
strict_checksum.result File 787 B 0644
strict_mode.result File 3.47 KB 0644
timestamp.result File 790 B 0644
tmpdir.result File 1.8 KB 0644
undo_space_id.result File 155 B 0644
xa_recovery.result File 352 B 0644