Bug#390144: closing dbh with active statement handles
Matt Ryan
matt.ryan at banana.org.uk
Fri Sep 29 13:01:54 UTC 2006
Package: libdbd-sqlite3-perl
Version: 1.13-1
Simple PERL script produces the error "closing dbh with active statement
handles" on disconnect.
Create a sample empty database (also errors if there is data in the table):
echo 'CREATE TABLE test_table (column_one text);' | sqlite3 test_sqlite.db
then run the following script:
#!/usr/bin/perl -w
#
use strict;
use DBI;
my($dbh) = DBI->connect("DBI:SQLite:dbname=test_sqlite.db");
unless($dbh) {
print(STDERR "${ProgName}: Cannot connect to database\n");
exit(1);
}
my($sqlite_version) = $dbh->{sqlite_version};
print("\$sqlite_version = [$sqlite_version]\n");
my($sql_S) = $dbh->prepare("SELECT column_one FROM test_table") ||
die($dbh->errstr());
$sql_S->execute() || die($dbh->errstr());
while($sql_S->fetchrow_hashref()) {
}
$sql_S->finish() || die($dbh->errstr());
$dbh->disconnect();
# Program End
exit(0);
A search of Google turns up a few references to this, but nothing that
seems to fix or explain the issue.
Matt.
More information about the pkg-perl-maintainers
mailing list