• Galina Shalygina's avatar
    MDEV-16517: Server crash in Item_func_in::val_int() when · 778df046
    Galina Shalygina authored
                IN predicate defined with non-constant values is pushed down
    
    The problem appears because of wrong changes made in MDEV-16090 in the
    Item_func_in::build_clone() method.
    For the clone of the IN predicate it copied 'cmp_fields' array values
    that become dirty after Item::cleanup_excluding_const_fields_processor
    has worked in pushdown. That causes crash.
    There is no need to copy 'cmp_fields' field, the array values should be
    NULLs in order to fix_fields() for the cloned IN predicate can set them
    correctly. fix_fields() computes values for 'cmp_fields' array only
    if they were not set earlier.
    778df046
item_cmpfunc.cc 189 KB