Bug #45363 autoincrement counter increases when it should not
Submitted: 8 Jun 2009 8:26 Modified: 8 Jun 2009 8:45
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.34 OS:Any
Assigned to: CPU Architecture:Any

[8 Jun 2009 8:26] Peter Laursen
Description:
This
http://bugs.mysql.com/bug.php?id=37560.

Should neve have been closed.  It is clearly reproducable on 5.1.34.

We experience this after moving to another server and upgrading MySQL from 4.1.22 to 5.1.34.

my webteam describes it like this:
"when we process order for a customer who is already there in database , then also the auto increment is increased(but it should not) and then when we add a fresh customer, the customer_id will again be increased. So we have missing  customer_ids."

or in other words if an existing row is UPDATED also the AC counter increases

How to repeat:
see above!

Suggested fix:
old behaviour please! Though the value of AC fields is principially not important, it is very annoying!
[8 Jun 2009 8:33] Peter Laursen
corrected typo in synopsis!
[8 Jun 2009 8:45] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Please read at http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html how changed AUTO_INCREMENT Handling in InnoDB in version 5.1