Jim Martin’s comment from ยง3.6.9. “Using AUTO_INCREMENT” of the MySQL documentation:
Just in case there’s any question, the AUTO_INCREMENT field /DOES NOT WRAP/. Once you hit the limit for the field size, INSERTs generate an error. (As per Jeremy Cole)
A quick test with MySQL 5.1.45 results in an error of:
ERROR 1467 (HY000): Failed to read auto-increment value from storage engine
You could test for that error on insert and take appropriate action.