• unknown's avatar
    MDEV-537 Make multi-column non-top level subqueries to be executed via index... · e648ff11
    unknown authored
    MDEV-537 Make multi-column non-top level subqueries to be executed via index (index/unique subquery)
               instead of single_select_engine
    
    This task changes the IN-EXISTS rewrite for multi-column subqueries
    "(a, b) IN (select b, c ...)" to work in the same way as for
    single-column subqueries "a IN (select b ...) with respect to the
    injection of NULL-rejecting predicates.
     
    More specifically, the method
    Item_in_subselect::create_row_in_to_exists_cond()
    adds Item_is_not_null_test and Item_func_trig_cond only if the left
    IN operand can be NULL. Not having these predicates when not necessary,
    makes it possible to rewrite the subquery into a "unique_subquery" or
    "index_subquery" when there is a suitable index on the only
    subquery table.
    e648ff11
subselect_mat_cost.result 19.1 KB