Commit 43963c73 authored by unknown's avatar unknown

Fixed bug in IN() optimization

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