mysqldump produces incorrect dumps with self-referenced foreign keys

Bug #1732625 reported by Paulus on 2017-11-16
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.

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

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  Edit
Everyone can see this information.

Other bug subscribers