Unfortunately, there are no references *to* the table that has a failing alter:
mysql> SELECT * FROM KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = '...' AND REFERENCED_TABLE_NAME = 'table';
Empty set (0.01 sec)
The references *from* the table are the ones that show up in #3:
mysql> SELECT constraint_name FROM KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = '...' AND TABLE_NAME = 'table' AND REFERENCED_TABLE_NAME IS NOT NULL;
+-------------------------------+
| constraint_name |
+-------------------------------+
| tablename_ibfk_1 |
| tablename_ibfk_2 |
+-------------------------------+
2 rows in set (0.00 sec)
@valerii-kravchuk, #6
Unfortunately, there are no references *to* the table that has a failing alter: TABLE_NAME = 'table';
mysql> SELECT * FROM KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = '...' AND REFERENCED_
Empty set (0.01 sec)
The references *from* the table are the ones that show up in #3:
mysql> SELECT constraint_name FROM KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = '...' AND TABLE_NAME = 'table' AND REFERENCED_ TABLE_NAME IS NOT NULL; ------- ------- ------- ----+ ------- ------- ------- ----+ ------- ------- ------- ----+
+------
| constraint_name |
+------
| tablename_ibfk_1 |
| tablename_ibfk_2 |
+------
2 rows in set (0.00 sec)