diff options
Diffstat (limited to 'mysys/my_compare.c')
-rw-r--r-- | mysys/my_compare.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/mysys/my_compare.c b/mysys/my_compare.c index 7fb2ef97916..5ba1b409abb 100644 --- a/mysys/my_compare.c +++ b/mysys/my_compare.c @@ -21,12 +21,11 @@ #include <my_sys.h> int ha_compare_text(CHARSET_INFO *charset_info, const uchar *a, uint a_length, - const uchar *b, uint b_length, my_bool part_key, - my_bool skip_end_space) + const uchar *b, uint b_length, my_bool part_key) { if (!part_key) return charset_info->coll->strnncollsp(charset_info, a, a_length, - b, b_length, (my_bool)!skip_end_space); + b, b_length); return charset_info->coll->strnncoll(charset_info, a, a_length, b, b_length, part_key); } @@ -186,8 +185,7 @@ int ha_key_cmp(HA_KEYSEG *keyseg, const uchar *a, if (piks && (flag=ha_compare_text(keyseg->charset,a,a_length,b,b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && - next_key_length <= 0), - (my_bool)!(nextflag & SEARCH_PREFIX)))) + next_key_length <= 0)))) return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); a+=a_length; b+=b_length; @@ -199,8 +197,7 @@ int ha_key_cmp(HA_KEYSEG *keyseg, const uchar *a, if (piks && (flag= ha_compare_text(keyseg->charset, a, a_length, b, b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && - next_key_length <= 0), - (my_bool)!(nextflag & SEARCH_PREFIX)))) + next_key_length <= 0)))) return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); a=end; b+=length; @@ -247,12 +244,7 @@ int ha_key_cmp(HA_KEYSEG *keyseg, const uchar *a, if (piks && (flag= ha_compare_text(keyseg->charset,a,a_length,b,b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && - next_key_length <= 0), - (my_bool) ((nextflag & (SEARCH_FIND | - SEARCH_UPDATE)) == - SEARCH_FIND && - ! (keyseg->flag & - HA_END_SPACE_ARE_EQUAL))))) + next_key_length <= 0)))) return ((keyseg->flag & HA_REVERSE_SORT) ? -flag : flag); a+= a_length; b+= b_length; |