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.

> Unless (and I don't understand much about Apache) each the process is used
> to serve one request completely and then the next. If this is the case then
> it seems that LAST_INSERT_ID would be reliable.

That is correct.

- Perrin

Reply via email to