Bug #38872 | Auto-increment for Innodb does not work for mixed and statement based formats | ||
---|---|---|---|
Submitted: | 18 Aug 2008 18:44 | Modified: | 26 Feb 2009 20:10 |
Reporter: | Hema Sridharan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S2 (Serious) |
Version: | mysql-6.0-backup, mysql-6.0, 5.1 bzr | OS: | Linux |
Assigned to: | Luis Soares | CPU Architecture: | Any |
Tags: | regression |
[18 Aug 2008 18:44]
Hema Sridharan
[18 Aug 2008 19:27]
Sveta Smirnova
Thank you for the report. Verified as described. Looks like duplicate of bug #31612. And this is not repeatable with 5.0 as latter.
[20 Aug 2008 15:07]
Hema Sridharan
Test case for seperate inserts
Attachment: test1.txt (text/plain), 1.93 KiB.
[20 Aug 2008 15:08]
Hema Sridharan
Test case using Row based format
Attachment: test2.txt (text/plain), 1.70 KiB.
[20 Aug 2008 18:22]
Peter Gulutzan
Lars Thalmann wrote: "We do not guarantee that the autoinc numbers are consecutive without gaps, only that they are strictly increasing. Peter G should confirm this before the bug gets closed." Unfortunately we do guarantee that. The MySQL Reference Manual says "innodb_autoinc_lock_mode = 0 ... assures that the auto-increment values assigned by any given statement are consecutive (although "gaps" can exist within a table if a transaction that generated auto-increment values is rolled back, as discussed later)." http://dev.mysql.com/doc/refman/5.1/en/innodb-auto-increment-handling.html Bug#38872 isn't about rollback. The word "consecutive" generally means "without gaps". And other places on that page imply the same thing. So I'd suggest a wait until Bug#31612 is fixed, then test again with innodb_autoinc_lock_mode=0. In the long term MySQL should try to abandon this wording. Other DBMSs tend to avoid consecutiveness guarantees, see http://web.archive.org/web/20030401185932/www.dbazine.com/gulutzan4.html
[26 Feb 2009 15:51]
Lars Thalmann
Verifier, since BUG#31612 is now fixed, and that bug was suggested as a possible reason why this bug appeared, can you please re-verify this bug?
[26 Feb 2009 20:10]
Sveta Smirnova
Lars, thank you for the feedback. Bug is not repeatable anymore since version 5.1.29.