• Alexander Barkov's avatar
    MDEV-23350 ROUND(bigint_22_or_longer) returns a wrong data type · 863d5b4f
    Alexander Barkov authored
    The condition in Item_func_round::fix_arg_int() to decide whether:
    - we can preserve the data type of args[0] versus
    - the result can go outside of the args[0] data type
    was wrong.
    
    The data type of the first argument can be preserved in these cases:
    - TRUNCATE(x, n)
    - ROUND(x, n>=0)
    
    Fixing the condition accordingly.
    863d5b4f
item_func.cc 181 KB