summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-14 10:13:53 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-14 10:13:53 +0300
commit3dbc49f075ba4f6b86b67c1ef3776d651474b729 (patch)
tree552b8e488527637eb90f91cc2f03c0cc69169a08 /strings
parent9ed08f357693875c9d2376651305aa66199d2c35 (diff)
parentb58586aae938e6aa7714c9bb3813da908e49010a (diff)
downloadmariadb-git-3dbc49f075ba4f6b86b67c1ef3776d651474b729.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-utf8.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index b8e71b1f7a9..7434f968383 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -4992,13 +4992,11 @@ static void my_hash_sort_utf8mb3_nopad(CHARSET_INFO *cs, const uchar *s, size_t
static void my_hash_sort_utf8mb3(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
- const uchar *e= s+slen;
/*
Remove end space. We have to do this to be able to compare
'A ' and 'A' as identical
*/
- while (e > s && e[-1] == ' ')
- e--;
+ const uchar *e= skip_trailing_space(s, slen);
my_hash_sort_utf8mb3_nopad(cs, s, e - s, nr1, nr2);
}
@@ -7436,13 +7434,11 @@ static void
my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
- const uchar *e= s + slen;
/*
Remove end space. We do this to be able to compare
'A ' and 'A' as identical
*/
- while (e > s && e[-1] == ' ')
- e--;
+ const uchar *e= skip_trailing_space(s, slen);
my_hash_sort_utf8mb4_nopad(cs, s, e - s, nr1, nr2);
}