Disabling external key constraints before resetting the lookup table?
set foreign_key_checks=0; drop table <table>; set foreign_key_checks=1;
There is an error report that details something similar, but I donβt understand if this is the same problem:
http://bugs.mysql.com/bug.php?id=5784
If not, you can try mysqlcheck :
mysqlcheck -u root -p <dbname> --auto-repair --check --optimize --databases
You will need to check the documents for the most appropriate parameters for your database. Be sure to pay attention to the comments in the first paragraph of documents about locks that are placed in tables during the execution of this command.
source share