Bug #89225 | INSERT INTO ... VALUES (DEFAULT) on auto_increment becomes unexpected value 0 | ||
---|---|---|---|
Submitted: | 14 Jan 2018 21:09 | Modified: | 15 Jan 2018 7:30 |
Reporter: | Ryuta Kamizono | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[14 Jan 2018 21:09]
Ryuta Kamizono
[15 Jan 2018 7:30]
MySQL Verification Team
Thank you for the bug report. Expected behavior as documented: https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_value_on_zero "NO_AUTO_VALUE_ON_ZERO NO_AUTO_VALUE_ON_ZERO affects handling of AUTO_INCREMENT columns. Normally, you generate the next sequence number for the column by inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO suppresses this behavior for 0 so that only NULL generates the next sequence number."