diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-10-01 00:10:03 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-10-01 00:10:03 +0400 |
commit | f5987a0c3ef089439d400217a5784c10fd991f52 (patch) | |
tree | d31ab1abebc1342fb6f35126aae1cf8a853547f8 /sql/sql_select.h | |
parent | 134e417895f741223b2a8b68c0b674d14920d316 (diff) | |
download | mariadb-git-f5987a0c3ef089439d400217a5784c10fd991f52.tar.gz |
BUG#860553: Crash in create_ref_for_key with semijoin + materialization
- The problem was that JOIN::save/restore_query_plan() did not save/restore parts of
the query plan that are located inside SJ_MATERIALIZATION_INFO structures. This could
cause parts of one plan to be used with another, which led get_best_combination() to
constructing non-sensical join plans (and crash).
Fixed by saving/restoring SJM parts of the query plans.
- check_and_do_in_subquery_rewrites() will not set SUBS_MATERIALIZATION flag when it
records that the subquery predicate is to be converted into semi-join.
If convert_join_subqueries_to_semijoins() later decides not to convert to semi-join,
let it set SUBS_MATERIALIZATION flag, if appropriate.
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r-- | sql/sql_select.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h index 676cc7452f4..0a416966995 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -666,6 +666,7 @@ protected: KEYUSE *join_tab_keyuse[MAX_TABLES]; /* Copies of JOIN_TAB::checked_keys for each JOIN_TAB. */ key_map join_tab_checked_keys[MAX_TABLES]; + SJ_MATERIALIZATION_INFO *sj_mat_info[MAX_TABLES]; public: Join_plan_state() { |