• Varun Gupta's avatar
    MDEV-16225: wrong resultset from query with semijoin=on · 5fb2c586
    Varun Gupta authored
    For non-semi-join subquery optimization we do a cost based decision between
    Materialisation and IN -> EXIST transformation. The issue in this case is that for IN->EXIST transformation
    we run JOIN::reoptimize with the IN->EXISt conditions and we come up with a new query plan. But when we compare
    the cost with Materialization, we make the decision to chose Materialization so we need to restore the query plan
    for Materilization.
    The saving and restoring for keyuse array and join_tab keyuse is only done when we have atleast
    one element in the keyuse_array , we are now changing to do it even for 0 elements to main the generality.
    5fb2c586
subselect_sj2_mat.result 55 KB