MySQL Forums
Forum List  »  General

Re: insert ignore ... auto increment value
Posted by: Dallan Hunt
Date: December 03, 2009 12:21PM

One issue I can imagine, is that say for example you use, just to make the point, a TINYINT as your unique id. TINYINT has a max positive value of 127 I believe.

Now suppose you have the id auto inrementing and you are at 126, and then you delete them all. Inserting again with auto increment will give 127. Now what happens if you insert again? On v5.1.36 the auto increment no longer increments (expected I suppose). But the problem is that now you lose the feature of auto increment for every subsequent insert, since now it becomes a manual job of selecting the old, lower number ids which were used before.

Auto increment seems only to be useful one time through to the max of the id data type.

Options: ReplyQuote


Subject
Written By
Posted
Re: insert ignore ... auto increment value
December 03, 2009 12:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.