diff options
author | Igor Babaev <igor@askmonty.org> | 2016-08-10 15:51:40 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2016-08-10 15:51:40 -0700 |
commit | 2f9555c40f96a956184a97e99d1b8f4cafbab024 (patch) | |
tree | 720fa733cd37f94d1294d1e91b52cd0f285319c6 /sql/sql_cte.h | |
parent | e20e28bd2eca6bb4961a298c2765885155bfdd57 (diff) | |
download | mariadb-git-2f9555c40f96a956184a97e99d1b8f4cafbab024.tar.gz |
Removed the parameter from st_select_lex_unit::exec_recursive.
Moved checking whether the limit set for the number of iterations
when executing a recursive query has been reached from
st_select_lex_unit::exec_recursive to TABLE_LIST::fill_recursive.
Changed the name of the system variable max_recursion_level for
max_recursive_iterations.
Adjusted test cases.
Diffstat (limited to 'sql/sql_cte.h')
-rw-r--r-- | sql/sql_cte.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/sql_cte.h b/sql/sql_cte.h index 52b2b8f4f77..dfe673dcce9 100644 --- a/sql/sql_cte.h +++ b/sql/sql_cte.h @@ -2,6 +2,7 @@ #define SQL_CTE_INCLUDED #include "sql_list.h" #include "sql_lex.h" +#include "sql_select.h" class select_union; struct st_unit_ctxt_elem; @@ -186,6 +187,8 @@ public: bool instantiate_tmp_tables(); + void prepare_for_next_iteration(); + friend class With_clause; }; @@ -357,6 +360,19 @@ bool With_element::all_are_stabilized() inline +void With_element::prepare_for_next_iteration() +{ + With_element *with_elem= this; + while ((with_elem= with_elem->get_next_mutually_recursive()) != this) + { + TABLE *rec_table= with_elem->first_rec_table_to_update; + if (rec_table) + rec_table->reginfo.join_tab->preread_init_done= false; + } +} + + +inline void st_select_lex_unit::set_with_clause(With_clause *with_cl) { with_clause= with_cl; |