Bug #60512 | mysql_insert_id() reports wrong value | ||
---|---|---|---|
Submitted: | 17 Mar 2011 13:06 | Modified: | 17 Mar 2011 20:40 |
Reporter: | Guenther Schmidt | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: C API (client library) | Severity: | S3 (Non-critical) |
Version: | 5.1 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[17 Mar 2011 13:06]
Guenther Schmidt
[17 Mar 2011 20:40]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Please read at http://dev.mysql.com/doc/refman/5.1/en/information-functions.html#function_last-insert-id: For MySQL 5.1.12 and later, LAST_INSERT_ID() (with no argument) returns the first automatically generated value successfully inserted for an AUTO_INCREMENT column as a result of the most recently executed INSERT statement. The value of LAST_INSERT_ID() remains unchanged if no rows are successfully inserted. So this is not a bug as value 1 was just not changed after SHOW WARNINGS run