Commit b5d75063 authored by monty@mysql.com's avatar monty@mysql.com

Fixed bug in IN() optimization

parent d4543818
......@@ -1475,8 +1475,8 @@ add_key_field(KEY_FIELD **key_fields,uint and_level,
bool optimizable=0;
for (uint i=0; i<num_values; i++)
{
used_tables|=(*value)->used_tables();
if (!((*value)->used_tables() & (field->table->map | RAND_TABLE_BIT)))
used_tables|=(value[i])->used_tables();
if (!((value[i])->used_tables() & (field->table->map | RAND_TABLE_BIT)))
optimizable=1;
}
if (!optimizable)
......
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