[MDEV-26796] Natural sort does not work for utf32/utf16/ucs2 Created: 2021-10-10  Updated: 2021-10-14  Resolved: 2021-10-11

Status: Closed
Project: MariaDB Server
Component/s: Character Sets
Affects Version/s: N/A
Fix Version/s: 10.7.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-4742 A function for native natural sorting... Closed

 Description   

create or replace table t (fld varchar(1)) default character set ucs2;
insert into t values ('x'),('a'),('b');
select fld, natural_sort_key(fld) from t order by natural_sort_key(fld);
drop table t;

preview-10.7-MDEV-4742-natural-sort 50d54ba96

MariaDB [test]> select fld, natural_sort_key(fld) from t order by natural_sort_key(fld);
+------+-----------------------+
| fld  | natural_sort_key(fld) |
+------+-----------------------+
| x    | NULL                  |
| a    | NULL                  |
| b    | NULL                  |
+------+-----------------------+
3 rows in set (0.002 sec)

Happens with ucs2, utf16, utf16le, utf32.



 Comments   
Comment by Elena Stepanova [ 2021-10-10 ]

Priority set to critical on procedural reasons. Please feel free to demote after looking.

Comment by Vladislav Vaintroub [ 2021-10-11 ]

Fixed in corresponding preview tree

Generated at Thu Feb 08 09:48:00 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.