summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-10-21 21:28:11 +0400
committerAlexander Barkov <bar@mariadb.com>2018-10-21 21:28:11 +0400
commit88cfde26e889dfe16e483461aba14716e40832a6 (patch)
tree6155ca6bf7d67287be95f7f6418b03e4fe760797 /strings
parent2e0bad8fc7f9ae2833a899f65b011af4e0610035 (diff)
downloadmariadb-git-88cfde26e889dfe16e483461aba14716e40832a6.tar.gz
A cleanup for MDEV-17511. Re-enabling ctype_ldml.test.
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-uca.ic8
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);