Bug #22898 | Wrong binary log replay for substitution "IS NULL" -> "= <LAST_INSERT_ID>" | ||
---|---|---|---|
Submitted: | 2 Oct 2006 16:08 | Modified: | 28 May 2007 8:17 |
Reporter: | Tomash Brechko | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S3 (Non-critical) |
Version: | 5.1.12 | OS: | Any |
Assigned to: | Chuck Bell | CPU Architecture: | Any |
[2 Oct 2006 16:08]
Tomash Brechko
[3 Oct 2006 12:11]
Valeriy Kravchuk
Thank you for a bug report. Verified just as described with 5.1.12-BK on Linux.
[28 May 2007 8:17]
Lars Thalmann
On Thu, May 24, 2007 at 04:25:22PM +0200, Sergei Golubchik wrote: > This is clearly documented in the manual, and as such, it's not a bug: > > * You can find the row that contains the most recent > `AUTO_INCREMENT' value by issuing a statement of the > following form immediately after generating the value: > > SELECT * FROM TBL_NAME WHERE AUTO_COL IS NULL > > This behavior can be disabled by setting > `SQL_AUTO_IS_NULL=0'. See *Note set-option::. > > > The main questions are: > > > > 1. Can (*) be used in other connections to find the last auto > > increment number, or can it only find the value of the same > > connection? > > Note above "immediately after generating the value". > No. > > > 2. Can (*) be used only in the next-coming query or can it be used > > forever in the same thread to find the last auto inc value? > > Only.