• Gleb Shchepa's avatar
    Bug #37761: IN handles NULL differently for table-subquery · 211164ff
    Gleb Shchepa authored
                and value-list
    
    The server returns unexpected results if a right side of the 
    NOT IN clause consists of NULL value and some constants of
    the same type, for example:
    
      SELECT * FROM t WHERE NOT t.id IN (NULL, 1, 2) 
      
    may return 3, 4, 5 etc if a table contains these values.
    
    
    The Item_func_in::val_int method has been modified:
    unnecessary resets of an Item_func_case::has_null field 
    value has been moved outside of an argument comparison
    loop. (Also unnecessary re-initialization of the null_value
    field has been moved).
    211164ff
item_cmpfunc.cc 132 KB