1
0
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:
David Hall
2019-03-06 13:57:49 -06:00
parent 827d6b5f2b
commit e9a920b4e8

View File

@@ -3984,10 +3984,19 @@ 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()
if (context.getFunction()->init(&context, colTypes) == mcsv1_UDAF::ERROR)
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 = udafc->getContext().getErrorMessage();
gwi.parseErrorText = e.what();
return NULL;
}
if (udafc->getContext().getRunFlag(UDAF_OVER_REQUIRED))