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: http://www.snake.net/nl/