You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-392 Fix time_to_sec() for negative time
This commit is contained in:
@ -161,7 +161,15 @@ int64_t Func_time_to_sec::getIntVal(rowgroup::Row& row,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int64_t rtn = (int64_t)(hour * 60 * 60) + (min * 60) + sec;
|
||||
int64_t rtn;
|
||||
if (hour < 0)
|
||||
{
|
||||
rtn = (int64_t)(hour * 60 * 60) - (min * 60) - sec;
|
||||
}
|
||||
else
|
||||
{
|
||||
rtn = (int64_t)(hour * 60 * 60) + (min * 60) + sec;
|
||||
}
|
||||
|
||||
if (bIsNegative)
|
||||
{
|
||||
|
Reference in New Issue
Block a user