pt-online-schema failure due to duplicated constraint names and from multiple foreign keys

Description

I seem to be running into an issue similar to PT-1418. pt-online-schema-change is failing due to duplicated constraint names when it attempts to make the table copy for altering.

Here’s a simple example:

I have a table with these three databases (MySQL):

Next I use pt-online-schema-change to add two foreign keys to the bars table:

Here now are the constraints that have been added to bars:

I think perhaps a key detail here is that the constraints have the same name other than the leading prefix.

Now, if I attempt to add another column to bars, I get the error:

For context I tested this with the v3.5.7 which seems to be latest version as of today. Also I’m using MySQL version 8.0.36-0ubuntu0.20.04.1.

Environment

None

Activity

Show:

Aaditya Dubey February 25, 2024 at 2:50 PM

Hi

Thank you for the report.
Verified as described.

Details

Assignee

Reporter

Priority

Components

Affects versions

Fix versions

Needs QA

Yes

Smart Checklist

Created February 8, 2024 at 4:35 PM
Updated April 26, 2024 at 10:08 PM