Bug #106009 | After INSERT ... SELECT, value of AUTO_INCREMENT becomes multiple of 8 | ||
---|---|---|---|
Submitted: | 30 Dec 2021 11:42 | Modified: | 31 Dec 2021 13:09 |
Reporter: | Domen Kermc | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 8.0.27 | OS: | Any |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[30 Dec 2021 11:42]
Domen Kermc
[31 Dec 2021 5:08]
MySQL Verification Team
Hi, This is not a bug. Check documentation: https://dev.mysql.com/doc/refman/8.0/en/replication-options-source.html#sysvar_auto_increm... https://dev.mysql.com/doc/refman/8.0/en/replication-options-source.html#sysvar_auto_increm... happy holidays
[31 Dec 2021 13:09]
Domen Kermc
Described behaviour was tested on two servers: replication source and server that is not taking part in a replication. Variables auto_increment_increment and auto_increment_offset both had value 1 on both servers. Also, as mentioned in bug description, behaviour is correct when inserting separate rows using INSERT ... VALUES (as examples in documentation https://dev.mysql.com/doc/refman/8.0/en/replication-options-source.html#sysvar_auto_increm... do). Only INSERT ... SELECT is problematic. I've delved further. I've tested versions 8.0.27, 8.0.24, 8.0.12, 5.7.35, 5.7.20, 5.7.10 and 5.6.20. They all exhibit this behaviour, but only on InnoDB engine. On MyISAM, INSERT ... SELECT works the same as INSERT ... VALUES. So this may be a bug. If it is, it's been around for a long time. If it's not, I would be grateful if you could point me to the documentation describing (and possibly changing) this behaviour.
[31 Dec 2021 14:57]
MySQL Verification Team
Please check: https://bugs.mysql.com/bug.php?id=105871