summaryrefslogtreecommitdiff
path: root/sql/opt_table_elimination.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-01-15 11:14:36 -0800
committerIgor Babaev <igor@askmonty.org>2011-01-15 11:14:36 -0800
commit84a0c9b2a245a166b87296b0aa9218730be89c21 (patch)
tree205a92844a464232a6992e38ef00b6e2780801db /sql/opt_table_elimination.cc
parentcb4fa7f401267bf887066100726c53f10b712e6d (diff)
downloadmariadb-git-84a0c9b2a245a166b87296b0aa9218730be89c21.tar.gz
Fixed LP bug #698882.
Made sure that the optimal fields are used by TABLE_REF objects when building index access keys to joined tables. Fixed a bug in the template function that sorts the elements of a list using the bubble sort algorithm. The bug caused poor performance of the function. Also added an optimization that skips comparison with the most heavy elements that has been already properly placed in the list. Made the comparison of the fields belonging to the same Item_equal more granular: fields belonging to the same table are also ordered according to some rules.
Diffstat (limited to 'sql/opt_table_elimination.cc')
-rw-r--r--sql/opt_table_elimination.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/opt_table_elimination.cc b/sql/opt_table_elimination.cc
index be1471b7e2c..7497395d628 100644
--- a/sql/opt_table_elimination.cc
+++ b/sql/opt_table_elimination.cc
@@ -1232,7 +1232,7 @@ void build_eq_mods_for_cond(Dep_analysis_context *ctx,
if (fvl->elements)
{
- exchange_sort<Dep_value_field>(fvl, compare_field_values, NULL);
+ bubble_sort<Dep_value_field>(fvl, compare_field_values, NULL);
add_module_expr(ctx, eq_mod, *and_level, NULL, bound_item, fvl);
}
break;