You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-783 Check for recursive cte against all tables in the query.
This commit is contained in:
@ -4809,16 +4809,6 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
|||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
return ER_CHECK_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Until we handle recursive cte:
|
|
||||||
With_clause* with_clause = select_lex.get_with_clause();
|
|
||||||
if (with_clause && with_clause->with_recursive)
|
|
||||||
{
|
|
||||||
gwi.fatalParseError = true;
|
|
||||||
gwi.parseErrorText = "Recursive CTE";
|
|
||||||
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
|
|
||||||
return ER_CHECK_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
gwi.internalDecimalScale = (gwi.thd->variables.infinidb_use_decimal_scale ? gwi.thd->variables.infinidb_decimal_scale : -1);
|
gwi.internalDecimalScale = (gwi.thd->variables.infinidb_use_decimal_scale ? gwi.thd->variables.infinidb_decimal_scale : -1);
|
||||||
gwi.subSelectType = csep->subType();
|
gwi.subSelectType = csep->subType();
|
||||||
|
|
||||||
@ -4893,6 +4883,16 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i
|
|||||||
if (string(table_ptr->table_name).find("$vtable") != string::npos)
|
if (string(table_ptr->table_name).find("$vtable") != string::npos)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Until we handle recursive cte:
|
||||||
|
// Checking here ensures we catch all with clauses in the query.
|
||||||
|
if (table_ptr->is_recursive_with_table())
|
||||||
|
{
|
||||||
|
gwi.fatalParseError = true;
|
||||||
|
gwi.parseErrorText = "Recursive CTE";
|
||||||
|
setError(gwi.thd, ER_CHECK_NOT_IMPLEMENTED, gwi.parseErrorText, gwi);
|
||||||
|
return ER_CHECK_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
string viewName = getViewName(table_ptr);
|
string viewName = getViewName(table_ptr);
|
||||||
|
|
||||||
// @todo process from subquery
|
// @todo process from subquery
|
||||||
|
Reference in New Issue
Block a user