andrey          Tue Jul 22 23:44:23 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/mysql  php_mysql.c 
    /php-src/ext/mysqli mysqli_nonapi.c 
  Log:
  MFH: Two less failing tests, one of which was definitely a leak in mysqli 
with mysqlnd
       and pconn. ext/mysql is being fixed with a better fix for similar leak.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/php_mysql.c?r1=1.213.2.6.2.16.2.23&r2=1.213.2.6.2.16.2.24&diff_format=u
Index: php-src/ext/mysql/php_mysql.c
diff -u php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.23 
php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.24
--- php-src/ext/mysql/php_mysql.c:1.213.2.6.2.16.2.23   Tue Jul 22 17:41:15 2008
+++ php-src/ext/mysql/php_mysql.c       Tue Jul 22 23:44:23 2008
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
  
-/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.23 2008/07/22 17:41:15 andrey Exp $ */
+/* $Id: php_mysql.c,v 1.213.2.6.2.16.2.24 2008/07/22 23:44:23 andrey Exp $ */
 
 /* TODO:
  *
@@ -794,6 +794,9 @@
                        mysql->active_result_id = 0;
                        mysql->multi_query = client_flags & 
CLIENT_MULTI_STATEMENTS? 1:0;
                        /* ensure that the link did not die */
+#if defined(MYSQL_USE_MYSQLND)
+                       mysqlnd_end_psession(mysql->conn);
+#endif 
                        if (mysql_ping(mysql->conn)) {
                                if (mysql_errno(mysql->conn) == 2006) {
 #ifndef MYSQL_USE_MYSQLND
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_nonapi.c?r1=1.54.2.7.2.5.2.13&r2=1.54.2.7.2.5.2.14&diff_format=u
Index: php-src/ext/mysqli/mysqli_nonapi.c
diff -u php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.13 
php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.14
--- php-src/ext/mysqli/mysqli_nonapi.c:1.54.2.7.2.5.2.13        Tue Jun 24 
11:01:38 2008
+++ php-src/ext/mysqli/mysqli_nonapi.c  Tue Jul 22 23:44:23 2008
@@ -17,7 +17,7 @@
   |          Ulf Wendel <[EMAIL PROTECTED]>                                    
 |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.13 2008/06/24 11:01:38 andrey Exp $ 
+  $Id: mysqli_nonapi.c,v 1.54.2.7.2.5.2.14 2008/07/22 23:44:23 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -162,8 +162,12 @@
                                                        mysql->mysql = 
zend_ptr_stack_pop(&plist->free_links);
 
                                                        
MyG(num_inactive_persistent)--;
+#if defined(MYSQLI_USE_MYSQLND)
+                                                       
mysqlnd_end_psession(mysql->mysql);
+#endif 
                                                        /* reset variables */
                                                        /* todo: option for 
ping or change_user */
+
 #if G0
                                                        if 
(!mysql_change_user(mysql->mysql, username, passwd, dbname)) {
 #else
@@ -175,9 +179,6 @@
                                                                
MyG(num_active_persistent)++;
                                                                goto end;
                                                        } else {
-#if defined(MYSQLI_USE_MYSQLND)
-                                                               
mysqlnd_end_psession(mysql->mysql);
-#endif 
                                                                
mysqli_close(mysql->mysql, MYSQLI_CLOSE_IMPLICIT);
                                                                mysql->mysql = 
NULL;
                                                        }



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

Reply via email to