diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_cte.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 5a590bfea93..5d4c2b20872 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1263,7 +1263,7 @@ bool With_element::check_unrestricted_recursive(st_select_lex *sel, With_element *with_elem= unit->with_element; if (encountered & with_elem->get_elem_map()) unrestricted|= with_elem->mutually_recursive; - else + else if (with_elem ==this) encountered|= with_elem->get_elem_map(); } } |