• unknown's avatar
    Fix bugs lp:833777, lp:894397 · d37faa72
    unknown authored
    Analysis:
    lp:894397 was a consequence of a prior incorrect fix of lp:833777
    which didn't take into account that even when all tables are
    constant there may be correlated conditions, and the where clause
    is not equivalent to the constant conditions.
    
    Solution:
    When there are constant tables only, evaluate only the conditions
    that reference outer fields, because the constant conditions are
    already checked, and the where clause doesn't have other conditions
    than constant ones, and outer referencing ones. The fix for
    lp:894397 also fixes lp:833777.
    d37faa72
subselect.test 166 KB