mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-26796 Natural sort does not work for utf32/utf16/ucs2
Fixed typo, added test.
This commit is contained in:
@ -203,3 +203,6 @@ NULL NULL
|
|||||||
a2 a02
|
a2 a02
|
||||||
a11 a111
|
a11 a111
|
||||||
drop table t;
|
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
|
||||||
|
@ -93,3 +93,5 @@ select * from t order by b;
|
|||||||
select a, b from t order by b;
|
select a, b from t order by b;
|
||||||
drop table t;
|
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);
|
||||||
|
@ -5657,7 +5657,7 @@ String *Item_func_natural_sort_key::val_str(String *out)
|
|||||||
*/
|
*/
|
||||||
if (cs->mbminlen != 1)
|
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;
|
goto error_exit;
|
||||||
in= &tmp;
|
in= &tmp;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user