iliaa Sun Jan 14 16:57:50 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/pdo_dblib dblib_stmt.c
Log:
Fixed bug #40121 (PDO_DBLIB driver wont free statements).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.494&r2=1.2027.2.547.2.495&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.494 php-src/NEWS:1.2027.2.547.2.495
--- php-src/NEWS:1.2027.2.547.2.494 Fri Jan 12 14:37:46 2007
+++ php-src/NEWS Sun Jan 14 16:57:50 2007
@@ -4,6 +4,7 @@
- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
- Improved proc_open(). Now on Windows it can run external commands not through
CMD.EXE. (Dmitry)
+- Fixed bug #40121 (PDO_DBLIB driver wont free statements). (Ilia)
- Fixed bug #40098 (php_fopen_primary_script() not thread safe). (Ilia)
- Fixed bug #40091 (spl_autoload_register with 2 instances of the same
class). (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo_dblib/dblib_stmt.c?r1=1.6.2.2.2.2&r2=1.6.2.2.2.3&diff_format=u
Index: php-src/ext/pdo_dblib/dblib_stmt.c
diff -u php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.2
php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.3
--- php-src/ext/pdo_dblib/dblib_stmt.c:1.6.2.2.2.2 Mon Jan 1 09:36:04 2007
+++ php-src/ext/pdo_dblib/dblib_stmt.c Sun Jan 14 16:57:50 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dblib_stmt.c,v 1.6.2.2.2.2 2007/01/01 09:36:04 sebastian Exp $ */
+/* $Id: dblib_stmt.c,v 1.6.2.2.2.3 2007/01/14 16:57:50 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
@@ -250,6 +250,17 @@
return 1;
}
+static int dblib_mysql_stmt_cursor_closer(pdo_stmt_t *stmt TSRMLS_DC)
+{
+ pdo_dblib_stmt *S = (pdo_mysql_stmt*)stmt->driver_data;
+
+ if (S->rows) {
+ free_rows(S TSRMLS_CC);
+ S->rows = NULL;
+ }
+
+ return 1;
+}
struct pdo_stmt_methods dblib_stmt_methods = {
pdo_dblib_stmt_dtor,
@@ -261,5 +272,7 @@
NULL, /* set attr */
NULL, /* get attr */
NULL, /* meta */
+ NULL, /* nextrow */
+ dblib_mysql_stmt_cursor_closer
};
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php