wez             Sun Apr  9 06:49:07 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/pdo_mysql      mysql_statement.c 
  Log:
  This completes the fix for PECL #5827; we need to gobble up result sets in the
  stmt dtor too.
  
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo_mysql/mysql_statement.c?r1=1.48.2.12&r2=1.48.2.13&diff_format=u
Index: php-src/ext/pdo_mysql/mysql_statement.c
diff -u php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.12 
php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.13
--- php-src/ext/pdo_mysql/mysql_statement.c:1.48.2.12   Sun Apr  9 06:41:42 2006
+++ php-src/ext/pdo_mysql/mysql_statement.c     Sun Apr  9 06:49:07 2006
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysql_statement.c,v 1.48.2.12 2006/04/09 06:41:42 wez Exp $ */
+/* $Id: mysql_statement.c,v 1.48.2.13 2006/04/09 06:49:07 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -67,6 +67,16 @@
                efree(S->out_length);
        }
 #endif
+#if HAVE_MYSQL_NEXT_RESULT
+       while (mysql_more_results(S->H->server)) {
+               if (mysql_next_result(S->H->server) == 0) {
+                       MYSQL_RES *res = mysql_store_result(S->H->server);
+                       if (res) {
+                               mysql_free_result(res);
+                       }
+               }
+       }
+#endif
        efree(S);
        return 1;
 }

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

Reply via email to