summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2011-08-17 12:02:02 +0400
committerSergey Petrunya <psergey@askmonty.org>2011-08-17 12:02:02 +0400
commit6321619496189f2e295bf891157938a98bf410cf (patch)
treeffbde6fae49deb50870970e08f79283b4e0e8683 /sql
parent249a10c7dd879b26665a7d14d9ce4a5c90ca8c77 (diff)
parente4bb53341f8301e982764235b3f31cb7c15d95f7 (diff)
downloadmariadb-git-6321619496189f2e295bf891157938a98bf410cf.tar.gz
Merge
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 83da3d157de..e0b228fc45a 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -19872,7 +19872,12 @@ static bool add_ref_to_table_cond(THD *thd, JOIN_TAB *join_tab)
error=(int) cond->add(join_tab->select->cond);
join_tab->select->cond= cond;
if (join_tab->select->pre_idx_push_select_cond)
- join_tab->select->pre_idx_push_select_cond= cond;
+ {
+ Item *new_cond= and_conds(join_tab->select->pre_idx_push_select_cond, cond);
+ if (!new_cond->fixed && new_cond->fix_fields(thd, &new_cond))
+ error= 1;
+ join_tab->select->pre_idx_push_select_cond= new_cond;
+ }
join_tab->set_select_cond(cond, __LINE__);
}
else if ((join_tab->select= make_select(join_tab->table, 0, 0, cond, 0,