It doesn't matter if your table animals
has foreign keys or not. You would be able to drop the table anyway if it had foreign keys.
What matters is that there are other tables with foreign keys referencing animals
.
Here's how you can check:
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE (REFERENCED_TABLE_SCHEMA, REFERENCED_TABLE_NAME) = ('mydatabase', 'animals');
Re your comment:
I've never heard of a case where foreign keys were invisible but still preventing the table from being dropped. But I suppose it's possible.
You can drop your table if you do it this way:
mysql> SET FOREIGN_KEY_CHECKS=0;
mysql> DROP TABLE animals;
mysql> SET FOREIGN_KEY_CHECKS=1;
However, I can't predict what may go wrong if the InnoDB tablespace is in a weird state already.
Ultimately, what you may have to do to clean this up is to dump all your InnoDB tables using mysqldump, then shut down the MySQL daemon, remove the InnoDB tablespace files, and then restart and reimport your dumped data. That will eliminate any possibility of tablespace corruption.