1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +03:00

MCOL-392 fix negative zero hours

Also fix some functions that were not behaving correctly
This commit is contained in:
Andrew Hutchings
2018-04-30 22:08:10 +01:00
parent 3c090647af
commit dfc351b730
10 changed files with 148 additions and 36 deletions

View File

@ -150,6 +150,9 @@ long long timeGet( uint64_t time, IntervalColumn::interval_type unit )
mask = 0xfffffffffffff000;
hour = mask | ((time >> 40) & 0xfff);
if ((hour >= 0) && (time >> 63))
hour*= -1;
// Always positive!
day = abs(hour / 24);