# Skip this test other platfoms and run only on Linux. # Set the environmental variables # Stop server # Copy the remote tablespace & DB zip files from suite location to working location. # Check that the file exists in the working folder. # Unzip the zip file. # Remove the DOS based *.isl files from the MySql Data directory. # Check that the *.ibd files are in the required location. # Create new *.isl files with the correct path to the *.ibd files, # Restart the DB server from unzip location Data Dir. # Note that lower case option is required because the # partition tables will be stored in mixed (Upper & Lower) format on Linux, # but on Windows the partition table names are stored in lower case only. # Check the DB & tables with DML statements. use test; SHOW CREATE TABLE emp1; Table Create Table emp1 CREATE TABLE `emp1` ( `empno` int(11) DEFAULT NULL, `ename` varchar(30) DEFAULT NULL, `sal` decimal(3,0) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SHOW CREATE TABLE emp2; Table Create Table emp2 CREATE TABLE `emp2` ( `empno` int(11) DEFAULT NULL, `ename` varchar(30) DEFAULT NULL, `sal` decimal(3,0) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (empno) (PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab1' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab2' ENGINE = InnoDB) */ SHOW CREATE TABLE emp3; Table Create Table emp3 CREATE TABLE `emp3` ( `empno` int(11) DEFAULT NULL, `ename` varchar(30) DEFAULT NULL, `sal` decimal(3,0) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/mysqld.5980/tab3/' SHOW CREATE TABLE emp4; Table Create Table emp4 CREATE TABLE `emp4` ( `empno` int(11) DEFAULT NULL, `ename` varchar(30) DEFAULT NULL, `sal` decimal(3,0) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC /*!50100 PARTITION BY HASH (empno) (PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab4' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/tab5' ENGINE = InnoDB) */ SHOW CREATE TABLE purchase; Table Create Table purchase CREATE TABLE `purchase` ( `id` int(11) DEFAULT NULL, `purchased` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ( YEAR(purchased)) SUBPARTITION BY HASH ( TO_DAYS(purchased)) (PARTITION p0 VALUES LESS THAN (1990) (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part0' ENGINE = InnoDB, SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part1' ENGINE = InnoDB), PARTITION p1 VALUES LESS THAN (2000) (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part2' ENGINE = InnoDB, SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/mysqld.5980/part3' ENGINE = InnoDB)) */ SELECT COUNT(*) FROM emp1; COUNT(*) 2 SELECT COUNT(*) FROM emp2; COUNT(*) 2 SELECT COUNT(*) FROM emp3; COUNT(*) 2 SELECT COUNT(*) FROM emp4; COUNT(*) 2 SELECT COUNT(*) FROM purchase; COUNT(*) 1 DELETE FROM emp1; DELETE FROM emp2; DELETE FROM emp3; DELETE FROM emp4; DELETE FROM purchase; SELECT COUNT(*) FROM emp1; COUNT(*) 0 SELECT COUNT(*) FROM emp2; COUNT(*) 0 SELECT COUNT(*) FROM emp3; COUNT(*) 0 SELECT COUNT(*) FROM emp4; COUNT(*) 0 SELECT COUNT(*) FROM purchase; COUNT(*) 0 # Check the system tables have the proper entry of the tables. SELECT path FROM information_schema.innodb_sys_datafiles WHERE path LIKE '%test%' ORDER BY space; path .\test\emp1.ibd MYSQL_TMP_DIR/mysqld.5980/tab1/test/emp2#p#p1.ibd MYSQL_TMP_DIR/mysqld.5980/tab2/test/emp2#p#p2.ibd MYSQL_TMP_DIR/mysqld.5980/tab3/test/emp3.ibd MYSQL_TMP_DIR/mysqld.5980/part0/test/purchase#p#p0#sp#s0.ibd MYSQL_TMP_DIR/mysqld.5980/part1/test/purchase#p#p0#sp#s1.ibd MYSQL_TMP_DIR/mysqld.5980/part2/test/purchase#p#p1#sp#s2.ibd MYSQL_TMP_DIR/mysqld.5980/part3/test/purchase#p#p1#sp#s3.ibd MYSQL_TMP_DIR/mysqld.5980/tab4/test/emp4#p#p1.ibd MYSQL_TMP_DIR/mysqld.5980/tab5/test/emp4#p#p2.ibd SELECT name,file_format,row_format FROM information_schema.innodb_sys_tablespaces ORDER BY name; name file_format row_format test/emp1 Antelope Compact or Redundant test/emp2#p#p1 Antelope Compact or Redundant test/emp2#p#p2 Antelope Compact or Redundant test/emp3 Antelope Compact or Redundant test/emp4#p#p1 Barracuda Dynamic test/emp4#p#p2 Barracuda Dynamic test/purchase#p#p0#sp#s0 Antelope Compact or Redundant test/purchase#p#p0#sp#s1 Antelope Compact or Redundant test/purchase#p#p1#sp#s2 Antelope Compact or Redundant test/purchase#p#p1#sp#s3 Antelope Compact or Redundant SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%emp%' ORDER BY name; name n_cols file_format row_format test/emp1 6 Antelope Compact test/emp2#p#p1 6 Antelope Compact test/emp2#p#p2 6 Antelope Compact test/emp3 6 Antelope Compact test/emp4#p#p1 6 Barracuda Dynamic test/emp4#p#p2 6 Barracuda Dynamic SELECT name,n_cols,file_format,row_format FROM information_schema.innodb_sys_tables WHERE name LIKE '%purchase%' ORDER BY name; name n_cols file_format row_format test/purchase#p#p0#sp#s0 5 Antelope Compact test/purchase#p#p0#sp#s1 5 Antelope Compact test/purchase#p#p1#sp#s2 5 Antelope Compact test/purchase#p#p1#sp#s3 5 Antelope Compact # # Cleanup # DROP TABLE emp1; DROP TABLE emp2; DROP TABLE emp3; DROP TABLE emp4; DROP TABLE purchase; CREATE DATABASE mtr; CREATE PROCEDURE mtr.check_warnings(OUT result INT) BEGIN SELECT 0 INTO RESULT; END|