Perrin Harkins wrote:
On Fri, Dec 5, 2008 at 5:39 PM, Justin Wyllie <[EMAIL PROTECTED]> wrote:
The mySQL documentation for LAST_INSERT_ID says that it returns the last
auto-incremented field value for 'that client'.

I am not sure what the client is in a mod_perl situation with Apache::DBI?

The current connection.

I have an Apache child process which uses one open database connection for
its lifetime. If 2 page requests use the same child process and thus the
same database connection does the mySQL server not see this as the same
client? If so - this seems to suggest that I can't rely on LAST_INSERT_ID

You can rely on LAST_INSERT_ID.  It is not affected by Apache::DBI.
yes, but, do you really want to gamble that the second request is handled by the same child process? and what if another request comes in between? I'd say this is only reliable during a keepalive session, but it really depends on what you're trying to do.

Enno

Reply via email to