• unknown's avatar
    Fix for luanchpad bug#609043 · 02c040dd
    unknown authored
    Removed indirect reference in equalities for cache index lookup.
    
    We should use a direct reference because some optimization of the
    query may optimize out a condition predicate and if the outer reference
    is the only element of the condition predicate the indirect reference
    becomes NULL.
    
    We can resolve correctly the indirect reference in
    Expression_cache_tmptable::make_equalities because it is called before
    optimization of the cached subquery.
    
    
    mysql-test/r/subquery_cache.result:
      The test suite for the bug added.
    mysql-test/t/subquery_cache.test:
      The test suite for the bug added.
    sql/sql_expression_cache.cc:
      Removed indirect reference in equalities for cache index lookup.
    02c040dd
subquery_cache.result 84.6 KB