tony2001                Wed Oct 18 14:23:24 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/oci8   oci8.c 
    /php-src    NEWS 
  Log:
  MFH: fix PECL bug #9061 (oci8 might reuse wrong persistent connection)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.269.2.16.2.24&r2=1.269.2.16.2.25&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.269.2.16.2.24 
php-src/ext/oci8/oci8.c:1.269.2.16.2.25
--- php-src/ext/oci8/oci8.c:1.269.2.16.2.24     Tue Sep 12 20:27:28 2006
+++ php-src/ext/oci8/oci8.c     Wed Oct 18 14:23:23 2006
@@ -26,7 +26,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8.c,v 1.269.2.16.2.24 2006/09/12 20:27:28 tony2001 Exp $ */
+/* $Id: oci8.c,v 1.269.2.16.2.25 2006/10/18 14:23:23 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -668,7 +668,7 @@
        php_info_print_table_start();
        php_info_print_table_row(2, "OCI8 Support", "enabled");
        php_info_print_table_row(2, "Version", "1.2.2");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.24 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.269.2.16.2.25 $");
 
        sprintf(buf, "%ld", OCI_G(num_persistent));
        php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1104,15 +1104,19 @@
                                                        /* server died */
                                                } else {
                                                        int rsrc_type;
+                                                       php_oci_connection *tmp;
 
                                                        /* okay, the connection 
is open and the server is still alive */
                                                        
connection->used_this_request = 1;
-                                                       
smart_str_free_ex(&hashed_details, 0);
-                                                       if 
(zend_list_find(connection->rsrc_id, &rsrc_type) && (rsrc_type == 
le_pconnection) && zend_list_addref(connection->rsrc_id) == SUCCESS) {
+                                                       tmp = 
(php_oci_connection *)zend_list_find(connection->rsrc_id, &rsrc_type);
+
+                                                       if (tmp != NULL && 
rsrc_type == le_pconnection && strlen(tmp->hash_key) == hashed_details.len &&
+                                                               
memcmp(tmp->hash_key, hashed_details.c, hashed_details.len) == 0 && 
zend_list_addref(connection->rsrc_id) == SUCCESS) {
                                                                /* do nothing */
                                                        } else {
                                                                
connection->rsrc_id = zend_list_insert(connection, le_pconnection);
                                                        }
+                                                       
smart_str_free_ex(&hashed_details, 0);
                                                        return connection;
                                                }
                                        }
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.307&r2=1.2027.2.547.2.308&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.307 php-src/NEWS:1.2027.2.547.2.308
--- php-src/NEWS:1.2027.2.547.2.307     Mon Oct 16 11:13:08 2006
+++ php-src/NEWS        Wed Oct 18 14:23:23 2006
@@ -7,6 +7,7 @@
 - Fixed bug #39020 (PHP in FastCGI server mode crashes). (Dmitry)
 - Fixed bug #38458, PECL bug #8944, PECL bug #7775 (error retrieving
   columns after long/text columns with PDO_ODBC). (Wez)
+- Fixed PECL bug #9061 (oci8 might reuse wrong persistent connection). (Tony)
 - Fixed PECL bug #8816 (issue in php_oci_statement_fetch with more than one 
   piecewise column) (jeff at badtz-maru dot com, Tony)
 - Fixed PECL bug #7755 (error selecting DOUBLE fields with PDO_ODBC).

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

Reply via email to