tony2001                Tue Jul 31 19:19:40 2007 UTC

  Modified files:              
    /php-src/ext/oci8   oci8.c oci8_collection.c oci8_interface.c 
                        oci8_lob.c oci8_statement.c php_oci8_int.h 
  Log:
  fix #42134 (oci_error() returns false after oci_new_collection() fails)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.333&r2=1.334&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.333 php-src/ext/oci8/oci8.c:1.334
--- php-src/ext/oci8/oci8.c:1.333       Wed Jul 18 15:09:37 2007
+++ php-src/ext/oci8/oci8.c     Tue Jul 31 19:19:39 2007
@@ -26,7 +26,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8.c,v 1.333 2007/07/18 15:09:37 sixd Exp $ */
+/* $Id: oci8.c,v 1.334 2007/07/31 19:19:39 tony2001 Exp $ */
 /* TODO
  *
  * file://localhost/www/docs/oci10/ociaahan.htm#423823 - implement lob_empty() 
with OCI_ATTR_LOBEMPTY
@@ -674,7 +674,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.333 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.334 $");
 
        snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent));
        php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1895,3 +1895,12 @@
 #endif
 
 #endif /* HAVE_OCI8 */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.14&r2=1.15&diff_format=u
Index: php-src/ext/oci8/oci8_collection.c
diff -u php-src/ext/oci8/oci8_collection.c:1.14 
php-src/ext/oci8/oci8_collection.c:1.15
--- php-src/ext/oci8/oci8_collection.c:1.14     Wed Jul 18 15:09:37 2007
+++ php-src/ext/oci8/oci8_collection.c  Tue Jul 31 19:19:39 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_collection.c,v 1.14 2007/07/18 15:09:37 sixd Exp $ */
+/* $Id: oci8_collection.c,v 1.15 2007/07/31 19:19:39 tony2001 Exp $ */
 
 
 
@@ -55,7 +55,8 @@
 
        collection->connection = connection;
        collection->collection = NULL;
-       
+       zend_list_addref(collection->connection->rsrc_id);
+
        /* get type handle by name */
        PHP_OCI_CALL_RETURN(connection->errcode, OCITypeByName,
                        (
@@ -761,3 +762,12 @@
 } /* }}} */
 
 #endif /* HAVE_OCI8 */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_interface.c?r1=1.30&r2=1.31&diff_format=u
Index: php-src/ext/oci8/oci8_interface.c
diff -u php-src/ext/oci8/oci8_interface.c:1.30 
php-src/ext/oci8/oci8_interface.c:1.31
--- php-src/ext/oci8/oci8_interface.c:1.30      Thu Jan 11 11:58:34 2007
+++ php-src/ext/oci8/oci8_interface.c   Tue Jul 31 19:19:39 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_interface.c,v 1.30 2007/01/11 11:58:34 tony2001 Exp $ */
+/* $Id: oci8_interface.c,v 1.31 2007/07/31 19:19:39 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2208,3 +2208,12 @@
 #endif
 
 #endif /* HAVE_OCI8 */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_lob.c?r1=1.29&r2=1.30&diff_format=u
Index: php-src/ext/oci8/oci8_lob.c
diff -u php-src/ext/oci8/oci8_lob.c:1.29 php-src/ext/oci8/oci8_lob.c:1.30
--- php-src/ext/oci8/oci8_lob.c:1.29    Wed Jul 18 15:09:37 2007
+++ php-src/ext/oci8/oci8_lob.c Tue Jul 31 19:19:39 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_lob.c,v 1.29 2007/07/18 15:09:37 sixd Exp $ */
+/* $Id: oci8_lob.c,v 1.30 2007/07/31 19:19:39 tony2001 Exp $ */
 
 
 
@@ -69,6 +69,8 @@
 
        descriptor = ecalloc(1, sizeof(php_oci_descriptor));
        descriptor->type = type;
+       descriptor->connection = connection;
+       zend_list_addref(descriptor->connection->rsrc_id);
 
        PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIDescriptorAlloc, 
(connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 
0, (dvoid **) 0));
 
@@ -79,8 +81,6 @@
                return NULL;
        }
 
-       descriptor->connection = connection;
-
        PHP_OCI_REGISTER_RESOURCE(descriptor, le_descriptor);
        
        descriptor->lob_current_position = 0;
@@ -940,3 +940,12 @@
 /* }}} */
 
 #endif /* HAVE_OCI8 */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.48&r2=1.49&diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.48 
php-src/ext/oci8/oci8_statement.c:1.49
--- php-src/ext/oci8/oci8_statement.c:1.48      Wed Jul 18 15:09:37 2007
+++ php-src/ext/oci8/oci8_statement.c   Tue Jul 31 19:19:39 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_statement.c,v 1.48 2007/07/18 15:09:37 sixd Exp $ */
+/* $Id: oci8_statement.c,v 1.49 2007/07/31 19:19:39 tony2001 Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -109,6 +109,7 @@
        statement->connection = connection;
        statement->has_data = 0;
        statement->nested = 0;
+       zend_list_addref(statement->connection->rsrc_id);
 
        if (OCI_G(default_prefetch) > 0) {
                php_oci_statement_set_prefetch(statement, 
OCI_G(default_prefetch) TSRMLS_CC);
@@ -1667,3 +1668,12 @@
 } /* }}} */
 
 #endif /* HAVE_OCI8 */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: noet sw=4 ts=4 fdm=marker
+ * vim<600: noet sw=4 ts=4
+ */
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/php_oci8_int.h?r1=1.35&r2=1.36&diff_format=u
Index: php-src/ext/oci8/php_oci8_int.h
diff -u php-src/ext/oci8/php_oci8_int.h:1.35 
php-src/ext/oci8/php_oci8_int.h:1.36
--- php-src/ext/oci8/php_oci8_int.h:1.35        Mon Jul  9 09:08:52 2007
+++ php-src/ext/oci8/php_oci8_int.h     Tue Jul 31 19:19:39 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: php_oci8_int.h,v 1.35 2007/07/09 09:08:52 tony2001 Exp $ */
+/* $Id: php_oci8_int.h,v 1.36 2007/07/31 19:19:39 tony2001 Exp $ */
 
 #if HAVE_OCI8
 # ifndef PHP_OCI8_INT_H
@@ -272,7 +272,6 @@
 #define PHP_OCI_REGISTER_RESOURCE(resource, le_resource) \
        do { \
                resource->id = ZEND_REGISTER_RESOURCE(NULL, resource, 
le_resource); \
-               zend_list_addref(resource->connection->rsrc_id); \
        } while (0)
 
 #define PHP_OCI_ZVAL_TO_CONNECTION(zval, connection) \

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

Reply via email to