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

Dropping primary key column from versioned table always fails with 1072

Details

    Description

      Example code:

      CREATE TABLE abc (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (b)) WITH SYSTEM VERSIONING;
      

      We now have a table with one primary key. Dropping column 'a' is no problem, but dropping column 'b' always fails with error code 1072.

      SET SESSION system_versioning_alter_history=KEEP; 
      ALTER TABLE abc DROP COLUMN b;
      

      Attachments

        Issue Links

          Activity

            here the row_end column is invisible, SHOW CREATE TABLE does not show it as a part of the primary key. So it should not cause the error.

            serg Sergei Golubchik added a comment - here the row_end column is invisible, SHOW CREATE TABLE does not show it as a part of the primary key. So it should not cause the error.

            oktopush

            nikitamalyavin Nikita Malyavin added a comment - oktopush

            People

              midenok Aleksey Midenkov
              user2180613 Remy Fox
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.