• Tor Didriksen's avatar
    Bug#13261955 TRUNCATE(DBL_MAX) RETURNS DBL_MAX RATHER THAN 'INF' · 38138943
    Tor Didriksen authored
    my_double_round(DBL_MAX, -12, ....)
    should return 'inf' rather than DBL_MAX
    
    The problem is that floor(value/tmp) * tmp
    is inlined, and optimized away.
    
    The solution seems to be to prevent inlining by pre-computing value/tmp and
    storing it in a variable.
    
    No new test case: main.type_float fails without this patch.
    38138943
item_func.cc 167 KB