tony2001                Fri Jun  8 08:44:26 2007 UTC

  Modified files:              
    /php-src/ext/oci8   oci8.c oci8_statement.c 
  Log:
  enable statement cache for non-persistent connections (patch by Chris Jones)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.330&r2=1.331&diff_format=u
Index: php-src/ext/oci8/oci8.c
diff -u php-src/ext/oci8/oci8.c:1.330 php-src/ext/oci8/oci8.c:1.331
--- php-src/ext/oci8/oci8.c:1.330       Sat Feb 24 16:25:54 2007
+++ php-src/ext/oci8/oci8.c     Fri Jun  8 08:44:25 2007
@@ -26,7 +26,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8.c,v 1.330 2007/02/24 16:25:54 helly Exp $ */
+/* $Id: oci8.c,v 1.331 2007/06/08 08:44:25 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.330 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.331 $");
 
        snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent));
        php_info_print_table_row(2, "Active Persistent Connections", buf);
@@ -1417,7 +1417,7 @@
        }
 
 #if HAVE_OCI_STMT_PREPARE2
-       if (connection->is_persistent) {
+       {
                ub4 statement_cache_size = (OCI_G(statement_cache_size) > 0) ? 
OCI_G(statement_cache_size) : 0;
 
                PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIAttrSet, ((dvoid *) 
connection->svc, (ub4) OCI_HTYPE_SVCCTX, (ub4 *) &statement_cache_size, 0, 
(ub4) OCI_ATTR_STMTCACHESIZE, OCI_G(err)));
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_statement.c?r1=1.45&r2=1.46&diff_format=u
Index: php-src/ext/oci8/oci8_statement.c
diff -u php-src/ext/oci8/oci8_statement.c:1.45 
php-src/ext/oci8/oci8_statement.c:1.46
--- php-src/ext/oci8/oci8_statement.c:1.45      Tue Jun  5 07:48:16 2007
+++ php-src/ext/oci8/oci8_statement.c   Fri Jun  8 08:44:26 2007
@@ -25,7 +25,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: oci8_statement.c,v 1.45 2007/06/05 07:48:16 tony2001 Exp $ */
+/* $Id: oci8_statement.c,v 1.46 2007/06/08 08:44:26 tony2001 Exp $ */
 
 
 #ifdef HAVE_CONFIG_H
@@ -82,7 +82,7 @@
                        php_oci_error(connection->err, connection->errcode 
TSRMLS_CC);
 
 #if HAVE_OCI_STMT_PREPARE2
-                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, 
statement->err, NULL, 0, OCI_DEFAULT));
+                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, 
statement->err, NULL, 0, statement->errcode ? OCI_STRLS_CACHE_DELETE : 
OCI_DEFAULT));
                        PHP_OCI_CALL(OCIHandleFree,(statement->err, 
OCI_HTYPE_ERROR));
 #else
                        PHP_OCI_CALL(OCIHandleFree,(statement->stmt, 
OCI_HTYPE_STMT));
@@ -746,7 +746,7 @@
        if (statement->stmt) {
 #if HAVE_OCI_STMT_PREPARE2
                if (statement->last_query_len) { /* FIXME: magical */
-                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, 
statement->err, NULL, 0, OCI_DEFAULT));
+                       PHP_OCI_CALL(OCIStmtRelease, (statement->stmt, 
statement->err, NULL, 0, statement->errcode ? OCI_STRLS_CACHE_DELETE : 
OCI_DEFAULT));
                } else {
                        PHP_OCI_CALL(OCIHandleFree, (statement->stmt, 
OCI_HTYPE_STMT));
                }

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

Reply via email to