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

AUTO_INCREMENT on secondary column can result in duplicate keys when using Aria storage engine

    XMLWordPrintable

    Details

      Description

      CREATE TABLE `test` (
        `name` varchar(32) NOT NULL,
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        PRIMARY KEY (`name`,`id`)
      ) ENGINE=Aria
      

      Start two or more connections running

      INSERT INTO test (name) VALUES ('foo')
      

      This will eventually result in a duplicate entry error (1062).
      (within a couple of hundred rows in my test setup with three connections)

      This does not happen when using the MyISAM storage engine.

        Attachments

          Activity

            People

            Assignee:
            holyfoot Alexey Botchkov
            Reporter:
            tgm Martijn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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