• Alexey Kopytov's avatar
    Fix for bug #43432: Union on floats does unnecessary rounding · afb2b6de
    Alexey Kopytov authored
      
    UNION could convert fixed-point FLOAT(M,D)/DOUBLE(M,D) columns  
    to FLOAT/DOUBLE when aggregating data types from the SELECT  
    substatements. While there is nothing particularly wrong with  
    this behavior, especially when M is greater than the hardware  
    precision limits, it could be confusing in cases when all  
    SELECT statements in a union have the same  
    FLOAT(M,D)/DOUBLE(M,D) columns with equal precision  
    specifications listed in the same position.  
      
    Since the manual is quite vague on what data type should be  
    returned in such cases, the bug was fixed by implementing the  
    most 'expected' behavior: do not convert FLOAT(M,D)/DOUBLE(M,D)  
    to anything else if all SELECT statements in a UNION have the  
    same precision for that column.  
    afb2b6de
union.result 43.5 KB