--echo # --echo #Bug #33398681 Innodb ibd tablespace file is moved back from innodb_directories to datadir after ALTER TABLE --echo # #This test will check whether the ibd tablespace file is moved back or not #Table t1a: Covers scenario create non-partitioned table without data directory specification and alter table force #Table t1b: Covers scenario create non-partitioned table without data directory specification and alter table force algo=inplace #Table t1c: Covers scenario create non-partitioned table without data directory specification and alter table force algo=copy #Table t2a: Covers scenario create non-partitioned table with data directory specification and alter table force #Table t2b: Covers scenario create non-partitioned table with data directory specification and alter table force algo=inplace #Table t2c: Covers scenario create non-partitioned table with data directory specification and alter table force algo=copy #Table t3a: Covers scenario create partitioned table without data directory specification and alter table force #Table t3b: Covers scenario create partitioned table without data directory specification and alter table force algo=inplace #Table t3c: Covers scenario create partitioned table without data directory specification and alter table force algo=copy #Table t4a: Covers scenario create partitioned table with data directory specification and alter table force #Table t4b: Covers scenario create partitioned table with data directory specification and alter table force algo=inplace #Table t4c: Covers scenario create partitioned table with data directory specification and alter table force algo=copy #Table t5a: Covers scenario create non-partitioned table with data directory specification and alter table force but moving ibd files from external dir to default dir #Table t5b: Covers scenario create non-partitioned table with data directory specification and alter table force algo=inplace but moving ibd files from external dir to default dir #Table t5c: Covers scenario create non-partitioned table with data directory specification and alter table force algo=copy but moving ibd files from external dir to default dir #Table t6a: Covers scenario create partitioned table with data directory specification and alter table force but moving ibd files from external dir to default dir #Table t6b: Covers scenario create partitioned table with data directory specification and alter table force algo=inplace but moving ibd files from external dir to default dir #Table t6c: Covers scenario create partitioned table with data directory specification and alter table force algo=copy but moving ibd files from external dir to default dir #Table t7a: Covers scenario create non-partitioned table with data directory specification and move from external dir 1 to external dir 2 and alter table force #Table t7b: Covers scenario create non-partitioned table with data directory specification and move from external dir 1 to external dir 2 and alter table force algo=inplace #Table t7c: Covers scenario create non-partitioned table with data directory specification and move from external dir 1 to external dir 2 and alter table force algo=copy #Table t8a: Covers scenario create partitioned table with data directory clause and both partitions in different directories, move to default dir and alter table force #Table t8b: Covers scenario create partitioned table with data directory clause and both partitions in different directories, move to default dir and alter table force algo=inplace #Table t8c: Covers scenario create partitioned table with data directory clause and both partitions in different directories, move to default dir and alter table force algo=copy #Table t8d: Covers scenario create partitioned table with one partition in data directory clause and the other partition in default data dir path, move to default dir and alter table force algo=copy #Table t9a: Covers scenario create partitioned table without data directory clause but moving each partition to different external directories and alter table force #Table t9b: Covers scenario create partitioned table without data directory clause but moving each partition to different external directories and alter table force algo=inplace #Table t9c: Covers scenario create partitioned table without data directory clause but moving each partition to different external directories and alter table force algo=copy --echo # Set different paths for --datadir LET $MYSQLD_DATADIR = `select @@datadir`; LET $EXTERNAL_DIR = $MYSQL_TMP_DIR/external_dir; LET $EXTERNAL_DIR2 = $MYSQL_TMP_DIR/external_dir2; LET $INNODB_DIRECTORIES = $MYSQLTEST_VARDIR/innodb_directories; LET $data_directory_clause = DATA DIRECTORY='$EXTERNAL_DIR'; LET $data_directory_clause2 = DATA DIRECTORY='$EXTERNAL_DIR2'; --echo # Create innodb_directories folder --mkdir $INNODB_DIRECTORIES --mkdir $INNODB_DIRECTORIES/dbtest --echo # Create external datadir folder --mkdir $EXTERNAL_DIR --mkdir $EXTERNAL_DIR/dbtest --echo # Create external datadir2 folder --mkdir $EXTERNAL_DIR2 --mkdir $EXTERNAL_DIR2/dbtest --echo # Restart the engine to make the external directory known. --let $external_dirs=$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$external_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR --source include/restart_mysqld.inc --echo # Create table CREATE DATABASE dbtest; USE dbtest; --echo # Normal tables CREATE TABLE `t1a` (`c1` INT); CREATE TABLE `t1b` (`c1` INT); CREATE TABLE `t1c` (`c1` INT); --echo # Normal tables with data directory clause --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t2a` (`c1` INT) $data_directory_clause; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t2b` (`c1` INT) $data_directory_clause; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t2c` (`c1` INT) $data_directory_clause; --echo # Partition tables CREATE TABLE `t3a` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); CREATE TABLE `t3b` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); CREATE TABLE `t3c` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); --echo # Partition tables with data directory clause --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t4a` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t4b` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t4c` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause); --echo # Normal tables with data directory clause 2 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t5a` (`c1` INT) $data_directory_clause2; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t5b` (`c1` INT) $data_directory_clause2; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t5c` (`c1` INT) $data_directory_clause2; --echo # Partition tables with data directory clause --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t6a` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause2, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t6b` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause2, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t6c` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause2, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # 1. ibd files for t1a, t1b, t1c, t3a, t3b, t3c --echo # Check that the ibd files for each table exist in the working (dbtest) folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Move ibd files from default directory to new innodb directory --copy_files_wildcard $MYSQLD_DATADIR/dbtest/ $INNODB_DIRECTORIES/dbtest/ * --remove_files_wildcard $MYSQLD_DATADIR/dbtest/ * --echo # Check that the files exist in the innodb_directories folder before alter after moving --list_files $INNODB_DIRECTORIES/dbtest * --echo # 2. ibd files for t2a, t2b, t2c, t4a, t4b, t4c --echo # Check that the ibd files for each table exist in the external directory where the tables are created --list_files $EXTERNAL_DIR/dbtest * --echo # 3. ibd files for t5a, t5b, t5c, t6a, t6b, t6c --echo # Check that the ibd files for each table exist in the external directory2 where the tables are created --list_files $EXTERNAL_DIR2/dbtest * --echo # Move ibd files for t5a, t5b, t5c, t6a, t6b, t6c from external directory2 to default directory --copy_files_wildcard $EXTERNAL_DIR2/dbtest/ $MYSQLD_DATADIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR2/dbtest/ * --echo # Check that the ibd files for t5a, t5b, t5c, t6a, t6b, t6c now exist in working (dbtest) folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Restart the server --let $innodb_dirs=$INNODB_DIRECTORIES;$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t1a FORCE; ALTER TABLE dbtest.t1b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t1c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t2a FORCE; ALTER TABLE dbtest.t2b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t2c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t3a FORCE; ALTER TABLE dbtest.t3b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t3c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t4a FORCE; ALTER TABLE dbtest.t4b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t4c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t5a FORCE; ALTER TABLE dbtest.t5b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t5c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t6a FORCE; ALTER TABLE dbtest.t6b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t6c FORCE, ALGORITHM=COPY; --echo # Check that the ibd files for t1a, t1b, t1c, t3a, t3b, t3c still exist in the innodb_directories folder --list_files $INNODB_DIRECTORIES/dbtest * --echo # Check that the ibd files for t1a, t1b, t1c, t3a, t3b, t3c do not exist and ibd files for t5a, t5b, t5c, t6a, t6b, t6c exist in the data directory folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Check that the ibd files for t5a, t5b, t5c, t6a, t6b, t6c do not exist in external directory2 where the tables are created --list_files $EXTERNAL_DIR2/dbtest * --echo # Check that the ibd files for t2a, t2b, t2c, t4a, t4b, t4c still exist in the external directory where the tables are created --list_files $EXTERNAL_DIR/dbtest * --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # Now move ibd files for t1a, t1b, t1c, t3a, t3b, t3c from innodb_directories folder to default directory --copy_files_wildcard $INNODB_DIRECTORIES/dbtest/ $MYSQLD_DATADIR/dbtest/ * --remove_files_wildcard $INNODB_DIRECTORIES/dbtest/ * --echo # Restart the server --let $innodb_dirs=$INNODB_DIRECTORIES;$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t1a FORCE; ALTER TABLE dbtest.t1b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t1c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t3a FORCE; ALTER TABLE dbtest.t3b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t3c FORCE, ALGORITHM=COPY; --echo # Check ibd files for t1a, t1b, t1c, t3a, t3b, t3c exist in default directory --list_files $MYSQLD_DATADIR/dbtest * --echo # Check ibd files for t1a, t1b, t1c, t3a, t3b, t3c do not exist in innodb_directories --list_files $INNODB_DIRECTORIES/dbtest * --echo # Clean Up --echo # Drop tables DROP TABLE dbtest.t1a; DROP TABLE dbtest.t1b; DROP TABLE dbtest.t1c; DROP TABLE dbtest.t2a; DROP TABLE dbtest.t2b; DROP TABLE dbtest.t2c; DROP TABLE dbtest.t3a; DROP TABLE dbtest.t3b; DROP TABLE dbtest.t3c; DROP TABLE dbtest.t4a; DROP TABLE dbtest.t4b; DROP TABLE dbtest.t4c; DROP TABLE dbtest.t5a; DROP TABLE dbtest.t5b; DROP TABLE dbtest.t5c; DROP TABLE dbtest.t6a; DROP TABLE dbtest.t6b; DROP TABLE dbtest.t6c; --echo # Clean up for other tests --remove_files_wildcard $INNODB_DIRECTORIES/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR2/dbtest/ * --echo # Additional test for tables with data directory clause --echo # Move non-partitioned table with data dir clause at EXTERNAL_DIR1 to EXTERNAL_DIR2 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t7a` (`c1` INT) $data_directory_clause; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t7b` (`c1` INT) $data_directory_clause; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t7c` (`c1` INT) $data_directory_clause; --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # Check that the ibd files for t7a, t7b, t7c exist in EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Move files from EXTERNAL_DIR to EXTERNAL_DIR2 --copy_files_wildcard $EXTERNAL_DIR/dbtest/ $EXTERNAL_DIR2/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR/dbtest/ * --echo # Check that the ibd files now exist in EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * --echo # Restart the server --let $innodb_dirs=$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t7a FORCE; ALTER TABLE dbtest.t7b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t7c FORCE, ALGORITHM=COPY; --echo # Check that the ibd files for t7a, t7b, t7c still exist in EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * --echo # Check that the ibd files for t7a, t7b, t7c do not exist in EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Clean up --echo # Drop tables DROP TABLE dbtest.t7a; DROP TABLE dbtest.t7b; DROP TABLE dbtest.t7c; --echo # Clean up for other tests --remove_files_wildcard $EXTERNAL_DIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR2/dbtest/ * --echo # Additional tests for partitioned tables --echo # 1. Creating partitioned table with data directory clause and both partitions in different directories --echo # Partition tables with data directory clause --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t8a` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t8b` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t8c` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) $data_directory_clause2); --echo # Partition table with one partition in external directory and one in default directory --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR eval CREATE TABLE `t8d` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10) $data_directory_clause, PARTITION p1 VALUES LESS THAN (20) ); --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # Check that for partition p0 for t8a, t8b, t8c and t8d exist in EXTERNAL_DIR and partition p1 for for t8a, t8b, t8c exist in EXTERNAL_DIR2 --echo # Listing EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Listing EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * --echo # List default directory. t8d's p1 partition should be present --list_files $MYSQLD_DATADIR/dbtest * --echo # Restart the server --let $innodb_dirs=$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t8a FORCE; ALTER TABLE dbtest.t8b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t8c FORCE, ALGORITHM=COPY; ALTER TABLE dbtest.t8d FORCE, ALGORITHM=COPY; --echo # Check that for partition p0 for t8a, t8b, t8c still exist in EXTERNAL_DIR and partition p1 for for t8a, t8b, t8c still exist in EXTERNAL_DIR2 --echo # Listing EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Listing EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * --echo # List default directory. t8d's p1 partition should be present --list_files $MYSQLD_DATADIR/dbtest * --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # Now lets move all partitioned tables p0 of t8a, t8b, t8c, t8d from EXTERNAL_DIR and partitioned tables p1 of t8a, t8b, t8c from EXTERNAL_DIR2 to default directory --copy_files_wildcard $EXTERNAL_DIR/dbtest/ $MYSQLD_DATADIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR/dbtest/ * --copy_files_wildcard $EXTERNAL_DIR2/dbtest/ $MYSQLD_DATADIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR2/dbtest/ * --echo # Restart the server --let $innodb_dirs=$EXTERNAL_DIR;$EXTERNAL_DIR2 let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t8a FORCE; ALTER TABLE dbtest.t8b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t8c FORCE, ALGORITHM=COPY; --echo # Check that all the partitioned tables for t8a, t8b, t8c and t8d now exist in default directory --list_files $MYSQLD_DATADIR/dbtest * --echo # Check that EXTERNAL_DIR and EXTERNAL_DIR2 are empty --echo # Listing EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Listing EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * ALTER TABLE dbtest.t8d FORCE, ALGORITHM=COPY; --echo # Check that all the partitioned tables for t8a, t8b, t8c and t8d now exist in default directory --list_files $MYSQLD_DATADIR/dbtest * --echo # Check that EXTERNAL_DIR and EXTERNAL_DIR2 are empty --echo # Listing EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Listing EXTERNAL_DIR2 --list_files $EXTERNAL_DIR2/dbtest/ * --echo # Drop tables DROP TABLE dbtest.t8a; DROP TABLE dbtest.t8b; DROP TABLE dbtest.t8c; DROP TABLE dbtest.t8d; --echo # Clean up for other tests --remove_files_wildcard $EXTERNAL_DIR/dbtest/ * --remove_files_wildcard $EXTERNAL_DIR2/dbtest/ * --echo # 2. Creating partitioned table without data directory clause but moving each partition to different external directories --echo # Partition tables CREATE TABLE `t9a` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); CREATE TABLE `t9b` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); CREATE TABLE `t9c` (a INT, b INT) PARTITION BY RANGE(a) (PARTITION p0 VALUES LESS THAN (10), PARTITION p1 VALUES LESS THAN (20)); --echo # Shutdown server --source include/shutdown_mysqld.inc --echo # Check that the ibd files for all p0 and p1 partitions of t9a, t9b, t9c table exist in the working (dbtest) folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Now move only p1 partitioned tables of t9a, t9b, t9c to EXTERNAL_DIR --copy_files_wildcard $MYSQLD_DATADIR/dbtest/ $EXTERNAL_DIR/dbtest/ t9a#p#p1.ibd --remove_files_wildcard $MYSQLD_DATADIR/dbtest/ t9a#p#p1.ibd --copy_files_wildcard $MYSQLD_DATADIR/dbtest/ $EXTERNAL_DIR/dbtest/ t9b#p#p1.ibd --remove_files_wildcard $MYSQLD_DATADIR/dbtest/ t9b#p#p1.ibd --copy_files_wildcard $MYSQLD_DATADIR/dbtest/ $EXTERNAL_DIR/dbtest/ t9c#p#p1.ibd --remove_files_wildcard $MYSQLD_DATADIR/dbtest/ t9c#p#p1.ibd --echo # Check that the ibd files for all p0 of t9a, t9b, t9c table exist in the working (dbtest) folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Check that the ibd files for all p1 of t9a, t9b, t9c table exist in EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Restart the server --let $innodb_dirs=$EXTERNAL_DIR let restart_parameters = restart: --innodb-directories=$innodb_dirs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --source include/start_mysqld.inc --echo # Alter table ALTER TABLE dbtest.t9a FORCE; ALTER TABLE dbtest.t9b FORCE, ALGORITHM=INPLACE; ALTER TABLE dbtest.t9c FORCE, ALGORITHM=COPY; --echo # Check that the ibd files for all p0 of t9a, t9b, t9c table still exist in the working (dbtest) folder --list_files $MYSQLD_DATADIR/dbtest * --echo # Check that the ibd files for all p1 of t9a, t9b, t9c table still exist in EXTERNAL_DIR --list_files $EXTERNAL_DIR/dbtest/ * --echo # Drop tables and database DROP TABLE dbtest.t9a; DROP TABLE dbtest.t9b; DROP TABLE dbtest.t9c; DROP DATABASE dbtest; --let restart_parameters="restart: " --source include/restart_mysqld.inc --rmdir $INNODB_DIRECTORIES/dbtest --rmdir $INNODB_DIRECTORIES --rmdir $EXTERNAL_DIR/dbtest --rmdir $EXTERNAL_DIR --rmdir $EXTERNAL_DIR2/dbtest --rmdir $EXTERNAL_DIR2 --echo # End Test