Jump to content


Photo

Auto-increment value Error


  • Please log in to reply
9 replies to this topic

#1 thegraingers

thegraingers
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationUK

Posted 03 January 2006 - 05:35 PM

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

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 January 2006 - 06:39 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 January 2006 - 06:40 PM

(accidental double-post)
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#4 thegraingers

thegraingers
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationUK

Posted 03 January 2006 - 07:10 PM

[!--quoteo(post=332808:date=Jan 3 2006, 06:39 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 06:39 PM) View Post[/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.
[/quote]


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

#5 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 January 2006 - 07:16 PM

Did/do you have zero-valued UIDs in these tables?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#6 thegraingers

thegraingers
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationUK

Posted 03 January 2006 - 07:40 PM

[!--quoteo(post=332824:date=Jan 3 2006, 07:16 PM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Jan 3 2006, 07:16 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Did/do you have zero-valued UIDs in these tables?
[/quote]

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

#7 LazyJones

LazyJones
  • Members
  • PipPipPip
  • Advanced Member
  • 78 posts

Posted 03 January 2006 - 07:46 PM

[!--quoteo(post=332832:date=Jan 3 2006, 02:40 PM:name=thegraingers)--][div class=\'quotetop\']QUOTE(thegraingers @ Jan 3 2006, 02:40 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
no, in both tables the lowest auto increment value present is 1
[/quote]

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

#8 thegraingers

thegraingers
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationUK

Posted 03 January 2006 - 07:49 PM

[!--quoteo(post=332837:date=Jan 3 2006, 07:46 PM:name=LazyJones)--][div class=\'quotetop\']QUOTE(LazyJones @ Jan 3 2006, 07:46 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
So are you trying to insert 0 into that field then?
[/quote]

no

#9 thegraingers

thegraingers
  • Members
  • Pip
  • Newbie
  • 9 posts
  • LocationUK

Posted 03 January 2006 - 08:01 PM

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

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

#10 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 03 January 2006 - 09:40 PM

Then post the statements in question... none of this story makes any sense.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users