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
commit 46a2e41398
13 changed files with 675 additions and 52 deletions

View file

@ -3156,6 +3156,12 @@ static Sys_var_charptr Sys_ssl_crlpath(
READ_ONLY GLOBAL_VAR(opt_ssl_crlpath), SSL_OPT(OPT_SSL_CRLPATH),
IN_FS_CHARSET, DEFAULT(0));
static Sys_var_mybool Sys_standards_compliant_cte(
"standards_compliant_cte",
"Allow only standards compiant CTE",
SESSION_VAR(only_standards_compliant_cte), CMD_LINE(OPT_ARG),
DEFAULT(TRUE));
// why ENUM and not BOOL ?
static const char *updatable_views_with_limit_names[]= {"NO", "YES", 0};