diff --git a/dbcon/mysql/ha_mcs_execplan.cpp b/dbcon/mysql/ha_mcs_execplan.cpp index c2e602e8d..c06acf0a7 100644 --- a/dbcon/mysql/ha_mcs_execplan.cpp +++ b/dbcon/mysql/ha_mcs_execplan.cpp @@ -3899,6 +3899,16 @@ ReturnedColumn* buildFunctionColumn(Item_func* ifp, gp_walk_info& gwi, bool& non { return NULL; } + if (ifp->argument_count() > std::numeric_limits::max()) + { + nonSupport = true; + gwi.fatalParseError = true; + Message::Args args; + string info = funcName + " with argument count > " + std::to_string(std::numeric_limits::max()); + args.add(info); + gwi.parseErrorText = IDBErrorInfo::instance()->errorMsg(ERR_NON_SUPPORTED_FUNCTION, args); + return NULL; + } if (!selectBetweenIn && (ifp->arguments()[0]->type() == Item::FIELD_ITEM || (ifp->arguments()[0]->type() == Item::REF_ITEM &&