db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@apache.org
Subject svn commit: r476087 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
Date Fri, 17 Nov 2006 09:17:56 GMT
Author: bernt
Date: Fri Nov 17 01:17:55 2006
New Revision: 476087

URL: http://svn.apache.org/viewvc?view=rev&rev=476087
Log:
DERBY-2084 getTransactionIsolation() in network client should not activate a transaction

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?view=diff&rev=476087&r1=476086&r2=476087
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Fri Nov 17
01:17:55 2006
@@ -993,11 +993,17 @@
                                 holdability());
             }
             
+            boolean savedInUnitOfWork = inUnitOfWork_;
             rs = getTransactionIsolationStmt.executeQuery("values current isolation");
             rs.next();
             String isolationStr = rs.getString(1);
             isolation_ = translateIsolation(isolationStr);
             rs.close();	
+            // So... of we did not have an active transaction before
+            // the query, we pretend to still not have an open
+            // transaction. The result set is closed, so this should
+            // not be problematic. DERBY-2084
+            inUnitOfWork_ = savedInUnitOfWork;
         }
         catch ( SqlException se )
         {



Mime
View raw message