summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-02-08 20:07:09 +0100
committerSergei Golubchik <serg@mariadb.org>2016-02-09 11:28:59 +0100
commit6703e5b6dafc93bd3b7a0964162e9f8f04473c83 (patch)
treeb9e4de2c68dd72689465508b86ef40966e5f446b
parentdece4bc57a9584eba0183f8a36b8456308eadfd0 (diff)
downloadmariadb-git-6703e5b6dafc93bd3b7a0964162e9f8f04473c83.tar.gz
Bug#20691429 ASSERTION `CHILD_L' FAILED IN STORAGE/MYISAMMRG/HA_MYISAMMRG.CC:631
test case
-rw-r--r--mysql-test/r/merge_innodb.result33
-rw-r--r--mysql-test/t/merge_innodb.test31
2 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/r/merge_innodb.result b/mysql-test/r/merge_innodb.result
index f6057d279b1..5aa344a9391 100644
--- a/mysql-test/r/merge_innodb.result
+++ b/mysql-test/r/merge_innodb.result
@@ -35,3 +35,36 @@ c1
Ann
Alice
DROP TABLE t1, t2, t3, t4, t5;
+create table t1 (c1 varchar(100));
+create table t2 (c1 varchar(100));
+create view t3 as select * from t1;
+insert into t1 values ('ann'), ('alice');
+insert into t2 values ('bob'), ('brian');
+create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
+create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
+select * from t5;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+lock tables t1 read, t2 read, t3 read, t4 read;
+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
+bob
+brian
+ann
+alice
+unlock tables;
+drop table t2;
+create view t2 as select * from t1;
+select * from t4;
+ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
+lock tables t1 read, t2 read, t3 read;
+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 t4;
+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
+unlock tables;
+drop view t2, t3;
+drop table t1;
diff --git a/mysql-test/t/merge_innodb.test b/mysql-test/t/merge_innodb.test
index 7f0b1a0c36e..9f87f241d00 100644
--- a/mysql-test/t/merge_innodb.test
+++ b/mysql-test/t/merge_innodb.test
@@ -39,3 +39,34 @@ SELECT * FROM t2;
SELECT * FROM t1;
DROP TABLE t1, t2, t3, t4, t5;
+#
+# Bug#20691429 temporary merge over view under lock tables
+#
+create table t1 (c1 varchar(100));
+create table t2 (c1 varchar(100));
+create view t3 as select * from t1;
+insert into t1 values ('ann'), ('alice');
+insert into t2 values ('bob'), ('brian');
+create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
+create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
+--error ER_WRONG_MRG_TABLE
+select * from t5;
+lock tables t1 read, t2 read, t3 read, t4 read;
+--error ER_WRONG_MRG_TABLE
+select * from t5;
+select * from t4;
+unlock tables;
+drop table t2;
+create view t2 as select * from t1;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+lock tables t1 read, t2 read, t3 read;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+--error ER_WRONG_MRG_TABLE
+select * from t4;
+unlock tables;
+drop view t2, t3;
+drop table t1;