• Rucha Deodhar's avatar
    MDEV-24387: Wrong number of decimal digits in certain UNION/Subqery · fb9a9599
    Rucha Deodhar authored
    constellation
    
    Analysis: The decimals is set to NOT_FIXED_DEC for Field_str even if it is
    NULL. Unsigned has decimals=0. So Type_std_attributes::decimals is set to 39
    (maximum between 0 and 39). This results in incorrect number of decimals
    when we have union of unsigned and NULL type.
    
    Fix: Check if the field is created from NULL value. If yes, set decimals to 0
    otherwise set it to NOT_FIXED_DEC.
    fb9a9599
union.result 78.2 KB