[CDBI] Prepared statement handle error under mod_perl

[prev] [thread] [next] [Date index for 2006/01/18]

From: Ryan Tate
Subject: [CDBI] Prepared statement handle error under mod_perl
Date: 23:35 on 18 Jan 2006
This is a fairly vague error report, but I have seen a lot of talk
lately on the list about prepare_cached and DBIx::ContextualFetch, so
I thought I'd ask it now even if the details are a bit sketchy, since
those topics are (theoretically) fresh in peoples' minds.

I run CDBI 0.96 under mod_perl2, DBI 1.48, DBIx::ContextualFetch 1.02,
and one of the first DBD::mysql's to support true prepared statements
(3.0002_1).

Since the DBD::mysql upgrade to true prepared statements, when I
switch one of my CDBI Web apps from CGI mode to mod_perl (persistent),
I will get the following sort of error whenever the app has been out
of use for several hours (just me using it at moment):

DBD::mysql::st execute failed: Unknown prepared statement handler (11)
given to mysql_stmt_execute [for Statement "(SQL cut here)"] at
/usr/local/share/perl/5.8.4/DBIx/ContextualFetch. pm line 51.

You can keep reloading but it doesn't make the error go away. I have
to restart the webserver, which fixes things.

I checked, and the sth that is triggering this (I can tell from the
SQL dump) is properly ->finished in my code.

Line 51 of Contextual Fetch is calling execute on the (obviously cached) st=
h.

Anyone know what's happening before I start banging my head against
this? Thanks for any help.

_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi

[CDBI] Prepared statement handle error under mod_perl
Ryan Tate 23:35 on 18 Jan 2006

Generated at 09:31 on 23 Jan 2006 by mariachi v0.52