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

InnoDB fails to refuse ALTER ONLINE TABLE when no PRIMARY KEY exists

    XMLWordPrintable

Details

    Description

      As noted in MDEV-15533, InnoDB can wrongly allow concurrent DML during a table-rebuilding ALTER TABLE statement when there is no PRIMARY KEY defined on the table.

      I think that we should have an explicit check that DROP PRIMARY KEY is not allowed without ADD PRIMARY KEY. But if there was no key in the first place, apparently we are missing the check.

      Not having a PRIMARY KEY is essentially causing the table to contain a hidden AUTO_INCREMENT like column as a hidden primary key. We refuse to add an AUTO_INCREMENT column online, and similarly we should refuse to rebuild PK-less tables online.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              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.