diff options
author | Igor Babaev <igor@askmonty.org> | 2012-03-02 15:03:20 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2012-03-02 15:03:20 -0800 |
commit | 8bc5045ea377f39701f421cc7ae00756f79962d2 (patch) | |
tree | 751d8bbe4d3844ab9dc16d0c07855e40028cbabc /sql/opt_sum.cc | |
parent | 8b469eb5151cb1b7da00cee3a7b42c10bd7ff51e (diff) | |
parent | 2521ac0c7f2450d588fa1704a6eef785da8812a9 (diff) | |
download | mariadb-git-8bc5045ea377f39701f421cc7ae00756f79962d2.tar.gz |
Merge MWL #247 from mariadb 5.3 -> mariadb 5.5.
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 7087a85d13a..bdc8b768849 100644 --- a/sql/opt_sum.cc +++ b/sql/opt_sum.cc @@ -856,7 +856,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, @@ -885,7 +884,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) { |