[CDBI] prepared statements and InactiveDestroy

[prev] [thread] [next] [Date index for 2005/11/05]

From: Aaron Turner
Subject: [CDBI] prepared statements and InactiveDestroy
Date: 01:21 on 05 Nov 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm writing a Class::DBI app which fork()'s where both parent and  
child need to keep the DBI handle.  Hence, I'm using  $dbh-> 
{InactiveDestroy} = 1; in the child so that when the child exits, the  
handle isn't thrown away.  However, after a few children, I start  
getting DBI errors like:

DBD::Pg::st execute failed: ERROR:  prepared statement "dbdpg_6" does  
not exist
[for Statement "SELECT protocol_typeid
FROM   mucore.protocol_type
WHERE  name = ?
" with ParamValues: 1='proto/http'] at /usr/lib/perl5/site_perl/5.8.5/ 
DBIx/ContextualFetch.pm line 51.

Since i know prepared statements in postgreSQL are tied to a session,  
it seems like the handle is still being destroyed and Class::DBI  
doesn't know it and is trying to re-use the prepared statement.   
Unfortunately, i'm at a loss of how to work around this issue.  Any  
ideas?

Using the latest Class::DBI, Class::DBI::Pg and DBI from CPAN as of  
today.

Thanks,
Aaron

- --
Aaron Turner, Sr. Security Engineer                    
<aturner@xxxxxxxxxx.xxx>
Ph: 408.329.6320          Fax: 408.329.6317


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDbAkmklVhPAXg8nARAkyMAJ9IkfGXFPFUC9rdbmbmXRpP/Juv1QCfUXn/
3exgKI7FZDn9kZnr1fh2z9E=
=+twE
-----END PGP SIGNATURE-----

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

[CDBI] prepared statements and InactiveDestroy
Aaron Turner 01:21 on 05 Nov 2005

Re: [CDBI] prepared statements and InactiveDestroy
Perrin Harkins 18:08 on 07 Nov 2005

Generated at 20:55 on 09 Nov 2005 by mariachi v0.52