You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
MCOL-1402 Fix addtime/subtime
The changes to addtime/subtime for TIME datatype broke the handling of the adding and subtracting of time. This fixes that.
This commit is contained in:
@ -2769,7 +2769,8 @@ int64_t DataConvert::stringToTime(const string& data)
|
||||
|
||||
if (*end != '\0')
|
||||
return -1;
|
||||
|
||||
hour = day * 24;
|
||||
day = -1;
|
||||
time = data.substr(pos + 1, data.length() - pos - 1);
|
||||
}
|
||||
else
|
||||
@ -2795,11 +2796,11 @@ int64_t DataConvert::stringToTime(const string& data)
|
||||
|
||||
if (pos == string::npos)
|
||||
{
|
||||
hour = atoi(hms.c_str());
|
||||
hour += atoi(hms.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
hour = atoi(hms.substr(0, pos).c_str());
|
||||
hour += atoi(hms.substr(0, pos).c_str());
|
||||
ms = hms.substr(pos + 1, hms.length() - pos - 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user