Bug#390144: libdbd-sqlite3-perl: closing dbh with active statement handles

Niko Tyni ntyni at iki.fi
Sat Nov 25 20:36:08 CET 2006


forwarded 390144 http://rt.cpan.org/Public/Bug/Display.html?id=22688
thanks

On Sun, Nov 19, 2006 at 11:44:01AM +0100, Bart Martens wrote:

> t/06sqlite.........closing dbh with active statement handles at /home/bart/src/libclass-dbi-loader-perl/libclass-dbi-loader-perl-0.33/blib/lib/Class/DBI/Loader/SQLite.pm line 110.

Hi,

apparently DBD::SQLite doesn't call sqlite3_finalize() for prepared
statements at disconnect time, resulting in sqlite3_close() getting
SQLITE_BUSY. A workaround is to explicitly undefine the prepared
handle object, so that sqlite_st_destroy() gets called.

In my understanding the code should keep track of the prepared handles so
it can destroy them when disconnecting, as suggested in eg. the DBI::DBD
documentation [1].

This is also CPAN bug #22688. I'll send my comments there as well.

[1] http://search.cpan.org/~timb/DBI/lib/DBI/DBD.pm#The_dbd_db_disconnect_method

Cheers,
-- 
Niko Tyni	ntyni at iki.fi




More information about the pkg-perl-maintainers mailing list