Commit 40bb97b5 authored by Sergey Petrunya's avatar Sergey Petrunya

MWL#17: Table elimination

- When making inferences "field is bound" -> "key is bound", do check 
  that the field is part of the key
parent b032c7d8
...@@ -1043,7 +1043,8 @@ void eliminate_tables(JOIN *join) ...@@ -1043,7 +1043,8 @@ void eliminate_tables(JOIN *join)
DBUG_PRINT("info", ("key %s.%s is now bound", DBUG_PRINT("info", ("key %s.%s is now bound",
key_dep->table->table->alias, key_dep->table->table->alias,
key_dep->table->table->key_info[key_dep->keyno].name)); key_dep->table->table->key_info[key_dep->keyno].name));
if (!key_dep->bound) if (field_dep->field->part_of_key.is_set(key_dep->keyno) &&
!key_dep->bound)
{ {
if (!--key_dep->n_missing_keyparts) if (!--key_dep->n_missing_keyparts)
{ {
......
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