summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2005-02-22 14:42:44 +0300
committerunknown <gluh@gluh.mysql.r18.ru>2005-02-22 14:42:44 +0300
commitb8adcb3bef7490a8ce95df8fe1b84335a1832369 (patch)
treecfe65024d212aa681601403acc0d7ee47157f64f /mysql-test
parent17cca96ec9c613a0e25cf78f7230bd9ebfb72010 (diff)
downloadmariadb-git-b8adcb3bef7490a8ce95df8fe1b84335a1832369.tar.gz
Fix for bug #7476: crash on SELECT * FROM INFORMATION_SCHEMA.TABLES(after review)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/information_schema.result5
-rw-r--r--mysql-test/t/information_schema.test27
2 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index e8ec4f70139..a201aa3ed63 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -610,3 +610,8 @@ create view v1 as select * from t1, t2;
set @got_val= (select count(*) from information_schema.columns);
drop view v1;
drop table t1, t2;
+CREATE TABLE t_crashme ( f1 BIGINT);
+CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
+CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
+drop view a2, a1;
+drop table t_crashme;
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index baf817b7c84..99fbc181136 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -363,3 +363,30 @@ create view v1 as select * from t1, t2;
set @got_val= (select count(*) from information_schema.columns);
drop view v1;
drop table t1, t2;
+
+#
+# Bug #7476: crash on SELECT * FROM INFORMATION_SCHEMA.TABLES
+#
+
+CREATE TABLE t_crashme ( f1 BIGINT);
+CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
+CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
+let $tab_count= 65;
+--disable_query_log
+while ($tab_count)
+{
+ EVAL CREATE TABLE t_$tab_count (f1 BIGINT);
+ dec $tab_count ;
+}
+--disable_result_log
+SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES;
+--enable_result_log
+let $tab_count= 65;
+while ($tab_count)
+{
+ EVAL DROP TABLE t_$tab_count;
+ dec $tab_count ;
+}
+--enable_query_log
+drop view a2, a1;
+drop table t_crashme;