diff options
author | Igor Babaev <igor@askmonty.org> | 2011-11-06 01:23:03 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-11-06 01:23:03 -0700 |
commit | e0c1b3f24246d22e6785315f9a8448bd9a590422 (patch) | |
tree | 3647722d252e18907dd1e405a012d7f5ca5610af /sql/sql_select.cc | |
parent | 928e94fb98b34e511d89c1ca38e35b42656c9313 (diff) | |
download | mariadb-git-e0c1b3f24246d22e6785315f9a8448bd9a590422.tar.gz |
Fixed LP bug #886145.
The bug happened because in some cases the function JOIN::exec
did not save the value of TABLE::pre_idx_push_select_cond in
TABLE::select->pre_idx_push_select_cond for the sort table.
Noticed and fixed a bug in the function make_cond_remainder
that builds the remainder condition after extraction of an index
pushdown condition from the where condition. The code
erroneously assumed that the function make_cond_for_table left
the value of ICP_COND_USES_INDEX_ONLY in sub-condition markers.
Adjusted many result files from the regression test suite
after this fix .
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 775a32d6e7c..19a29765066 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2565,7 +2565,9 @@ JOIN::exec() if (curr_table->pre_idx_push_select_cond && !curr_table->pre_idx_push_select_cond->fixed) curr_table->pre_idx_push_select_cond->fix_fields(thd, 0); - + + curr_table->select->pre_idx_push_select_cond= + curr_table->pre_idx_push_select_cond; curr_table->set_select_cond(curr_table->select->cond, __LINE__); curr_table->select_cond->top_level_item(); DBUG_EXECUTE("where",print_where(curr_table->select->cond, |