Subject: | Bug with non-executed queries |
Date: | Wed, 26 Jul 2006 11:06:12 -0700 (PDT) |
To: | bug-DBD-SQLite [...] rt.cpan.org |
From: | Vini Mat <vmt005 [...] yahoo.com> |
Hi,
This is the first time I report a bug to CPAN, sorry if I'm doing it the wrong way.
This is my test script:
----------------
use DBI;
$dbh = DBI->connect("dbi:SQLite:dbname=blah.db","","",{ AutoCommit => 0 });
$sql = $dbh->prepare("select * from t");
$sql->finish;
$dbh->disconnect;
----------------
(It assumes there is a table called 't' in database 'blah.db')
After running it, I always get a "closing dbh with active statement handles" message. To make sure, I ran the same script on an oracle database (using DBD-Oracle), and didn't get the message (as I expected).
To get around it, I just issued a "$sql->execute" command just before disconnecting. I believe there is something preventing the $dbh->disconnect from resetting the Active flag for child statements that have been prepared but not executed, or something like that.
Thanks,
Vini
---------------------------------
Groups are talking. We´re listening. Check out the handy changes to Yahoo! Groups.