diff options
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) |