Bug #2955 LAST INSERTED ID FOR UNIQUE KEY
Submitted: 25 Feb 2004 4:27 Modified: 4 Feb 2009 14:25
Reporter: Gergo Bacskai Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DML Severity:S4 (Feature request)
Version:4.x OS:Any (All)
Assigned to: CPU Architecture:Any
Tags: ufr

[25 Feb 2004 4:27] Gergo Bacskai
Description:
I have a good idea to make faster dataware houses dimension tables.

If the table has AUTO_INCLEMENT column (C1 Primary Key) and a unique key (in C2,C3,C4)
after the INSERT IGNORE INTO VALUES (NULL,C1,C2,C3)
generate the LAST_INSERTED_ID found PK (c1) of Unique Key
or make a new function for this feature.

Now I can do it in 2 phase/search.
(if not found than insert or is not inserted than find)
Best Regards
Gergõ

How to repeat:
... feature request

Suggested fix:
... feature request
[4 Feb 2009 14:25] Susanne Ebrecht
By using MySQL 5.1 you will have more possibilities to do what you want to do.

So I will close this feature request now.