mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Make 'move_file' command more reliable in 3 innodb tests
The tests innodb.import_tablespace_race, innodn.restart, and innodb.innodb-wl5522 move the tablespace file between the data directory and the tmp directory specified by global environment variables. However this is risky because it's not unusual that the set tmp directory (often under /tmp) is mounted on another disk partition or device, and 'move_file' command may fail with "Errcode: 18 'Invalid cross-device link.'" For innodb.import_tablespace_race and innodb.innodb-wl5522, moving files across directories is not necessary. Modify the tests so they rename files under the same directory. For innodb.restart, instead of moving between datadir and MYSQL_TMPDIR, move the files under MYSQLTEST_VARDIR. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
This commit is contained in:
committed by
Sergei Golubchik
parent
da73db2382
commit
0cc1694e9c
@@ -63,16 +63,24 @@ a b c
|
||||
# Done restarting server
|
||||
# List before t1 DISCARD
|
||||
db.opt
|
||||
t1.cfg.sav
|
||||
t1.frm
|
||||
t1.ibd
|
||||
t1.ibd.sav
|
||||
t2.cfg.sav
|
||||
t2.frm
|
||||
t2.ibd
|
||||
t2.ibd.sav
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
# List after t1 DISCARD
|
||||
db.opt
|
||||
t1.cfg.sav
|
||||
t1.frm
|
||||
t1.ibd.sav
|
||||
t2.cfg.sav
|
||||
t2.frm
|
||||
t2.ibd
|
||||
t2.ibd.sav
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
ALTER TABLE t1 ENGINE InnoDB;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
@@ -90,10 +98,14 @@ a b c
|
||||
638 Cavalry ..asdasdfaeraf
|
||||
db.opt
|
||||
t1.cfg
|
||||
t1.cfg.sav
|
||||
t1.frm
|
||||
t1.ibd
|
||||
t1.ibd.sav
|
||||
t2.cfg.sav
|
||||
t2.frm
|
||||
t2.ibd
|
||||
t2.ibd.sav
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
640
|
||||
@@ -112,7 +124,9 @@ ALTER TABLE t2 ROW_FORMAT=DYNAMIC;
|
||||
ALTER TABLE t2 DISCARD TABLESPACE;
|
||||
# List after t2 DISCARD
|
||||
db.opt
|
||||
t2.cfg.sav
|
||||
t2.frm
|
||||
t2.ibd.sav
|
||||
ALTER TABLE t2 IMPORT TABLESPACE;
|
||||
ERROR HY000: Schema mismatch (Table flags don't match, server table has 0x21 and the meta-data file has 0x1; .cfg file uses ROW_FORMAT=COMPACT)
|
||||
ALTER TABLE t2 IMPORT TABLESPACE;
|
||||
|
Reference in New Issue
Block a user