• unknown's avatar
    MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation · ccc8dabc
    unknown authored
    Fixed a crash in Item_equal::fix_length_and_dec that was a result of the
    architecture of the MWL#89 subquery optimization.
    
    The injection of IN->EXISTS predicates for subqueries happened inside
    make_join_statistics, after constant substitution, but before multiple
    equality substitution done by substitute_for_best_equal_field. As a
    result, when we called fix_fields for the WHERE clause after the injection
    of IN->EXISTS predicates, Item_equal was not fixed, and it was in a state
    not anticipated by Item_equal::fix_length_and_dec - the Item_equal
    containted only a constant, and no fields at all.
    
    The fix takes into account this new possible state when calling fix_fields.
    ccc8dabc
item_cmpfunc.cc 149 KB