diff options
author | Igor Babaev <igor@askmonty.org> | 2011-12-31 02:25:57 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-12-31 02:25:57 -0800 |
commit | b6b5f9fabe4866a8753e81e1f80593b645f35d8e (patch) | |
tree | 5ea9c96070eeb391ca24850300a800289d365f26 /sql/opt_sum.cc | |
parent | 1c47e1ca0d9b2753b2f447df9efad2d14fbba74b (diff) | |
download | mariadb-git-b6b5f9fabe4866a8753e81e1f80593b645f35d8e.tar.gz |
Implementation of the MWL#247: Make the optimizer use extended keys.
The main patch.
.
Diffstat (limited to 'sql/opt_sum.cc')
-rw-r--r-- | sql/opt_sum.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc index 7b4c48497fa..e6fb28f73b3 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -844,7 +844,6 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo, 1 Can use key to optimize MIN()/MAX(). In this case ref, range_fl and prefix_len are updated */ - static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, Field* field, COND *cond, @@ -873,7 +872,8 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref, continue; uint jdx= 0; *prefix_len= 0; - for (part= keyinfo->key_part, part_end= part+keyinfo->key_parts ; + part_end= keyinfo->key_part+table->actual_n_key_parts(keyinfo); + for (part= keyinfo->key_part ; part != part_end ; part++, jdx++, key_part_to_use= (key_part_to_use << 1) | 1) { |