From: i-devolder at jm-bruneau dot be
Operating system: Linux 2.6.26 ( Debian )
PHP version: 5.3.0RC2
PHP Bug Type: PDO related
Bug description: PDO_mysql memory leak
Description:
------------
When running a query the memoryusage keeps on rising, discovered with huge
resultsets
Reproduce code:
---------------
$test = new PDO( $dsn , $usr , $pss );
$sql = "SELECT * FROM tech_eciffOkcab.crawlPriceComp";
$stmt = $test->prepare( $sql );
$stmt->execute();
while( $row = $stmt->fetch( PDO::FETCH_ASSOC ) ) {
echo memory_get_usage()."\n";
}
Expected result:
----------------
57752
57752
57752
57752
57752
57752
57752
57752
57752
57752
output from php 5.2.9, memory usage stays the same
Actual result:
--------------
33552328
33552440
33552552
33552664
33552776
33552888
33553000
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried
to allocate 20 bytes) in /home/idev/web/private/cmdscripts/testmem.php on
line 16
output from php 5.3RC2, memory usage keeps increasing ( this is on a table
with 1.2 million records
--
Edit bug report at http://bugs.php.net/?id=48525&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48525&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48525&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48525&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48525&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48525&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48525&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48525&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48525&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48525&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48525&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48525&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48525&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48525&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48525&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48525&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48525&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48525&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48525&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48525&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48525&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48525&r=mysqlcfg