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

Natural sort does not work for utf32/utf16/ucs2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 10.7.1
    • Character Sets
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.