summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/gluh.(none)>2006-11-21 13:45:01 +0400
committerunknown <gluh@mysql.com/gluh.(none)>2006-11-21 13:45:01 +0400
commit1ae9f3b985c59f0c94922cb2bc3c186abae5c619 (patch)
treedec2cfab806944145c39e08f820a385e7eb96f77 /mysql-test
parente139c57f29dd537b14d527a159d0931f4473e0fd (diff)
downloadmariadb-git-1ae9f3b985c59f0c94922cb2bc3c186abae5c619.tar.gz
Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
disable filling of I_S tables for EXPLAIN mysql-test/r/information_schema.result: Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash test case mysql-test/t/information_schema.test: Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash test case
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/information_schema.result15
-rw-r--r--mysql-test/t/information_schema.test14
2 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 3fffce73aa9..43eedc19f12 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1254,3 +1254,18 @@ COLUMN_NAME MD5(COLUMN_DEFAULT) LENGTH(COLUMN_DEFAULT) COLUMN_DEFAULT=get_value(
fld1 7cf7a6782be951a1f2464a350da926a5 65532 1
DROP TABLE bug23037;
DROP FUNCTION get_value;
+create view v1 as
+select table_schema as object_schema,
+table_name as object_name,
+table_type as object_type
+from information_schema.tables
+order by object_schema;
+explain select * from v1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
+2 DERIVED tables ALL NULL NULL NULL NULL 2 Using filesort
+explain select * from (select table_name from information_schema.tables) as a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
+2 DERIVED tables ALL NULL NULL NULL NULL 2
+drop view v1;
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index 27007bbe16a..dd203add344 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -973,4 +973,18 @@ DROP FUNCTION get_value;
+
+#
+# Bug#22413: EXPLAIN SELECT FROM view with ORDER BY yield server crash
+#
+create view v1 as
+select table_schema as object_schema,
+ table_name as object_name,
+ table_type as object_type
+from information_schema.tables
+order by object_schema;
+explain select * from v1;
+explain select * from (select table_name from information_schema.tables) as a;
+drop view v1;
+
# End of 5.0 tests.