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

Drop of non-existing FK succeeds for temporary table

    XMLWordPrintable

Details

    Description

      --source include/have_innodb.inc
       
      CREATE TEMPORARY TABLE t (a INT, KEY(a)) ENGINE=InnoDB;
      INSERT INTO t VALUES (1);
      ALTER TABLE t DROP FOREIGN KEY fk;
       
      # Cleanup
      DROP TABLE t;
      

      10.3 77951dd7

      CREATE TEMPORARY TABLE t (a INT, KEY(a)) ENGINE=InnoDB;
      INSERT INTO t VALUES (1);
      ALTER TABLE t DROP FOREIGN KEY fk;
      DROP TABLE t;
      

      So, although there is no foreign key fk (or any other), ALTER succeeds.
      Reproducible on all current version lines of MariaDB and on MySQL 5.7. Not reproducible on MySQL 8.0.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.