Skip Menu |

This queue is for tickets about the Class-DBI-mysql CPAN distribution.

Report information
The Basics
Id: 19721
Status: open
Priority: 0/
Queue: Class-DBI-mysql

People
Owner: Nobody in particular
Requestors: ABH [...] cpan.org
Cc: zach [...] zachlipton.com
AdminCc:

Bug Information
Severity: Important
Broken in: 1.00
Fixed in: (no value)



Subject: Active statement handle warning with new DBD::mysql
The latest DBD::mysql gives a warning about a statement handle still being active when using Class::DBI:;mysql. This patch fixes it. (The line numbers might be slightly off) [ask@g5 ~/src/winces]$ svn diff lib/Class/DBI/mysql.pm Index: lib/Class/DBI/mysql.pm ========================================================= ========== --- lib/Class/DBI/mysql.pm (revision 1505) +++ lib/Class/DBI/mysql.pm (working copy) @@ -67,6 +67,7 @@ push @cols, $col; push @pri, $col if $hash->{key} eq "PRI"; } + $sth->finish; $class->_croak("$table has no primary key") unless @pri; $class->columns(Primary => @pri); $class->columns(All => @cols);
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Tue, 6 Jun 2006 07:23:31 +0100
To: via RT <bug-Class-DBI-mysql [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Mon, Jun 05, 2006 at 10:47:09PM -0400, via RT wrote: Show quoted text
> The latest DBD::mysql gives a warning about a statement handle still being active when using > Class::DBI:;mysql. This patch fixes it. (The line numbers might be slightly off)
The DBI docs imply that this is a bug in the driver. Is this something that has been introduced in error in DBD::mysql? Tony
CC: ABH [...] cpan.org
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Tue, 6 Jun 2006 03:45:03 -0700
To: bug-Class-DBI-mysql [...] rt.cpan.org
From: Ask Bjørn Hansen <ask [...] perl.org>
On Jun 5, 2006, at 11:24 PM, Tony Bowden via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19721 > > > On Mon, Jun 05, 2006 at 10:47:09PM -0400, via RT wrote:
>> The latest DBD::mysql gives a warning about a statement handle >> still being active when using >> Class::DBI:;mysql. This patch fixes it. (The line numbers might >> be slightly off)
> > The DBI docs imply that this is a bug in the driver. Is this something > that has been introduced in error in DBD::mysql?
Hmn, maybe it's not setting "Active" to false properly on the "DESCRIBE TABLE" thing after all data has been read. (I can't see how the code doesn't read all the data). Nonetheless, adding $sth->finish is harmless and quenches the warning. - ask
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Tue, 6 Jun 2006 13:39:42 +0100
To: "ask [...] perl.org via RT" <bug-Class-DBI-mysql [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Tue, Jun 06, 2006 at 06:45:35AM -0400, ask@perl.org via RT wrote: Show quoted text
> > The DBI docs imply that this is a bug in the driver. Is this something > > that has been introduced in error in DBD::mysql?
> Hmn, maybe it's not setting "Active" to false properly on the > "DESCRIBE TABLE" thing after all data has been read. (I can't see > how the code doesn't read all the data). > Nonetheless, adding $sth->finish is harmless and quenches the warning.
I've noticed that the problem occurs more generally than this, however, so I don't know whether there's something I need to fix in Class::DBI itself, or this is a temporary glitch from a buggy release of DBD::mysql... Tony
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Mon, 12 Jun 2006 13:27:14 -0700
To: bug-Class-DBI-mysql [...] rt.cpan.org
From: Ask Bjørn Hansen <ask [...] perl.org>
On Jun 6, 2006, at 5:41 AM, Tony Bowden via RT wrote: Show quoted text
> I've noticed that the problem occurs more generally than this, > however, > so I don't know whether there's something I need to fix in Class::DBI > itself, or this is a temporary glitch from a buggy release of > DBD::mysql...
FWIW, I tried reproducing it with a simple test in the DBD-mysql test suite, but couldn't make the error pop up there.... - ask -- http://www.askbjoernhansen.com/
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Mon, 12 Jun 2006 22:39:07 +0100
To: "ask [...] perl.org via RT" <bug-Class-DBI-mysql [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Mon, Jun 12, 2006 at 04:27:43PM -0400, ask@perl.org via RT wrote: Show quoted text
> FWIW, I tried reproducing it with a simple test in the DBD-mysql test > suite, but couldn't make the error pop up there....
Bizarre. I'm slightly reluctant to add a finish() as I'm worried it might be masking a deeper problem. As you say, there's no way it should really get there without having already fetched all the rows, so working out why it thinks there are rows left (which would be important to find when setting up Columns) seems more useful than just telling it to discard any unfetched rows... Tony
From: ask [...] develooper.com
... and as you said there's a similar problem with Ima::DBI (or DBIx::ContextualFetch?) FWIW I haven't seen it with anything else than CDBI apps. :-/ - ask
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Thu, 6 Jul 2006 13:25:00 +0100
To: Guest via RT <bug-Class-DBI-mysql [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Thu, Jul 06, 2006 at 07:53:33AM -0400, Guest via RT wrote: Show quoted text
> FWIW I haven't seen it with anything else than CDBI apps. :-/
Perhaps this is because so many people cargo-cult a ->finish()? ISTR seeing something in a changelog fixing a problem with DBD::mysql recently that might have been the cause of this, but I can't find it atm. Perhaps I imagined it... Tony
From: ZLIPTON [...] cpan.org
Any word on this bug? I'm seeing it dependably with my cdbi application.
Subject: Re: [rt.cpan.org #19721] Active statement handle warning with new DBD::mysql
Date: Sat, 22 Jul 2006 00:33:23 +0100
To: via RT <bug-Class-DBI-mysql [...] rt.cpan.org>
From: Tony Bowden <tony [...] kasei.com>
On Fri, Jul 21, 2006 at 06:18:31PM -0400, via RT wrote: Show quoted text
> Any word on this bug? I'm seeing it dependably with my cdbi application.
I still don't know where the bug is. I don't believe it's in Class::DBI Tony