summaryrefslogtreecommitdiff
path: root/mysql-test/r/cte_nonrecursive.result
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2016-09-07 11:35:06 +0300
committerSergei Petrunia <psergey@askmonty.org>2016-09-07 11:35:06 +0300
commit4c39f75c73dfd9fa7e593ecfb5fa6e4272848d48 (patch)
treec66ebb2902a7152b32e4851199ad47a323fdb9e4 /mysql-test/r/cte_nonrecursive.result
parent06ba09d604012bb789c64a007e169e86bf1bd3c2 (diff)
downloadmariadb-git-4c39f75c73dfd9fa7e593ecfb5fa6e4272848d48.tar.gz
MDEV-10057: Crash with EXPLAIN + WITH + constant query
Add the testcase
Diffstat (limited to 'mysql-test/r/cte_nonrecursive.result')
-rw-r--r--mysql-test/r/cte_nonrecursive.result13
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result
index 3b358747a56..9ecc098bb0c 100644
--- a/mysql-test/r/cte_nonrecursive.result
+++ b/mysql-test/r/cte_nonrecursive.result
@@ -851,3 +851,16 @@ a
9
drop view v1;
drop table ten, one_k;
+#
+# MDEV-10057 : Crash with EXPLAIN + WITH + constant query
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+1
+1
+EXPLAIN SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT 1) AS t1;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> system NULL NULL NULL NULL 1
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
+DROP TABLE t1;