diff options
author | Igor Babaev <igor@askmonty.org> | 2011-12-31 03:36:20 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-12-31 03:36:20 -0800 |
commit | ec2828e4f7f973361a9fd6c06bd913103b5115bd (patch) | |
tree | 2aa5cce450b1a5e6017b3427af80b8968d3ff62c /sql/opt_sum.cc | |
parent | 7714496dc1c72d01fd214cb7737ca4216a982e0f (diff) | |
parent | b6b5f9fabe4866a8753e81e1f80593b645f35d8e (diff) | |
download | mariadb-git-ec2828e4f7f973361a9fd6c06bd913103b5115bd.tar.gz |
Merged MWL#247 into the latest 5.3.
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 08717142aa0..60830d8be69 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -847,7 +847,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, @@ -876,7 +875,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) { |