From: [EMAIL PROTECTED]
Operating system: Mac OS X 10.4.8
PHP version: 5.2.1RC2
PHP Bug Type: PDO related
Bug description: DBLIB driver wont free statements
Description:
------------
As stated on the summary, PDO DBLIB driver wont free memory
allocated to statements (or the resultset, not sure). Same
code done with ext/mssql functions works, though.
Reproduce code:
---------------
$db = new PDO('dblib:host=hostname;dbname=database', 'user', 'password');
$query = 'SELECT GETDATE()'; // NOW() on mysql
for ($i = 0; $i < 10; $i++) {
$stmt = $db->query($query); // new statement
$stmt->fetch(); // actual data
$stmt->fetch(); // false; end of resultset
$stmt->closeCursor(); // this should at least free it, right?
$stmt = null; // being paranoid here
echo memory_get_usage() . "\n";
}
Expected result:
----------------
54152
54152
54152
54152
54152
54152
54152
54152
54152
54152
Actual result:
--------------
54152
54252
54292
54332
54372
54412
54452
54492
54532
54572
--
Edit bug report at http://bugs.php.net/?id=40121&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40121&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40121&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40121&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40121&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40121&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40121&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40121&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40121&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40121&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40121&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40121&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40121&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40121&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40121&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40121&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40121&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40121&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40121&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40121&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40121&r=mysqlcfg