> I am getting the same problem. The autoincrementing primary key
> tinyint(3) indicates that the next number for it to use is 255 yet
> it has already used that number. I have rebuilt the table importing
> the data and it still gives me the 1062 error. I have erased the
> last record but it comes up to 255 and does not advance past it. It
> is in a MyISAM table.
The range of TINYINT UNSIGNED is from 0 to 255. Thus, if you have 256
rows in your table, your table is "full".
Solution: Change the column type to something bigger: SMALLINT
UNSIGNED (0 to 65535), INT UNSIGNED (0 to 4.2 billion), OR BIGINT
ALTER TABLE mytbl MODIFY mycol INT UNSIGNED NOT NULL AUTO_INCREMENT;
See http://www.mysql.com/doc/en/Column_types.html for details.
Stefan Hinz <hinz@stripped>
iConnect GmbH <http://iConnect.de>
Heesestr. 6, 12169 Berlin (Germany)
Telefon: +49 30 7970948-0 Fax: +49 30 7970948-3
[filter fodder: sql, mysql, query]