pt-online-schema failure due to duplicated constraint names and from multiple foreign keys
General
Escalation
General
Escalation
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.
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 thebars
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
.