summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test18
1 files changed, 9 insertions, 9 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index 39c33ef8684..f84e10b0e3c 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -2,7 +2,10 @@
# test of MERGE TABLES
#
+--disable_warnings
drop table if exists t1,t2,t3,t4,t5,t6;
+--enable_warnings
+
create table t1 (a int not null primary key auto_increment, message char(20));
create table t2 (a int not null primary key auto_increment, message char(20));
INSERT INTO t1 (message) VALUES ("Testing"),("table"),("t1");
@@ -49,6 +52,7 @@ select * from t4;
create table t5 (a int not null, b char(10), key(a)) type=MERGE UNION=(test.t1,test_2.t2);
# Because of windows, it's important that we drop the merge tables first!
+# This should give a warning on table t5
drop table if exists t5,t4,t3,t1,t2;
create table t1 (c char(10)) type=myisam;
@@ -110,10 +114,9 @@ select * from t1;
drop table t1;
#
-# Bug found by Monty.
+# Bug in flush tables combined with MERGE tables
#
-drop table if exists t3, t2, t1;
create table t1 (a int not null, b int not null, key(a,b));
create table t2 (a int not null, b int not null, key(a,b));
create table t3 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2);
@@ -127,7 +130,6 @@ drop table t3,t1,t2;
# [phi] testing INSERT_METHOD stuff
#
-drop table if exists t6, t5, t4, t3, t2, t1;
# first testing of common stuff with new parameters
create table t1 (a int not null, b int not null auto_increment, primary key(a,b));
create table t2 (a int not null, b int not null auto_increment, primary key(a,b));
@@ -181,15 +183,14 @@ CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '
INSERT INTO t1 VALUES (1,1), (2,1);
CREATE TABLE t2 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) TYPE=MyISAM;
INSERT INTO t2 VALUES (1,2), (2,2);
-CREATE TABLE t ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', KEY a (a,b)) TYPE=MRG_MyISAM UNION=(t1,t2);
-select max(b) from t where a = 2;
+CREATE TABLE t3 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', KEY a (a,b)) TYPE=MRG_MyISAM UNION=(t1,t2);
+select max(b) from t3 where a = 2;
select max(b) from t1 where a = 2;
-drop table if exists t,t1,t2;
+drop table if exists t3,t1,t2;
#
# temporary merge tables
#
-drop table if exists t1, t2, t3, t4, t5, t6;
create table t1 (a int not null);
create table t2 (a int not null);
insert into t1 values (1);
@@ -208,7 +209,6 @@ drop table if exists t6, t3, t1, t2, t4, t5;
# testing merge::records_in_range and optimizer
#
-DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (
fileset_id tinyint(3) unsigned NOT NULL default '0',
file_code varchar(32) NOT NULL default '',
@@ -235,5 +235,5 @@ EXPLAIN SELECT * FROM t1 WHERE fileset_id = 2
AND file_code BETWEEN '0000000115' AND '0000000120' LIMIT 1;
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2
AND file_code = '0000000115' LIMIT 1;
-DROP TABLE IF EXISTS t2, t1;
+DROP TABLE t2, t1;