1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed the problem of wrong identification of WITH tables defined in WITH clauses without RECURSIVE.

Added test cases to check the fix.
Fixed the problem of wrong types of recursive tables when the type of anchor part does not coincide with the
type of recursive part.
Prevented usage of marerialization and subquery cache for subqueries with recursive references.
Introduced system variables 'max_recursion_level'.
Added a test case to test usage of this variable.
This commit is contained in:
Galina Shalygina
2016-05-24 21:29:52 +03:00
parent 0f7fe2a743
commit b4f1f42062
16 changed files with 493 additions and 143 deletions

View File

@@ -30,6 +30,7 @@
#include "sql_alter.h" // Alter_info
#include "sql_window.h"
/* YACC and LEX Definitions */
/* These may not be declared yet */
@@ -690,7 +691,7 @@ public:
{
return reinterpret_cast<st_select_lex*>(slave);
}
void set_with_clause(With_clause *with_cl) { with_clause= with_cl; }
void set_with_clause(With_clause *with_cl);
st_select_lex_unit* next_unit()
{
return reinterpret_cast<st_select_lex_unit*>(next);
@@ -1095,10 +1096,7 @@ public:
void set_non_agg_field_used(bool val) { m_non_agg_field_used= val; }
void set_agg_func_used(bool val) { m_agg_func_used= val; }
void set_with_clause(With_clause *with_clause)
{
master_unit()->with_clause= with_clause;
}
void set_with_clause(With_clause *with_clause);
With_clause *get_with_clause()
{
return master_unit()->with_clause;
@@ -1109,8 +1107,8 @@ public:
}
With_element *find_table_def_in_with_clauses(TABLE_LIST *table);
bool check_unrestricted_recursive(bool only_standards_compliant);
void check_subqueries_with_recursive_references();
List<Window_spec> window_specs;
void prepare_add_window_spec(THD *thd);
bool add_window_def(THD *thd, LEX_STRING *win_name, LEX_STRING *win_ref,