Commit 886d740a authored by Monty's avatar Monty

Optimized max_part_bit in sql_select.cc to use my_find_first_bit.

parent f0b2e765
...@@ -6967,12 +6967,13 @@ Item_equal::add_key_fields(JOIN *join, KEY_FIELD **key_fields, ...@@ -6967,12 +6967,13 @@ Item_equal::add_key_fields(JOIN *join, KEY_FIELD **key_fields,
} }
static uint static inline uint
max_part_bit(key_part_map bits) max_part_bit(key_part_map bits)
{ {
uint found; if (bits == 0)
for (found=0; bits & 1 ; found++,bits>>=1) ; return 0;
return found; /* find first zero bit by reverting all bits and find first bit */
return my_find_first_bit(~(ulonglong) bits);
} }
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