• Monty's avatar
    Move join->emb_smj_nest setting to choose_plan() · 1d82e5da
    Monty authored
    This cleans up the interface for choose_plan() as it is not depending
    on setting join->emb_sj_nest.
    
    choose_plan() now sets up join->emb_sj_nest and join->allowed_tables before
    calling optimize_straight_join() and best_extension_by_limited_search().
    
    Other things:
    - Converted some 'if' to DBUG_ASSERT() as these should always be true.
    - Calculate 'allowed_tables' in choose_plan() as this never changes in
      the childs.
    - Added assert to check that next_emb->nested_join->n_tables doesn't
      get to a wrong value.
    - Documented some variables in sql_select.h
    1d82e5da
sql_select.h 85.7 KB