My code has a query that looks like:
INSERT INTO table
VALUES (...)
ON DUPLICATE KEY UPDATE
id = LAST_INSERT_ID(id),
...
id is a PRIMARY KEY.
My question is that I can't for anything remember why I have id = LAST_INSERT_ID(id). I wrote it years ago and it's not commented. Can anyone think of a reason why I was doing this?