mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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:
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
@ -200,6 +200,7 @@ my @DEFAULT_SUITES= qw(
|
||||
json-
|
||||
maria-
|
||||
mariabackup-
|
||||
merge-
|
||||
multi_source-
|
||||
optimizer_unfixed_bugs-
|
||||
parts-
|
||||
|
22
mysql-test/suite/merge/alter_table.result
Normal file
22
mysql-test/suite/merge/alter_table.result
Normal file
@ -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;
|
12
mysql-test/suite/merge/alter_table.test
Normal file
12
mysql-test/suite/merge/alter_table.test
Normal file
@ -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;
|
Reference in New Issue
Block a user