• Sergey Petrunya's avatar
    BUG#43768: Prepared query with nested subqueries core dumps on second execution · 77e66c69
    Sergey Petrunya authored
    Fix two problems:
    1. Let optimize_semijoin_nests() reset sj_nest->sjmat_info irrespectively  
       of value of optimizer_flag. We need this in case somebody has turned optimization
       off between reexecutions of the same statement.
    
    2. Do not pull out constant tables out of semi-join nests. The problem is that pullout 
       operation is not undoable, and if a table is constant because it is 1/0-row table it 
       may cease to be constant on the next execution. Note that tables that are constant
       because of possible eq_ref(const) access will still be pulled out as they are
       considered functionally-dependent.
    77e66c69
subselect_sj_jcl6.result 33 KB