[Maria-developers] Rev 2741: MWL#17: Table elimination in file:///home/psergey/dev/maria-5.1-table-elim-r11/
At file:///home/psergey/dev/maria-5.1-table-elim-r11/ ------------------------------------------------------------ revno: 2741 revision-id: psergey@askmonty.org-20090821133606-2t7hib7wuctqller parent: psergey@askmonty.org-20090821074822-6x2gv01r9ltt2bhc committer: Sergey Petrunya <psergey@askmonty.org> branch nick: maria-5.1-table-elim-r11 timestamp: Fri 2009-08-21 15:36:06 +0200 message: MWL#17: Table elimination - Remove a piece of code that's not needed anymore. === modified file 'sql/opt_table_elimination.cc' --- a/sql/opt_table_elimination.cc 2009-08-21 07:48:22 +0000 +++ b/sql/opt_table_elimination.cc 2009-08-21 13:36:06 +0000 @@ -505,39 +505,6 @@ /* - The only requirement of this function is to order fields in some - deterministic way. -*/ - -int cmp_equal_fields(Item_field *field1, Item_field *field2, void *arg) -{ - int cmp= 0; - bool outer_ref= 0; - if (field2->used_tables() & OUTER_REF_TABLE_BIT) - { - outer_ref= 1; - cmp= -1; - } - if (field2->used_tables() & OUTER_REF_TABLE_BIT) - { - outer_ref= 1; - cmp++; - } - if (outer_ref) - return cmp; - cmp= (int)field2->field->table->tablenr - - (int)field1->field->table->tablenr; - if (cmp) - return cmp < 0 ? -1 : 1; - cmp= (int)field2->field->field_index - - (int)field1->field->field_index; - - return cmp < 0 ? -1 : (cmp ? 1 : 0); - -} - - -/* Perform an OR operation on two (adjacent) Equality_module arrays. SYNOPSIS
participants (1)
-
Sergey Petrunya