1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +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

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