Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-3863

mysqldump --innodb-optimize-keys may produce invalid SQL with implicitly named FK constraints

    XMLWordPrintable

    Details

      Description

      CREATE TABLE t2 (id int, a int, primary key(id), FOREIGN KEY (a) REFERENCES t2(id)) ENGINE=InnoDB;
      

      implicitly creates

      KEY `a` (`a`)
      

      which is taken away to `ALTER TABLE` by optimizer.
      Then optimized statement also implicitly creates

      KEY `a` (`a`)
      

      what causes that `ALTER TABLE` returns an error.

      It is related to https://jira.percona.com/browse/PS-605

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              przemyslaw.skibinski Przemyslaw Skibinski
              Reporter:
              przemyslaw.skibinski Przemyslaw Skibinski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m

                    Smart Checklist