develooper Front page | perl.perl5.porters | Postings from July 2008

[perl #56908] DBI memory leak

David Landgren via RT
July 17, 2008 21:01
[perl #56908] DBI memory leak
Message ID:
On Mon Jul 14 00:40:45 2008, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.36 running under perl 5.10.0.
> -----------------------------------------------------------------
> [Please enter your report here]
> Under perl-5.10.0 the following simple program leaks memory,
> while under perl-5.8.8 it does not. DBI module version is the
> same under both perl versions (1.605). The leak seems to be not
> specific to DBD driver, as it also happens with mysql and
> oracle drivers.
> use DBI;
> my $dbh=DBI->connect('DBI:NullP:');
> while(1) {
> 	my $q=$dbh->prepare(q{select 1 from dual});
> }

DBI does some sneaky things with the internals, in the pursuit of raw

The internals were heavily reworked during the development track up to
5.10, and in the process DBI was dinged a couple of times by changes in
assumptions. As such, and given the absence of response so far (in spite
of a delightfully short test snippet -- thank you), I recommend you post
your report to the dbi-users mailing list.

I've cc'ed Tim Bunce on this reply. It just may turn out that Tim has a
easy solution regardless, and was not aware of the bug report.

David Landgren Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About