db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1058251 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
Date Wed, 12 Jan 2011 17:38:58 GMT
Author: dag
Date: Wed Jan 12 17:38:57 2011
New Revision: 1058251

URL: http://svn.apache.org/viewvc?rev=1058251&view=rev
Log:
DERBY-4968 Let query stop execution if an interrupt is seen, at same time as we check the
query timeout

(subtask of DERBY-4741): Patch derby-4968-1, which makes Derby throw
CONN_INTERRUPT if an interrupt has been seen when execution reaches
BasicNoPutResultSetImpl#checkCancellationFlag. The thread's interrupt
flag is also set.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java?rev=1058251&r1=1058250&r2=1058251&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
Wed Jan 12 17:38:57 2011
@@ -40,6 +40,7 @@ import org.apache.derby.iapi.sql.execute
 import org.apache.derby.iapi.sql.execute.NoPutResultSet;
 import org.apache.derby.iapi.store.access.TransactionController;
 import org.apache.derby.iapi.types.DataValueDescriptor;
+import org.apache.derby.iapi.util.InterruptStatus;
 
 /**
  * Abstract ResultSet for for operations that return rows but
@@ -1004,11 +1005,14 @@ implements NoPutResultSet
         throws
             StandardException
 	{
-        StatementContext localStatementContext = getLanguageConnectionContext().getStatementContext();
           
+        LanguageConnectionContext lcc = getLanguageConnectionContext();
+        StatementContext localStatementContext = lcc.getStatementContext();            
         if (localStatementContext == null) {
             return;
         }
 
+		InterruptStatus.throwIf(lcc);
+
         if (localStatementContext.isCancelled()) {
             throw StandardException.newException(SQLState.LANG_STATEMENT_CANCELLED_OR_TIMED_OUT);
         }



Mime
View raw message