Commit 44f6c293 authored by Ramil Kalimullin's avatar Ramil Kalimullin

Code clean-up.


sql/sql_select.cc:
  the if() separate arguments checks are slightly faster.
parent 5b9903e1
......@@ -7643,10 +7643,12 @@ static COND *build_equal_items_for_cond(THD *thd, COND *cond,
/*
Check if we eliminated all the predicates of the level, e.g.
(a=a AND b=b AND a=a)
(a=a AND b=b AND a=a).
*/
if (!(args->elements + cond_equal.current_level.elements + eq_list.elements))
return new Item_int((longlong) 1,1);
if (!args->elements &&
!cond_equal.current_level.elements &&
!eq_list.elements)
return new Item_int((longlong) 1, 1);
List_iterator_fast<Item_equal> it(cond_equal.current_level);
while ((item_equal= it++))
......
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