From 805300341cf303f10d208c9b200d9a7b5bc6ef07 Mon Sep 17 00:00:00 2001 From: David Hall Date: Thu, 5 Oct 2017 11:06:06 -0500 Subject: [PATCH] MCOL-783 Error not supported for recursive CTE --- dbcon/mysql/ha_calpont_execplan.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dbcon/mysql/ha_calpont_execplan.cpp b/dbcon/mysql/ha_calpont_execplan.cpp index ec449be19..c5006277d 100755 --- a/dbcon/mysql/ha_calpont_execplan.cpp +++ b/dbcon/mysql/ha_calpont_execplan.cpp @@ -4809,6 +4809,15 @@ int getSelectPlan(gp_walk_info& gwi, SELECT_LEX& select_lex, SCSEP& csep, bool i return ER_CHECK_NOT_IMPLEMENTED; } + // Until we handle recursive cte: + if (gwi.thd->lex->derived_tables == DERIVED_WITH) + { + 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.subSelectType = csep->subType();