← Back to team overview

maria-developers team mailing list archive

Rev 2730: MWL#17: Table elimination in file:///home/psergey/dev/maria-5.1-table-elim-r5/

 

At file:///home/psergey/dev/maria-5.1-table-elim-r5/

------------------------------------------------------------
revno: 2730
revision-id: psergey@xxxxxxxxxxxx-20090813000143-dukzk352hjywidk7
parent: psergey@xxxxxxxxxxxx-20090812234302-10es7qmf0m09ahbq
committer: Sergey Petrunya <psergey@xxxxxxxxxxxx>
branch nick: maria-5.1-table-elim-r5
timestamp: Thu 2009-08-13 04:01:43 +0400
message:
  MWL#17: Table elimination
  - When making inferences "field is bound" -> "key is bound", do check 
    that the field is part of the key
=== modified file 'sql/opt_table_elimination.cc'
--- a/sql/opt_table_elimination.cc	2009-08-12 23:43:02 +0000
+++ b/sql/opt_table_elimination.cc	2009-08-13 00:01:43 +0000
@@ -1043,7 +1043,8 @@
             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)
               {