Skip to content
  • Roy Lyseng's avatar
    333425fc
    Bug#29463760 In cases like ifnull(datetime(2), time(3), wrong answer · 333425fc
    Roy Lyseng authored
    The ifnull function had a different type resolution procedure than
    all other CASE-derived functions (ie CASE, COALESCE, etc), which
    caused wrong length information to be generated for certain numeric
    expressions.
    
    Fixed by using the same type aggregation as for COALESCE function,
    which is the superclass for Item_func_ifnull.
    
    A few test cases have changed, all seem to be correct.
    
    Reviewed by: Knut Hatlen <knut.hatlen@oracle.com>
    333425fc
    Bug#29463760 In cases like ifnull(datetime(2), time(3), wrong answer
    Roy Lyseng authored
    The ifnull function had a different type resolution procedure than
    all other CASE-derived functions (ie CASE, COALESCE, etc), which
    caused wrong length information to be generated for certain numeric
    expressions.
    
    Fixed by using the same type aggregation as for COALESCE function,
    which is the superclass for Item_func_ifnull.
    
    A few test cases have changed, all seem to be correct.
    
    Reviewed by: Knut Hatlen <knut.hatlen@oracle.com>
Loading