0

I've observed this a couple of times now. I truncated a table, and now anytime I do any SQL operation on that table, MYSQL client will stop responding. I can open a new client and query any other table. If I truncate another table while this is going on, it will also become unresponsive. It seems to take a very long time to "fix" itself.

Eventually, it does, and I can truncate the tables and run any other query operation against them.

Does anyone know why this would happen?

2
  • What version of MySQL? What Engine for the table? How big is the table?
    – Rick James
    Aug 7 '19 at 0:02
  • 5.7, innoDB, very small Aug 8 '19 at 0:11
1

See answer on StackExchange and the bug is known and related to the autoincrement.

And if you don't only want to understand the issue, but fix it, see https://dba.stackexchange.com/a/146181/220459.

mysqladmin -u root proc
mysqladmin -u root kill xxx

where xxx is the first process that is hanging.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.