pt-online-schema-change: MySQL error 1452

Hi,

I tried to add a null string column to an existing table using pt-online-schema-change with –alter-foreign-keys-method option. I’ve tried values: auto, drop_swap, and rebuild_constraints since I want to keep the foreign keys after adding the new column, I still get the same MySQL error 1452 below. Any idea why the error occurred?

1 Like

Hi,
That is odd that all three methods fail. Are you sure both tables are consistent, that is, no orphaned rows in child table (without references in parent)?
Some clues here: Hijacking Innodb Foreign Keys - Percona Database Performance Blog

1 Like