summaryrefslogtreecommitdiff
path: root/mysql-test/r/merge_innodb.result
diff options
context:
space:
mode:
authorunknown <istruewing@stella.local>2007-11-30 15:16:31 +0100
committerunknown <istruewing@stella.local>2007-11-30 15:16:31 +0100
commitdc362dae41ae345b05039eed113e3751d0a7e7f6 (patch)
tree55178c136ca0e4f5f9bfc79eaf81fcd55b1eb099 /mysql-test/r/merge_innodb.result
parent4ebdf739ce173dcc6821dd71e0b8d4f815c6acd0 (diff)
downloadmariadb-git-dc362dae41ae345b05039eed113e3751d0a7e7f6.tar.gz
Bug#30491 - MERGE doesn't report error when one table is Innodb
1. A bad error message was given when a MERGE table with an InnoDB child table was tried to use. 2. After selecting from a correct MERGE table and then altering one of the children to InnoDB, incorrect results were returned. These bugs have been fixed with the patch for bug 26379 (Combination of FLUSH TABLE and REPAIR TABLE corrupts a MERGE table). For verification, I added the test case from the bug report. mysql-test/r/merge_innodb.result: Bug#30491 - MERGE doesn't report error when one table is Innodb Added test result. mysql-test/t/merge_innodb.test: Bug#30491 - MERGE doesn't report error when one table is Innodb Added test case.
Diffstat (limited to 'mysql-test/r/merge_innodb.result')
-rw-r--r--mysql-test/r/merge_innodb.result37
1 files changed, 37 insertions, 0 deletions
diff --git a/mysql-test/r/merge_innodb.result b/mysql-test/r/merge_innodb.result
new file mode 100644
index 00000000000..f6057d279b1
--- /dev/null
+++ b/mysql-test/r/merge_innodb.result
@@ -0,0 +1,37 @@
+DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
+CREATE TABLE t1 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t2 (c1 varchar(100)) ENGINE=MyISAM;
+CREATE TABLE t3 (c1 varchar(100)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES ('Ann'), ('Alice');
+INSERT INTO t2 VALUES ('Bob'), ('Brian');
+INSERT INTO t3 VALUES ('Chris'), ('Charlie');
+CREATE TABLE t4 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t2)
+INSERT_METHOD=LAST;
+CREATE TABLE t5 (c1 varchar(100)) ENGINE=MRG_MYISAM UNION=(t1,t3)
+INSERT_METHOD=LAST;
+SELECT * FROM t5;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t4;
+c1
+Ann
+Alice
+Bob
+Brian
+ALTER TABLE t2 ENGINE=InnoDB;
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+DELETE FROM t2 LIMIT 1;
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+INSERT INTO t4 VALUES ('Beware');
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+SELECT * FROM t2;
+c1
+Brian
+SELECT * FROM t1;
+c1
+Ann
+Alice
+DROP TABLE t1, t2, t3, t4, t5;