You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by kr...@apache.org on 2012/09/12 19:04:43 UTC

svn commit: r1384037 - in /db/derby/code/branches/10.8: ./ java/engine/org/apache/derby/impl/sql/compile/ResultColumnList.java

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();