summaryrefslogtreecommitdiff
path: root/mysql-test/t/merge.test
diff options
context:
space:
mode:
authorSergey Glukhov <Sergey.Glukhov@sun.com>2008-10-09 13:55:16 +0500
committerSergey Glukhov <Sergey.Glukhov@sun.com>2008-10-09 13:55:16 +0500
commit56810c9d6560f073ec09078a139f059e9d3ea01f (patch)
treeb1614f6d5b466fe639a3698682a8ab49aec49c86 /mysql-test/t/merge.test
parent95b721e62853c400541937b75f9e4d4bdada9bc0 (diff)
downloadmariadb-git-56810c9d6560f073ec09078a139f059e9d3ea01f.tar.gz
Bug#35068 Assertion fails when reading from i_s.tables and there is incorrect merge table
Hide "Table doesn't exist" errors if the table belongs to a merge table. mysql-test/r/merge.result: result fix mysql-test/t/merge.test: test case sql/sql_base.cc: Hide "Table doesn't exist" errors if the table belongs to a merge table.
Diffstat (limited to 'mysql-test/t/merge.test')
-rw-r--r--mysql-test/t/merge.test25
1 files changed, 19 insertions, 6 deletions
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index fd1336491aa..dd3e4e28aeb 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -456,7 +456,7 @@ CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);
SELECT * FROM t2;
DROP TABLE t1, t2;
CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM t2;
DROP TABLE t2;
@@ -548,11 +548,11 @@ drop table t1;
# CREATE TABLE fails
#
CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM tm1;
CHECK TABLE tm1;
CREATE TABLE t1(a INT);
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM tm1;
CHECK TABLE tm1;
CREATE TABLE t2(a BLOB);
@@ -878,7 +878,7 @@ DROP TABLE t4;
--echo # 2. Normal rename.
SELECT * FROM t3 ORDER BY c1;
RENAME TABLE t2 TO t5;
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM t3 ORDER BY c1;
RENAME TABLE t5 TO t2;
SELECT * FROM t3 ORDER BY c1;
@@ -896,7 +896,7 @@ UNLOCK TABLES;
--echo #
--echo # 4. Alter table rename.
ALTER TABLE t2 RENAME TO t5;
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM t3 ORDER BY c1;
ALTER TABLE t5 RENAME TO t2;
SELECT * FROM t3 ORDER BY c1;
@@ -956,7 +956,7 @@ CREATE TABLE t2 (c1 INT, INDEX(c1)) ENGINE=MRG_MYISAM UNION=(t1)
LOCK TABLES t1 WRITE, t2 WRITE;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
---error ER_NO_SUCH_TABLE
+--error 1168
SELECT * FROM t2;
--error ER_NO_SUCH_TABLE
SELECT * FROM t1;
@@ -1395,6 +1395,19 @@ UNLOCK TABLES;
DROP TABLE t1, m1;
#
+# Bug#35068 - Assertion fails when reading from i_s.tables
+# and there is incorrect merge table
+#
+CREATE TABLE tm1 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1) INSERT_METHOD=FIRST;
+--replace_column 8 # 9 # 10 # 11 # 12 # 13 # 14 # 15 # 16 # 17 # 19 # 20 #
+SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE
+TABLE_SCHEMA = 'test' and TABLE_NAME='tm1';
+
+DROP TABLE tm1;
+
+--echo End of 5.1 tests
+
+#
# Bug#36006 - Optimizer does table scan for select count(*)
#
CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM;