diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2010-03-20 15:01:47 +0300 |
commit | 7df026676b6d845cc0ed7a7437995c3019a5f42d (patch) | |
tree | dc051ac4712ac159b52fc2b48e5dd918cbc39799 /sql/opt_table_elimination.cc | |
parent | f59d1dcf0acc12c482c28c902a0030f12ba263af (diff) | |
parent | f09ca00e088b316441bb76e97ba097bc9f3da7d3 (diff) | |
download | mariadb-git-7df026676b6d845cc0ed7a7437995c3019a5f42d.tar.gz |
Merge MariaDB-5.2 -> MariaDB 5.3
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r-- | sql/opt_table_elimination.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc index 5f24b0c188e..e8f6a4fd4b9 100644 --- a/sql/opt_table_elimination.cc +++ b/sql/opt_table_elimination.cc @@ -1225,8 +1225,16 @@ void build_eq_mods_for_cond(Dep_analysis_context *ctx, bound_item= item; } } - exchange_sort<Dep_value_field>(fvl, compare_field_values, NULL); - add_module_expr(ctx, eq_mod, *and_level, NULL, bound_item, fvl); + /* + Multiple equality is only useful if it includes at least one field from + the table that we could potentially eliminate: + */ + if (fvl->elements) + { + + exchange_sort<Dep_value_field>(fvl, compare_field_values, NULL); + add_module_expr(ctx, eq_mod, *and_level, NULL, bound_item, fvl); + } break; } default: |