• Sergei Petrunia's avatar
    MDEV-22377: Subquery in an UPDATE query uses full scan instead of range · d140d276
    Sergei Petrunia authored
    [Patch idea by Igor Babaev]
    
    Symptom: for IN (SELECT ...) subqueries using IN-to-EXISTS transformation,
    the optimizer was unable to make inferences using multiple equalities.
    
    The cause is code Item_in_subselect::inject_in_to_exists_cond() which may
    break invariants that Multiple-Equality code relies on. In particular, it
    may produce a WHERE condition with an empty Item_cond::m_cond_equal.
    
    Fixed this by making Item_cond::m_cond_equal.
    d140d276
subselect2.result 25.4 KB