List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 23 1999 10:15pm
Subject:Re: AUTO_INCREMENT Limit?
View as plain text  
At 5:09 PM -0500 4/23/1999, Ben Kirkpatrick wrote:
>   I'm using mysql  Ver 9.15 Distrib 3.21.30, for sun-solaris2.6 (sparc)
>which doesn't seem to support "OPTIMIZE TABLE".  I created 65k some-odd
>records (ran out of keys), then deleted the lowest 200 records.  I ran
>"isamchk" and then tried doing more inserts, but I get this:
>mysql> INSERT INTO testauto VALUES (0,'test');
>ERROR 1062: Duplicate entry '65535' for key 1
>   I must be missing something that gets this to re-use the unused keys.

Yes, OPTIMIZE TABLE didn't appear until one of the 3.22.x versions.

For your AUTO_INCREMENT problem, check your table structure using
DESCRIBE tbl_name.  You may find that your AUTO_INCREMENT column
is declared as an unsigned SMALLINT - the range of that type
is 0-65535.  If so, you may want to change it to a MEDIUMINT, INT,
or BIGINT to increase the range.

Paul DuBois, paul@stripped
Northern League Chronicles:
AUTO_INCREMENT Limit?Ben Kirkpatrick24 Apr
  • Re: AUTO_INCREMENT Limit?Paul DuBois24 Apr
    • I can't shut down mySQL.Daevid Vincent24 Apr
      • Re: I can't shut down mySQL.Paul DuBois24 Apr
    • this listtaubin24 Apr
    • Re: this listFred Read26 Apr
    • Re: I can't shut down mySQL.Daevid Vincent26 Apr
      • Re: I can't shut down mySQL.Michael Widenius27 Apr
    • Re: I can't shut down mySQL.Sasha Pachev27 Apr
  • Re: AUTO_INCREMENT Limit?Thimble Smith24 Apr