| 1 |
--source suite/innodb/include/ibd2sdi_replace_pattern.inc |
| 2 |
--echo # Import an .ibd from 5.7 |
| 3 |
--copy_file $MYSQLTEST_VARDIR/std_data/57import.zip $MYSQL_TMP_DIR/57import.zip |
| 4 |
|
| 5 |
# Check that the file exists in the working folder. |
| 6 |
--file_exists $MYSQL_TMP_DIR/57import.zip |
| 7 |
|
| 8 |
# Unzip the zip file. |
| 9 |
--exec unzip -qo $MYSQL_TMP_DIR/57import.zip -d $MYSQL_TMP_DIR |
| 10 |
|
| 11 |
--let $MYSQLD_DATADIR = `SELECT @@datadir` |
| 12 |
create table t1 (a INT, b INT, c BLOB, PRIMARY KEY (a,b), d TEXT) CHARSET=latin1; |
| 13 |
|
| 14 |
ALTER TABLE t1 DISCARD TABLESPACE; |
| 15 |
|
| 16 |
--echo # copy 5.7 .ibd and .cfg |
| 17 |
--copy_files_wildcard $MYSQL_TMP_DIR/57import/ $MYSQLD_DATADIR/test/ * |
| 18 |
|
| 19 |
ALTER TABLE t1 IMPORT TABLESPACE; |
| 20 |
|
| 21 |
SELECT * FROM t1; |
| 22 |
|
| 23 |
--source include/shutdown_mysqld.inc |
| 24 |
--replace_regex $ibd2sdi_pattern |
| 25 |
--exec $IBD2SDI $MYSQLD_DATADIR/test/t1.ibd 2>&1 |
| 26 |
|
| 27 |
--source include/start_mysqld.inc |
| 28 |
|
| 29 |
DROP TABLE t1; |
| 30 |
--force-rmdir $MYSQL_TMP_DIR/57import |
| 31 |
--remove_file $MYSQL_TMP_DIR/57import.zip |