summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-11-09 19:40:02 -0800
committerIgor Babaev <igor@askmonty.org>2010-11-09 19:40:02 -0800
commit6e5bcca7935d3c62f84bb640e5357664a210ee12 (patch)
treed8559bd522bde648c26a1ca380d19e13e1aa6ad8 /sql/sql_select.cc
parent05f21b21e4942efe02fa6dd334094cc64ce0983b (diff)
parent6b67bafc747e10815566178d730b190a84803fb7 (diff)
downloadmariadb-git-6e5bcca7935d3c62f84bb640e5357664a210ee12.tar.gz
Merge
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index debd1b07fe5..7c51d0e25bd 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2213,6 +2213,14 @@ JOIN::exec()
DBUG_VOID_RETURN;
curr_table->select->cond->fix_fields(thd, 0);
}
+ if (curr_table->pre_idx_push_select_cond)
+ {
+ if (!(curr_table->pre_idx_push_select_cond=
+ new Item_cond_and(curr_table->pre_idx_push_select_cond,
+ sort_table_cond)))
+ DBUG_VOID_RETURN;
+ curr_table->pre_idx_push_select_cond->fix_fields(thd, 0);
+ }
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,
@@ -6355,6 +6363,7 @@ JOIN::make_simple_join(JOIN *parent, TABLE *temp_table)
join_tab->do_firstmatch= NULL;
join_tab->loosescan_match_tab= NULL;
join_tab->emb_sj_nest= NULL;
+ join_tab->pre_idx_push_select_cond= NULL;
bzero((char*) &join_tab->read_record,sizeof(join_tab->read_record));
temp_table->status=0;
temp_table->null_row=0;