"closing dbh with active statement handles" warnings with DBD::SQLite
am 02.05.2006 13:18:39 von shlomifHi all!
I'm using DBD::SQLite and with the following program or similar, I'm getting a
"closing dbh with active statement handles" warning:
<<<<<<
use strict;
use warnings;
use DBI;
my $dbh = DBI->connect("dbi:SQLite:dbname=test.db", "", "");
$dbh->do("CREATE TEMP TABLE test (a INTEGER, b INTEGER)");
my $sth = $dbh->prepare("INSERT INTO test VALUES(?,?)");
# $sth->execute(5,6);
# $sth->{Active} = 1;
# $sth->finish();
>>>>>>
This is related to this bug:
http://rt.cpan.org/Public/Bug/Display.html?id=17603
And to the comment with the "closing dbh with active" text in:
http://rt.cpan.org/Public/Bug/Display.html?id=9643
Now, if I uncomment the $sth->execute() line, these warnings disappear. Also,
if I uncomment the $sth->{Active} = 1 and $sth->finish() lines, these
warnings disappear. However, if I uncomment all three lines, I get the
following error:
<<<
DBD::SQLite::st finish failed: not an error(21) at dbdimp.c line 550 at
mytest.pl line 10.
>>>
I'm looking for a way to eliminate these warnings without breaking anything,
whether or not I'm using these statement handles.
Regards,
Shlomi Fish
------------------------------------------------------------ ---------
Shlomi Fish shlomif@iglu.org.il
Homepage: http://www.shlomifish.org/
95% of the programmers consider 95% of the code they did not write, in the
bottom 5%.