diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-16 08:53:00 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-12-16 08:58:01 +0200 |
commit | 89633995e4962a7ad4a241cdf62ee637990d6787 (patch) | |
tree | 86f2184dc7b35cc0822da8f30733f663f0cb3a1f | |
parent | 28c89b7151bc3ebd7a3459e85f4c9b5e73529629 (diff) | |
download | mariadb-git-89633995e4962a7ad4a241cdf62ee637990d6787.tar.gz |
MDEV-16678: Actually ignore #sql-ib tables
Apparently, regular expression operations that remove entire lines
of output do not work with list_files, and hence the adjustments in
commit 1c282d4bc48326f8b5407d372a7053c940b67252 were ineffective.
For cat_file (preceded by list_files_write_file) the replace_regex
does work.
For some reason, for suite/parts/inc/partition_crash_exchange.inc
some file names will be lost when using list_files_write_file
instead of list_files.
We use a precise pattern match. dict_mem_create_temporary_tablename()
is generating #sql-ib names followed by decimal digits only.
-rw-r--r-- | mysql-test/include/check-testcase.test | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/r/innodb-wl5980-alter.result | 2 | ||||
-rw-r--r-- | mysql-test/suite/innodb/t/innodb-wl5980-alter.test | 256 | ||||
-rw-r--r-- | mysql-test/suite/parts/inc/partition_crash.inc | 18 | ||||
-rw-r--r-- | mysql-test/suite/parts/r/partition_debug.result | 44 | ||||
-rw-r--r-- | mysql-test/suite/parts/r/partition_debug_innodb.result | 28 |
6 files changed, 209 insertions, 141 deletions
diff --git a/mysql-test/include/check-testcase.test b/mysql-test/include/check-testcase.test index 191feae1628..514c28b0e00 100644 --- a/mysql-test/include/check-testcase.test +++ b/mysql-test/include/check-testcase.test @@ -98,7 +98,7 @@ call mtr.check_testcase(); let $datadir=`select @@datadir`; list_files $datadir mysql_upgrade_info; list_files_write_file $datadir.tempfiles.txt $datadir/test #sql*; ---replace_regex /#sql-ib[0-9a-f]+\.ibd\n// +--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n// cat_file $datadir.tempfiles.txt; remove_file $datadir.tempfiles.txt; list_files $datadir/mysql #sql*; diff --git a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result index 0855d6b5148..6142d419bb6 100644 --- a/mysql-test/suite/innodb/r/innodb-wl5980-alter.result +++ b/mysql-test/suite/innodb/r/innodb-wl5980-alter.result @@ -2,6 +2,7 @@ # This is a copy of innodb-alter.test except using remote tablespaces # and showing those files. # +SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table; SET default_storage_engine=InnoDB; SET GLOBAL innodb_file_per_table=ON; SET NAMES utf8mb4; @@ -1588,3 +1589,4 @@ DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign; ### files in MYSQL_DATA_DIR/test db.opt ### files in MYSQL_TMP_DIR/alt_dir/test +SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; diff --git a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test index 84511ea5897..1a32b94c140 100644 --- a/mysql-test/suite/innodb/t/innodb-wl5980-alter.test +++ b/mysql-test/suite/innodb/t/innodb-wl5980-alter.test @@ -5,15 +5,12 @@ --source include/have_innodb.inc ---disable_query_log -# These values can change during the test -LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/ /#sql-ib[0-9a-f]+\.ibd\n//; +SET @innodb_file_per_table_orig=@@GLOBAL.innodb_file_per_table; +LET $regexp=/FTS_[0-9a-f_]+([A-Z0-9_]+)\.([islbd]{3})/FTS_AUX_\1.\2/ /#sql-ib[1-9][0-9]*\.ibd\n//; # Set up some variables LET $MYSQL_DATA_DIR = `select @@datadir`; LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir'; ---enable_query_log SET default_storage_engine=InnoDB; SET GLOBAL innodb_file_per_table=ON; @@ -57,11 +54,15 @@ ALTER TABLE t1 ALTER c2 DROP DEFAULT; SHOW CREATE TABLE t1; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc @@ -70,44 +71,60 @@ ALTER TABLE t1 CHANGE c2 c2 INT AFTER c1; ALTER TABLE t1 CHANGE c1 c1 INT FIRST; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc ALTER TABLE t1 CHANGE C2 c3 INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc ALTER TABLE t1 CHANGE c3 C INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc ALTER TABLE t1 CHANGE C Cöŀumň_TWO INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt SELECT i.* FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS i INNER JOIN sys_foreign sf ON i.ID = sf.ID; @@ -120,11 +137,15 @@ ALTER TABLE t1 CHANGE cöĿǖmň_two c3 INT; ALTER TABLE t1 CHANGE cÖĿUMŇ_two c3 INT, RENAME TO t3; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt SELECT st.NAME, i.NAME FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i @@ -143,11 +164,15 @@ ALTER TABLE t3 CHANGE c3 `1234567890123456789012345678901234567890123456789012345678901234` INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t3; @@ -168,11 +193,15 @@ ALTER TABLE t3 CHANGE `倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾ä` INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt # check that the rename is case-insensitive (note the upper-case ä at end) ALTER TABLE t3 CHANGE @@ -180,11 +209,15 @@ ALTER TABLE t3 CHANGE c3 INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt # test with 4-byte UTF-8 (should be disallowed) --error ER_INVALID_CHARACTER_STRING @@ -196,11 +229,15 @@ ALTER TABLE t3 CHANGE c3 😲 INT; ALTER TABLE t3 RENAME TO t2; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt SELECT st.NAME, i.NAME FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i @@ -216,11 +253,15 @@ FROM sys_tables st INNER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLES i ON i.TABLE_ID=st.TABLE_ID; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc @@ -256,11 +297,15 @@ SET foreign_key_checks=1; SHOW CREATE TABLE t1c; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc @@ -277,11 +322,15 @@ SET foreign_key_checks=0; ALTER TABLE t1c DROP INDEX C3; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt SET foreign_key_checks=1; @@ -293,11 +342,15 @@ SHOW CREATE TABLE t1c; ALTER TABLE t1c DROP FOREIGN KEY t1C3; --echo ### files in MYSQL_DATA_DIR/test ---list_files $MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1c; @@ -306,11 +359,15 @@ SHOW CREATE TABLE t1c; ALTER TABLE t1c DROP INDEX c2, DROP FOREIGN KEY t1C2; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1c; @@ -320,11 +377,15 @@ SHOW CREATE TABLE t1c; ALTER TABLE t1 DROP INDEX c2, CHANGE c3 c2 INT; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt -- source suite/innodb/include/innodb_dict.inc @@ -343,11 +404,15 @@ CHANGE c1 pk INT, ALTER c2 SET DEFAULT 42, RENAME TO tt, ALGORITHM=INPLACE, LOCK=SHARED; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt # The output should be empty, because index->id was reassigned. -- source suite/innodb/include/innodb_dict.inc @@ -387,11 +452,15 @@ CREATE TABLE t1n LIKE t1o; ALTER TABLE t1n ADD FULLTEXT INDEX(ct); --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --error ER_WRONG_COLUMN_NAME ALTER TABLE t1n CHANGE c1 Fts_DOC_ID INT, ALGORITHM=INPLACE; @@ -402,30 +471,42 @@ ALTER TABLE t1n CHANGE FTS_DOC_ID c11 INT, ALGORITHM=INPLACE; ALTER TABLE t1n CHANGE c1 FTS_DOC_ïD INT, ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt ALTER TABLE t1n CHANGE FTS_DOC_ÏD c1 INT, ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt ALTER TABLE t1n CHANGE c1 c2 INT, CHANGE c2 ct INT, CHANGE ct c1 TEXT, ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1n; @@ -433,11 +514,15 @@ ALTER TABLE t1n CHANGE c2 c1 INT, CHANGE ct c2 INT, CHANGE c1 ct TEXT, ALGORITHM=COPY; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1n; @@ -450,33 +535,45 @@ ALTER TABLE t1n ADD INDEX(c2), CHANGE c2 c4 INT, ALGORITHM=COPY; ALTER TABLE t1n ADD INDEX(c4), CHANGE c2 c4 INT, ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1n; ALTER TABLE t1n DROP INDEX c4; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --error ER_DUP_FIELDNAME ALTER TABLE t1n CHANGE c4 c1 INT, ADD INDEX(c1), ALGORITHM=INPLACE; ALTER TABLE t1n CHANGE c4 c11 INT, ADD INDEX(c11), ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1n; @@ -485,22 +582,30 @@ DROP TABLE t1n; ALTER TABLE t1o MODIFY c1 BIGINT UNSIGNED NOT NULL; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt ALTER TABLE t1o ADD FULLTEXT INDEX(ct), CHANGE c1 FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ALGORITHM=INPLACE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt # This would create a hidden FTS_DOC_ID column, which cannot be done online. --error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON @@ -520,11 +625,15 @@ ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL, DROP INDEX ct, LOCK=NONE; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR SHOW CREATE TABLE t1o; @@ -547,21 +656,29 @@ FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN i WHERE FOR_NAME='test/t1o'; ALTER TABLE t1o ADD UNIQUE INDEX FTS_DOC_ID_INDEX(foo_id); --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt ALTER TABLE t1o CHANGE foo_id FTS_DOC_ID BIGINT UNSIGNED NOT NULL, ADD FULLTEXT INDEX(ct); --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp ---list_files $MYSQL_TMP_DIR/alt_dir/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --error ER_INNODB_FT_WRONG_DOCID_INDEX ALTER TABLE t1o CHANGE FTS_DOC_ID foo_id BIGINT UNSIGNED NOT NULL; @@ -579,15 +696,14 @@ INNER JOIN sys_tables st ON i.TABLE_ID=st.TABLE_ID; DROP TABLE tt, t1o, sys_tables, sys_indexes, sys_foreign; --echo ### files in MYSQL_DATA_DIR/test +--list_files_write_file $MYSQL_DATA_DIR.files.txt $MYSQL_DATA_DIR/test --replace_regex $regexp ---list_files $MYSQL_DATA_DIR/test +--cat_file $MYSQL_DATA_DIR.files.txt +--remove_file $MYSQL_DATA_DIR.files.txt --echo ### files in MYSQL_TMP_DIR/alt_dir/test --replace_regex $regexp --list_files $MYSQL_TMP_DIR/alt_dir/test --rmdir $MYSQL_TMP_DIR/alt_dir/test --rmdir $MYSQL_TMP_DIR/alt_dir --- disable_query_log -eval set global innodb_file_per_table=$innodb_file_per_table_orig; -call mtr.add_suppression("deleting orphaned .ibd file"); --- enable_query_log +SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; diff --git a/mysql-test/suite/parts/inc/partition_crash.inc b/mysql-test/suite/parts/inc/partition_crash.inc index f38ba008951..98229544621 100644 --- a/mysql-test/suite/parts/inc/partition_crash.inc +++ b/mysql-test/suite/parts/inc/partition_crash.inc @@ -3,8 +3,12 @@ --eval $create_statement --eval $insert_statement --echo # State before crash + +--list_files_write_file $DATADIR.files.txt $DATADIR/test --replace_result #p# #P# #sp# #SP# ---list_files $DATADIR/test +--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n// +--cat_file $DATADIR.files.txt +--remove_file $DATADIR.files.txt SHOW CREATE TABLE t1; --sorted_result SELECT * FROM t1; @@ -14,14 +18,20 @@ SELECT * FROM t1; --error 2013 --eval $crash_statement --echo # State after crash (before recovery) ---replace_regex /sqlx.*\./sqlx-nnnn_nnnn./ /#p#/#P#/ /#sp#/#SP#/ /#tmp#/#TMP#/ /#sql-ib[0-9a-f]+\.ibd\n// ---list_files $DATADIR/test +--list_files_write_file $DATADIR.files.txt $DATADIR/test +--replace_result #p# #P# #sp# #SP# #tmp# #TMP# +--replace_regex /sqlx.*\./sqlx-nnnn_nnnn./ /#sql-ib[1-9][0-9]*\.ibd\n// +--cat_file $DATADIR.files.txt +--remove_file $DATADIR.files.txt --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc --echo # State after crash recovery +--list_files_write_file $DATADIR.files.txt $DATADIR/test --replace_result #p# #P# #sp# #SP# ---list_files $DATADIR/test +--replace_regex /#sql-ib[1-9][0-9]*\.ibd\n// +--cat_file $DATADIR.files.txt +--remove_file $DATADIR.files.txt SHOW CREATE TABLE t1; --sorted_result SELECT * FROM t1; diff --git a/mysql-test/suite/parts/r/partition_debug.result b/mysql-test/suite/parts/r/partition_debug.result index 7460fe8dd74..04ad9e9354a 100644 --- a/mysql-test/suite/parts/r/partition_debug.result +++ b/mysql-test/suite/parts/r/partition_debug.result @@ -422,16 +422,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.MYD -#sqlx-nnnn_nnnn.MYI -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p1.MYD -t1#P#p1.MYI -t1.frm -t1.par -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.MYD @@ -537,16 +528,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.MYD -#sqlx-nnnn_nnnn.MYI -db.opt -t1#P#p0.MYD -t1#P#p0.MYI -t1#P#p1.MYD -t1#P#p1.MYI -t1.frm -t1.par -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.MYD @@ -652,16 +634,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.MYD -#sqlx-nnnn_nnnn.MYI -db.opt -t1#P#p1.MYD -t1#P#p1.MYI -t1.frm -t1.par -t2.MYD -t2.MYI -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.MYD @@ -767,16 +740,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.MYD -#sqlx-nnnn_nnnn.MYI -db.opt -t1#P#p1.MYD -t1#P#p1.MYI -t1.frm -t1.par -t2.MYD -t2.MYI -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.MYD diff --git a/mysql-test/suite/parts/r/partition_debug_innodb.result b/mysql-test/suite/parts/r/partition_debug_innodb.result index 8bae87ee877..0a7efba416a 100644 --- a/mysql-test/suite/parts/r/partition_debug_innodb.result +++ b/mysql-test/suite/parts/r/partition_debug_innodb.result @@ -6406,13 +6406,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.ibd -db.opt -t1#P#p0.ibd -t1#P#p1.ibd -t1.frm -t1.par -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.ibd @@ -6514,13 +6508,7 @@ a b ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) -#sqlx-nnnn_nnnn.ibd -db.opt -t1#P#p0.ibd -t1#P#p1.ibd -t1.frm -t1.par -t2.frm +#sqlx-nnnn_nnnn.frm # State after crash recovery db.opt t1#P#p0.ibd @@ -6623,12 +6611,6 @@ ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) #sqlx-nnnn_nnnn.ibd -db.opt -t1#P#p1.ibd -t1.frm -t1.par -t2.frm -t2.ibd # State after crash recovery db.opt t1#P#p0.ibd @@ -6731,12 +6713,6 @@ ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE t2; ERROR HY000: Lost connection to MySQL server during query # State after crash (before recovery) #sqlx-nnnn_nnnn.ibd -db.opt -t1#P#p1.ibd -t1.frm -t1.par -t2.frm -t2.ibd # State after crash recovery db.opt t1#P#p0.ibd |