• unknown's avatar
    Fix bug lp:893486 · 5170e938
    unknown authored
    Analysis:
    The bug is a result of an incomplete fix for bug lp:869036.
    That fix didn't take into account that there may be a case
    when ther are no NULLs in the materialized subquery, however
    all columns without NULLs may not be grouped in the only
    non-null index. This is the case when the left subquery expression
    has nullable columns.
    
    Solution:
    The patch handles two missing sub-cases of the case when there are
    no value (non-null matches) for any outer expression, and there are
    both NULLs and non-NUll values in the outer reference.
    a) If the materialized subquery contains no NULLs there cannot be a
       partial match, because there are no NULLs in those columns where
       the outer reference has no NULLs.
    b) If the materialized subquery contains NULLs, but there exists a
       column, such that its corresponding outer expression has no NULL,
       and this column also has no NULL. Then there cannot be a partial
       match either.
    5170e938
subselect_partial_match.result 41.2 KB