mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MWL#17: Table elimination
- When making inferences "field is bound" -> "key is bound", do check that the field is part of the key
This commit is contained in:
parent
b032c7d833
commit
40bb97b525
1 changed files with 2 additions and 1 deletions
|
@ -1043,7 +1043,8 @@ void eliminate_tables(JOIN *join)
|
|||
DBUG_PRINT("info", ("key %s.%s is now bound",
|
||||
key_dep->table->table->alias,
|
||||
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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue