1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-03 05:41:09 +03:00

Updated mtr files to support different compiled in options

This allows one to run the test suite even if any of the following
options are changed:
- character-set-server
- collation-server
- join-cache-level
- log-basename
- max-allowed-packet
- optimizer-switch
- query-cache-size and query-cache-type
- skip-name-resolve
- table-definition-cache
- table-open-cache
- Some innodb options
etc

Changes:
- Don't print out the value of system variables as one can't depend on
  them to being constants.
- Don't set global variables to 'default' as the default may not
  be the same as the test was started with if there was an additional
  option file. Instead save original value and reset it at end of test.
- Test that depends on the latin1 character set should include
  default_charset.inc or set the character set to latin1
- Test that depends on the original optimizer switch, should include
  default_optimizer_switch.inc
- Test that depends on the value of a specific system variable should
  set it in the test (like optimizer_use_condition_selectivity)
- Split subselect3.test into subselect3.test and subselect3.inc to
  make it easier to set and reset system variables.
- Added .opt files for test that required specfic options that could
  be changed by external configuration files.
- Fixed result files in rockdsb & tokudb that had not been updated for
  a while.
This commit is contained in:
Monty
2019-08-30 16:06:54 +03:00
parent b23b3a5fb6
commit 9cba6c5aa3
659 changed files with 11181 additions and 13214 deletions

View File

@@ -77,6 +77,7 @@ FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm
@@ -144,6 +145,7 @@ FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm
@@ -210,6 +212,7 @@ FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm

View File

@@ -51,6 +51,7 @@ SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# Files in datadir after manual recovery.
db.opt
t1.frm
t1.ibd
SHOW TABLES;
@@ -108,6 +109,7 @@ DROP TABLE t2;
CREATE TABLE t2 (f1 INT NOT NULL, f2 INT NOT NULL) ENGINE=InnoDB;
ALTER TABLE t2 ADD PRIMARY KEY (f2, f1);
DROP TABLE t2;
db.opt
# -------------------------
# End of Testing Scenario 2
# -------------------------
@@ -126,6 +128,7 @@ SELECT * FROM information_schema.innodb_sys_tables
WHERE table_id = ID;
TABLE_ID NAME FLAG N_COLS SPACE FILE_FORMAT ROW_FORMAT ZIP_PAGE_SIZE SPACE_TYPE
# Files in datadir after manual recovery.
db.opt
t1.frm
t1.ibd
SHOW TABLES;

View File

@@ -5,6 +5,7 @@ CREATE TABLE t1 (x INT) ENGINE=INNODB, DATA DIRECTORY='MYSQL_TMP_DIR';
# Contents of tmp/test directory containing .ibd file
t1.ibd
# Contents of the 'test' database directory containing .isl and .frm files
db.opt
t1.frm
t1.isl
DROP TABLE t1;

View File

