You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1951 Don't crash when MariaDB UDAF not defined in Columnstore
This commit is contained in:
@@ -3984,12 +3984,21 @@ ReturnedColumn* buildAggregateColumn(Item* item, gp_walk_info& gwi)
|
||||
colTypes.push_back(make_pair(udafc->functionParms()->alias(), udafc->functionParms()->resultType().colDataType));
|
||||
|
||||
// Call the user supplied init()
|
||||
try
|
||||
{
|
||||
if (context.getFunction()->init(&context, colTypes) == mcsv1_UDAF::ERROR)
|
||||
{
|
||||
gwi.fatalParseError = true;
|
||||
gwi.parseErrorText = udafc->getContext().getErrorMessage();
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
gwi.fatalParseError = true;
|
||||
gwi.parseErrorText = e.what();
|
||||
return NULL;
|
||||
}
|
||||
if (udafc->getContext().getRunFlag(UDAF_OVER_REQUIRED))
|
||||
{
|
||||
gwi.fatalParseError = true;
|
||||
|
Reference in New Issue
Block a user