Jump to content

Archived

This topic is now archived and is closed to further replies.

thegraingers

Auto-increment value Error

Recommended Posts

I am using php/mysql widely on my web site and two of my tables keep getting the following error

 

"Auto-increment value: 0 is smaller than max used value....."

 

Which is fixed by repairing the table.

 

This is happening a few times a week and I am keen to identify the problem and fix it, any clues welcomed, thanks

Share this post


Link to post
Share on other sites

When you do receive these errors? When you run CHECK TABLES? I'm not sure I really understand the error message either, though it's possible that you have auto_increment values of 0 in your tables, which are strictly allowed, but no desired. Please clarify.

Share this post


Link to post
Share on other sites

(accidental double-post)

Share this post


Link to post
Share on other sites

[!--quoteo(post=332808:date=Jan 3 2006, 06:39 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 06:39 PM) 332808[/snapback][/div][div class=\'quotemain\'][!--quotec--]

When you do receive these errors? When you run CHECK TABLES? I'm not sure I really understand the error message either, though it's possible that you have auto_increment values of 0 in your tables, which are strictly allowed, but no desired. Please clarify.

 

 

Yes the error is showing up when I do a check table.

I have an automated check on a number of tables in place following some other errors which were occuring a few months ago

Share this post


Link to post
Share on other sites

Did/do you have zero-valued UIDs in these tables?

Share this post


Link to post
Share on other sites

[!--quoteo(post=332824:date=Jan 3 2006, 07:16 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 07:16 PM) 332824[/snapback][/div][div class=\'quotemain\'][!--quotec--]

Did/do you have zero-valued UIDs in these tables?

 

no, in both tables the lowest auto increment value present is 1

Share this post


Link to post
Share on other sites

[!--quoteo(post=332832:date=Jan 3 2006, 02:40 PM:name=thegraingers)--][div class=\'quotetop\']QUOTE(thegraingers @ Jan 3 2006, 02:40 PM) 332832[/snapback][/div][div class=\'quotemain\'][!--quotec--]

no, in both tables the lowest auto increment value present is 1

 

So are you trying to insert 0 into that field then?

Share this post


Link to post
Share on other sites

[!--quoteo(post=332837:date=Jan 3 2006, 07:46 PM:name=LazyJones)--][div class=\'quotetop\']QUOTE(LazyJones @ Jan 3 2006, 07:46 PM) 332837[/snapback][/div][div class=\'quotemain\'][!--quotec--]

So are you trying to insert 0 into that field then?

 

no

Share this post


Link to post
Share on other sites

[!--quoteo(post=332840:date=Jan 3 2006, 07:49 PM:name=thegraingers)--][div class=\'quotetop\']QUOTE(thegraingers @ Jan 3 2006, 07:49 PM) 332840[/snapback][/div][div class=\'quotemain\'][!--quotec--]

no

 

The error follows a select statement, sometimes on the same table the error is found in, which finds no matching rows

Share this post


Link to post
Share on other sites

Then post the statements in question... none of this story makes any sense.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.