Code clean-up.

sql/sql_select.cc:
  the if() separate arguments checks are slightly faster.
This commit is contained in:
Ramil Kalimullin 2009-03-17 11:04:15 +04:00
parent 5b9903e1c8
commit 44f6c2937d

View File

@ -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++))