Bug #35116 LAST_INSERT_ID() give wrong value after REPLACE INTO query
| Submitted: | 6 Mar 2008 15:35 | Modified: | 10 Mar 2008 11:57 |
|---|---|---|---|
| Reporter: | Axel Axel | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 5.0.45 | OS: | Linux (5.0.45-1ubuntu3.1 mysql Ver 14.12 Distrib 5.0.45, for pc-linux-gnu (i486) using readline 5.2) |
| Assigned to: | Paul DuBois | CPU Architecture: | Any |
| Tags: | INSERT_ID, LAST_INSERT_ID, REPLACE | ||
[6 Mar 2008 15:35]
Axel Axel
[6 Mar 2008 20:20]
Valeriy Kravchuk
I think current behaviour is intended and should just be documented clearly.
[10 Mar 2008 11:57]
Sergei Golubchik
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 It is documented clearly: http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id " LAST_INSERT_ID() (with no argument) returns the first *automatically generated* value <skip> The value of LAST_INSERT_ID() is *not changed* if you set the AUTO_INCREMENT column of a row to a non-“magic” value (that is, a value that is not NULL and not 0). "
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.056 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.