Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3fe2b866
Commit
3fe2b866
authored
Oct 21, 2018
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-17511 Improve performance for ORDER BY with a CHAR(N) CHARACTER SET utf8_unicode_ci
parent
f6a20205
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
strings/ctype-uca.ic
strings/ctype-uca.ic
+13
-0
No files found.
strings/ctype-uca.ic
View file @
3fe2b866
...
...
@@ -620,6 +620,19 @@ MY_FUNCTION_NAME(strnxfrm)(CHARSET_INFO *cs,
uchar *d0= dst;
uchar *de= dst + dstlen;
/*
There are two ways to handle trailing spaces for PAD SPACE collations:
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.
This will effectively generate exactly the same sortable key result.
The latter is much faster.
*/
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);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment