diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-11-05 15:42:03 +0100 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-11-05 15:42:03 +0100 |
commit | ca9fe97e9f050111227f3257172670a151431d83 (patch) | |
tree | 2d7883b6f6ed985beb703f0fd5c5e8207e7fce20 /sql/opt_range.cc | |
parent | 16b603a8b0c2bba16cb66b1769f21c0185435d33 (diff) | |
download | mariadb-git-ca9fe97e9f050111227f3257172670a151431d83.tar.gz |
BUG#48447, BUG#48161, fixed a regression from fix of BUG#6045, where binary collations can use indexes/partition pruning for cases using equality conditions, however it cannot be used for any other condition like <, >, <=, >=, <>, also added test case for verification of BUG#47774 in this patch
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ce86fa535fe..e2be5695ccb 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -5882,7 +5882,8 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field, value->result_type() == STRING_RESULT && key_part->image_type == Field::itRAW && ((Field_str*)field)->charset() != conf_func->compare_collation() && - !(conf_func->compare_collation()->state & MY_CS_BINSORT)) + !(conf_func->compare_collation()->state & MY_CS_BINSORT && + (type == Item_func::EQUAL_FUNC || type == Item_func::EQ_FUNC))) goto end; if (param->using_real_indexes) |