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

Support adding AUTO_INCREMENT flag to existing numeric using INPLACE

    XMLWordPrintable

Details

    Description

      Upstream FR #115958

      Description:
      Currently, a table copy is required to toggle AUTO_INCREMENT on or off:

      Reason: Cannot change column type INPLACE. Try ALGORITHM=COPY.

      How to repeat:
      DROP TABLE IF EXISTS `t`;
      CREATE TABLE `t` (`id` bigint unsigned NOT NULL, PRIMARY KEY (`id`));
      INSERT INTO `t` (id) VALUES (1), (100), (1000);
      INSERT INTO `t` (id) VALUES (300);
      SELECT `id` FROM `t`;
      ALTER TABLE `t` MODIFY `id` bigint unsigned NOT NULL AUTO_INCREMENT, ALGORITHM=INPLACE;

      Suggested fix:
      Allow this change INPLACE

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mg MG
              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.