|
| <prev next> |
Memory leak in DBD::mysql with server side prepares?: msg#00048db.mysql.perl
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 * FROM content_class WHERE id = ? LIMIT 1"; my $dbh_l = DBI->connect ( "dbi:mysql:database=$DBName:host=$DBHost:mysql_server_prepare=$ssp", $DBUser, $DBPass, { RaiseError => 1, PrintError => 0 }, ); my $s_q = $dbh_l->prepare($query); my $id = 484262734; while (1) { $s_q->execute($id); 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 -- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@xxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: bug in DBD::MySQL on Ubuntu / Sarge: 00048, Martin Waite |
|---|---|
| Previous by Thread: | example dir eg/ missing from distribution?i: 00048, paul lucassen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |