From: [email protected]
Operating system:
PHP version: 5.3CVS-2009-02-16 (CVS)
PHP Bug Type: PDO related
Bug description: PDO_Firebird memory leaks when using bindColumn()
Description:
------------
See below.
Reproduce code:
---------------
<?php
$db = new PDO('firebird:dbname=...', 'sysdba', 'foo');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
@$db->exec('drop table test');
$db->exec('CREATE TABLE test(idx int NOT NULL PRIMARY KEY, txt
VARCHAR(20))');
$db->exec('INSERT INTO test VALUES(0, \'String0\')');
$stmt = $db->prepare('SELECT idx, txt FROM test ORDER by idx');
$idx = $txt = 0;
$stmt->bindColumn('IDX', $idx);
$stmt->bindColumn('TXT', $txt);
$stmt->execute();
while($stmt->fetch(PDO::FETCH_BOUND)) {
var_dump(array($idx=>$txt));
}
Actual result:
--------------
array(1) {
[0]=>
string(7) "String0"
}
[Mon Feb 16 19:30:09 2009] Script: '../test.php'
/home/felipe/dev/php5/main/spprintf.c(775) : Freeing 0x090E8A64 (79
bytes), script=../test.php
Last leak repeated 1 time
=== Total 2 memory leaks detected ===
--
Edit bug report at http://bugs.php.net/?id=47414&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=47414&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=47414&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=47414&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=47414&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=47414&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=47414&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=47414&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=47414&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=47414&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=47414&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=47414&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=47414&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=47414&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=47414&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47414&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47414&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=47414&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=47414&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=47414&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=47414&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=47414&r=mysqlcfg