Skip Menu |
 

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

Report information
The Basics
Id: 20009
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: radoslaw.pociecha [...] hurra.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.0004
Fixed in: (no value)



Subject: statement handle is not closed after fetching all rows
Download (untitled) / with headers
text/plain 854b
Hi, statement handle is not closed after fetching all rows, e.g.: #id is a primary key my $sth = $dbh->prepare(q{SELECT * FROM table WHERE id = ?}); $sth->execute(52768); $sth->fetchrow_arrayref; $sth->fetchrow_arrayref; $sth->fetchrow_arrayref; # here $sth is stil active this seems to be a bug in dbdimp.c, after patching it with: @@ -2952,6 +2952,9 @@ do_error(sth, mysql_errno(&imp_dbh->mysql), mysql_error(&imp_dbh->mysql)); + if (!DBIc_COMPAT(imp_sth)) + dbd_st_finish(sth, imp_sth); + return Nullav; } everything seems to be ok. These added lines were removed from version 3.0003. Bug appears since version 3.0004, in 3.0003 it is ok. I'm using DBD::mysql version 3.0006, DBI version 1.51, perl 5.8.8, mysql-client 2.0.22.I have tried it on FreeBSD 5.4, 6.0, 6.1. Radoslaw Pociecha
From: guest
Download (untitled) / with headers
text/plain 468b
On Di. 20. Jun. 2006, 11:29:29, guest wrote: Show quoted text
> Hi, > > statement handle is not closed after fetching all rows, e.g.: > > #id is a primary key > my $sth = $dbh->prepare(q{SELECT * FROM table WHERE id = ?}); > $sth->execute(52768); > $sth->fetchrow_arrayref; > $sth->fetchrow_arrayref; > $sth->fetchrow_arrayref; > # here $sth is still active
I don't understand the problem. Why the $sth should be "closed" here? What if the code following is $sth->execute(1234); ...
Download (untitled) / with headers
text/plain 114b
This is already fixed in 3.0007_1. (Sorry I didn't close this ticket at the time, I missed this extra duplicate.)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.