Bug #40121 [Com]: DBLIB driver wont free statements

From: Date: Wed, 23 Oct 2013 19:36:52 +0000
Subject: Bug #40121 [Com]: DBLIB driver wont free statements
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-182413@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=40121&edit=1 ID: 40121 Comment by: b808054 at drdrb dot com Reported by: spheroid@php.net Summary: DBLIB driver wont free statements Status: No Feedback Type: Bug Package: PDO related Operating System: Mac OS X 10.4.8 PHP Version: 5.2.5 Assigned To: fmk Block user comment: N Private report: N New Comment: I have the same problem with version 5.3.10 Previous Comments: ------------------------------------------------------------------------ [2009-05-03 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2009-04-25 14:42:18] jani@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2008-04-24 18:23:58] eric dot johney at sellingsource dot com This is still a problem for me in 5.2.5 using the PDO DBLIB driver. Mysql and mssql_* functions work fine on the same query. ------------------------------------------------------------------------ [2007-01-15 12:11:15] spheroid@php.net And more issues :-) That previous example was done with just one row in the resultset, but after I tried to return more rows, I found something disturbing: Code: $db = new PDO('dblib:host=hostname;dbname=database', 'username', 'password'); $query = 'select top 10 * from table'; $stmt = $db->prepare($query); for ($i = 0; $i < 10; $i++) { $stmt->execute(); $stmt->fetchAll(); $stmt->closeCursor(); echo memory_get_usage() . "\n"; } Output: 172240 240044 307824 375632 443464 511288 579064 646932 714776 782576 ------------------------------------------------------------------------ [2007-01-15 07:07:21] spheroid@php.net After playing around with GDB I noticed that the S->cols is being allocated on different memory block each time. S and S- >rows stay in the same place, though. I suppose this is due the different methods used to allocate memory, but I just don't have enough clue to fix it. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=40121 -- Edit this bug report at https://bugs.php.net/bug.php?id=40121&edit=1

« previous php.bugs (#182413) next »