Bug #10763 last_insert_id() and @@identity after some query executions
Submitted: 20 May 2005 12:15 Modified: 20 May 2005 15:24
Reporter: Thomas Stegemann Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.6 OS:Windows (Win XP)
Assigned to: CPU Architecture:Any

[20 May 2005 12:15] Thomas Stegemann
Description:
The execution of the last_insert_id() and @@identity commands does not work as expected. We think this depends on the session opening and closing each time a statement is executed.

(result is 0 everytime)

How to repeat:
create a database with a testtab and insert some values,
then call select last_insert_id() or select @@identity;

Suggested fix:
Implement correct session handling in the query browser.

Other tools (like Toad) are working properly.
[20 May 2005 15:24] MySQL Verification Team
Yes you are right for each statement the QB uses a new session
by design.