ID:               40121
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         PDO related
 Operating System: Mac OS X 10.4.8
 PHP Version:      5.2.1RC2
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2007-01-13 18:23:10] [EMAIL PROTECTED]

Forgot to mention that it works perfectly with MySQL driver.

------------------------------------------------------------------------

[2007-01-13 18:19:43] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=40121&edit=1

Reply via email to