You might have a corrupt table.  For 3.22 format, you'll need to use
isamchk, I think...  It's been a long time since I've worked with ISAM
tables.

Now that I look closer at your email, though, it is probably the fact
that your id's start with 0, not 1.  The alter table actually dumps the
data into a new table.  It may be inserting the 0 as a 1
(auto_increments tend to do that -- it can be annoying at times).  Then
the 1 fails because of the duplicate key.  Seems rather silly for an
alter table to do, though, so let me know what you find out.

If the problem is with the 0, just change it to a 156, alter, and update
it back to 0.  Update always works fine with auto_increment columns.

On Tue, 2001-10-30 at 15:17, Rich Duzenbury wrote:
> I've recently upgraded from 3.22.32 to 3.23.43 and I'd like to convert my 
> tables to the MyISAM format.
> 
> According to the docs regarding the upgrade 
> (http://www.mysql.com/doc/U/p/Upgrading-from-3.22.html),
> this is the procedure:
> ALTER TABLE table_name TYPE=MyISAM
> 
> On one of my tables, I receive the following error:
> ERROR 1062: Duplicate entry '11' for key 1.
> 
> It sounds reasonable enough, but the table is already defined as uniquely 
> keyed.
> 
> My last mysqldump shows the create statement as:
> 
> CREATE TABLE JOB (
>    jobid int(10) unsigned default '0' NOT NULL auto_increment,
> 
>    ... many fields omitted for brevity ...
> 
>   PRIMARY KEY (jobid)
> );
> 
> There are only 156 rows in this table currently.  The job id's run from 0 
> to 155, and I can't see any duplicates.
> 
> SELECT jobid, count(*)
> FROM job
> GROUP BY jobid
> HAVING count(*) > 1;
> 
> returns no rows.
> 
> Any clues as to how to proceed?
> 
> Regards,
> Rich
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to