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

Inserting NULL into base column breaks NATURAL_SORT_KEY column

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 10.7.1
    • Server
    • None

    Description

      create or replace table t (a varchar(8), b varchar(8) as (natural_sort_key(a)));
      insert into t (a) values ('a2'),(NULL),('a11');
      select * from t order by b;
      select a, b from t order by b;
      

      preview-10.7-MDEV-4742-natural-sort deac988668

      MariaDB [test]> select * from t order by b;
      +------+------+
      | a    | b    |
      +------+------+
      | NULL | NULL |
      | a11  | NULL |
      | a2   | a02  |
      +------+------+
      3 rows in set (0.001 sec)
       
      MariaDB [test]> select a, b from t order by b;
      +------+------+
      | a    | b    |
      +------+------+
      | a2   | NULL |
      | NULL | NULL |
      | a11  | NULL |
      +------+------+
      3 rows in set (0.001 sec)
      

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.