Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 19610
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: jsnell [...] cloudmark.com
RSOD [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 3.0004: memory leak with server-side prepares, MySQL 4.1.14, RHEL3, Perl 5.8.4
Date: Tue, 30 May 2006 14:11:49 -0700
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Jason Snell" <jsnell [...] cloudmark.com>
Download (untitled) / with headers
text/plain 787b
First, here are the perl/mysql versions involved: MySQL: 4.1.14 Perl: 5.8.0 DBI: 1.50 DBD::mysql: 3.0004 Here is a simple perl script that uses server side prepares (db vars removed): #!/usr/bin/perl -w use strict; use DBI; my $ssp = 1; my $count = 0; my $query = "SELECT 1 FROM DUAL"; my $dbh = DBI->connect ( "dbi:mysql:database=$DBName:host=$DBHost:mysql_server_prepare=$ssp", $DBUser, $DBPass, { RaiseError => 1, PrintError => 0 }, ); my $s_q = $dbh->prepare($query); while (1) { $s_q->execute(); my @data = $s_q->fetchrow_array(); $s_q->finish; $count++; print "ran $count queries\r"; sleep(0.3); } This script, when run, will eat about 10M of memory a second. Am I missing something about server side prepares? Cheers, -Jason
Download (untitled) / with headers
text/plain 998b
This was fixed in 3.0005/3.0005_1 Thanks! Patrick On Tue May 30 17:13:02 2006, jsnell@cloudmark.com wrote: Show quoted text
> First, here are the perl/mysql versions involved: > MySQL: 4.1.14 > Perl: 5.8.0 > DBI: 1.50 > DBD::mysql: 3.0004 > > Here is a simple perl script that uses server side prepares (db vars > removed): > > #!/usr/bin/perl -w > > use strict; > use DBI; > > my $ssp = 1; > my $count = 0; > > my $query = "SELECT 1 FROM DUAL"; > > my $dbh = DBI->connect ( > > "dbi:mysql:database=$DBName:host=$DBHost:mysql_server_prepare=$ssp", > $DBUser, $DBPass, > { RaiseError => 1, PrintError => 0 }, > ); > > my $s_q = $dbh->prepare($query); > > while (1) { > $s_q->execute(); > my @data = $s_q->fetchrow_array(); > $s_q->finish; > > $count++; > > print "ran $count queries\r"; > > sleep(0.3); > } > > This script, when run, will eat about 10M of memory a second. Am I > missing something about server side prepares? > > Cheers, > > -Jason > > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.