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 km...@apache.org on 2005/06/26 11:58:24 UTC

svn commit: r201792 - /incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java

Author: kmarsden
Date: Sat Jun 25 14:53:04 2005
New Revision: 201792

URL: http://svn.apache.org/viewcvs?rev=201792&view=rev
Log:
DERBY-389
Fix a hang accessing the statement cache in network server stress test. The change was to remove the synchronization on the statement cache from the removeStatement method of GenericLanguageConnectionContext.  It is not needed because  the statement cache handles its own synchronization.   Also changes the javadoc to remove some incorrect info about temp tables.


Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?rev=201792&r1=201791&r2=201792&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java (original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java Sat Jun 25 14:53:04 2005
@@ -766,25 +766,22 @@
 	}
 
 	/**
-	 * This method will get called if the statement is referencing tables in SESSION schema.
-	 * We do not want to cache such statements because multiple connections can have
-	 * different definition of the same table name and hence compiled plan for one connection
-	 * may not make sense for some other connection. Because of this, remove the statement from the cache
-	 *
-	 * @exception StandardException thrown if lookup goes wrong.
-	 */
+	*  This method will remove a statement from the  statement cache.
+	*  It will be called,  for example, if there is an exception preparing
+	*  the statement.
+	*
+	*  @param statement Statement to remove
+	*  @exception StandardException thrown if lookup goes wrong.
+	*/	
 	public void removeStatement(Statement statement)
 		throws StandardException {
 
 		if (statementCache == null)
 			return;
-
-		synchronized (statementCache) {
-
+ 
 			Cacheable cachedItem = statementCache.findCached(statement);
 			if (cachedItem != null)
 				statementCache.remove(cachedItem);
-		}
 	}
 
 	/**