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

DROP CONSTRAINT ..., ALGORITHM=COPY has no effect

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (a INT primary key, b int) ENGINE=InnoDB;
      CREATE TABLE t2 (a int primary key, b int, constraint b foreign key(b) references t1(a)) engine=innodb;
      SHOW CREATE TABLE t2;
      Table	Create Table
      t2	CREATE TABLE `t2` (
        `a` int(11) NOT NULL,
        `b` int(11) DEFAULT NULL,
        PRIMARY KEY (`a`),
        KEY `b` (`b`),
        CONSTRAINT `b` FOREIGN KEY (`b`) REFERENCES `t1` (`a`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      ALTER TABLE t2 DROP CONSTRAINT b, ALGORITHM=COPY;
      SHOW CREATE TABLE t2;
      Table	Create Table
      t2	CREATE TABLE `t2` (
        `a` int(11) NOT NULL,
        `b` int(11) DEFAULT NULL,
        PRIMARY KEY (`a`),
        KEY `b` (`b`),
        CONSTRAINT `b` FOREIGN KEY (`b`) REFERENCES `t1` (`a`)
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1
      

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              jplindst Jan Lindström (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.