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."
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.