Commit 5a8766a9 authored by Sergei Petrunia's avatar Sergei Petrunia

Better comments in Item_in_subselect::inject_in_to_exists_cond()

parent 53b580a9
......@@ -2757,6 +2757,8 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg)
}
where_item= and_items(thd, join_arg->conds, where_item);
/* This is the fix_fields() call mentioned in the comment above */
if (!where_item->fixed && where_item->fix_fields(thd, 0))
DBUG_RETURN(true);
// TIMOUR TODO: call optimize_cond() for the new where clause
......@@ -2767,7 +2769,10 @@ bool Item_in_subselect::inject_in_to_exists_cond(JOIN *join_arg)
/* Attach back the list of multiple equalities to the new top-level AND. */
if (and_args && join_arg->cond_equal)
{
/* The argument list of the top-level AND may change after fix fields. */
/*
The fix_fields() call above may have changed the argument list, so
fetch it again:
*/
and_args= ((Item_cond*) join_arg->conds)->argument_list();
((Item_cond_and *) (join_arg->conds))->m_cond_equal=
*join_arg->cond_equal;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment