1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

MCOL-1429 Fix DAYNAME()/MONTHNAME() NULL result

For NULL result -1 cast to a uint was used as an array index. This
caused crashes with TIME data type.
This commit is contained in:
Andrew Hutchings
2018-06-04 20:47:33 +01:00
parent 6948ab85a3
commit fd6a2f46a5
2 changed files with 6 additions and 2 deletions

View File

@@ -47,7 +47,9 @@ string Func_monthname::getStrVal(rowgroup::Row& row,
bool& isNull,
CalpontSystemCatalog::ColType& op_ct)
{
uint32_t month = getIntVal(row, parm, isNull, op_ct);
int32_t month = getIntVal(row, parm, isNull, op_ct);
if (month == -1)
return "";
return helpers::monthFullNames[month];
}