2 Sep
2004
2 Sep
'04
4:48 p.m.
Howdy everyone! LAST_INSERT_ID() in MySQL returns the number of the last automatically generated autoincrement value on a per-connection basis. Now, as far as I understand, when using ZMySQLDA all queries share one connection which saves a lot of time, because it is not necessary to open a new connection for each and every statement. But what happens when the server load is increasing and there are many insert statements? Wouldn't it be possible that another insert would be executed by another Zope thread in between an insert and a corresponding select LAST_INSERT_ID() so that LAST_INSERT_ID() would not return the expected value? Cheers, Ragnar