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

Auto-increment does not work with DESC on MERGE table

    XMLWordPrintable

Details

    Description

      create table t (a int not null, primary key(a desc)) engine=MyISAM;
      create table tm (a int not null auto_increment, primary key(a desc)) engine=MERGE union=(t) insert_method=FIRST;
       
      insert into tm () values ();
      insert into tm () values ();
      insert into tm () values ();
       
      drop table tm, t;
      

      The third INSERT above fails with

      preview-10.8-MDEV-13756-desc-indexes c10e10c6

      At line 6: query 'insert into tm () values ()' failed: ER_DUP_ENTRY (1062): Duplicate entry '2' for key 'PRIMARY'
      

      Not reproducible with an ascending key.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.