Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Increasingly I'm getting tables having to be repaired dwith the message returned of: Auto-increment value: 0 is smaller than max used value: xx

This has happened on tables with 200 rows and tables with ~3 million rows, but so far the same few tables have had the problem. I'm running MySQL 5.0.22.

The repairs are run by a script which checks every minute for the need to repair MySQL tables. I also have an automated backup of the 6 Gigabyte database running very two hours and the repairs always get trigged around the time of the backup.

Any ideas?

share|improve this question
Well it seems like this might be a MySQL bug as reported here: and is fixed in versions 5.0.23 and up. If I wasn't doing a CHECK TABLES then I possibly wouldn't have this problem. For the time being I've disabled the CHECK TABLES cron from running when the backup does, hopefully this should resolve it. – Rhodri May 5 '10 at 10:17
up vote 2 down vote accepted

After putting the "fix" I mentioned in my comment above in place I no longer have this problem. Upgrading MySQL would be too much of a hassle for this problem so disabling the script during the backup is the best solution for me at this time.

They say talking to yourself is the first sign of madness, doesn't bode well for me :(

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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