1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-1983 Reject non-numeric arguments for regr_*** functions that require numeric

This commit is contained in:
David Hall
2019-01-02 10:31:53 -06:00
parent 4701e8f4af
commit eb75d3cd7e
13 changed files with 152 additions and 3 deletions

View File

@ -54,6 +54,13 @@ mcsv1_UDAF::ReturnCode regr_syy::init(mcsv1Context* context,
context->setErrorMessage("regr_syy() with other than 2 arguments");
return mcsv1_UDAF::ERROR;
}
if (!(isNumeric(colTypes[0].dataType)))
{
// The error message will be prepended with
// "The storage engine for the table doesn't support "
context->setErrorMessage("regr_syy() with a non-numeric dependant (first) argument");
return mcsv1_UDAF::ERROR;
}
context->setUserDataSize(sizeof(regr_syy_data));
context->setResultType(CalpontSystemCatalog::DOUBLE);