From 8ae65920fabddb9157cddb547cf914b4a63539bf Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 5 Sep 2016 23:07:31 -0700 Subject: 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. --- mysql-test/r/cte_recursive.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r/cte_recursive.result') 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 -- cgit v1.2.1