• evgen@moonbone.local's avatar
    Fixed bug#16272: IF function with decimal args can produce wrong result · 8f904e9c
    evgen@moonbone.local authored
    The Item_func_if::fix_length_and_dec() function when calculating length of 
    result doesn't take into account unsigned_flag. But it is taken when 
    calculating length of temporary field. This result in creating field that 
    shorter than needed. Due to this, in the reported query 40.0 converted to 9.99.
    
    The function Item_func_if::fix_length_and_dec() now adds 1 to the max_length if 
    the unsigned_flag isn't set.
    8f904e9c
item_cmpfunc.cc 88.9 KB