diff options
author | Igor Babaev <igor@askmonty.org> | 2010-11-08 20:36:32 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2010-11-08 20:36:32 -0800 |
commit | 6b67bafc747e10815566178d730b190a84803fb7 (patch) | |
tree | a9e533da8cd7dc498310f3272f7e46f1591df1d3 /sql/opt_index_cond_pushdown.cc | |
parent | c670b9021e782ead4cdd0d20ead2421367626ea5 (diff) | |
download | mariadb-git-6b67bafc747e10815566178d730b190a84803fb7.tar.gz |
Fixed LP bug #668644.
The pushdown condition for the sorted table in a query can be complemented
by the conditions from HAVING. This transformation is done in JOIN::exec
pretty late after the original pushdown condition have been saved in the
field pre_idx_push_select_cond for the sorted table. So this field must
be updated after the inclusion of the condition from HAVING.
Diffstat (limited to 'sql/opt_index_cond_pushdown.cc')
-rw-r--r-- | sql/opt_index_cond_pushdown.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_index_cond_pushdown.cc b/sql/opt_index_cond_pushdown.cc index 277343b81a5..f6437e04ec5 100644 --- a/sql/opt_index_cond_pushdown.cc +++ b/sql/opt_index_cond_pushdown.cc @@ -318,7 +318,7 @@ void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok) if (idx_cond) { Item *idx_remainder_cond= 0; - tab->pre_idx_push_select_cond= tab->select_cond; + tab->pre_idx_push_select_cond= tab->select->cond; /* For BKA cache we store condition to special BKA cache field because evaluation of the condition requires additional operations |