Re: DBD::mysql::st execute warning

[prev] [thread] [next] [Date index for 2005/01/03]

From: Perrin Harkins
Subject: Re: DBD::mysql::st execute warning
Date: 22:38 on 03 Jan 2005
On Mon, 2005-01-03 at 01:51 +0000, Scott McWhirter wrote:
> I've come across this recently and the
> main fix is to implement a "ping" subroutine since mysql doesn't
> implement one itself.

According to the ChangeLog, MySQL has had a ping subroutine for
something like 6 years.  You should not implement your own.

> Also things like caching statement handles without
> using "prepare_cached" is a very bad thing.

It looks like Ima::DBI does the right thing there, calling
prepare_cached() each time you ask for the handle.  The symptoms though
point to a cached statement handle that tries to use a database
connection that has gone away.

> In the main, it looks more like a DBI/DBD problem rather than a
> Class::DBI one.

I don't think so.  DBI/DBD::mysql do the right thing when you call
connect_cached() and prepare_cached(), so this most likely is caused by
a statement handle getting kept around someplace in Ima::DBI or
Class::DBI.

I'd suggest a bit more debugging by manually dropping and restarting the
mysql server after a few requests, and seeing if it can pick up
correctly.  It's probably a good idea to add some extra debugging into
the Ima::DBI code to see if it is calling the right things (doing the
ping and prepare_cached) in the request where you have the problem.

- Perrin

DBD::mysql::st execute warning
cdbi 19:47 on 02 Jan 2005

Re: DBD::mysql::st execute warning
Scott McWhirter 01:51 on 03 Jan 2005

Re: DBD::mysql::st execute warning
Perrin Harkins 22:38 on 03 Jan 2005

Re: DBD::mysql::st execute warning
cdbi 00:19 on 05 Jan 2005

Re: DBD::mysql::st execute warning
cdbi 01:43 on 05 Jan 2005

Re: DBD::mysql::st execute warning
Perrin Harkins 05:12 on 05 Jan 2005

Generated at 12:15 on 16 Jan 2005 by mariachi v0.52