> Howdy All!
> This is not mine, but a comment I found in the manual that I would very
> like to see answered.
> How does the combination of auto_increment and last_insert_id() work in
> concurrent situation:
> User1 inserts with auto_increment, and for some reason is delayed with
> last_insert_id() call.
> User2 inserts with auto_increment.
> User2 calls last_insert_id()
> User1 finally calls last_insert_id()
> Which id does User1 get?
> Which id does User2 get?
> Any helpful answers would by much appreciated!
ISTR that each last_insert_id() is relevant only to its own
thread/connection - ie it will only give the last id for the bod that does
the insert concerned. However, I don't know how long the delay might be
able to last.....