summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2016-08-10 15:51:40 -0700
committerIgor Babaev <igor@askmonty.org>2016-08-10 15:51:40 -0700
commit2f9555c40f96a956184a97e99d1b8f4cafbab024 (patch)
tree720fa733cd37f94d1294d1e91b52cd0f285319c6 /sql/sql_union.cc
parente20e28bd2eca6bb4961a298c2765885155bfdd57 (diff)
downloadmariadb-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_union.cc')
-rw-r--r--sql/sql_union.cc17
1 files changed, 1 insertions, 16 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 4a73a503ebe..382fabd39d7 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -1167,7 +1167,7 @@ err:
// One step of recursive execution
-bool st_select_lex_unit::exec_recursive(bool is_driving_recursive)
+bool st_select_lex_unit::exec_recursive()
{
st_select_lex *lex_select_save= thd->lex->current_select;
st_select_lex *start= with_element->first_recursive;
@@ -1189,18 +1189,6 @@ bool st_select_lex_unit::exec_recursive(bool is_driving_recursive)
if ((saved_error= incr_table->file->ha_delete_all_rows()))
goto err;
- if (is_driving_recursive)
- {
- With_element *with_elem= with_element;
- while ((with_elem= with_elem->get_next_mutually_recursive()) !=
- with_element)
- {
- rec_table= with_elem->first_rec_table_to_update;
- if (rec_table)
- rec_table->reginfo.join_tab->preread_init_done= false;
- }
- }
-
if (with_element->level == 0)
{
start= first_select();
@@ -1248,9 +1236,6 @@ bool st_select_lex_unit::exec_recursive(bool is_driving_recursive)
if (with_element->level == 1)
rec_table->reginfo.join_tab->preread_init_done= true;
}
-
- if (with_element->level == thd->variables.max_recursion_level)
- with_element->set_as_stabilized();
thd->lex->current_select= lex_select_save;
err: