Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26796

Natural sort does not work for utf32/utf16/ucs2

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 10.7.1
    • Component/s: Character Sets
    • Labels:
      None

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              wlad Vladislav Vaintroub
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration