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

InnoDB ALTER TABLE treats auto_increment_increment,auto_increment_offset differently from ALGORITHM=COPY

    XMLWordPrintable

Details

    Description

      The fix of Bug#14219624 - ALTER TABLE...ADD COL AUTO_INCREMENT DOES NOT OBEY AUTO_INCREMENT_OFFSET was incomplete. Contrary to what is claimed in the test innodb.innodb-alter-autoinc, the results do differ between ALGORITHM=COPY and ALGORITHM=INPLACE. Here is an example:

      git checkout origin/10.1
      diff -u <(tail +76 mysql-test/suite/innodb/r/innodb-alter-autoinc.result|head) --label COPY <(tail +156 mysql-test/suite/innodb/r/innodb-alter-autoinc.result|head) --label INPLACE
      

      --- COPY
      +++ INPLACE
      @@ -6,5 +6,5 @@
       123	55
       347	60
       33101	65
      -123	70
       123	75
      +123	80
      

      This could cause corruption in replication or in Galera cluster, especially if only some nodes are using old_alter_table=1, or some are running a server version where the ALTER TABLE operation is executed using a different ALGORITHM.

      Attachments

        Issue Links

          Activity

            People

              sysprg Julius Goryavsky
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.