summaryrefslogtreecommitdiff
path: root/mysql-test/main/cte_recursive.result
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-22 11:47:09 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-22 11:47:09 +0200
commit4ec8598c1dcb63499bce998142b8e5b8b09b2d30 (patch)
tree23010dcb3489b54b4bc9b26481a4a16a4378914a /mysql-test/main/cte_recursive.result
parentfe3bf136b6cf83aac5a6e21d3db1c4e821612017 (diff)
parentafe5a51c2df95aa282e4459afeb7f037563def92 (diff)
downloadmariadb-git-4ec8598c1dcb63499bce998142b8e5b8b09b2d30.tar.gz
Merge branch 'github/10.2' into 10.3
Diffstat (limited to 'mysql-test/main/cte_recursive.result')
-rw-r--r--mysql-test/main/cte_recursive.result30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index 19a2e964959..4d1535cacb2 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -3239,6 +3239,36 @@ Parent Child Path
654 987 987,
321 654 987,654,
DROP TABLE t1;
+#
+# MDEV-16212: recursive CTE with global ORDER BY
+#
+set statement max_recursive_iterations = 2 for
+WITH RECURSIVE qn AS (
+SELECT 1 FROM dual UNION ALL
+SELECT 1 FROM qn
+ORDER BY (SELECT * FROM qn))
+SELECT count(*) FROM qn;
+ERROR 42000: This version of MariaDB doesn't yet support 'global ORDER_BY/LIMIT in recursive CTE spec'
+#
+# MDEV-15581: mix of ALL and DISTINCT UNION in recursive CTE
+#
+create table t1(a int);
+insert into t1 values(1),(2);
+insert into t1 values(1),(2);
+set @c=0, @d=0;
+WITH RECURSIVE qn AS
+(
+select 1,0 as col from t1
+union distinct
+select 1,0 from t1
+union all
+select 3, 0*(@c:=@c+1) from qn where @c<1
+union all
+select 3, 0*(@d:=@d+1) from qn where @d<1
+)
+select * from qn;
+ERROR 42000: This version of MariaDB doesn't yet support 'mix of ALL and DISTINCT UNION operations in recursive CTE spec'
+drop table t1;
# Start of 10.3 tests
#
# MDEV-14217 [db crash] Recursive CTE when SELECT includes new field