~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/t/merge_innodb.test

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# t/merge_innodb.test
 
2
#
 
3
# Tests with MERGE tables over InnoDB tables
 
4
#
 
5
 
 
6
--source include/have_innodb.inc
 
7
 
 
8
--disable_warnings
 
9
DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
 
10
--enable_warnings
 
11
 
 
12
#
 
13
# Bug#30491 - MERGE doesn't report error when one table is Innodb
 
14
#
 
15
CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM;
 
16
CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM;
 
17
CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB;
 
18
INSERT INTO t1 VALUES ('Ann'), ('Alice');
 
19
INSERT INTO t2 VALUES ('Bob'), ('Brian');
 
20
INSERT INTO t3 VALUES ('Chris'), ('Charlie');
 
21
CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2)
 
22
  INSERT_METHOD=LAST;
 
23
CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3)
 
24
  INSERT_METHOD=LAST;
 
25
--error ER_WRONG_MRG_TABLE
 
26
SELECT * FROM t5;
 
27
SELECT * FROM t4;
 
28
ALTER TABLE t2 ENGINE=InnoDB;
 
29
--error ER_WRONG_MRG_TABLE
 
30
SELECT * FROM t4;
 
31
DELETE FROM t2 LIMIT 1;
 
32
--error ER_WRONG_MRG_TABLE
 
33
SELECT * FROM t4;
 
34
--error ER_WRONG_MRG_TABLE
 
35
INSERT INTO t4 VALUES ('Beware');
 
36
--error ER_WRONG_MRG_TABLE
 
37
SELECT * FROM t4;
 
38
SELECT * FROM t2;
 
39
SELECT * FROM t1;
 
40
DROP TABLE t1, t2, t3, t4, t5;
 
41