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
bc09362e
Commit
bc09362e
authored
Oct 11, 2021
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26796 Natural sort does not work for utf32/utf16/ucs2
Fixed typo, added test.
parent
5b5a67b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletion
+6
-1
mysql-test/main/natural_sort_key.result
mysql-test/main/natural_sort_key.result
+3
-0
mysql-test/main/natural_sort_key.test
mysql-test/main/natural_sort_key.test
+2
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+1
-1
No files found.
mysql-test/main/natural_sort_key.result
View file @
bc09362e
...
...
@@ -203,3 +203,6 @@ NULL NULL
a2 a02
a11 a111
drop table t;
select natural_sort_key(_utf16 0x0031),natural_sort_key(_ucs2 0x0031), natural_sort_key(_utf32 0x00000031);
natural_sort_key(_utf16 0x0031) natural_sort_key(_ucs2 0x0031) natural_sort_key(_utf32 0x00000031)
01 01 01
mysql-test/main/natural_sort_key.test
View file @
bc09362e
...
...
@@ -93,3 +93,5 @@ select * from t order by b;
select
a
,
b
from
t
order
by
b
;
drop
table
t
;
# MDEV-26796 Natural sort does not work for utf32/utf16/ucs2
select
natural_sort_key
(
_utf16
0x0031
),
natural_sort_key
(
_ucs2
0x0031
),
natural_sort_key
(
_utf32
0x00000031
);
sql/item_strfunc.cc
View file @
bc09362e
...
...
@@ -5657,7 +5657,7 @@ String *Item_func_natural_sort_key::val_str(String *out)
*/
if
(
cs
->
mbminlen
!=
1
)
{
if
(
!
tmp
.
copy
(
in
,
&
my_charset_utf8mb4_bin
,
&
errs
))
if
(
tmp
.
copy
(
in
,
&
my_charset_utf8mb4_bin
,
&
errs
))
goto
error_exit
;
in
=
&
tmp
;
}
...
...
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