Comment 9 for bug 1364457

Revision history for this message
Olaf van Zandwijk (olafz) wrote :

@valerii-kravchuk, #6

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)