summaryrefslogtreecommitdiff
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
parent2e0bad8fc7f9ae2833a899f65b011af4e0610035 (diff)
downloadmariadb-git-88cfde26e889dfe16e483461aba14716e40832a6.tar.gz
A cleanup for MDEV-17511. Re-enabling ctype_ldml.test.
-rw-r--r--mysql-test/main/disabled.def1
-rw-r--r--strings/ctype-uca.ic8
2 files changed, 4 insertions, 5 deletions
diff --git a/mysql-test/main/disabled.def b/mysql-test/main/disabled.def
index 8fd4f86f778..e83ff00d10b 100644
--- a/mysql-test/main/disabled.def
+++ b/mysql-test/main/disabled.def
@@ -22,4 +22,3 @@ innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
connect-abstract : waiting for libmariadb update
-ctype_ldml : MDEV-17511 revealed a wrong test
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);