diff options
author | Alexander Barkov <bar@mariadb.com> | 2018-10-21 21:28:11 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2018-10-21 21:28:11 +0400 |
commit | 88cfde26e889dfe16e483461aba14716e40832a6 (patch) | |
tree | 6155ca6bf7d67287be95f7f6418b03e4fe760797 /strings | |
parent | 2e0bad8fc7f9ae2833a899f65b011af4e0610035 (diff) | |
download | mariadb-git-88cfde26e889dfe16e483461aba14716e40832a6.tar.gz |
A cleanup for MDEV-17511. Re-enabling ctype_ldml.test.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-uca.ic | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/strings/ctype-uca.ic b/strings/ctype-uca.ic index ad4b773c5ad..3d39fc40281 100644 --- a/strings/ctype-uca.ic +++ b/strings/ctype-uca.ic @@ -625,14 +625,14 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs, 1. Keep trailing spaces as they are, so have strnxfrm_onelevel() scan spaces as normal characters. This will call scanner_next() for every trailing space and calculate its weight using UCA weights. - 2. Strip trailing spaces before calling strnxfrm_onelevel(). - If we return a too short key, the caller will append weights for - implicit spaces anyway, up to the desired key size. + 2. Strip trailing spaces before calling strnxfrm_onelevel(), as it will + append weights for implicit spaces anyway, up to the desired key size. This will effectively generate exactly the same sortable key result. The latter is much faster. */ - srclen= cs->cset->lengthsp(cs, (const char*) src, srclen); + if (flags & MY_STRXFRM_PAD_WITH_SPACE) + srclen= cs->cset->lengthsp(cs, (const char*) src, srclen); dst= MY_FUNCTION_NAME(strnxfrm_onelevel)(cs, &cs->uca->level[0], dst, de, nweights, src, srclen, flags); |