MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Ingo Struewing Date:November 30 2007 2:16pm
Subject:bk commit into 5.1 tree (istruewing:1.2671) BUG#30491
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of istruewing. When istruewing does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-11-30 15:16:31+01:00, istruewing@stripped +2 -0
  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@stripped, 2007-11-30 15:16:30+01:00, istruewing@stripped +37 -0
    Bug#30491 - MERGE doesn't report error when one table is Innodb
    Added test result.

  mysql-test/r/merge_innodb.result@stripped, 2007-11-30 15:16:30+01:00, istruewing@stripped +0 -0

  mysql-test/t/merge_innodb.test@stripped, 2007-11-30 15:16:30+01:00, istruewing@stripped +41 -0
    Bug#30491 - MERGE doesn't report error when one table is Innodb
    Added test case.

  mysql-test/t/merge_innodb.test@stripped, 2007-11-30 15:16:30+01:00, istruewing@stripped +0 -0

diff -Nrup a/mysql-test/r/merge_innodb.result b/mysql-test/r/merge_innodb.result
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/r/merge_innodb.result	2007-11-30 15:16:30 +01:00
@@ -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;
diff -Nrup a/mysql-test/t/merge_innodb.test b/mysql-test/t/merge_innodb.test
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/mysql-test/t/merge_innodb.test	2007-11-30 15:16:30 +01:00
@@ -0,0 +1,41 @@
+# t/merge_innodb.test
+#
+# Tests with MERGE tables over InnoDB tables
+#
+
+--source include/have_innodb.inc
+
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2, t3, t4, t5;
+--enable_warnings
+
+#
+# Bug#30491 - MERGE doesn't report error when one table is Innodb
+#
+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;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t5;
+SELECT * FROM t4;
+ALTER TABLE t2 ENGINE=InnoDB;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+DELETE FROM t2 LIMIT 1;
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+--error ER_WRONG_MRG_TABLE
+INSERT INTO t4 VALUES ('Beware');
+--error ER_WRONG_MRG_TABLE
+SELECT * FROM t4;
+SELECT * FROM t2;
+SELECT * FROM t1;
+DROP TABLE t1, t2, t3, t4, t5;
+
Thread
bk commit into 5.1 tree (istruewing:1.2671) BUG#30491Ingo Struewing30 Nov