diff options
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r-- | sql/sql_cte.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index 08d5e20f99a..a952f3b84b1 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1114,6 +1114,7 @@ bool TABLE_LIST::set_as_with_table(THD *thd, With_element *with_elem) { derived= with_elem->spec; if (derived != select_lex->master_unit() && + !with_elem->is_recursive && !is_with_table_recursive_reference()) { derived->move_as_slave(select_lex); |