OS Is Linux.

The autoincrement key is defined as INT, so plenty of room there.

Table sizes are getting up there:
   attempt.MYD 1,902,291,232    inrec.MYD 1,979,795,600
   attempt.MYI   280,733,696    inrec.MYI   240,460,800
After doing a myisamchk -r on the attempt table, inserts appear to be 
working again, so I would't think the huge file sizes are the problem (yet).

No recovery was done on the inrec table, but after doing a FLUSH-TABLE, an 
insert worked on that table as well.  Don't understand that one.

I still point back to the fact that 2 different tables had autoincrement 
problems at virtually the same time.  And this is the only app running on 
this system.  Why did MySql decide these 2 keys already exist when in fact 
they don't?


>From: Gerald Clark <[EMAIL PROTECTED]>
>To: Dan Shapella <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: duplicate key error on autoincrement field while inserting
>Date: Tue, 24 Apr 2001 13:08:47 -0500
>
>What operating system are you running, and how big are these files and
>indicies?
>
>Is this a 2 Gig file size limit problem?
>
>You are getting near the limit to the size of an unsigned mediumint.
>
>
>Dan Shapella wrote:
> >
> > I have a weird one here.
> >
> > I have an application that inserts records into one of 2 different 
>tables.
> > The other day, an insert attempt on one of the tables failed with a
> > duplicate key error on key 1, an autoincrement field.  About a minute 
>later,
> > an insert attempt on the other table failed similarly.  But, when a 
>SELECT
> > was done on each table for the key value in question, no record was 
>found.
> >
> > The autoincrement values in question were 16288908 for the first table, 
>and
> > 11339940 for the second table.  These tables handle thousands of inserts 
>per
> > day, and all other table activity is read-only via SELECT statements.
> >
> > Does anyone have any idea what may have caused this and what can be done 
>to
> > prevent it?  It is as if MySQL built the record with key value 16288908,
> > placed it in the table cache, built another record with the same key, 
>tried
> > to place that in the table cache and failed, reported the error, and 
>then
> > deleted the record from the table cache before it was written into the
> > actual table.
> >
> > I did a "myisamchk -i" on the first table, which generated the 
>following:
> >
> > Checking MyISAM file: attempt.MYI
> > Data records: 16288907   Deleted blocks:       0
> > /usr/local/bin/myisamchk: warning: Table is marked as crashed
> > /usr/local/bin/myisamchk: warning: 1 clients is using or hasn't closed 
>the
> > table properly
> > - check file-size
> > - check key delete-chain
> > - check record delete-chain
> > - check index reference
> > - check data record references index: 1
> > /usr/local/bin/myisamchk: error: Found key at page 280732672 that points 
>to
> > record outside datafile
> > - check record links
> > /usr/local/bin/myisamchk: error: Checksum for key:  1 doesn't match 
>checksum
> > for records
> > /usr/local/bin/myisamchk: error: Checksum for key:  2 doesn't match 
>checksum
> > for records
> >
> > Record blocks:    16288907    Delete blocks:         0
> > Record data:    1829202488    Deleted data:          0
> > Lost space:       12006835    Linkdata:       61081997
> > MyISAM-table 'attempt.MYI' is corrupted
> > Fix it using switch "-r" or "-o"
> >
> > Any suggestions would be greatly appreciated. Thanks!
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
> >
> > ---------------------------------------------------------------------
> > 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
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


---------------------------------------------------------------------
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