From 88cfde26e889dfe16e483461aba14716e40832a6 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Sun, 21 Oct 2018 21:28:11 +0400 Subject: A cleanup for MDEV-17511. Re-enabling ctype_ldml.test. --- strings/ctype-uca.ic | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'strings') 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); -- cgit v1.2.1