• Tatiana A. Nurnberg's avatar
    Bug#37553: MySql Error Compare TimeDiff & Time · ae0c6a94
    Tatiana A. Nurnberg authored
    We pretended that TIMEDIFF() would always return positive results;
    this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0)
    type that rendered a negative result, but still gave false in comparison.
    We also inadvertantly dropped the sign when converting times to
    decimal.
    
    CAST(time AS DECIMAL) handles signs of the times correctly.
    TIMEDIFF() marked up as signed. Time/date comparison code switched to
    signed for clarity.
    ae0c6a94
item_cmpfunc.h 48.6 KB