diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2011-11-02 22:05:08 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2011-11-02 22:05:08 +0400 |
commit | 9b761df393341bb15d6892ae8def9ae84d07305b (patch) | |
tree | b94635e7fc3c1a99c3c46b594b73b7e60b1d6c9f /sql/opt_subselect.cc | |
parent | 600a03bf53b7a55f8ecab77144c47b539586bb57 (diff) | |
download | mariadb-git-9b761df393341bb15d6892ae8def9ae84d07305b.tar.gz |
BUG#878753: Assertion '0' failed in replace_where_subcondition with derived_merge
- Remove the assert in replace_where_subcondition (the patch has explanation why)
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 416dcadc67f..aa0a8152bbb 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -1026,7 +1026,6 @@ static bool replace_where_subcondition(JOIN *join, Item **expr, Item *old_cond, Item *new_cond, bool do_fix_fields) { - //Item **expr= (emb_nest == (TABLE_LIST*)1)? &join->conds : &emb_nest->on_expr; if (*expr == old_cond) { *expr= new_cond; @@ -1050,9 +1049,15 @@ static bool replace_where_subcondition(JOIN *join, Item **expr, } } } - // If we came here it means there were an error during prerequisites check. - DBUG_ASSERT(0); - return TRUE; + /* + We can come to here when + - we're doing replace operations on both on_expr and prep_on_expr + - on_expr is the same as prep_on_expr, or they share a sub-tree + (so, when we do replace in on_expr, we replace in prep_on_expr, too, + and when we try doing a replace in prep_on_expr, the item we wanted + to replace there has already been replaced) + */ + return FALSE; } static int subq_sj_candidate_cmp(Item_in_subselect* el1, Item_in_subselect* el2, |