1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed many problems in the code of With_element::check_unrestricted_recursive().

Added the check whether there are set functions in the specifications of recursive CTE.
Added the check whether there are recursive references in subqueries.
Introduced boolean system variable 'standards_compliant_cte'. By default it's set to 'on'.
When it's set to 'off' non-standard compliant CTE can be executed.
This commit is contained in:
Galina Shalygina
2016-05-19 22:07:53 +03:00
parent 3b47632bfc
commit 46a2e41398
13 changed files with 675 additions and 52 deletions

View File

@ -266,14 +266,18 @@ void select_union::cleanup()
void select_union_recursive::cleanup()
{
select_union::cleanup();
free_tmp_table(thd, table);
if (table)
{
select_union::cleanup();
free_tmp_table(thd, table);
}
incr_table->file->extra(HA_EXTRA_RESET_STATE);
incr_table->file->ha_delete_all_rows();
//free_io_cache(incr_table);
//filesort_free_buffers(incr_table,0);
free_tmp_table(thd, incr_table);
if (incr_table)
{
incr_table->file->extra(HA_EXTRA_RESET_STATE);
incr_table->file->ha_delete_all_rows();
free_tmp_table(thd, incr_table);
}
List_iterator<TABLE> it(rec_tables);
TABLE *tab;
@ -281,8 +285,6 @@ void select_union_recursive::cleanup()
{
tab->file->extra(HA_EXTRA_RESET_STATE);
tab->file->ha_delete_all_rows();
//free_io_cache(tab);
//filesort_free_buffers(tab,0);
free_tmp_table(thd, tab);
}
}