db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r1384037 - in /db/derby/code/branches/10.8: ./ java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
Date Wed, 12 Sep 2012 17:04:43 GMT
Author: kristwaa
Date: Wed Sep 12 17:04:43 2012
New Revision: 1384037

URL: http://svn.apache.org/viewvc?rev=1384037&view=rev
Log:
DERBY-4279: Statement cache deadlock

Merged fix from trunk (revision 1365661).

Modified:
    db/derby/code/branches/10.8/   (props changed)
    db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java

Propchange: db/derby/code/branches/10.8/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1365661

Modified: db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java?rev=1384037&r1=1384036&r2=1384037&view=diff
==============================================================================
--- db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
(original)
+++ db/derby/code/branches/10.8/java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java
Wed Sep 12 17:04:43 2012
@@ -1549,13 +1549,19 @@ public class ResultColumnList extends Qu
 				int savedItem;
 				RowLocation rl;
 				
-				cc = getLanguageConnectionContext().
-						getTransactionCompile().openConglomerate(
-							conglomerateId,
-                            false,
-							0,
-							TransactionController.MODE_RECORD,
-							TransactionController.ISOLATION_READ_COMMITTED);
+				LanguageConnectionContext lcc = getLanguageConnectionContext();
+				DataDictionary dd = lcc.getDataDictionary();
+				
+				int isolationLevel = (dd.getCacheMode() == DataDictionary.DDL_MODE) ? 
+						TransactionController.ISOLATION_READ_COMMITTED : TransactionController.ISOLATION_NOLOCK;
+
+				cc = lcc.getTransactionCompile().openConglomerate(
+						conglomerateId,
+                        false,
+						0,
+						TransactionController.MODE_RECORD,
+						isolationLevel);
+
 				try
 				{
 					rl = cc.newRowLocationTemplate();



Mime
View raw message