• Ole John Aske's avatar
    Fix for Bug#57034 incorrect OUTER JOIN result when joined on unique key · a6c41291
    Ole John Aske authored
    Item_equal::val_int() checked for NULL-values by checking Item::null_value
    *before* the respective ::store_value() and ::cmp(Item*) metods where called.
    
    As Item::null_value is set by these metods, the value of 'null_value' 
    is not valid until *after* ::store_value() or ::cmp() has
    been called for the Item object.
          
    Fix is to swap order of ::store_value()/::cmp() and checking of Item::null_value.
    This pattern is widely used other places inside item_cmpfunc.cc .
    
    a6c41291
item_cmpfunc.cc 145 KB