forked from percona/percona-server
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #1081016: mysqldump --innodb-optimize-keys may produce invalid SQL
with explicitly named FK constraints The problem was that mysqldump --innodb-optimize-keys produced invalid SQL for cases when there was an explicitly named FK constrained which implied a implicit secondary index with the same name. An attempt to skip such a key definition from table schema and add it later with an ALTER TABLE statement resulted in an "Incorrect index name" error, because an index with the same name has already been created implicitly. Fixed by detecting such cases in skip_secondary_keys() and restoring the secondary to table schema in case there's an explicitly named FK constraint with the same name.
- Loading branch information
Showing
3 changed files
with
195 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters