Bug #98595 | Auto-inc number is different between different connections | ||
---|---|---|---|
Submitted: | 14 Feb 2020 9:30 | Modified: | 14 Feb 2020 13:46 |
Reporter: | Fengchun Hua | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.18 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[14 Feb 2020 9:30]
Fengchun Hua
[14 Feb 2020 13:46]
MySQL Verification Team
Hi Mr. Hua, Thank you for your bug report. However, this is not a bug. This is exactly how the traditional auto-increment lock is designed to work in InnoDB storage engine, having in mind that InnoDB is also a MVCC engine. This is all thoroughly described in our Reference Manual, chapter 15.6.1. Simply, auto-increment lock is a table lock. In a single connection, the value of the next auto_increment value can be reused. This is not possible in concurrent connections, due to MVCC. Hence, you get the expected result. Last, but not least, this behaviour can not be changed and it is the same for any value of innodb_autoinc_lock_mode. Not a bug.