From afed809297ec43d7825b607b6ebadbabe4f63c2a Mon Sep 17 00:00:00 2001 From: "timour@askmonty.org" Date: Fri, 18 Oct 2013 11:45:25 +0300 Subject: MDEV-5123 Remove duplicated conditions pushed both to join_tab->select_cond and join_tab->cache_select->cond for blocked joins. BNL and BNLH joins pre-filter the records from a joined table via JOIN_TAB::cache_select->cond. There is no need to re-evaluate the same conditions via JOIN_TAB::select_cond. This patch removes the duplicated conditions from the top-level conjuncts of each pushed condition. The added "Using where" in few EXPLAINs is due to taking into account tab->cache_select->cond in addition to tab->select_cond in JOIN::save_explain_data_intern. --- sql/sql_select.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_select.h') diff --git a/sql/sql_select.h b/sql/sql_select.h index d4da44756c7..509e5ba67a6 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -544,6 +544,7 @@ typedef struct st_join_table { !(used_sjm_lookup_tables & ~emb_sj_nest->sj_inner_tables)); } + void remove_redundant_bnl_scan_conds(); } JOIN_TAB; -- cgit v1.2.1