1261 lines
66 KiB
Plaintext
1261 lines
66 KiB
Plaintext
SET default_storage_engine=InnoDB;
|
|
#
|
|
# A series of tests to make sure tables are opened after restart.
|
|
# Bug#13357607 Compressed file-per-table tablespaces fail to open
|
|
#
|
|
CREATE DATABASE move_test;
|
|
USE move_test;
|
|
set global innodb_file_per_table=on;
|
|
#
|
|
# Create and insert records into a REDUNDANT row formatted table.
|
|
#
|
|
CREATE TABLE t1_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=REDUNDANT ENGINE=InnoDB;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t1_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
|
|
INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
|
|
INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
|
|
INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
|
|
SHOW CREATE TABLE t1_restart;
|
|
Table Create Table
|
|
t1_restart CREATE TABLE `t1_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT
|
|
SELECT count(*) FROM t1_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a COMPACT row formatted table.
|
|
#
|
|
CREATE TABLE t2_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=COMPACT ENGINE=InnoDB;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t2_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
SHOW CREATE TABLE t2_restart;
|
|
Table Create Table
|
|
t2_restart CREATE TABLE `t2_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT
|
|
SELECT count(*) FROM t2_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a COMPRESSED row formatted table.
|
|
#
|
|
CREATE TABLE t3_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t3_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
|
|
INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
|
|
INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
|
|
INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
|
|
SHOW CREATE TABLE t3_restart;
|
|
Table Create Table
|
|
t3_restart CREATE TABLE `t3_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
SELECT count(*) FROM t3_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a DYNAMIC row formatted table.
|
|
#
|
|
CREATE TABLE t4_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=DYNAMIC ENGINE=InnoDB;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t4_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
SHOW CREATE TABLE t4_restart;
|
|
Table Create Table
|
|
t4_restart CREATE TABLE `t4_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
SELECT count(*) FROM t4_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a table that uses a remote DATA DIRECTORY.
|
|
#
|
|
#
|
|
CREATE TABLE t5_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=DYNAMIC ENGINE=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
SHOW CREATE TABLE t5_restart;
|
|
Table Create Table
|
|
t5_restart CREATE TABLE `t5_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000027 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
SELECT count(*) FROM t5_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a partitioned table that uses-echo # a remote DATA DIRECTORY for each partition.
|
|
CREATE TABLE t6_restart(
|
|
c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 ENGINE=InnoDB
|
|
PARTITION BY HASH(c1) (
|
|
PARTITION p0 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir',
|
|
PARTITION p1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir',
|
|
PARTITION p2 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir');
|
|
INSERT INTO t6_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
|
|
INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
|
|
INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
|
|
INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
|
|
SHOW CREATE TABLE t6_restart;
|
|
Table Create Table
|
|
t6_restart CREATE TABLE `t6_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB) */
|
|
SELECT count(*) FROM t6_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a subpartitioned table that uses
|
|
# a remote DATA DIRECTORY for each subpartition.
|
|
#
|
|
CREATE TABLE t7_restart(
|
|
c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=DYNAMIC ENGINE=InnoDB
|
|
PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
|
|
PARTITION p0 VALUES LESS THAN (10) (
|
|
SUBPARTITION s0 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir',
|
|
SUBPARTITION s1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE (
|
|
SUBPARTITION s2 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir',
|
|
SUBPARTITION s3 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'));
|
|
INSERT INTO t7_restart VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
|
|
INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
|
|
INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
|
|
INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
|
|
SHOW CREATE TABLE t7_restart;
|
|
Table Create Table
|
|
t7_restart CREATE TABLE `t7_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir/' ENGINE = InnoDB)) */
|
|
SELECT count(*) FROM t7_restart;
|
|
count(*)
|
|
16
|
|
#
|
|
# Create and insert records into a table that uses a general tablespace.
|
|
#
|
|
CREATE TABLESPACE s1_restart ADD DATAFILE 's1_restart.ibd';
|
|
CREATE TABLE t8_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=COMPACT ENGINE=InnoDB TABLESPACE=s1_restart;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t8_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
SHOW CREATE TABLE t8_restart;
|
|
Table Create Table
|
|
t8_restart CREATE TABLE `t8_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT
|
|
SELECT count(*) FROM t8_restart;
|
|
count(*)
|
|
65
|
|
CREATE TABLE t9_restart(c1 DOUBLE AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
|
|
ROW_FORMAT=DYNAMIC ENGINE=InnoDB TABLESPACE=s1_restart;
|
|
Warnings:
|
|
Warning 3856 AUTO_INCREMENT support for FLOAT/DOUBLE columns is deprecated and will be removed in a future release. Consider removing AUTO_INCREMENT from column 'c1'.
|
|
INSERT INTO t9_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
SHOW CREATE TABLE t9_restart;
|
|
Table Create Table
|
|
t9_restart CREATE TABLE `t9_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000125 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
SELECT count(*) FROM t9_restart;
|
|
count(*)
|
|
65
|
|
#
|
|
# Show these tables in information_schema.
|
|
#
|
|
=== information_schema.innodb_tables and innodb_tablespaces ===
|
|
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
|
|
move_test/t1_restart move_test/t1_restart 0 11 Redundant 0 Single
|
|
move_test/t2_restart move_test/t2_restart 1 11 Compact 0 Single
|
|
move_test/t3_restart move_test/t3_restart 37 11 Compressed 2048 Single
|
|
move_test/t4_restart move_test/t4_restart 33 11 Dynamic 0 Single
|
|
move_test/t5_restart move_test/t5_restart 97 11 Dynamic 0 Single
|
|
move_test/t6_restart#p#p0 move_test/t6_restart#p#p0 101 11 Compressed 2048 Single
|
|
move_test/t6_restart#p#p1 move_test/t6_restart#p#p1 101 11 Compressed 2048 Single
|
|
move_test/t6_restart#p#p2 move_test/t6_restart#p#p2 101 11 Compressed 2048 Single
|
|
move_test/t7_restart#p#p0#sp#s0 move_test/t7_restart#p#p0#sp#s0 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p0#sp#s1 move_test/t7_restart#p#p0#sp#s1 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p1#sp#s2 move_test/t7_restart#p#p1#sp#s2 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p1#sp#s3 move_test/t7_restart#p#p1#sp#s3 97 11 Dynamic 0 Single
|
|
move_test/t8_restart s1_restart 129 11 Compact 0 General
|
|
move_test/t9_restart s1_restart 161 11 Dynamic 0 General
|
|
mtr/global_suppressions mtr/global_suppressions 33 7 Dynamic 0 Single
|
|
mtr/test_suppressions mtr/test_suppressions 33 7 Dynamic 0 Single
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/move_test/t1_restart.ibd
|
|
move_test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/move_test/t2_restart.ibd
|
|
move_test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/move_test/t3_restart.ibd
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
s1_restart General DEFAULT 0 Any s1_restart.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t1_restart TABLESPACE InnoDB NORMAL move_test/t1_restart MYSQLD_DATADIR/move_test/t1_restart.ibd
|
|
move_test/t2_restart TABLESPACE InnoDB NORMAL move_test/t2_restart MYSQLD_DATADIR/move_test/t2_restart.ibd
|
|
move_test/t3_restart TABLESPACE InnoDB NORMAL move_test/t3_restart MYSQLD_DATADIR/move_test/t3_restart.ibd
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart TABLESPACE InnoDB NORMAL move_test/t5_restart MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
|
|
#
|
|
# Shutdown the server and list the tablespace OS files
|
|
#
|
|
---- MYSQL_DATA_DIR/move_test
|
|
t1_restart.ibd
|
|
t2_restart.ibd
|
|
t3_restart.ibd
|
|
t4_restart.ibd
|
|
---- ALT_DIR
|
|
move_test
|
|
---- ALT_DIR/move_test
|
|
t5_restart.ibd
|
|
t6_restart#p#p0.ibd
|
|
t6_restart#p#p1.ibd
|
|
t6_restart#p#p2.ibd
|
|
t7_restart#p#p0#sp#s0.ibd
|
|
t7_restart#p#p0#sp#s1.ibd
|
|
t7_restart#p#p1#sp#s2.ibd
|
|
t7_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Start the server and show that tables are still visible and accessible.
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir
|
|
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
|
Variable_name Value
|
|
innodb_file_per_table ON
|
|
SHOW CREATE TABLE t1_restart;
|
|
Table Create Table
|
|
t1_restart CREATE TABLE `t1_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=REDUNDANT
|
|
SHOW CREATE TABLE t2_restart;
|
|
Table Create Table
|
|
t2_restart CREATE TABLE `t2_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT
|
|
SHOW CREATE TABLE t3_restart;
|
|
Table Create Table
|
|
t3_restart CREATE TABLE `t3_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
SHOW CREATE TABLE t4_restart;
|
|
Table Create Table
|
|
t4_restart CREATE TABLE `t4_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
SHOW CREATE TABLE t5_restart;
|
|
Table Create Table
|
|
t5_restart CREATE TABLE `t5_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000020 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
SHOW CREATE TABLE t6_restart;
|
|
Table Create Table
|
|
t6_restart CREATE TABLE `t6_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
SHOW CREATE TABLE t7_restart;
|
|
Table Create Table
|
|
t7_restart CREATE TABLE `t7_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
SHOW CREATE TABLE t8_restart;
|
|
Table Create Table
|
|
t8_restart CREATE TABLE `t8_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT
|
|
SHOW CREATE TABLE t9_restart;
|
|
Table Create Table
|
|
t9_restart CREATE TABLE `t9_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) /*!50100 TABLESPACE `s1_restart` */ ENGINE=InnoDB AUTO_INCREMENT=1000000110 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
INSERT INTO t1_restart (SELECT 0, c2, c3, c4, c5 FROM t1_restart);
|
|
INSERT INTO t2_restart (SELECT 0, c2, c3, c4, c5 FROM t2_restart);
|
|
INSERT INTO t3_restart (SELECT 0, c2, c3, c4, c5 FROM t3_restart);
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t6_restart (SELECT 0, c2, c3, c4, c5 FROM t6_restart);
|
|
INSERT INTO t7_restart (SELECT 0, c2, c3, c4, c5 FROM t7_restart);
|
|
INSERT INTO t8_restart (SELECT 0, c2, c3, c4, c5 FROM t8_restart);
|
|
INSERT INTO t9_restart (SELECT 0, c2, c3, c4, c5 FROM t9_restart);
|
|
SELECT count(*) FROM t1_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t2_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t3_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t4_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t5_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t6_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t7_restart;
|
|
count(*)
|
|
32
|
|
SELECT count(*) FROM t8_restart;
|
|
count(*)
|
|
130
|
|
SELECT count(*) FROM t9_restart;
|
|
count(*)
|
|
130
|
|
#
|
|
# Show these tables in information_schema.
|
|
#
|
|
=== information_schema.innodb_tables and innodb_tablespaces ===
|
|
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
|
|
move_test/t1_restart move_test/t1_restart 0 11 Redundant 0 Single
|
|
move_test/t2_restart move_test/t2_restart 1 11 Compact 0 Single
|
|
move_test/t3_restart move_test/t3_restart 37 11 Compressed 2048 Single
|
|
move_test/t4_restart move_test/t4_restart 33 11 Dynamic 0 Single
|
|
move_test/t5_restart move_test/t5_restart 97 11 Dynamic 0 Single
|
|
move_test/t6_restart#p#p0 move_test/t6_restart#p#p0 101 11 Compressed 2048 Single
|
|
move_test/t6_restart#p#p1 move_test/t6_restart#p#p1 101 11 Compressed 2048 Single
|
|
move_test/t6_restart#p#p2 move_test/t6_restart#p#p2 101 11 Compressed 2048 Single
|
|
move_test/t7_restart#p#p0#sp#s0 move_test/t7_restart#p#p0#sp#s0 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p0#sp#s1 move_test/t7_restart#p#p0#sp#s1 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p1#sp#s2 move_test/t7_restart#p#p1#sp#s2 97 11 Dynamic 0 Single
|
|
move_test/t7_restart#p#p1#sp#s3 move_test/t7_restart#p#p1#sp#s3 97 11 Dynamic 0 Single
|
|
move_test/t8_restart s1_restart 129 11 Compact 0 General
|
|
move_test/t9_restart s1_restart 161 11 Dynamic 0 General
|
|
mtr/global_suppressions mtr/global_suppressions 33 7 Dynamic 0 Single
|
|
mtr/test_suppressions mtr/test_suppressions 33 7 Dynamic 0 Single
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t1_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/move_test/t1_restart.ibd
|
|
move_test/t2_restart Single DEFAULT 0 Compact or Redundant MYSQLD_DATADIR/move_test/t2_restart.ibd
|
|
move_test/t3_restart Single DEFAULT 2048 Compressed MYSQLD_DATADIR/move_test/t3_restart.ibd
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
s1_restart General DEFAULT 0 Any s1_restart.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t1_restart TABLESPACE InnoDB NORMAL move_test/t1_restart MYSQLD_DATADIR/move_test/t1_restart.ibd
|
|
move_test/t2_restart TABLESPACE InnoDB NORMAL move_test/t2_restart MYSQLD_DATADIR/move_test/t2_restart.ibd
|
|
move_test/t3_restart TABLESPACE InnoDB NORMAL move_test/t3_restart MYSQLD_DATADIR/move_test/t3_restart.ibd
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart TABLESPACE InnoDB NORMAL move_test/t5_restart MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
s1_restart TABLESPACE InnoDB NORMAL s1_restart MYSQLD_DATADIR/s1_restart.ibd
|
|
DROP TABLE t1_restart;
|
|
DROP TABLE t2_restart;
|
|
DROP TABLE t3_restart;
|
|
DROP TABLE t8_restart;
|
|
DROP TABLE t9_restart;
|
|
DROP TABLESPACE s1_restart;
|
|
#
|
|
# Truncate the remote tablespaces.
|
|
#
|
|
TRUNCATE TABLE t5_restart;
|
|
ALTER TABLE t6_restart TRUNCATE PARTITION p2;
|
|
ALTER TABLE t7_restart TRUNCATE PARTITION p1;
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart TABLESPACE InnoDB NORMAL move_test/t5_restart MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
INSERT INTO t5_restart VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
INSERT INTO t5_restart (SELECT 0, c2, c3, c4, c5 FROM t5_restart);
|
|
SELECT count(*) FROM t5_restart;
|
|
count(*)
|
|
8
|
|
SHOW CREATE TABLE t5_restart;
|
|
Table Create Table
|
|
t5_restart CREATE TABLE `t5_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000012 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
SELECT count(*) FROM t6_restart;
|
|
count(*)
|
|
21
|
|
SHOW CREATE TABLE t6_restart;
|
|
Table Create Table
|
|
t6_restart CREATE TABLE `t6_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
SELECT count(*) FROM t7_restart;
|
|
count(*)
|
|
9
|
|
SHOW CREATE TABLE t7_restart;
|
|
Table Create Table
|
|
t7_restart CREATE TABLE `t7_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
#
|
|
# Shutdown the server and make a backup of a tablespace
|
|
#
|
|
---- MYSQL_DATA_DIR/move_test
|
|
t4_restart.ibd
|
|
---- ALT_DIR/move_test
|
|
t5_restart.ibd
|
|
t5_restart.ibd.bak
|
|
t6_restart#p#p0.ibd
|
|
t6_restart#p#p1.ibd
|
|
t6_restart#p#p2.ibd
|
|
t7_restart#p#p0#sp#s0.ibd
|
|
t7_restart#p#p0#sp#s1.ibd
|
|
t7_restart#p#p1#sp#s2.ibd
|
|
t7_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Start the server and show the tablespaces.
|
|
#
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir
|
|
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
|
Variable_name Value
|
|
innodb_file_per_table ON
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t5_restart TABLESPACE InnoDB NORMAL move_test/t5_restart MYSQL_TMP_DIR/alt_dir/move_test/t5_restart.ibd
|
|
move_test/t6_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p0.ibd
|
|
move_test/t6_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p1.ibd
|
|
move_test/t6_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t6_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t6_restart#p#p2.ibd
|
|
move_test/t7_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s0.ibd
|
|
move_test/t7_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p0#sp#s1.ibd
|
|
move_test/t7_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s2.ibd
|
|
move_test/t7_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t7_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t7_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
SELECT count(*) FROM t5_restart;
|
|
count(*)
|
|
8
|
|
SHOW CREATE TABLE t5_restart;
|
|
Table Create Table
|
|
t5_restart CREATE TABLE `t5_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000009 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
SELECT count(*) FROM t6_restart;
|
|
count(*)
|
|
21
|
|
SHOW CREATE TABLE t6_restart;
|
|
Table Create Table
|
|
t6_restart CREATE TABLE `t6_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
SELECT count(*) FROM t7_restart;
|
|
count(*)
|
|
9
|
|
SHOW CREATE TABLE t7_restart;
|
|
Table Create Table
|
|
t7_restart CREATE TABLE `t7_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
#
|
|
# Try to rename a tablespace to a file that already exists
|
|
#
|
|
---- MYSQL_DATA_DIR/move_test
|
|
t4_restart.ibd
|
|
---- ALT_DIR/move_test
|
|
t5_restart.ibd
|
|
t6_restart#p#p0.ibd
|
|
t6_restart#p#p1.ibd
|
|
t6_restart#p#p2.ibd
|
|
t7_restart#p#p0#sp#s0.ibd
|
|
t7_restart#p#p0#sp#s1.ibd
|
|
t7_restart#p#p1#sp#s2.ibd
|
|
t7_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Rename file table and tablespace
|
|
#
|
|
RENAME TABLE t5_restart TO t55_restart;
|
|
RENAME TABLE t6_restart TO t66_restart;
|
|
RENAME TABLE t7_restart TO t77_restart;
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart TABLESPACE InnoDB NORMAL move_test/t55_restart MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
|
|
SELECT count(*) FROM t55_restart;
|
|
count(*)
|
|
16
|
|
SHOW CREATE TABLE t55_restart;
|
|
Table Create Table
|
|
t55_restart CREATE TABLE `t55_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000024 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
|
|
SELECT count(*) FROM t66_restart;
|
|
count(*)
|
|
42
|
|
SHOW CREATE TABLE t66_restart;
|
|
Table Create Table
|
|
t66_restart CREATE TABLE `t66_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
|
|
SELECT count(*) FROM t77_restart;
|
|
count(*)
|
|
18
|
|
SHOW CREATE TABLE t77_restart;
|
|
Table Create Table
|
|
t77_restart CREATE TABLE `t77_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
---- MYSQL_DATA_DIR/move_test
|
|
t4_restart.ibd
|
|
---- ALT_DIR/move_test
|
|
t55_restart.ibd
|
|
t66_restart#p#p0.ibd
|
|
t66_restart#p#p1.ibd
|
|
t66_restart#p#p2.ibd
|
|
t77_restart#p#p0#sp#s0.ibd
|
|
t77_restart#p#p0#sp#s1.ibd
|
|
t77_restart#p#p1#sp#s2.ibd
|
|
t77_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Restart the server
|
|
#
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir
|
|
SHOW VARIABLES LIKE 'innodb_file_per_table';
|
|
Variable_name Value
|
|
innodb_file_per_table ON
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart TABLESPACE InnoDB NORMAL move_test/t55_restart MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
|
|
SELECT count(*) FROM t55_restart;
|
|
count(*)
|
|
32
|
|
SHOW CREATE TABLE t55_restart;
|
|
Table Create Table
|
|
t55_restart CREATE TABLE `t55_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000048 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
|
|
SELECT count(*) FROM t66_restart;
|
|
count(*)
|
|
84
|
|
SHOW CREATE TABLE t66_restart;
|
|
Table Create Table
|
|
t66_restart CREATE TABLE `t66_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
|
|
SELECT count(*) FROM t77_restart;
|
|
count(*)
|
|
36
|
|
SHOW CREATE TABLE t77_restart;
|
|
Table Create Table
|
|
t77_restart CREATE TABLE `t77_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
#
|
|
# Shutdown the server
|
|
#
|
|
---- MYSQL_DATA_DIR/move_test
|
|
t4_restart.ibd
|
|
---- ALT_DIR/move_test
|
|
t55_restart.ibd
|
|
t66_restart#p#p0.ibd
|
|
t66_restart#p#p1.ibd
|
|
t66_restart#p#p2.ibd
|
|
t77_restart#p#p0#sp#s0.ibd
|
|
t77_restart#p#p0#sp#s1.ibd
|
|
t77_restart#p#p1#sp#s2.ibd
|
|
t77_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Start the server and check tablespaces.
|
|
#
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart TABLESPACE InnoDB NORMAL move_test/t55_restart MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
SELECT count(*) FROM t4_restart;
|
|
count(*)
|
|
64
|
|
SHOW CREATE TABLE t4_restart;
|
|
Table Create Table
|
|
t4_restart CREATE TABLE `t4_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000099 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
|
|
SELECT count(*) FROM t55_restart;
|
|
count(*)
|
|
64
|
|
SHOW CREATE TABLE t55_restart;
|
|
Table Create Table
|
|
t55_restart CREATE TABLE `t55_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000096 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
|
|
SELECT count(*) FROM t66_restart;
|
|
count(*)
|
|
168
|
|
SHOW CREATE TABLE t66_restart;
|
|
Table Create Table
|
|
t66_restart CREATE TABLE `t66_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=180 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
|
|
SELECT count(*) FROM t77_restart;
|
|
count(*)
|
|
72
|
|
SHOW CREATE TABLE t77_restart;
|
|
Table Create Table
|
|
t77_restart CREATE TABLE `t77_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
#
|
|
# Shutdown the server
|
|
#
|
|
#
|
|
# Start the server and check tablespaces.
|
|
#
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart TABLESPACE InnoDB NORMAL move_test/t55_restart MYSQL_TMP_DIR/alt_dir/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p0 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p1 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p2 MYSQL_TMP_DIR/alt_dir/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
SELECT count(*) FROM t4_restart;
|
|
count(*)
|
|
128
|
|
SHOW CREATE TABLE t4_restart;
|
|
Table Create Table
|
|
t4_restart CREATE TABLE `t4_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000195 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
|
|
SELECT count(*) FROM t55_restart;
|
|
count(*)
|
|
128
|
|
SHOW CREATE TABLE t55_restart;
|
|
Table Create Table
|
|
t55_restart CREATE TABLE `t55_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000192 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
|
|
INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
|
|
SELECT count(*) FROM t66_restart;
|
|
count(*)
|
|
336
|
|
SHOW CREATE TABLE t66_restart;
|
|
Table Create Table
|
|
t66_restart CREATE TABLE `t66_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=348 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
|
|
INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
|
|
SELECT count(*) FROM t77_restart;
|
|
count(*)
|
|
144
|
|
SHOW CREATE TABLE t77_restart;
|
|
Table Create Table
|
|
t77_restart CREATE TABLE `t77_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=168 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
|
|
#
|
|
# Shutdown the server
|
|
# Move all the files form ALT_DIR to ALT_DIR_MOVED
|
|
#
|
|
# Moving files
|
|
t55_restart.ibd
|
|
t66_restart#p#p0.ibd
|
|
t66_restart#p#p1.ibd
|
|
t66_restart#p#p2.ibd
|
|
t77_restart#p#p0#sp#s0.ibd
|
|
t77_restart#p#p0#sp#s1.ibd
|
|
t77_restart#p#p1#sp#s2.ibd
|
|
t77_restart#p#p1#sp#s3.ibd
|
|
#
|
|
# Start the server and check tablespaces.
|
|
#
|
|
# restart:--innodb-directories=MYSQL_TMP_DIR/alt_dir_moved
|
|
INSERT INTO t4_restart (SELECT 0, c2, c3, c4, c5 FROM t4_restart);
|
|
SELECT count(*) FROM t4_restart;
|
|
count(*)
|
|
256
|
|
SHOW CREATE TABLE t4_restart;
|
|
Table Create Table
|
|
t4_restart CREATE TABLE `t4_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000387 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
INSERT INTO t55_restart (SELECT 0, c2, c3, c4, c5 FROM t55_restart);
|
|
SELECT count(*) FROM t55_restart;
|
|
count(*)
|
|
256
|
|
SHOW CREATE TABLE t55_restart;
|
|
Table Create Table
|
|
t55_restart CREATE TABLE `t55_restart` (
|
|
`c1` double NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1000000384 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir_moved/'
|
|
INSERT INTO t66_restart (SELECT 0, c2, c3, c4, c5 FROM t66_restart);
|
|
SELECT count(*) FROM t66_restart;
|
|
count(*)
|
|
672
|
|
SHOW CREATE TABLE t66_restart;
|
|
Table Create Table
|
|
t66_restart CREATE TABLE `t66_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=684 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2
|
|
/*!50100 PARTITION BY HASH (`c1`)
|
|
(PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB,
|
|
PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB,
|
|
PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB) */
|
|
INSERT INTO t77_restart (SELECT 0, c2, c3, c4, c5 FROM t77_restart);
|
|
SELECT count(*) FROM t77_restart;
|
|
count(*)
|
|
288
|
|
SHOW CREATE TABLE t77_restart;
|
|
Table Create Table
|
|
t77_restart CREATE TABLE `t77_restart` (
|
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
|
`c2` char(10) DEFAULT NULL,
|
|
`c3` varchar(100) DEFAULT NULL,
|
|
`c4` date DEFAULT NULL,
|
|
`c5` text,
|
|
PRIMARY KEY (`c1`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=312 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC
|
|
/*!50100 PARTITION BY RANGE (`c1`)
|
|
SUBPARTITION BY HASH (`c1`)
|
|
(PARTITION p0 VALUES LESS THAN (10)
|
|
(SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB,
|
|
SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB),
|
|
PARTITION p1 VALUES LESS THAN MAXVALUE
|
|
(SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB,
|
|
SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_moved' ENGINE = InnoDB)) */
|
|
#
|
|
# Show these tables in information_schema with the updated path
|
|
#
|
|
=== information_schema.innodb_tables and innodb_tablespaces ===
|
|
Table Name Tablespace Table Flags Columns Row Format Zip Size Space Type
|
|
move_test/t4_restart move_test/t4_restart 33 11 Dynamic 0 Single
|
|
move_test/t55_restart move_test/t55_restart 97 11 Dynamic 0 Single
|
|
move_test/t66_restart#p#p0 move_test/t66_restart#p#p0 101 11 Compressed 2048 Single
|
|
move_test/t66_restart#p#p1 move_test/t66_restart#p#p1 101 11 Compressed 2048 Single
|
|
move_test/t66_restart#p#p2 move_test/t66_restart#p#p2 101 11 Compressed 2048 Single
|
|
move_test/t77_restart#p#p0#sp#s0 move_test/t77_restart#p#p0#sp#s0 97 11 Dynamic 0 Single
|
|
move_test/t77_restart#p#p0#sp#s1 move_test/t77_restart#p#p0#sp#s1 97 11 Dynamic 0 Single
|
|
move_test/t77_restart#p#p1#sp#s2 move_test/t77_restart#p#p1#sp#s2 97 11 Dynamic 0 Single
|
|
move_test/t77_restart#p#p1#sp#s3 move_test/t77_restart#p#p1#sp#s3 97 11 Dynamic 0 Single
|
|
mtr/global_suppressions mtr/global_suppressions 33 7 Dynamic 0 Single
|
|
mtr/test_suppressions mtr/test_suppressions 33 7 Dynamic 0 Single
|
|
=== information_schema.innodb_tablespaces and innodb_datafiles ===
|
|
Space_Name Space_Type Page_Size Zip_Size Formats_Permitted Path
|
|
move_test/t4_restart Single DEFAULT 0 Dynamic MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir_moved/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 Single DEFAULT 2048 Compressed MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 Single DEFAULT 0 Dynamic MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions Single DEFAULT 0 Dynamic MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
=== information_schema.files ===
|
|
Space_Name File_Type Engine Status Tablespace_Name Path
|
|
move_test/t4_restart TABLESPACE InnoDB NORMAL move_test/t4_restart MYSQLD_DATADIR/move_test/t4_restart.ibd
|
|
move_test/t55_restart TABLESPACE InnoDB NORMAL move_test/t55_restart MYSQL_TMP_DIR/alt_dir_moved/move_test/t55_restart.ibd
|
|
move_test/t66_restart#p#p0 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p0 MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p0.ibd
|
|
move_test/t66_restart#p#p1 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p1 MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p1.ibd
|
|
move_test/t66_restart#p#p2 TABLESPACE InnoDB NORMAL move_test/t66_restart#p#p2 MYSQL_TMP_DIR/alt_dir_moved/move_test/t66_restart#p#p2.ibd
|
|
move_test/t77_restart#p#p0#sp#s0 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s0 MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p0#sp#s0.ibd
|
|
move_test/t77_restart#p#p0#sp#s1 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p0#sp#s1 MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p0#sp#s1.ibd
|
|
move_test/t77_restart#p#p1#sp#s2 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s2 MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p1#sp#s2.ibd
|
|
move_test/t77_restart#p#p1#sp#s3 TABLESPACE InnoDB NORMAL move_test/t77_restart#p#p1#sp#s3 MYSQL_TMP_DIR/alt_dir_moved/move_test/t77_restart#p#p1#sp#s3.ibd
|
|
mtr/global_suppressions TABLESPACE InnoDB NORMAL mtr/global_suppressions MYSQLD_DATADIR/mtr/global_suppressions.ibd
|
|
mtr/test_suppressions TABLESPACE InnoDB NORMAL mtr/test_suppressions MYSQLD_DATADIR/mtr/test_suppressions.ibd
|
|
#
|
|
# Cleanup
|
|
#
|
|
DROP DATABASE move_test;
|