wez             Fri Oct 28 22:16:37 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/pdo_mysql      mysql_statement.c 
  Log:
  argh! we don't want to NULL the stmt here; freeing the results is not the same
  as destroying the prepared statement handler, so we're leaking and breaking, 
as
  can be seen by running the test suite.
  
  brown paper bag for PDO in PHP 5.1RC4?
  
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.5&r2=1.48.2.6&ty=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.5 
php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.6
--- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.5    Thu Oct 27 13:26:19 2005
+++ php-src/ext/pdo_mysql/mysql_statement.c     Fri Oct 28 22:16:35 2005
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysql_statement.c,v 1.48.2.5 2005/10/27 17:26:19 tony2001 Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.6 2005/10/29 02:16:35 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -244,7 +244,6 @@
 #if HAVE_MYSQL_STMT_PREPARE
        if (S->stmt) {
                mysql_stmt_free_result(S->stmt);
-               S->stmt = NULL;
        }
 #endif
        if (S->result) {
@@ -574,7 +573,6 @@
 #if HAVE_MYSQL_STMT_PREPARE
        if (S->stmt) {
                int retval = mysql_stmt_free_result(S->stmt);
-               S->stmt = NULL;
                return retval ? 0 : 1;
        }
 #endif

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to