diff options
author | Monty <monty@mariadb.org> | 2022-06-13 17:45:37 +0300 |
---|---|---|
committer | Sergei Petrunia <sergey@mariadb.com> | 2023-02-02 22:55:21 +0300 |
commit | 1d82e5daf7174a402a603c553357dcb78515eb04 (patch) | |
tree | a832d42e1a0bd87d6ad655fda2118a875014dfcb /sql/opt_split.cc | |
parent | 249475b99cf32dfa12efbbf7058238587c90ca47 (diff) | |
download | mariadb-git-1d82e5daf7174a402a603c553357dcb78515eb04.tar.gz |
Move join->emb_smj_nest setting to choose_plan()
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
Diffstat (limited to 'sql/opt_split.cc')
-rw-r--r-- | sql/opt_split.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_split.cc b/sql/opt_split.cc index 1bd90869f2e..6c31b895378 100644 --- a/sql/opt_split.cc +++ b/sql/opt_split.cc @@ -973,7 +973,7 @@ SplM_plan_info * JOIN_TAB::choose_best_splitting(double record_count, table_map all_table_map= (((table_map) 1) << join->table_count) - 1; reset_validity_vars_for_keyuses(best_key_keyuse_ext_start, best_table, best_key, remaining_tables, true); - choose_plan(join, all_table_map & ~join->const_table_map); + choose_plan(join, all_table_map & ~join->const_table_map, 0); /* Check that the chosen plan is really a splitting plan. |