Commit 88cfde26 authored by Alexander Barkov's avatar Alexander Barkov

A cleanup for MDEV-17511. Re-enabling ctype_ldml.test.

parent 2e0bad8f
...@@ -22,4 +22,3 @@ innodb_bug12902967 : broken upstream ...@@ -22,4 +22,3 @@ innodb_bug12902967 : broken upstream
file_contents : MDEV-6526 these files are not installed anymore file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing max_statement_time : cannot possibly work, depends on timing
connect-abstract : waiting for libmariadb update connect-abstract : waiting for libmariadb update
ctype_ldml : MDEV-17511 revealed a wrong test
...@@ -625,14 +625,14 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs, ...@@ -625,14 +625,14 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
1. Keep trailing spaces as they are, so have strnxfrm_onelevel() scan 1. Keep trailing spaces as they are, so have strnxfrm_onelevel() scan
spaces as normal characters. This will call scanner_next() for every spaces as normal characters. This will call scanner_next() for every
trailing space and calculate its weight using UCA weights. trailing space and calculate its weight using UCA weights.
2. Strip trailing spaces before calling strnxfrm_onelevel(). 2. Strip trailing spaces before calling strnxfrm_onelevel(), as it will
If we return a too short key, the caller will append weights for append weights for implicit spaces anyway, up to the desired key size.
implicit spaces anyway, up to the desired key size.
This will effectively generate exactly the same sortable key result. This will effectively generate exactly the same sortable key result.
The latter is much faster. 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= MY_FUNCTION_NAME(strnxfrm_onelevel)(cs, &cs->uca->level[0],
dst, de, nweights, dst, de, nweights,
src, srclen, flags); src, srclen, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment