Skip to content
  • Guilhem Bichot's avatar
    e0a309bd
    wl#6042 "split JOIN_TAB into optimizer and executor part". · e0a309bd
    Guilhem Bichot authored
    The "executor part" is a new class QEP_TAB. JOIN_TABs are dropped at end
    of JOIN::optimize. EXPLAIN and JOIN::exec use only QEP_TABs. So does the
    construction of the AQP.
    QEP_TAB and JOIN_TAB share certain members, put in a class QEP_shared.
    SQL_SELECT is removed, most of it goes into QEP_shared or QEP_TAB.
    The memcpy of all JOIN_TABs at end of get_best_combination() is gone;
    instead, we keep the old JOIN_TABs for a bit longer, but access them
    in the final plan's order thanks to best_ref[] pointers.
    This refactoring fixes
    Bug#18921626 DEBUG CRASH IN PLAN_CHANGE_WATCHDOG::~PLAN_CHANGE_WATCHDOG AT SQL_OPTIMIZER.CC
    and Bug#18535226 DEBUG CRASH ON QUICK_RANGE_SELECT::RESET.
    e0a309bd
    wl#6042 "split JOIN_TAB into optimizer and executor part".
    Guilhem Bichot authored
    The "executor part" is a new class QEP_TAB. JOIN_TABs are dropped at end
    of JOIN::optimize. EXPLAIN and JOIN::exec use only QEP_TABs. So does the
    construction of the AQP.
    QEP_TAB and JOIN_TAB share certain members, put in a class QEP_shared.
    SQL_SELECT is removed, most of it goes into QEP_shared or QEP_TAB.
    The memcpy of all JOIN_TABs at end of get_best_combination() is gone;
    instead, we keep the old JOIN_TABs for a bit longer, but access them
    in the final plan's order thanks to best_ref[] pointers.
    This refactoring fixes
    Bug#18921626 DEBUG CRASH IN PLAN_CHANGE_WATCHDOG::~PLAN_CHANGE_WATCHDOG AT SQL_OPTIMIZER.CC
    and Bug#18535226 DEBUG CRASH ON QUICK_RANGE_SELECT::RESET.
Loading