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

Forgot to mention that it works perfectly with MySQL driver.


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

[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