summaryrefslogtreecommitdiff
path: root/mysql-test/r/cte_recursive.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-09-05 23:07:31 -0700
committerIgor Babaev <igor@askmonty.org>2016-09-05 23:07:31 -0700
commit8ae65920fabddb9157cddb547cf914b4a63539bf (patch)
tree70d9bcdba6c62dc8e8e529853dfd803ca5cb119c /mysql-test/r/cte_recursive.result
parentaaedb63ee071584817810dc22d5cea7909cb0546 (diff)
downloadmariadb-git-8ae65920fabddb9157cddb547cf914b4a63539bf.tar.gz
Fixed bug mdev-10737.
This bug in st_select_lex_node::move_node could result in invalid select lists in recursive units that could cause falling into infinite loops when iterating over selects in such units.
Diffstat (limited to 'mysql-test/r/cte_recursive.result')
-rw-r--r--mysql-test/r/cte_recursive.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/cte_recursive.result b/mysql-test/r/cte_recursive.result
index cb1c2439a13..da5f380c0e4 100644
--- a/mysql-test/r/cte_recursive.result
+++ b/mysql-test/r/cte_recursive.result
@@ -1611,3 +1611,15 @@ EXPLAIN
}
}
drop table t1;
+#
+# MDEV-10737: recursive union with several anchors at the end
+#
+WITH RECURSIVE cte(n) AS
+( SELECT n+1 FROM cte WHERE n < 5 UNION SELECT 1 UNION SELECT 1 )
+SELECT * FROM cte;
+n
+1
+2
+3
+4
+5