summaryrefslogtreecommitdiff
path: root/sql/opt_table_elimination.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2009-08-27 01:01:40 +0400
committerSergey Petrunya <psergey@askmonty.org>2009-08-27 01:01:40 +0400
commit005c24e9739f1050e846cef8a3e75c4671b30a7b (patch)
tree4e02da9cddc2463588ee0a2efda46fe10082a52a /sql/opt_table_elimination.cc
parentc483437781d04bd1bffbc6de5070b2032a6ae00f (diff)
downloadmariadb-git-005c24e9739f1050e846cef8a3e75c4671b30a7b.tar.gz
MWL#17: Table elimination:
- Fix a trivial problem when OR-merging two multi-equalities - Amend testsuite to provide full gcov coverage mysql-test/r/table_elim.result: MWL#17: Table elimination: - Amend testsuite to provide full gcov coverage mysql-test/t/table_elim.test: MWL#17: Table elimination: - Amend testsuite to provide full gcov coverage
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r--sql/opt_table_elimination.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc
index 1b916db2b25..6c517fa7842 100644
--- a/sql/opt_table_elimination.cc
+++ b/sql/opt_table_elimination.cc
@@ -654,7 +654,7 @@ Equality_module *merge_func_deps(Equality_module *start, Equality_module *new_fi
List <Field_value> *fv;
if (!(fv= new List<Field_value>))
- break;
+ break; /* purecov: inspected */
List_iterator<Field_value> it1(*old->mult_equal_fields);
List_iterator<Field_value> it2(*new_fields->mult_equal_fields);
@@ -664,7 +664,11 @@ Equality_module *merge_func_deps(Equality_module *start, Equality_module *new_fi
while (lfield && rfield)
{
if (lfield == rfield)
+ {
fv->push_back(lfield);
+ lfield=it1++;
+ rfield=it2++;
+ }
else
{
uint left_ratio= lfield->field->table->tablenr*MAX_FIELDS +