32 lines
923 B
Plaintext
32 lines
923 B
Plaintext
--source suite/innodb/include/ibd2sdi_replace_pattern.inc
|
|
--echo # Import an .ibd from 5.7
|
|
--copy_file $MYSQLTEST_VARDIR/std_data/57import.zip $MYSQL_TMP_DIR/57import.zip
|
|
|
|
# Check that the file exists in the working folder.
|
|
--file_exists $MYSQL_TMP_DIR/57import.zip
|
|
|
|
# Unzip the zip file.
|
|
--exec unzip -qo $MYSQL_TMP_DIR/57import.zip -d $MYSQL_TMP_DIR
|
|
|
|
--let $MYSQLD_DATADIR = `SELECT @@datadir`
|
|
create table t1 (a INT, b INT, c BLOB, PRIMARY KEY (a,b), d TEXT) CHARSET=latin1;
|
|
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
|
|
--echo # copy 5.7 .ibd and .cfg
|
|
--copy_files_wildcard $MYSQL_TMP_DIR/57import/ $MYSQLD_DATADIR/test/ *
|
|
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
|
|
SELECT * FROM t1;
|
|
|
|
--source include/shutdown_mysqld.inc
|
|
--replace_regex $ibd2sdi_pattern
|
|
--exec $IBD2SDI $MYSQLD_DATADIR/test/t1.ibd 2>&1
|
|
|
|
--source include/start_mysqld.inc
|
|
|
|
DROP TABLE t1;
|
|
--force-rmdir $MYSQL_TMP_DIR/57import
|
|
--remove_file $MYSQL_TMP_DIR/57import.zip
|