db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r555959 - /db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
Date Fri, 13 Jul 2007 12:03:20 GMT
Author: kahatlen
Date: Fri Jul 13 05:03:19 2007
New Revision: 555959

URL: http://svn.apache.org/viewvc?view=rev&rev=555959
Log:
DERBY-2932: Connection.createClob() and Connection.createBlob() throw
a procedure not found exception and do not switch to non-locator code
upon soft upgrade

Fix contributed by V. Narayanan.

Modified:
    db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java

Modified: db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java?view=diff&rev=555959&r1=555958&r2=555959
==============================================================================
--- db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
(original)
+++ db/derby/code/branches/10.3/java/client/org/apache/derby/client/am/CallableLocatorProcedures.java
Fri Jul 13 05:03:19 2007
@@ -112,19 +112,18 @@
             return INVALID_LOCATOR;
         }
         
-        if (blobCreateLocatorCall == null) {
-            blobCreateLocatorCall = connection.prepareCallX
-                ("? = CALL SYSIBM.BLOBCREATELOCATOR()",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 connection.holdability());
-            blobCreateLocatorCall
-                .registerOutParameterX(1, java.sql.Types.INTEGER);
-            // Make sure this statement does not commit user transaction
-            blobCreateLocatorCall.isAutoCommittableStatement_ = false;
-        }
-        
         try {
+            if (blobCreateLocatorCall == null) {
+                blobCreateLocatorCall = connection.prepareCallX
+                        ("? = CALL SYSIBM.BLOBCREATELOCATOR()",
+                        java.sql.ResultSet.TYPE_FORWARD_ONLY,
+                        java.sql.ResultSet.CONCUR_READ_ONLY,
+                        connection.holdability());
+                blobCreateLocatorCall
+                        .registerOutParameterX(1, java.sql.Types.INTEGER);
+                // Make sure this statement does not commit user transaction
+                blobCreateLocatorCall.isAutoCommittableStatement_ = false;
+            }
             blobCreateLocatorCall.executeX();
         }
         catch(SqlException sqle) {
@@ -590,19 +589,18 @@
             return INVALID_LOCATOR;
         }
         
-        if (clobCreateLocatorCall == null) {
-            clobCreateLocatorCall = connection.prepareCallX
-                ("? = CALL SYSIBM.CLOBCREATELOCATOR()",
-                 java.sql.ResultSet.TYPE_FORWARD_ONLY, 
-                 java.sql.ResultSet.CONCUR_READ_ONLY, 
-                 java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
-            clobCreateLocatorCall
-                .registerOutParameterX(1, java.sql.Types.INTEGER);
-            // Make sure this statement does not commit user transaction
-            clobCreateLocatorCall.isAutoCommittableStatement_ = false;
-        }
-
         try {
+            if (clobCreateLocatorCall == null) {
+                clobCreateLocatorCall = connection.prepareCallX
+                        ("? = CALL SYSIBM.CLOBCREATELOCATOR()",
+                        java.sql.ResultSet.TYPE_FORWARD_ONLY,
+                        java.sql.ResultSet.CONCUR_READ_ONLY,
+                        java.sql.ResultSet.CLOSE_CURSORS_AT_COMMIT);
+                clobCreateLocatorCall
+                        .registerOutParameterX(1, java.sql.Types.INTEGER);
+                // Make sure this statement does not commit user transaction
+                clobCreateLocatorCall.isAutoCommittableStatement_ = false;
+            }
             clobCreateLocatorCall.executeX();
         }
         catch(SqlException sqle) {



Mime
View raw message