mysqldump produces incorrect dumps with self-referenced foreign keys

Bug #1732625 reported by Paulus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Triaged
High
Unassigned
5.6
Triaged
High
Unassigned
5.7
Triaged
High
Unassigned

Bug Description

The percona build introduces --innodb-optimize-keys into the mysqldump utility. However it incorrectly works with foreign keys on the same table. For example this snippet produces an error on restore:

mysql -e 'create table test (a int, b int, index(a), index(b), foreign key (a) references test(b));' test
mysqldump test test > test.sql
mysql test < test.sql

The expected behaviour is to restore the table and not stop on the create table statement.

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

Verified as described.

Changed in percona-server:
status: New → Confirmed
tags: added: regression
tags: added: mysqldump-opt-keys
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1125

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.