• unknown's avatar
    Fix bug lp:809266 · 1e6bd6b4
    unknown authored
    Analysis:
    This is a bug in MWL#68, where it was incorrectly assumed
    that if there is a match in the only non-null key, then
    if there is a covering NULL row on all remaining NULL-able
    columns there is a partial match. However, this is not the case,
    because even if there is such a null-only sub-row, it is not
    guaranteed to be part of the matched sub-row. The matched sub-row
    and the NULL-only sub-row may be parts of different rows.
    
    In fact there are two cases:
    - there is a complete row with only NULL values, and
    - all nullable columns contain only NULL values.
    
    These two cases were incorrectly mixed up in the class member
      subselect_partial_match_engine::covering_null_row_width.
    
    
    Solution:
    The solution is to:
    - split covering_null_row_width into two members:
      has_covering_null_row, and has_covering_null_columns, and
    - take into account each state during initialization and
      execution.
    1e6bd6b4
item_subselect.cc 160 KB