• Sergey Petrunya's avatar
    MDEV-5368: Server crashes in Item_in_subselect::optimize on ... · 519c7305
    Sergey Petrunya authored
    - convert_subq_to_sj() must connect child select's tables into 
      parent select's TABLE_LIST::next_local chain.  
    - The problem was that it took child's leaf_tables.head() which
      is different. This could cause certain tables (in this bug's case,
      child select's non-merged semi-join) not to be present in 
      TABLE_LIST::next_local chain.  Which would cause non-merged semi-join
      not to be initialized in setup_tables(), which would lead to 
      NULL pointer dereference.
    519c7305
subselect_sj_mat.test 54.5 KB