summaryrefslogtreecommitdiff
path: root/mysql-test/r/cte_nonrecursive.result
diff options
context:
space:
mode:
authorGalina Shalygina <galashalygina@gmail.com>2016-05-25 00:29:13 +0300
committerGalina Shalygina <galashalygina@gmail.com>2016-05-25 00:29:13 +0300
commitc7c2f8d4a0dedd52795b7f8a6971c35ea46cc016 (patch)
treecd55069d2bd3debaf86c472f2e34fa9f0052a2ab /mysql-test/r/cte_nonrecursive.result
parent93845e1718e4460e829a3e942bf5202e6a733db2 (diff)
parent804b00e878dd14b0e50a646ac134c4a52259d41a (diff)
downloadmariadb-git-c7c2f8d4a0dedd52795b7f8a6971c35ea46cc016.tar.gz
Merge branch '10.2' of github.com:MariaDB/server into 10.2
Diffstat (limited to 'mysql-test/r/cte_nonrecursive.result')
-rw-r--r--mysql-test/r/cte_nonrecursive.result17
1 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/cte_nonrecursive.result b/mysql-test/r/cte_nonrecursive.result
index a9c13f3f10b..c1f2739bd97 100644
--- a/mysql-test/r/cte_nonrecursive.result
+++ b/mysql-test/r/cte_nonrecursive.result
@@ -759,3 +759,20 @@ a
30
drop view v1;
drop table t1;
+#
+# Bug mdev-10058: Invalid derived table with WITH clause
+#
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (a INT);
+CREATE TABLE t3 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+INSERT INTO t2 VALUES (1),(2),(3);
+INSERT INTO t3 VALUES (1),(2),(3);
+SELECT * FROM (WITH a AS (SELECT * FROM t1) (t2 NATURAL JOIN t3));
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't2 NATURAL JOIN t3))' at line 1
+SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS d1;
+a
+1
+2
+3
+DROP TABLE t1,t2,t3;