[CDBI] Problem with new DBD::mysql driver?

James M jmessrie at cox.net
Wed May 31 02:27:01 BST 2006

Even a simple script like this was causing the warning (on the 2nd search):

my $obj = MyClass->search(attr => 'value1')->first;
$obj = MyClass->search(attr => 'value2')->first;

-----Original Message-----
From: Matt S Trout [mailto:dbix-class at trout.me.uk] 
Sent: Tuesday, May 30, 2006 12:49 PM
To: jmessrie at cox.net
Cc: classdbi at lists.digitalcraftsmen.net
Subject: Re: [CDBI] Problem with new DBD::mysql driver?

jmessrie at cox.net wrote:
> Recently I upgraded from 3.0003 to 3.0004.  I noticed that I suddenly
started receiving tons of warnings from my Class::DBI scripts such as:
> statement handle DBIx::ContextualFetch::st=HASH(0x18bfe60) still Active at
/usr/lib64/perl5/site_perl/5.8.8/Ima/DBI.pm line 381
> It seems like these warnings are from prepare_cached.  The scripts would
still run properly despite the warnings.   I downgraded back to 3.0003 and
everything is fine again.  Did anyone else see something like this?

I suspect that's mysql_auto_reconnect clearing the CachedKids when it 
reconnects, which was done in the name of getting rid of a large class 
of nasty lurking bugs.

That you have lots of active sths around is weird and probably not a 
good thing, though.

(I am not a DBD expert. those who are, please augment/correct as 

More information about the ClassDBI mailing list