From ec820a380e081493e2b6fb191237a2f1c949fb4d Mon Sep 17 00:00:00 2001 From: Monty Date: Mon, 27 Mar 2023 17:57:19 +0300 Subject: [PATCH] Moved merge tests from main to suite/merge This makes it easier to run test on just the MRG_MYISAM engine. Other things: - Renamed merge-big.test to flush_corruption.test as it does not have anything to do with merge tables. --- mysql-test/main/alter_table.result | 22 ------------------- mysql-test/main/alter_table.test | 14 ------------ ...rge-big.result => flush_corruption.result} | 0 .../{merge-big.test => flush_corruption.test} | 2 +- mysql-test/mariadb-test-run.pl | 1 + mysql-test/suite/merge/alter_table.result | 22 +++++++++++++++++++ mysql-test/suite/merge/alter_table.test | 12 ++++++++++ mysql-test/{main => suite/merge}/merge.result | 0 mysql-test/{main => suite/merge}/merge.test | 0 .../{main => suite/merge}/merge_debug.result | 0 .../{main => suite/merge}/merge_debug.test | 0 .../{main => suite/merge}/merge_innodb.result | 0 .../{main => suite/merge}/merge_innodb.test | 0 .../merge}/merge_mmap-master.opt | 0 .../{main => suite/merge}/merge_mmap.result | 0 .../{main => suite/merge}/merge_mmap.test | 0 16 files changed, 36 insertions(+), 37 deletions(-) rename mysql-test/main/{merge-big.result => flush_corruption.result} (100%) rename mysql-test/main/{merge-big.test => flush_corruption.test} (98%) create mode 100644 mysql-test/suite/merge/alter_table.result create mode 100644 mysql-test/suite/merge/alter_table.test rename mysql-test/{main => suite/merge}/merge.result (100%) rename mysql-test/{main => suite/merge}/merge.test (100%) rename mysql-test/{main => suite/merge}/merge_debug.result (100%) rename mysql-test/{main => suite/merge}/merge_debug.test (100%) rename mysql-test/{main => suite/merge}/merge_innodb.result (100%) rename mysql-test/{main => suite/merge}/merge_innodb.test (100%) rename mysql-test/{main => suite/merge}/merge_mmap-master.opt (100%) rename mysql-test/{main => suite/merge}/merge_mmap.result (100%) rename mysql-test/{main => suite/merge}/merge_mmap.test (100%) diff --git a/mysql-test/main/alter_table.result b/mysql-test/main/alter_table.result index 879bc0edfec..1508bb9d34a 100644 --- a/mysql-test/main/alter_table.result +++ b/mysql-test/main/alter_table.result @@ -268,28 +268,6 @@ ERROR 42000: Incorrect table name '' rename table t1 to ``; ERROR 42000: Incorrect table name '' drop table t1; -drop table if exists t1, t2; -Warnings: -Note 1051 Unknown table 'test.t1,test.t2' -create table t1 ( a varchar(10) not null primary key ) engine=myisam; -create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1); -flush tables; -alter table t1 modify a varchar(10); -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` varchar(10) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`) -flush tables; -alter table t1 modify a varchar(10) not null; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `a` varchar(10) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`) -drop table if exists t1, t2; create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM; insert ignore into t1 (a) values(1); Warnings: diff --git a/mysql-test/main/alter_table.test b/mysql-test/main/alter_table.test index 8ddf60f26d8..ebf10008f48 100644 --- a/mysql-test/main/alter_table.test +++ b/mysql-test/main/alter_table.test @@ -244,20 +244,6 @@ alter table t1 rename to ``; rename table t1 to ``; drop table t1; -# -# BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns -# -drop table if exists t1, t2; -create table t1 ( a varchar(10) not null primary key ) engine=myisam; -create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1); -flush tables; -alter table t1 modify a varchar(10); -show create table t2; -flush tables; -alter table t1 modify a varchar(10) not null; -show create table t2; -drop table if exists t1, t2; - # The following is also part of bug #6236 (CREATE TABLE didn't properly count # not null columns for primary keys) diff --git a/mysql-test/main/merge-big.result b/mysql-test/main/flush_corruption.result similarity index 100% rename from mysql-test/main/merge-big.result rename to mysql-test/main/flush_corruption.result diff --git a/mysql-test/main/merge-big.test b/mysql-test/main/flush_corruption.test similarity index 98% rename from mysql-test/main/merge-big.test rename to mysql-test/main/flush_corruption.test index 5873d2eb233..97ef416307f 100644 --- a/mysql-test/main/merge-big.test +++ b/mysql-test/main/flush_corruption.test @@ -1,5 +1,5 @@ # -# Test of MERGE tables with multisession and many waits. +# Test of MyISAM tables with multisession and many waits. # # This test takes rather long time so let us run it only in --big-test mode --source include/big_test.inc diff --git a/mysql-test/mariadb-test-run.pl b/mysql-test/mariadb-test-run.pl index 1c4d2866c85..0c97866bd67 100755 --- a/mysql-test/mariadb-test-run.pl +++ b/mysql-test/mariadb-test-run.pl @@ -200,6 +200,7 @@ my @DEFAULT_SUITES= qw( json- maria- mariabackup- + merge- multi_source- optimizer_unfixed_bugs- parts- diff --git a/mysql-test/suite/merge/alter_table.result b/mysql-test/suite/merge/alter_table.result new file mode 100644 index 00000000000..5adf610e5c0 --- /dev/null +++ b/mysql-test/suite/merge/alter_table.result @@ -0,0 +1,22 @@ +# +# BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns +# +create table t1 ( a varchar(10) not null primary key ) engine=myisam; +create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1); +flush tables; +alter table t1 modify a varchar(10); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` varchar(10) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`) +flush tables; +alter table t1 modify a varchar(10) not null; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` varchar(10) NOT NULL, + PRIMARY KEY (`a`) +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci UNION=(`t1`) +drop table if exists t1, t2; diff --git a/mysql-test/suite/merge/alter_table.test b/mysql-test/suite/merge/alter_table.test new file mode 100644 index 00000000000..da56772bf60 --- /dev/null +++ b/mysql-test/suite/merge/alter_table.test @@ -0,0 +1,12 @@ +--echo # +--echo # BUG#6236 - ALTER TABLE MODIFY should set implicit NOT NULL on PK columns +--echo # +create table t1 ( a varchar(10) not null primary key ) engine=myisam; +create table t2 ( a varchar(10) not null primary key ) engine=merge union=(t1); +flush tables; +alter table t1 modify a varchar(10); +show create table t2; +flush tables; +alter table t1 modify a varchar(10) not null; +show create table t2; +drop table if exists t1, t2; diff --git a/mysql-test/main/merge.result b/mysql-test/suite/merge/merge.result similarity index 100% rename from mysql-test/main/merge.result rename to mysql-test/suite/merge/merge.result diff --git a/mysql-test/main/merge.test b/mysql-test/suite/merge/merge.test similarity index 100% rename from mysql-test/main/merge.test rename to mysql-test/suite/merge/merge.test diff --git a/mysql-test/main/merge_debug.result b/mysql-test/suite/merge/merge_debug.result similarity index 100% rename from mysql-test/main/merge_debug.result rename to mysql-test/suite/merge/merge_debug.result diff --git a/mysql-test/main/merge_debug.test b/mysql-test/suite/merge/merge_debug.test similarity index 100% rename from mysql-test/main/merge_debug.test rename to mysql-test/suite/merge/merge_debug.test diff --git a/mysql-test/main/merge_innodb.result b/mysql-test/suite/merge/merge_innodb.result similarity index 100% rename from mysql-test/main/merge_innodb.result rename to mysql-test/suite/merge/merge_innodb.result diff --git a/mysql-test/main/merge_innodb.test b/mysql-test/suite/merge/merge_innodb.test similarity index 100% rename from mysql-test/main/merge_innodb.test rename to mysql-test/suite/merge/merge_innodb.test diff --git a/mysql-test/main/merge_mmap-master.opt b/mysql-test/suite/merge/merge_mmap-master.opt similarity index 100% rename from mysql-test/main/merge_mmap-master.opt rename to mysql-test/suite/merge/merge_mmap-master.opt diff --git a/mysql-test/main/merge_mmap.result b/mysql-test/suite/merge/merge_mmap.result similarity index 100% rename from mysql-test/main/merge_mmap.result rename to mysql-test/suite/merge/merge_mmap.result diff --git a/mysql-test/main/merge_mmap.test b/mysql-test/suite/merge/merge_mmap.test similarity index 100% rename from mysql-test/main/merge_mmap.test rename to mysql-test/suite/merge/merge_mmap.test