@@ -176,7 +176,7 @@ SET FOREIGN_KEY_CHECKS=1;
# MDEV-17531 Crash in RENAME TABLE with FOREIGN KEY and FULLTEXT INDEX
#
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
CREATE DATABASE best;
CREATE DATABASE best default character set latin1;
CREATE TABLE t3 (a INT PRIMARY KEY,
CONSTRAINT t2_ibfk_1 FOREIGN KEY (a) REFERENCES t1(a)) ENGINE=InnoDB;
CREATE TABLE best.t2 (a INT PRIMARY KEY, b TEXT, FULLTEXT INDEX(b),

View File

@@ -937,6 +937,7 @@ DROP TABLE t1, parent;
#BUG#21514135 SCHEMA MISMATCH ERROR WHEN IMPORTING TABLESPACE AFTER
#DROPPING AN INDEX
#
SET NAMES utf8mb4;
CREATE DATABASE source_db;
CREATE DATABASE dest_db;
CREATE TABLE source_db.t1 (

View File

@@ -1 +1,3 @@
1
show create database test;
Database Create Database
test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */

View File

@@ -31,12 +31,14 @@ a b c
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
CREATE TABLE t2(a INT PRIMARY KEY) ENGINE=InnoDB ROW_FORMAT=COMPACT;
db.opt
t1.frm
t1.ibd
t2.frm
t2.ibd
FLUSH TABLE t1, t2 FOR EXPORT;
# List before copying files
db.opt
t1.cfg
t1.frm
t1.ibd
@@ -61,12 +63,14 @@ a b c
# Restarting server
# Done restarting server
# List before t1 DISCARD
db.opt
t1.frm
t1.ibd
t2.frm
t2.ibd
ALTER TABLE t1 DISCARD TABLESPACE;
# List after t1 DISCARD
db.opt
t1.frm
t2.frm
t2.ibd
@@ -85,6 +89,7 @@ a b c
823 Evolution lsjndofiabsoibeg
822 Devotion asdfuihknaskdf
821 Cavalry ..asdasdfaeraf
db.opt
t1.cfg
t1.frm
t1.ibd
@@ -107,6 +112,7 @@ DROP TABLE t1;
ALTER TABLE t2 ROW_FORMAT=DYNAMIC;
ALTER TABLE t2 DISCARD TABLESPACE;
# List after t2 DISCARD
db.opt
t2.frm
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)
@@ -135,6 +141,7 @@ INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
db.opt
t1.frm
t1.ibd
FLUSH TABLES t1 FOR EXPORT;
@@ -142,6 +149,7 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
16
backup: t1
db.opt
t1.cfg
t1.frm
t1.ibd
@@ -154,6 +162,7 @@ ALTER TABLE t1 DISCARD TABLESPACE;
SELECT * FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
db.opt
t1.cfg
t1.frm
t1.ibd
@@ -173,6 +182,7 @@ INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
INSERT INTO t1(c2) SELECT c2 FROM t1;
db.opt
t1.frm
t1.ibd
FLUSH TABLES t1 FOR EXPORT;
@@ -180,10 +190,12 @@ SELECT COUNT(*) FROM t1;
COUNT(*)
16
backup: t1
db.opt
t1.cfg
t1.frm
t1.ibd
UNLOCK TABLES;
db.opt
t1.frm
t1.ibd
INSERT INTO t1(c2) SELECT c2 FROM t1;
@@ -196,6 +208,7 @@ ALTER TABLE t1 DISCARD TABLESPACE;
SELECT * FROM t1;
ERROR HY000: Tablespace has been discarded for table `t1`
restore: t1 .ibd and .cfg files
db.opt
t1.cfg
t1.frm
t1.ibd
@@ -220,6 +233,7 @@ SELECT COUNT(*) FROM t1 WHERE c2 = 1;
COUNT(*)
16
backup: t1
db.opt
t1.cfg
t1.frm
t1.ibd

View File

@@ -64,6 +64,7 @@ t1 CREATE TABLE `t1` (
KEY `c2` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -99,6 +100,7 @@ test/t1c3 c3 c2 0
ALTER TABLE t1 CHANGE c2 c2 INT AFTER c1;
ALTER TABLE t1 CHANGE c1 c1 INT FIRST;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -133,6 +135,7 @@ test/t1c2 c2 c2 0
test/t1c3 c3 c2 0
ALTER TABLE t1 CHANGE C2 c3 INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -167,6 +170,7 @@ test/t1c2 c2 c3 0
test/t1c3 c3 c2 0
ALTER TABLE t1 CHANGE c3 C INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -201,6 +205,7 @@ test/t1c2 c2 C 0
test/t1c3 c3 c2 0
ALTER TABLE t1 CHANGE C Cöŀumň_TWO INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -242,6 +247,7 @@ ALTER TABLE t1 CHANGE cöĿǖmň_two c3 INT;
ERROR 42S22: Unknown column 'cöĿǖmň_two' in 't1'
ALTER TABLE t1 CHANGE cÖĿUMŇ_two c3 INT, RENAME TO t3;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -289,6 +295,7 @@ ERROR 42000: Identifier name '12345678901234567890123456789012345678901234567890
ALTER TABLE t3 CHANGE c3
`1234567890123456789012345678901234567890123456789012345678901234` INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -325,6 +332,7 @@ ALTER TABLE t3 CHANGE
`1234567890123456789012345678901234567890123456789012345678901234`
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾ä` INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -344,6 +352,7 @@ ALTER TABLE t3 CHANGE
`倀倁倂倃倄倅倆倇倈倉倊個倌倍倎倏倐們倒倓倔倕倖倗倘候倚倛倜倝倞借倠倡倢倣値倥倦倧倨倩倪倫倬倭倮倯倰倱倲倳倴倵倶倷倸倹债倻值倽倾Ä`
c3 INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -365,6 +374,7 @@ ALTER TABLE t3 CHANGE c3 😲 INT;
ERROR HY000: Invalid utf8mb4 character string: '\xF0\x9F\x98\xB2'
ALTER TABLE t3 RENAME TO t2;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -401,6 +411,7 @@ ON i.TABLE_ID=st.TABLE_ID;
NAME NAME
test/t1 test/t1
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -475,6 +486,7 @@ t1c CREATE TABLE `t1c` (
CONSTRAINT `t1c3` FOREIGN KEY (`c3`) REFERENCES `t1p` (`c2`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -514,6 +526,7 @@ ERROR HY000: Cannot drop index 'c3': needed in a foreign key constraint
SET foreign_key_checks=0;
ALTER TABLE t1c DROP INDEX C3;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -561,6 +574,7 @@ test/t1c2 c2 c3 0
test/t1c3 c3 c2 0
ALTER TABLE t1c DROP FOREIGN KEY t1C3;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -605,6 +619,7 @@ ID FOR_COL_NAME REF_COL_NAME POS
test/t1c2 c2 c3 0
ALTER TABLE t1c DROP INDEX c2, DROP FOREIGN KEY t1C2;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -646,6 +661,7 @@ INNER JOIN sys_foreign sf ON i.ID = sf.ID;
ID FOR_COL_NAME REF_COL_NAME POS
ALTER TABLE t1 DROP INDEX c2, CHANGE c3 c2 INT;
### files in MYSQL_DATA_DIR/test
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -698,6 +714,7 @@ FTS_AUX_BEING_DELETED_CACHE.isl
FTS_AUX_CONFIG.isl
FTS_AUX_DELETED.isl
FTS_AUX_DELETED_CACHE.isl
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -794,6 +811,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -855,6 +873,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -910,6 +929,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -966,6 +986,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1031,6 +1052,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1099,6 +1121,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1164,6 +1187,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1221,6 +1245,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1276,6 +1301,7 @@ FTS_AUX_BEING_DELETED_CACHE.isl
FTS_AUX_CONFIG.isl
FTS_AUX_DELETED.isl
FTS_AUX_DELETED_CACHE.isl
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1331,6 +1357,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1392,6 +1419,7 @@ FTS_AUX_BEING_DELETED_CACHE.isl
FTS_AUX_CONFIG.isl
FTS_AUX_DELETED.isl
FTS_AUX_DELETED_CACHE.isl
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1463,6 +1491,7 @@ FTS_AUX_BEING_DELETED_CACHE.isl
FTS_AUX_CONFIG.isl
FTS_AUX_DELETED.isl
FTS_AUX_DELETED_CACHE.isl
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1511,6 +1540,7 @@ FTS_AUX_BEING_DELETED_CACHE.ibd
FTS_AUX_CONFIG.ibd
FTS_AUX_DELETED.ibd
FTS_AUX_DELETED_CACHE.ibd
db.opt
sys_foreign.frm
sys_foreign.ibd
sys_indexes.frm
@@ -1560,4 +1590,5 @@ ID FOR_COL_NAME REF_COL_NAME POS
#
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

View File

@@ -98,5 +98,6 @@ FOUND 1 /InnoDB: At LSN: \d+: unable to open file .*u[1-5].ibd for tablespace.*/
FOUND 1 /\[Warning\] InnoDB: Tablespace \d+ was not found at .*u[1-5].ibd, and innodb_force_recovery was set. All redo log for this tablespace will be ignored!.*/ in mysqld.1.err
DROP TABLE u1,u2,u3,u6;
# List of files:
db.opt
SHOW TABLES;
Tables_in_test

View File

@@ -77,3 +77,4 @@ ib_buffer_pool
ib_logfile0
ib_logfile1
ibdata1
db.opt