0
votes
0answers
16 views

Analyze a Database to Find Failed Foreign Key Constraints [migrated]

I aggressively deleted a ton of data after using this query: SET FOREIGN_KEY_CHECKS = 0; Is there any easy way I can analyze the entire database to check to see if I have any hanging records that ...
1
vote
1answer
70 views

Does adding a foreign key constraint in MySQL cause a table rebuild?

I need to alter a large table in order to add a foreign key. Does adding the constraint cause the table to be rebuilt? The referenced table already exists and has an index on the column.
0
votes
2answers
446 views

Cannot drop index from MySQL INNODB table with foreign keys/references

I'm about to drop an index from a mySQL INNODB table. There are references defined already. When I try to alter it, it says: 1025 - Error on rename of 'X/#sql-2a5f_219828' to 'X' (errno: 150) ...
2
votes
2answers
242 views

Visualizing InnoDB's Foreign Keys

What would be the best way to get a visual representation of a group of MySQL tables' foreign key constraints? (other than drawing them out by hand) Something like this: