diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-08-21 15:36:06 +0200 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-08-21 15:36:06 +0200 |
commit | f3d0b1c04e0d7edf21e1ae1378b2bafe9580f147 (patch) | |
tree | 9845427b25e8c9d5fde37b347798a9d10b096a7a /sql/opt_table_elimination.cc | |
parent | 9c1336801ec49f772f62bb3943432523c4f37aa9 (diff) | |
download | mariadb-git-f3d0b1c04e0d7edf21e1ae1378b2bafe9580f147.tar.gz |
MWL#17: Table elimination
- Remove a piece of code that's not needed anymore.
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index e3597de2c51..f13ada782f4 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -505,39 +505,6 @@ void build_eq_mods_for_cond(Func_dep_analyzer *fda, Equality_module **eq_mod, /* - 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 |