• Igor Babaev's avatar
    MDEV-19778 Wrong Result on Left Outer Join with Subquery right on true · 645191aa
    Igor Babaev authored
               and WHERE filter afterwards
    
    This patch complements the patch fixing the bug MDEV-6892. The latter
    properly handled queries that used mergeable views returning constant
    columns as inner tables of outer joins and whose where clause contained
    predicates referring to these columns if the predicates of happened not
    to be equality predicates. Otherwise the server still could return wrong
    result sets for such queries. Besides the fix for MDEV-6892 prevented
    some possible conversions of outer joins to inner joins for such queries.
    
    This patch corrected the function check_simple_equality() to handle
    properly conjunctive equalities of the where clause that refer to the
    constant columns of mergeable views used as inner tables of an outer join.
    The patch also changed the code of Item_direct_view_ref::not_null_tables().
    This change allowed to take into account predicates containing references
    to constant columns of mergeable views when converting outer joins into
    inner joins.
    645191aa
item.h 141 KB