apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r658279 - /apr/apr-util/trunk/dbd/apr_dbd_oracle.c
Date Tue, 20 May 2008 15:31:53 GMT
Author: wrowe
Date: Tue May 20 08:31:53 2008
New Revision: 658279

URL: http://svn.apache.org/viewvc?rev=658279&view=rev
Log:
Protect unlocks within GLOBAL_PREPARED_STATEMENTS blocks, as this is where
they were initially obtained.

Submitted by: Chris Darroch <chrisd pearsoncmg.com>

Modified:
    apr/apr-util/trunk/dbd/apr_dbd_oracle.c

Modified: apr/apr-util/trunk/dbd/apr_dbd_oracle.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/dbd/apr_dbd_oracle.c?rev=658279&r1=658278&r2=658279&view=diff
==============================================================================
--- apr/apr-util/trunk/dbd/apr_dbd_oracle.c (original)
+++ apr/apr-util/trunk/dbd/apr_dbd_oracle.c Tue May 20 08:31:53 2008
@@ -982,7 +982,9 @@
     sql->status = OCIHandleAlloc(dbd_oracle_env, (dvoid**) &stmt->stmt,
                                  OCI_HTYPE_STMT, 0, NULL);
     if (sql->status != OCI_SUCCESS) {
+#ifdef GLOBAL_PREPARED_STATEMENTS
         apr_dbd_mutex_unlock();
+#endif
         return 1;
     }
 
@@ -990,7 +992,9 @@
                                  strlen(query), OCI_NTV_SYNTAX, OCI_DEFAULT);
     if (sql->status != OCI_SUCCESS) {
         OCIHandleFree(stmt->stmt, OCI_HTYPE_STMT);
+#ifdef GLOBAL_PREPARED_STATEMENTS
         apr_dbd_mutex_unlock();
+#endif
         return 1;
     }
 
@@ -1001,7 +1005,9 @@
     sql->status = OCIAttrGet(stmt->stmt, OCI_HTYPE_STMT, &stmt->type, 0,
                              OCI_ATTR_STMT_TYPE, sql->err);
     if (sql->status != OCI_SUCCESS) {
+#ifdef GLOBAL_PREPARED_STATEMENTS
         apr_dbd_mutex_unlock();
+#endif
         return 1;
     }
 
@@ -1011,7 +1017,9 @@
                              sizeof(prefetch_size), OCI_ATTR_PREFETCH_MEMORY,
                              sql->err);
     if (sql->status != OCI_SUCCESS) {
+#ifdef GLOBAL_PREPARED_STATEMENTS
         apr_dbd_mutex_unlock();
+#endif
         return 1;
     }
 #endif



Mime
View raw message