MDEV-4908: Assertion `((Item_cond *) cond)->functype() == ((Item_cond *) new_item)->functype()' fails on a query with IN and equal conditions, AND/OR, materialization+semijoin

A new AND Item should be prepared (fix_field() call) before using.
This commit is contained in:
unknown 2013-08-21 17:42:09 +03:00
commit f8af4423b4
4 changed files with 50 additions and 2 deletions

View file

@ -5154,10 +5154,12 @@ bool setup_jtbm_semi_joins(JOIN *join, List<TABLE_LIST> *join_list,
{
eq_cond= new Item_func_eq(subq_pred->left_expr->element_index(i),
new_sink->row[i]);
if (!eq_cond || eq_cond->fix_fields(join->thd, &eq_cond))
if (!eq_cond)
DBUG_RETURN(1);
(*join_where)= and_items(*join_where, eq_cond);
if (!((*join_where)= and_items(*join_where, eq_cond)) ||
(*join_where)->fix_fields(join->thd, join_where))
DBUG_RETURN(1);
}
}
else