• Igor Babaev's avatar
    MDEV-18679 Server crashes in JOIN::optimize · 9bd47835
    Igor Babaev authored
    The bug manifested itself when executing a query with materialized
    view/derived/CTE whose specification was a SELECT query contained
    another materialized derived and impossible WHERE/HAVING condition
    was detected for this SELECT.
    As soon as such condition is detected the join structures of all
    derived tables used in the SELECT are destroyed. So optimization
    of the queries specifying these derived tables is impossible. Besides
    it's not needed.
    
    In 10.3 optimization of a materialized derived table is performed before
    detection of impossible WHERE/HAVING condition in the embedding SELECT.
    9bd47835
derived_cond_pushdown.test 91.3 KB