# pt-online-schema-change: MySQL error 1452

**URL:** <https://forums.percona.com/t/pt-online-schema-change-mysql-error-1452/7400>\
**Category:** Percona Toolkit\
**Created:** [January 28, 2020, 7:39pm UTC](https://forums.percona.com/t/pt-online-schema-change-mysql-error-1452/7400 "2020-01-28T19:39:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ay123](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@ay123](https://forums.percona.com/u/ay123)\
**Post date:** [January 28, 2020, 7:39pm UTC](https://forums.percona.com/t/pt-online-schema-change-mysql-error-1452/7400/1 "2020-01-28T19:39:31Z")

</div>

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?

 ![photoid=55268](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/2/2ccb7c13c39484a5101efb1fe4d7f58caf07ca25.png)

---

<div class="post-metadata">

**Author:** ![przemek](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/przemek/32/3_2.png) [@przemek](https://forums.percona.com/u/przemek)\
**Post date:** [January 5, 2021, 11:45pm UTC](https://forums.percona.com/t/pt-online-schema-change-mysql-error-1452/7400/2 "2021-01-05T23:45:33Z")

</div>

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](https://www.percona.com/blog/2012/01/02/hijacking-innodb-foreign-keys/)
