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 rh...@apache.org on 2006/09/08 17:35:37 UTC

svn commit: r441540 [1/6] - in /db/derby/code/branches/10.2/java: client/ client/org/apache/derby/client/am/ client/org/apache/derby/jdbc/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/sql/catalog/ eng...

Author: rhillegas
Date: Fri Sep  8 08:35:32 2006
New Revision: 441540

URL: http://svn.apache.org/viewvc?view=rev&rev=441540
Log:
DERBY-1725: Merge the following patches from the trunk to the 10.2 branch: No JIRA (441088, 440846), DERBY-706 (441426), DERBY-1700 (441232, 440762), DERBY-1767 (441185), DERBY-1729 (441140), DERBY-1686 (441131), DERBY-1700 (441105, 439861), DERBY-1802 (441098, 441097), DERBY-1491 (440550), DERBY-1813 (440517), DERBY-1791 (440373), DERBY-1768 (440321), DERBY-1800 (440062), DERBY-1790 (439845), DERBY-1756 (439775), DERBY-1810 (439702), DERBY-1702 (439335).

Added:
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL2.out
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL2.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/MathTrigFunctionsTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TimeHandlingTest.java
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TimeHandlingTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2.sql
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2_app.properties
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2_app.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2_sed.properties
      - copied unchanged from r441427, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL2_sed.properties
Removed:
    db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/RowId.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedRowId.java
Modified:
    db/derby/code/branches/10.2/java/client/build.xml
    db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/ResultSet.java
    db/derby/code/branches/10.2/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
    db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/build.xml
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ActivationClassBuilder.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/OnceResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/ProjectRestrictResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/RowResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/ScalarAggregateResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/SetOpResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/SortResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TableScanResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/UnionResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/VTIResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/jdbc/Driver40.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/JDBC40Translation.java
    db/derby/code/branches/10.2/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/harness/jvm.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/ibm14/testSecMec.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/altertable.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/outparams.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/parameterMapping.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/outparams.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/parameterMapping.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNet.exclude
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/OutBufferedStream.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/RowIdNotImplementedTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/errorStream.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/JDBC.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java

Modified: db/derby/code/branches/10.2/java/client/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/client/build.xml?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/client/build.xml (original)
+++ db/derby/code/branches/10.2/java/client/build.xml Fri Sep  8 08:35:32 2006
@@ -61,7 +61,7 @@
       proceed="${proceed}"
       verbose="${verbose}"
       srcdir="${derby.client.src.dir}"
-      excludes="**/*40.java,**/RowId.java" 
+      excludes="**/*40.java" 
       destdir="${out.dir}">
       <classpath>
           <pathelement path="${jce1_2_1}"/>
@@ -85,7 +85,7 @@
       proceed="${proceed}"
       verbose="${verbose}"
       srcdir="${derby.client.src.dir}"
-      includes="**/*40.java,**/RowId.java" 
+      includes="**/*40.java" 
       destdir="${out.dir}">
       <classpath>
         <pathelement path="${jce1_2_1}"/>

Modified: db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/ResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/ResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/ResultSet.java (original)
+++ db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/ResultSet.java Fri Sep  8 08:35:32 2006
@@ -4392,7 +4392,8 @@
             }
             //using quotes around the column name to preserve case sensitivity
             try {
-                insertSQL.append("\"" + resultSetMetaData_.getColumnName(column) + "\"");
+                insertSQL.append(quoteSqlIdentifier(
+                        resultSetMetaData_.getColumnName(column)));
             } catch ( SQLException sqle ) {
                 throw new SqlException(sqle);
             }
@@ -4425,7 +4426,9 @@
                     updateString += ",";
                 }
                 try {
-                    updateString += "\"" + resultSetMetaData_.getColumnName(column) + "\" = ? ";
+                    updateString += quoteSqlIdentifier(
+                            resultSetMetaData_.getColumnName(column)) + 
+                            " = ? ";
                 } catch ( SQLException sqle ) {
                     throw new SqlException(sqle);
                 }
@@ -4489,14 +4492,27 @@
 
         //dervied column like select 2 from t1, has null schema and table name
         if (resultSetMetaData_.sqlxSchema_[baseTableColumn] != null && !resultSetMetaData_.sqlxSchema_[baseTableColumn].equals("")) {
-            tableName += "\"" + resultSetMetaData_.sqlxSchema_[baseTableColumn] + "\".";
+            tableName += quoteSqlIdentifier(
+                    resultSetMetaData_.sqlxSchema_[baseTableColumn]) + ".";
         }
         if (resultSetMetaData_.sqlxBasename_[baseTableColumn] != null) {
-            tableName += "\"" + resultSetMetaData_.sqlxBasename_[baseTableColumn] + "\"";
+            tableName += quoteSqlIdentifier(
+                    resultSetMetaData_.sqlxBasename_[baseTableColumn]);
         }
         return tableName;
     }
 
+    private String quoteSqlIdentifier(String orgValue) {
+        int i = 0, start = 0;
+        String retValue = "";
+        while ((i = orgValue.indexOf("\"", start) + 1) > 0) {
+            retValue += orgValue.substring(start, i) + "\"";
+            start = i;
+        }
+        retValue += orgValue.substring(start, orgValue.length());
+        return "\"" + retValue + "\"";
+    }
+    
     private String getServerCursorName() throws SqlException {
         return statement_.section_.getServerCursorName();
     }

Modified: db/derby/code/branches/10.2/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java (original)
+++ db/derby/code/branches/10.2/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java Fri Sep  8 08:35:32 2006
@@ -277,10 +277,7 @@
      * possibilities. USRIDPWD, EUSRIDPWD and USRSSBPWD require a password, USRIDONL
      * is the only security mechanism which does not require password.
      * 1. if password is not available, then security mechanism possible is USRIDONL
-     * 2. if password is available, if client supports EUSRIDPWD, then EUSRIDPWD is 
-     * returned
-     * 3. if password is available, if client does not support EUSRIDPWD, then
-     * USRIDPWD is returned.
+     * 2. if password is available,then USRIDPWD is returned.
      *
      * @param password password argument 
      * @return upgraded security mechanism if possible
@@ -291,14 +288,16 @@
         if ( password == null )
             return propertyDefault_securityMechanism;
 
-        // if password is available, then a security mechanism is picked in
-        // following order if support is available.
-        // 1. EUSRIDPWD
-        // 2. USRIDPWD
         // when we have support for more security mechanisms on server 
         // and client, we should update this upgrade logic to pick 
         // secure security mechanisms before trying out the USRIDPWD
         
+        /*
+        // -----------------------
+        // PLEASE NOTE: 
+        // When DERBY-1517, DERBY-1755 is fixed, there might be a way to use EUSRIDPWD 
+        // when both client and server vm's have support for it. Hence the below
+        // if statement is commented out.
         if (SUPPORTS_EUSRIDPWD)
             return (short)NetConfiguration.SECMEC_EUSRIDPWD;
         else 
@@ -312,7 +311,9 @@
             // exception, as described in DERBY-926).
             // 
             // return (short)NetConfiguration.SECMEC_USRSSBPWD;
-            return (short)NetConfiguration.SECMEC_USRIDPWD;
+         // ----------------------
+         */
+         return (short)NetConfiguration.SECMEC_USRIDPWD;
 
     }
 

Modified: db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Fri Sep  8 08:35:32 2006
@@ -948,6 +948,7 @@
 							curStmt.rsSuspend();
 					} catch (SQLException e)
 					{
+						skipRemainder(true);
 						writer.clearDSSesBackToMark(writerMark);
 						if (SanityManager.DEBUG) 
 						{

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java Fri Sep  8 08:35:32 2006
@@ -3629,8 +3629,8 @@
                     }
                     // using quotes around the column name 
                     // to preserve case sensitivity
-                    insertSQL.append("\"" + 
-                            rd.getColumnDescriptor(i).getName() + "\"");
+                    insertSQL.append(quoteSqlIdentifier(
+                            rd.getColumnDescriptor(i).getName()));
                     if (columnGotUpdated[i-1]) { 
                         valuesSQL.append("?");
                     } else {
@@ -3677,6 +3677,8 @@
             } catch (StandardException t) {
                 throw closeOnTransactionError(t);
             } finally {
+                if (statementContext != null)
+                    lcc.popStatementContext(statementContext, null);
                 restoreContextStack();
             }
         }
@@ -3721,12 +3723,14 @@
                     if (foundOneColumnAlready)
                         updateWhereCurrentOfSQL.append(",");
                     //using quotes around the column name to preserve case sensitivity
-                    updateWhereCurrentOfSQL.append("\"" + rd.getColumnDescriptor(i).getName() + "\"=?");
+                    updateWhereCurrentOfSQL.append(quoteSqlIdentifier(
+                            rd.getColumnDescriptor(i).getName()) + "=?");
                     foundOneColumnAlready = true;
                 }
             }
             //using quotes around the cursor name to preserve case sensitivity
-            updateWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");
+            updateWhereCurrentOfSQL.append(" WHERE CURRENT OF " + 
+                    quoteSqlIdentifier(getCursorName()));
             lcc = getEmbedConnection().getLanguageConnection();
 
             // Context used for preparing, don't set any timeout (use 0)
@@ -3783,18 +3787,23 @@
             checkNotOnInsertRow();
 
             setupContextStack();
+            
+            LanguageConnectionContext lcc = null;
+            StatementContext statementContext = null;
+            
             //now construct the delete where current of sql
             try {
                 StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
                 CursorActivation activation = getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
                 deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
                 //using quotes around the cursor name to preserve case sensitivity
-                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF \"" + getCursorName() + "\"");
-
-                LanguageConnectionContext lcc = getEmbedConnection().getLanguageConnection();
+                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " + 
+                        quoteSqlIdentifier(getCursorName()));
 
+                lcc = getEmbedConnection().getLanguageConnection();
+                
                 // Context used for preparing, don't set any timeout (use 0)
-                StatementContext statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
+                statementContext = lcc.pushStatementContext(isAtomic, false, deleteWhereCurrentOfSQL.toString(), null, false, 0L);
                 org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(deleteWhereCurrentOfSQL.toString());
                 // Get activation, so that we can get the warning from it
                 Activation act = ps.getActivation(lcc, false);
@@ -3815,6 +3824,8 @@
             } catch (StandardException t) {
                     throw closeOnTransactionError(t);
             } finally {
+                if (statementContext != null)
+                    lcc.popStatementContext(statementContext, null);
                 restoreContextStack();
                 initializeUpdateRowModifiers();
             }
@@ -3824,12 +3835,23 @@
 	private String getFullBaseTableName(ExecCursorTableReference targetTable) {
 		//using quotes to preserve case sensitivity
 		if (targetTable.getSchemaName() != null)
-			return "\"" + targetTable.getSchemaName() + "\".\""
-					+ targetTable.getBaseName() + "\"";
+			return quoteSqlIdentifier(targetTable.getSchemaName()) + "." + 
+					quoteSqlIdentifier(targetTable.getBaseName());
 		else
-			return "\"" + targetTable.getBaseName() + "\"";
+			return quoteSqlIdentifier(targetTable.getBaseName());
 	}
 
+    private String quoteSqlIdentifier(String orgValue) {
+        int i = 0, start = 0;
+        String retValue = "";
+        while ((i = orgValue.indexOf("\"", start) + 1) > 0) {
+            retValue += orgValue.substring(start, i) + "\"";
+            start = i;
+        }
+        retValue += orgValue.substring(start, orgValue.length());
+        return "\"" + retValue + "\"";
+    }
+    
 	/**
 	 * JDBC 2.0
 	 * 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/build.xml?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/build.xml (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/jdbc/build.xml Fri Sep  8 08:35:32 2006
@@ -58,7 +58,6 @@
 	  <exclude name="${derby.dir}/impl/jdbc/*20.java"/>
 	  <exclude name="${derby.dir}/impl/jdbc/*30.java"/>
 	  <exclude name="${derby.dir}/impl/jdbc/*40.java"/>
-          <exclude name="${derby.dir}/impl/jdbc/EmbedRowId.java"/>
    </javac>
     <copy file="metadata.properties" tofile="${out.dir}/org/apache/derby/impl/jdbc/metadata.properties"/>
     <javac
@@ -184,7 +183,6 @@
             <pathelement path="${java16compile.classpath}"/>
         </classpath>
         <include name="${derby.dir}/impl/jdbc/*40.java"/>
-        <include name="${derby.dir}/impl/jdbc/EmbedRowId.java"/>
     </javac>
 </target> 
 </project>

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java Fri Sep  8 08:35:32 2006
@@ -9968,7 +9968,7 @@
     throws StandardException
 	{
         TablePermsDescriptor key = new TablePermsDescriptor( this, tablePermsUUID);
-        return (TablePermsDescriptor) getPermissions( key);
+        return getUncachedTablePermsDescriptor( key );
 	}
 
     private Object getPermissions( PermissionsDescriptor key) throws StandardException
@@ -9987,7 +9987,7 @@
     throws StandardException
 	{
     	ColPermsDescriptor key = new ColPermsDescriptor( this, colPermsUUID);
-        return (ColPermsDescriptor) getPermissions( key);
+        return getUncachedColPermsDescriptor( key );
 	}
 
     /**
@@ -10092,7 +10092,7 @@
     throws StandardException
 	{
     	RoutinePermsDescriptor key = new RoutinePermsDescriptor( this, routinePermsUUID);
-        return (RoutinePermsDescriptor) getPermissions( key);    	
+        return getUncachedRoutinePermsDescriptor( key );   	
 	}
 
     /**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ActivationClassBuilder.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ActivationClassBuilder.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ActivationClassBuilder.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ActivationClassBuilder.java Fri Sep  8 08:35:32 2006
@@ -419,7 +419,7 @@
 	/*
 		The first time a current datetime is needed, create the class
 		level support for it. The first half of the logic is in our parent
-		class. Then we add logic here to tidy up for ResultSet management.
+		class.
 	 */
 	protected LocalField getCurrentSetup()
 	{
@@ -433,22 +433,6 @@
 
 		executeMethod.getField(lf);
 		executeMethod.callMethod(VMOpcode.INVOKEVIRTUAL, (String) null, "forget", "void", 0);
-
-		// 4) a resultSetClosed method is set up to be passed to
-		//    the outermost result set, if it is an open/close result set,
-		//    so that cdt can be told to forget when a result set closes:
-		//	  GeneratedMethod rscm; // the name is just a generated name, simpler.
-		//    void rscm() {
-		//		cdt.forget();
-		//	  }
-		MethodBuilder mb = newExprFun();
-		mb.getField(lf); // the instance
-		mb.callMethod(VMOpcode.INVOKEVIRTUAL, (String) null, "forget", "void", 0);
-		mb.pushNull("java.lang.Object");
-		mb.methodReturn();
-		mb.complete();
-		
-		resultSetClosedMethod = mb;
 
 		return lf;
 	}

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/BaseColumnNode.java Fri Sep  8 08:35:32 2006
@@ -172,9 +172,9 @@
 		return Qualifier.SCAN_INVARIANT;
 	}
         
-        /**
-         * @inheritDoc
-         */
+    /**
+     * {@inheritDoc}
+     */
 	protected boolean isEquivalent(ValueNode o)
 	{
 		if (isSameNodeType(o)) 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ConditionalNode.java Fri Sep  8 08:35:32 2006
@@ -490,7 +490,7 @@
 	}
         
 	/**
-	 * @{inheritDoc}
+	 * {@inheritDoc}
 	 */
 	protected boolean isEquivalent(ValueNode o) throws StandardException
 	{

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ExpressionClassBuilder.java Fri Sep  8 08:35:32 2006
@@ -110,8 +110,6 @@
 
 	//protected final JavaFactory javaFac;
 
-	protected MethodBuilder resultSetClosedMethod;
-
 	private String currentRowScanResultSetName;
 
 
@@ -717,24 +715,6 @@
 		//
 		mb.pushThis();
 		mb.callMethod(getEF);
-	}
-
-	/**
-		This utility method returns the resultSetClosed method reference that the
-		activation wants called when a result set closes, to let it clean up.
-		This will be null if none was needed.
-
-		REMIND: because ObjectManager returns exceptions on its invoke() method
-		and close() is not supposed to return exceptions, we may want to
-		move this to be something done on open() instead of on close().
-		Otherwise, we have to do try/catch/THROWASSERT in the close code,
-		which looks unfriendly.
-	 */
-	void pushResultSetClosedMethodFieldAccess(MethodBuilder mb) {
-		if (resultSetClosedMethod != null)
-			pushMethodReference(mb, resultSetClosedMethod);
-		else
-			mb.pushNull(ClassName.GeneratedMethod);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GrantNode.java Fri Sep  8 08:35:32 2006
@@ -33,7 +33,7 @@
 /**
  * This class represents a GRANT statement.
  */
-public class GrantNode extends MiscellaneousStatementNode
+public class GrantNode extends DDLStatementNode
 {
 	private PrivilegeNode privileges;
 	private List grantees;
@@ -94,7 +94,7 @@
 	 */
 	public QueryTreeNode bind() throws StandardException
 	{
-		privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees);
+		privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, true);
 		return this;
 	} // end of bind
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/OrderByList.java Fri Sep  8 08:35:32 2006
@@ -408,7 +408,7 @@
 			date/time request, then a method will have been generated.
 			Otherwise, a simple null is passed in to the result set method.
 		 */
-		acb.pushResultSetClosedMethodFieldAccess(mb);
+        mb.pushNull(ClassName.GeneratedMethod);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getSortResultSet",
 							ClassName.NoPutResultSet, 10);

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/PrivilegeNode.java Fri Sep  8 08:35:32 2006
@@ -98,12 +98,12 @@
      *               If the object of this privilege is not in the list then this statement is registered
      *               as dependent on the object.
      * @param grantees The list of grantees
-     *
+     * @param isGrant grant if true; revoke if false
      * @return the bound node
      *
      * @exception StandardException	Standard error policy.
      */
-	public QueryTreeNode bind( HashMap dependencies, List grantees ) throws StandardException
+	public QueryTreeNode bind( HashMap dependencies, List grantees, boolean isGrant ) throws StandardException
 	{
         Provider dependencyProvider = null;
         SchemaDescriptor sd = null;
@@ -134,7 +134,7 @@
 				throw StandardException.newException(SQLState.AUTH_GRANT_REVOKE_NOT_ALLOWED,
 						 td.getQualifiedName());
 
-            specificPrivileges.bind( td);
+            specificPrivileges.bind( td, isGrant);
             dependencyProvider = td;
             break;
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java Fri Sep  8 08:35:32 2006
@@ -1050,19 +1050,8 @@
 	void closeMethodArgument(ExpressionClassBuilder acb,
 									MethodBuilder mb)
 	{
-		/*
-			For supporting current datetime, we may have a method
-			that needs to be called when the statement's result set 
-			is closed.
-		 */
-		if (statementResultSet)
-		{
-			acb.pushResultSetClosedMethodFieldAccess(mb);
-		}
-		else
-		{
+
 			mb.pushNull(ClassName.GeneratedMethod);
-		}
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RevokeNode.java Fri Sep  8 08:35:32 2006
@@ -33,7 +33,7 @@
 /**
  * This class represents a REVOKE statement.
  */
-public class RevokeNode extends MiscellaneousStatementNode
+public class RevokeNode extends DDLStatementNode
 {
     private PrivilegeNode privileges;
     private List grantees;
@@ -94,7 +94,7 @@
      */
 	public QueryTreeNode bind() throws StandardException
 	{
-        privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees);
+        privileges = (PrivilegeNode) privileges.bind( new HashMap(), grantees, false);
         return this;
     } // end of bind
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/TablePrivilegesNode.java Fri Sep  8 08:35:32 2006
@@ -29,6 +29,21 @@
 import org.apache.derby.iapi.services.io.FormatableBitSet;
 import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
+import org.apache.derby.iapi.sql.depend.DependencyManager;
+import org.apache.derby.iapi.sql.depend.Provider;
+import org.apache.derby.iapi.sql.depend.ProviderInfo;
+import org.apache.derby.iapi.sql.depend.ProviderList;
+import org.apache.derby.iapi.sql.conn.ConnectionUtil;
+import org.apache.derby.iapi.sql.conn.LanguageConnectionContext;
+import org.apache.derby.iapi.sql.dictionary.AliasDescriptor;
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;
+import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TupleDescriptor;
+import org.apache.derby.iapi.sql.dictionary.ViewDescriptor;
+
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * This class represents a set of privileges on one table.
  */
@@ -37,8 +52,9 @@
 	private boolean[] actionAllowed = new boolean[ TablePrivilegeInfo.ACTION_COUNT];
 	private ResultColumnList[] columnLists = new ResultColumnList[ TablePrivilegeInfo.ACTION_COUNT];
 	private FormatableBitSet[] columnBitSets = new FormatableBitSet[ TablePrivilegeInfo.ACTION_COUNT];
-	private TableDescriptor td;
-
+	private TableDescriptor td;  
+	private List descriptorList; 
+	
 	/**
 	 * Add all actions
 	 */
@@ -74,11 +90,12 @@
 	 * Bind.
 	 *
 	 * @param td The table descriptor
+	 * @param isGrant grant if true; revoke if false
 	 */
-	public void bind( TableDescriptor td) throws StandardException
+	public void bind( TableDescriptor td, boolean isGrant) throws StandardException
 	{
 		this.td = td;
-		
+			
 		for( int action = 0; action < TablePrivilegeInfo.ACTION_COUNT; action++)
 		{
 			if( columnLists[ action] != null)
@@ -90,6 +107,11 @@
 					throw StandardException.newException(SQLState.AUTH_GRANT_REVOKE_NOT_ALLOWED,
 									td.getQualifiedName());
 		}
+		
+		if (isGrant && td.getTableType() == TableDescriptor.VIEW_TYPE)
+		{
+			bindPrivilegesForView(td);
+		}
 	}
 	
 	/**
@@ -97,6 +119,61 @@
 	 */
 	public PrivilegeInfo makePrivilegeInfo()
 	{
-		return new TablePrivilegeInfo( td, actionAllowed, columnBitSets);
+		return new TablePrivilegeInfo( td, actionAllowed, columnBitSets, 
+				descriptorList);
 	}
+	
+	/**
+	 *  Retrieve all the underlying stored dependencies such as table(s), 
+	 *  view(s) and routine(s) descriptors which the view depends on.
+	 *  This information is then passed to the runtime to determine if
+	 *  the privilege is grantable to the grantees by this grantor at
+	 *  execution time.
+	 *  
+	 *  Go through the providers regardless who the grantor is since 
+	 *  the statement cache may be in effect.
+	 *  
+	 * @param td the TableDescriptor to check
+	 *
+	 * @exception StandardException standard error policy.
+	 */
+	private void bindPrivilegesForView ( TableDescriptor td) 
+		throws StandardException
+	{
+		LanguageConnectionContext lcc = getLanguageConnectionContext();
+		DataDictionary dd = lcc.getDataDictionary();
+		ViewDescriptor vd = dd.getViewDescriptor(td);
+		DependencyManager dm = dd.getDependencyManager();
+		ProviderInfo[] pis = dm.getPersistentProviderInfos(vd);
+		this.descriptorList = new ArrayList();
+					
+		int siz = pis.length;
+		for (int i=0; i < siz; i++) 
+		{
+			try 
+			{
+				Provider provider = (Provider) pis[i].getDependableFinder().getDependable(pis[i].getObjectId());
+				if (provider == null)  
+				{
+					throw StandardException.newException(
+							SQLState.LANG_OBJECT_NOT_FOUND, 
+							"OBJECT", 
+							pis[i].getObjectId());
+				}
+							
+				if (provider instanceof TableDescriptor || 
+					provider instanceof ViewDescriptor ||
+					provider instanceof AliasDescriptor)
+				{
+					descriptorList.add(provider);
+				}
+			}
+			catch(java.sql.SQLException ex)
+			{
+				throw StandardException.plainWrapException(ex);
+			}		   
+		}
+	}
+	
 }
+	

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/AnyResultSet.java Fri Sep  8 08:35:32 2006
@@ -210,7 +210,6 @@
 			// block, to ensure that it is executed?
 		    clearCurrentRow();
 
-			currentRow = null;
 	        source.close();
 
 			super.close();

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java Fri Sep  8 08:35:32 2006
@@ -1473,8 +1473,7 @@
 										true,
 										rsNum,
 										0,
-										0,
-										null);
+										0);
 			}
 			RowResultSet[] rrs = new RowResultSet[numRows];
 			UnionResultSet[] urs = new UnionResultSet[numRows - 1];
@@ -1487,8 +1486,7 @@
 										true,
 										rsNum,
 										1,
-										0,
-										null);
+										0);
 				if (i > 0)
 				{
 					urs[i - 1] = new UnionResultSet (
@@ -1497,8 +1495,7 @@
 										this,
 										rsNum,
 										i + 1,
-										0,
-										null);
+										0);
 				}
 			}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/BulkTableScanResultSet.java Fri Sep  8 08:35:32 2006
@@ -67,7 +67,7 @@
  *
  * @author jamie
  */
-public class BulkTableScanResultSet extends TableScanResultSet
+class BulkTableScanResultSet extends TableScanResultSet
 	implements CursorResultSet
 {
 	private DataValueDescriptor[][] rowArray;
@@ -84,7 +84,7 @@
 	 *
 	 * @exception StandardException thrown on failure to open
 	 */
-    public BulkTableScanResultSet(long conglomId,
+    BulkTableScanResultSet(long conglomId,
 		StaticCompiledOpenConglomInfo scoci, Activation activation, 
 		GeneratedMethod resultRowAllocator, 
 		int resultSetNumber,
@@ -105,8 +105,7 @@
 		int rowsPerRead,
 		boolean oneRowScan,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
     {
 		super(conglomId,
@@ -133,8 +132,7 @@
 			rowsPerRead,
 			oneRowScan,
 			optimizerEstimatedRowCount,
-			optimizerEstimatedCost,
-			closeCleanup);
+			optimizerEstimatedCost);
 
 		if (SanityManager.DEBUG)
 		{

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/CurrentOfResultSet.java Fri Sep  8 08:35:32 2006
@@ -229,7 +229,6 @@
 			// block, to ensure that it is executed?
 	    	clearCurrentRow();
 	        next = false;
-			currentRow = null;
 
 			super.close();
 	    }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DependentResultSet.java Fri Sep  8 08:35:32 2006
@@ -58,7 +58,7 @@
  * rows that needs to be deleted on dependent tables. Using the row location 
  * we got from the index , base row is fetched.
 */
-public class DependentResultSet extends NoPutResultSetImpl implements CursorResultSet
+class DependentResultSet extends NoPutResultSetImpl implements CursorResultSet
 {
 
 
@@ -103,7 +103,6 @@
 	protected GeneratedMethod stopKeyGetter;
 	protected int stopSearchOperator;
 	protected Qualifier[][] qualifiers;
-	protected GeneratedMethod closeCleanup;
 	public String tableName;
 	public String userSuppliedOptimizerOverrides;
 	public String indexName;
@@ -112,7 +111,6 @@
 	public int rowsPerRead;
 	public boolean forUpdate;
 	private boolean sameStartStopPosition;
-	private boolean nextDone;
 	public int isolationLevel;
 	public int lockMode;
 
@@ -125,12 +123,11 @@
 	public boolean coarserLock;
 	public boolean oneRowScan;
 	protected long	rowsThisScan;
-	private long estimatedRowCount;
 
 	//
     // class interface
     //
-	public DependentResultSet(
+	DependentResultSet(
 		long conglomId,
 		StaticCompiledOpenConglomInfo scoci, 
 		Activation activation, 
@@ -153,7 +150,6 @@
 		boolean oneRowScan,
 		double optimizerEstimatedRowCount,
 		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup,
 		String parentResultSetId, 
 		long fkIndexConglomId,
 		int fkColArrayItem,
@@ -227,8 +223,6 @@
 		//internally for delete cascades, isolation should be set to
 		//REPEATABLE READ irrespective what the user level isolation level is.
 		this.isolationLevel = TransactionController.ISOLATION_REPEATABLE_READ;
-
-		this.closeCleanup = closeCleanup;
 
 		runTimeStatisticsOn = (activation != null &&
 							   activation.getLanguageConnectionContext().getRunTimeStatisticsMode());

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctGroupedAggregateResultSet.java Fri Sep  8 08:35:32 2006
@@ -66,7 +66,7 @@
  *
  * @author jerry (broken out from SortResultSet)
  */
-public class DistinctGroupedAggregateResultSet extends GroupedAggregateResultSet
+class DistinctGroupedAggregateResultSet extends GroupedAggregateResultSet
 {
 
     /**
@@ -88,7 +88,7 @@
 	 *
 	 * @exception StandardException Thrown on error
 	 */
-    public DistinctGroupedAggregateResultSet(NoPutResultSet s,
+    DistinctGroupedAggregateResultSet(NoPutResultSet s,
 					boolean isInSortedOrder,
 					int	aggregateItem,
 					int	orderingItem,
@@ -97,11 +97,10 @@
 					int maxRowSize,
 					int resultSetNumber,
 				    double optimizerEstimatedRowCount,
-				    double optimizerEstimatedCost,
-					GeneratedMethod c) throws StandardException 
+				    double optimizerEstimatedCost) throws StandardException 
 	{
 		super(s, isInSortedOrder, aggregateItem, orderingItem,
-			  a, ra, maxRowSize, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost, c);
+			  a, ra, maxRowSize, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
     }
 
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScalarAggregateResultSet.java Fri Sep  8 08:35:32 2006
@@ -54,7 +54,7 @@
  *
  * @author jerry (broken out from SortResultSet)
  */
-public class DistinctScalarAggregateResultSet extends ScalarAggregateResultSet
+class DistinctScalarAggregateResultSet extends ScalarAggregateResultSet
 {
 	private ColumnOrdering[] order;
 	private int maxRowSize;
@@ -84,7 +84,7 @@
 	 *
 	 * @exception StandardException Thrown on error
 	 */
-    public DistinctScalarAggregateResultSet(NoPutResultSet s,
+    DistinctScalarAggregateResultSet(NoPutResultSet s,
 					boolean isInSortedOrder,
 					int	aggregateItem,
 					int	orderingItem,
@@ -94,14 +94,13 @@
 					int resultSetNumber,
 					boolean singleInputRow,
 				    double optimizerEstimatedRowCount,
-				    double optimizerEstimatedCost,
-					GeneratedMethod c) throws StandardException 
+				    double optimizerEstimatedCost) throws StandardException 
 	{
 		super(s, isInSortedOrder, aggregateItem, a, ra,
 			  resultSetNumber, 
 			  singleInputRow,
 			  optimizerEstimatedRowCount,
-			  optimizerEstimatedCost, c);
+			  optimizerEstimatedCost);
 
 		order = (ColumnOrdering[])
 					((FormatableArrayHolder)

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DistinctScanResultSet.java Fri Sep  8 08:35:32 2006
@@ -68,7 +68,7 @@
  *
  * @author jerry
  */
-public class DistinctScanResultSet extends HashScanResultSet
+class DistinctScanResultSet extends HashScanResultSet
 {
 
 	Enumeration element = null;
@@ -77,7 +77,7 @@
     //
     // class interface
     //
-    public DistinctScanResultSet(long conglomId, 
+    DistinctScanResultSet(long conglomId, 
 		StaticCompiledOpenConglomInfo scoci, Activation activation, 
 		GeneratedMethod resultRowAllocator, 
 		int resultSetNumber,
@@ -91,8 +91,7 @@
 		boolean tableLocked,
 		int isolationLevel,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
     {
 		super(conglomId, scoci, activation, resultRowAllocator, resultSetNumber,
@@ -108,7 +107,7 @@
 			  false,				  // forUpdate
 			  colRefItem, lockMode, tableLocked, isolationLevel,
 			  false,
-			  optimizerEstimatedRowCount, optimizerEstimatedCost, closeCleanup);
+			  optimizerEstimatedRowCount, optimizerEstimatedCost);
 
 		// Tell super class to eliminate duplicates
 		eliminateDuplicates = true;

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericAggregateResultSet.java Fri Sep  8 08:35:32 2006
@@ -75,7 +75,6 @@
 	protected GeneratedMethod			rowAllocator;
 	protected AggregatorInfoList	aggInfoList;	
 	public NoPutResultSet source;
-    protected GeneratedMethod closeCleanup;
 	protected	NoPutResultSet	originalSource; // used for run time stats only
 
 	/**
@@ -97,15 +96,13 @@
 		GeneratedMethod	ra,
 		int 			resultSetNumber,
 		double 			optimizerEstimatedRowCount,
-		double 			optimizerEstimatedCost,
-		GeneratedMethod c
+		double 			optimizerEstimatedCost
 	) 
 		throws StandardException 
 	{
 		super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
 		source = s;
 		originalSource = s;
-		closeCleanup = c;
 
 
 		rowAllocator = ra;

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GenericResultSetFactory.java Fri Sep  8 08:35:32 2006
@@ -243,8 +243,7 @@
 			reuseResult,
 			doesProjection,
 		    optimizerEstimatedRowCount,
-			optimizerEstimatedCost,
-			closeCleanup);
+			optimizerEstimatedCost);
 	}
 
 	/**
@@ -279,8 +278,7 @@
 			loadFactor,
 			true,		// Skip rows with 1 or more null key columns
 		    optimizerEstimatedRowCount,
-			optimizerEstimatedCost,
-			closeCleanup);
+			optimizerEstimatedCost);
 	}
 
 	/**
@@ -308,8 +306,7 @@
 			maxRowSize,
 			resultSetNumber, 
 		    optimizerEstimatedRowCount,
-			optimizerEstimatedCost,
-			closeCleanup);
+			optimizerEstimatedCost);
 	}
 
 	/**
@@ -333,7 +330,7 @@
 						source, isInSortedOrder, aggregateItem, source.getActivation(),
 						rowAllocator, resultSetNumber, singleInputRow,
 						optimizerEstimatedRowCount,
-						optimizerEstimatedCost, closeCleanup);
+						optimizerEstimatedCost);
 	}
 
 	/**
@@ -357,7 +354,7 @@
 						source, isInSortedOrder, aggregateItem, orderItem, source.getActivation(),
 						rowAllocator, maxRowSize, resultSetNumber, singleInputRow,
 						optimizerEstimatedRowCount,
-						optimizerEstimatedCost, closeCleanup);
+						optimizerEstimatedCost);
 	}
 
 	/**
@@ -379,7 +376,7 @@
 		return new GroupedAggregateResultSet(
 						source, isInSortedOrder, aggregateItem, orderItem, source.getActivation(),
 						rowAllocator, maxRowSize, resultSetNumber, optimizerEstimatedRowCount,
-						optimizerEstimatedCost, closeCleanup);
+						optimizerEstimatedCost);
 	}
 
 	/**
@@ -401,7 +398,7 @@
 		return new DistinctGroupedAggregateResultSet(
 						source, isInSortedOrder, aggregateItem, orderItem, source.getActivation(),
 						rowAllocator, maxRowSize, resultSetNumber, optimizerEstimatedRowCount,
-						optimizerEstimatedCost, closeCleanup);
+						optimizerEstimatedCost);
 	}
 											
 
@@ -455,8 +452,7 @@
 	{
 		return new RowResultSet(activation, row, canCacheRow, resultSetNumber, 
 							    optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -489,8 +485,7 @@
 								isTarget,
 								scanIsolationLevel,
 							    optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -561,8 +556,7 @@
 								isolationLevel,
 								true,		// Skip rows with 1 or more null key columns
 								optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -608,8 +602,7 @@
 								tableLocked,
 								isolationLevel,
 								optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -672,8 +665,7 @@
 								1,	// rowsPerRead is 1 if not a bulkTableScan
 								oneRowScan,
 								optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -744,8 +736,7 @@
 								rowsPerRead,
 								oneRowScan,
 								optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -783,8 +774,7 @@
 								restriction,
 								forUpdate,
 							    optimizerEstimatedRowCount,
-								optimizerEstimatedCost,
-								closeCleanup);
+								optimizerEstimatedCost);
 	}
 
 	/**
@@ -814,8 +804,7 @@
 										   notExistsRightSide, 
 										   optimizerEstimatedRowCount,
 										   optimizerEstimatedCost,
-										   userSuppliedOptimizerOverrides,
-										   closeCleanup);
+										   userSuppliedOptimizerOverrides);
 	}
 
 	/**
@@ -845,8 +834,7 @@
 										   notExistsRightSide, 
 										   optimizerEstimatedRowCount,
 										   optimizerEstimatedCost,
-										   userSuppliedOptimizerOverrides,
-										   closeCleanup);
+										   userSuppliedOptimizerOverrides);
 	}
 
 	/**
@@ -880,8 +868,7 @@
 										   notExistsRightSide,
 										   optimizerEstimatedRowCount,
 										   optimizerEstimatedCost,
-										   userSuppliedOptimizerOverrides,
-										   closeCleanup);
+										   userSuppliedOptimizerOverrides);
 	}
 
 	/**
@@ -915,8 +902,7 @@
 										   notExistsRightSide,
 										   optimizerEstimatedRowCount,
 										   optimizerEstimatedCost,
-										   userSuppliedOptimizerOverrides,
-										   closeCleanup);
+										   userSuppliedOptimizerOverrides);
 	}
 
 	/**
@@ -945,8 +931,7 @@
 		return new MaterializedResultSet(source, source.getActivation(), 
 									  resultSetNumber, 
 									  optimizerEstimatedRowCount,
-									  optimizerEstimatedCost,
-									  closeCleanup);
+									  optimizerEstimatedCost);
 	}
 
 	/**
@@ -972,8 +957,7 @@
 									  resultSetNumber, 
 									  sourceRowWidth,
 									  optimizerEstimatedRowCount,
-									  optimizerEstimatedCost,
-									  closeCleanup);
+									  optimizerEstimatedCost);
 		}
 		else
 		{
@@ -997,8 +981,7 @@
 		return new NormalizeResultSet(source, source.getActivation(), 
 									  resultSetNumber, erdNumber, 
 									  optimizerEstimatedRowCount,
-									  optimizerEstimatedCost, forUpdate,
-									  closeCleanup);
+									  optimizerEstimatedCost, forUpdate);
 	}
 
 	/**
@@ -1049,8 +1032,7 @@
 				                  leftResultSet.getActivation(),
 								  resultSetNumber, 
 								  optimizerEstimatedRowCount,
-								  optimizerEstimatedCost,
-								  closeCleanup);
+								  optimizerEstimatedCost);
 	}
 
     public NoPutResultSet getSetOpResultSet( NoPutResultSet leftSource,
@@ -1074,7 +1056,6 @@
                                    optimizerEstimatedCost,
                                    opType,
                                    all,
-                                   closeCleanup,
                                    intermediateOrderByColumnsSavedObject,
                                    intermediateOrderByDirectionSavedObject);
     }
@@ -1143,8 +1124,7 @@
 					tableLocked,
 					isolationLevel,
 					optimizerEstimatedRowCount,
-					optimizerEstimatedCost,
-					closeCleanup);
+					optimizerEstimatedCost);
 	}
 
 
@@ -1213,7 +1193,6 @@
 								oneRowScan,
 								optimizerEstimatedRowCount,
 								optimizerEstimatedCost,
-								closeCleanup,
 								parentResultSetId,
 								fkIndexConglomId,
 								fkColArrayItem,

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/GroupedAggregateResultSet.java Fri Sep  8 08:35:32 2006
@@ -68,7 +68,7 @@
  *
  * @author jerry (broken out from SortResultSet)
  */
-public class GroupedAggregateResultSet extends GenericAggregateResultSet
+class GroupedAggregateResultSet extends GenericAggregateResultSet
 	implements CursorResultSet {
 
 	/* Run time statistics variables */
@@ -124,7 +124,7 @@
 	 *
 	 * @exception StandardException Thrown on error
 	 */
-    public GroupedAggregateResultSet(NoPutResultSet s,
+    GroupedAggregateResultSet(NoPutResultSet s,
 					boolean isInSortedOrder,
 					int	aggregateItem,
 					int	orderingItem,
@@ -133,10 +133,9 @@
 					int maxRowSize,
 					int resultSetNumber,
 				    double optimizerEstimatedRowCount,
-				    double optimizerEstimatedCost,
-					GeneratedMethod c) throws StandardException 
+				    double optimizerEstimatedCost) throws StandardException 
 	{
-		super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost, c);
+		super(s, aggregateItem, a, ra, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
 		this.isInSortedOrder = isInSortedOrder;
 		sortTemplateRow = getExecutionFactory().getIndexableRow((ExecRow) rowAllocator.invoke(activation));
 		order = (ColumnOrdering[])
@@ -476,11 +475,7 @@
 			// REVISIT: does this need to be in a finally
 			// block, to ensure that it is executed?
 		    clearCurrentRow();
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
 
-			currentRow = null;
 			sortResultRow = null;
 			sourceExecIndexRow = null;
 			closeSource();

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashJoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -44,9 +44,9 @@
  * Simple subclass of nested loop, differentiated
  * to ease RunTimeStatistics output generation.
  */
-public class HashJoinResultSet extends NestedLoopJoinResultSet
+class HashJoinResultSet extends NestedLoopJoinResultSet
 {
-    public HashJoinResultSet(NoPutResultSet leftResultSet,
+    HashJoinResultSet(NoPutResultSet leftResultSet,
 								   int leftNumCols,
 								   NoPutResultSet rightResultSet,
 								   int rightNumCols,
@@ -57,12 +57,11 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
     {
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 
 			  oneRowRightSide, notExistsRightSide, optimizerEstimatedRowCount, 
-			  optimizerEstimatedCost, userSuppliedOptimizerOverrides, closeCleanup);
+			  optimizerEstimatedCost, userSuppliedOptimizerOverrides);
     }
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashLeftOuterJoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -44,9 +44,9 @@
  * Simple subclass of nested loop left outer join, differentiated
  * to ease RunTimeStatistics output generation.
  */
-public class HashLeftOuterJoinResultSet extends NestedLoopLeftOuterJoinResultSet
+class HashLeftOuterJoinResultSet extends NestedLoopLeftOuterJoinResultSet
 {
-    public HashLeftOuterJoinResultSet(
+    HashLeftOuterJoinResultSet(
 						NoPutResultSet leftResultSet,
 						int leftNumCols,
 						NoPutResultSet rightResultSet,
@@ -60,14 +60,13 @@
 					    boolean notExistsRightSide,
  					    double optimizerEstimatedRowCount,
 						double optimizerEstimatedCost,
-						String userSuppliedOptimizerOverrides,
-						GeneratedMethod closeCleanup)
+						String userSuppliedOptimizerOverrides)
     {
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 
 			  emptyRowFun, wasRightOuterJoin,
 			  oneRowRightSide, notExistsRightSide,
 			  optimizerEstimatedRowCount, optimizerEstimatedCost, 
-			  userSuppliedOptimizerOverrides, closeCleanup);
+			  userSuppliedOptimizerOverrides);
     }
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashScanResultSet.java Fri Sep  8 08:35:32 2006
@@ -109,7 +109,6 @@
 	private int initialCapacity;
 	private float loadFactor;
 	private int maxCapacity;
-	private GeneratedMethod closeCleanup;
 	public String tableName;
 	public String userSuppliedOptimizerOverrides;
 	public String indexName;
@@ -140,7 +139,7 @@
     //
     // class interface
     //
-    public HashScanResultSet(long conglomId,
+    HashScanResultSet(long conglomId,
 		StaticCompiledOpenConglomInfo scoci, Activation activation, 
 		GeneratedMethod resultRowAllocator, 
 		int resultSetNumber,
@@ -164,8 +163,7 @@
 		int isolationLevel,
 		boolean skipNullKeyColumns,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
     {
 		super(activation,
@@ -287,8 +285,6 @@
                 "Invalid isolation level - " + isolationLevel);
         }
 
-        this.closeCleanup = closeCleanup;
-
 		runTimeStatisticsOn = 
             getLanguageConnectionContext().getRunTimeStatisticsMode();
 
@@ -621,11 +617,7 @@
 			// REVISIT: does this need to be in a finally
 			// block, to ensure that it is executed?
 		    clearCurrentRow();
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
 
-			currentRow = null;
 			if (hashtableBuilt)
 			{
 				// This is where we get the scan properties for a subquery

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/HashTableResultSet.java Fri Sep  8 08:35:32 2006
@@ -67,7 +67,7 @@
  *
  * @author jerry
  */
-public class HashTableResultSet extends NoPutResultSetImpl
+class HashTableResultSet extends NoPutResultSetImpl
 	implements CursorResultSet 
 {
 	/* Run time statistics variables */
@@ -83,7 +83,6 @@
 	public Qualifier[][] nextQualifiers;
     private GeneratedMethod projection;
 	private int[]			projectMapping;
-    private GeneratedMethod closeCleanup;
 	private boolean runTimeStatsOn;
 	private ExecRow			mappedResultRow;
 	public boolean reuseResult;
@@ -111,7 +110,7 @@
     //
     // class interface
     //
-    public HashTableResultSet(NoPutResultSet s,
+    HashTableResultSet(NoPutResultSet s,
 					Activation a,
 					GeneratedMethod str,
 					Qualifier[][] nextQualifiers,
@@ -126,8 +125,7 @@
 					float loadFactor,
 					boolean skipNullKeyColumns,
 				    double optimizerEstimatedRowCount,
-					double optimizerEstimatedCost,
-					GeneratedMethod c) 
+					double optimizerEstimatedCost) 
 		throws StandardException
 	{
 		super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
@@ -157,7 +155,6 @@
 		this.initialCapacity = initialCapacity;
 		this.loadFactor = loadFactor;
 		this.skipNullKeyColumns = skipNullKeyColumns;
-        closeCleanup = c;
 
 		// Allocate a result row if all of the columns are mapped from the source
 		if (projection == null)
@@ -517,10 +514,7 @@
 			// REVISIT: does this need to be in a finally
 			// block, to ensure that it is executed?
 	    	clearCurrentRow();
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
-			currentRow = null;
+
 	        source.close();
 
 			super.close();

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/IndexRowToBaseRowResultSet.java Fri Sep  8 08:35:32 2006
@@ -64,7 +64,7 @@
  *
  * @author jeff
  */
-public class IndexRowToBaseRowResultSet extends NoPutResultSetImpl
+class IndexRowToBaseRowResultSet extends NoPutResultSetImpl
 	implements CursorResultSet {
 
     // set in constructor and not altered during
@@ -74,7 +74,6 @@
 	private GeneratedMethod resultRowAllocator;
 	private GeneratedMethod restriction;
     private long baseConglomId;
-    private GeneratedMethod closeCleanup;
 	public FormatableBitSet accessedHeapCols;
 	private FormatableBitSet accessedIndexCols;
 	//caching accessed columns (heap+index) beetle 3865
@@ -109,7 +108,7 @@
     //
     // class interface
     //
-    public IndexRowToBaseRowResultSet(
+    IndexRowToBaseRowResultSet(
 					long conglomId,
 					int scociItem,
 					Activation a,
@@ -123,8 +122,7 @@
 					GeneratedMethod restriction,
 					boolean forUpdate,
 					double optimizerEstimatedRowCount,
-					double optimizerEstimatedCost,
-					GeneratedMethod closeCleanup) 
+					double optimizerEstimatedCost) 
 		throws StandardException
 	{
 		super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
@@ -141,7 +139,6 @@
 		/* RESOLVE - once we push Qualifiers into the store we
 		 * need to clear their Orderable cache on each open/reopen.
 		 */
-        this.closeCleanup = closeCleanup;
 
 		// retrieve the valid column list from
 		// the saved objects, if it exists
@@ -480,7 +477,6 @@
 					clearCurrentRow();
 					baseRowLocation = null;
 
-					currentRow = null;
 				}
 				else
 				{
@@ -492,7 +488,6 @@
 
 				retval = currentRow;
 		    } else {
-				currentRow = null;
 				clearCurrentRow();
 				baseRowLocation = null;
 
@@ -521,10 +516,7 @@
 			// REVISIT: does this need to be in a finally
 			// block, to ensure that it is executed?
 	    	clearCurrentRow();
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
-			currentRow = null;
+
 			if (closeBaseCCHere)
 			{
                 // This check should only be needed in the error case where
@@ -647,7 +639,6 @@
 			setCurrentRow(sourceRow);
 		} else {
 			clearCurrentRow();
-			currentRow = null;
 		}
 		return currentRow;
 	}

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java Fri Sep  8 08:35:32 2006
@@ -2353,8 +2353,8 @@
 							LanguageProperties.BULK_FETCH_DEFAULT_INT,	// rows per read
 							false,					// not a 1 row per scan
 							0d,						// estimated rows
-							0d, 					// estimated cost
-							(GeneratedMethod)null);	// close cleanup
+							0d 					// estimated cost
+							);
 			tableScan.openCore();
 		}
 		else

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/JoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -42,7 +42,7 @@
  *
  * @author ames
  */
-public abstract class JoinResultSet extends NoPutResultSetImpl
+abstract class JoinResultSet extends NoPutResultSetImpl
 	implements CursorResultSet
 {
 	/* Run time statistics variables */
@@ -63,7 +63,6 @@
 	public	  NoPutResultSet rightResultSet;
 	protected int		  rightNumCols;
     protected GeneratedMethod restriction;
-    protected GeneratedMethod closeCleanup;
 	public	  boolean oneRowRightSide;
 	public	  boolean notExistsRightSide;  //right side is NOT EXISTS
 	
@@ -73,7 +72,7 @@
      * class interface
      *
      */
-    public JoinResultSet(NoPutResultSet leftResultSet,
+    JoinResultSet(NoPutResultSet leftResultSet,
 								   int leftNumCols,
 								   NoPutResultSet rightResultSet,
 								   int rightNumCols,
@@ -84,8 +83,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
     {
 		super(activation, resultSetNumber, optimizerEstimatedRowCount, 
 			  optimizerEstimatedCost);
@@ -96,7 +94,6 @@
         this.restriction = restriction;
 		this.oneRowRightSide = oneRowRightSide;
 		this.notExistsRightSide = notExistsRightSide;
-        this.closeCleanup = closeCleanup;
 		constructorTime += getElapsedMillis(beginTime);
 		this.userSuppliedOptimizerOverrides = userSuppliedOptimizerOverrides;
     }
@@ -204,10 +201,6 @@
 
 		if ( isOpen )
 	    {
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
-
 	        leftResultSet.close();
 			if (isRightOpen)
 			{

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/LastIndexKeyResultSet.java Fri Sep  8 08:35:32 2006
@@ -56,7 +56,7 @@
  *
  * @author jamie
  */
-public class LastIndexKeyResultSet extends NoPutResultSetImpl
+class LastIndexKeyResultSet extends NoPutResultSetImpl
 {
 	protected	ExecRow		candidate;
 
@@ -69,7 +69,6 @@
 	protected GeneratedMethod stopKeyGetter;
 	protected int stopSearchOperator;
 	protected Qualifier[][] qualifiers;
-	protected GeneratedMethod closeCleanup;
 	public String tableName;
 	public String userSuppliedOptimizerOverrides;
 	public String indexName;
@@ -110,7 +109,6 @@
 	 * @param optimizerEstimatedRowCount	Estimated total # of rows by
 	 * 										optimizer
 	 * @param optimizerEstimatedCost		Estimated total cost by optimizer
-	 * @param closeCleanup		any cleanup the activation needs to do on close.
 	 *
 	 * @exception StandardException thrown when unable to create the
 	 * 				result set
@@ -129,8 +127,7 @@
 		boolean tableLocked,
 		int isolationLevel,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup
+		double optimizerEstimatedCost
 	) throws StandardException
 	{
 		super(activation,
@@ -218,8 +215,6 @@
                 "Invalid isolation level - " + isolationLevel);
         }
 
-		this.closeCleanup = closeCleanup;
-
 		runTimeStatisticsOn = getLanguageConnectionContext().getRunTimeStatisticsMode();
 
 		/* Only call row allocators once */
@@ -287,7 +282,6 @@
 		}
 		else
 		{
-			currentRow = null;
 		    clearCurrentRow();
 		}
 			
@@ -304,7 +298,6 @@
 	{
 		if (returnedRow || !isOpen)
 		{
-			currentRow = null;
 		    clearCurrentRow();
 		} 
 		else
@@ -325,12 +318,7 @@
 		if (isOpen)
 	    {
 			isOpen = false;
-			currentRow = null;
 		    clearCurrentRow();
-			if (closeCleanup != null) 
-			{
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
 
 			super.close();
 	    }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MaterializedResultSet.java Fri Sep  8 08:35:32 2006
@@ -56,7 +56,7 @@
  * Return rows from temp table on subsequent scans.
  */
 
-public class MaterializedResultSet extends NoPutResultSetImpl
+class MaterializedResultSet extends NoPutResultSetImpl
 	implements CursorResultSet
 {
 	/*
@@ -79,9 +79,6 @@
 	public	  long						createTCTime;
 	public	  long						fetchTCTime;
 
-
-    private GeneratedMethod closeCleanup;
-
 	/**
 	 * Constructor for a MaterializedResultSet
 	 *
@@ -96,8 +93,7 @@
 	public MaterializedResultSet(NoPutResultSet source,
 							  Activation activation, int resultSetNumber,
 							  double optimizerEstimatedRowCount,
-							  double optimizerEstimatedCost,
-							  GeneratedMethod c) throws StandardException
+							  double optimizerEstimatedCost) throws StandardException
 	{
 		super(activation, resultSetNumber, 
 			  optimizerEstimatedRowCount, optimizerEstimatedCost);
@@ -106,7 +102,6 @@
         // Get the current transaction controller
         tc = activation.getTransactionController();
 
-        closeCleanup = c;
 		constructorTime += getElapsedMillis(beginTime);
 	}
 
@@ -309,10 +304,6 @@
 		beginTime = getCurrentTimeMillis();
 	    if ( isOpen )
 	    {
-			if (closeCleanup != null) 
-			{
-				closeCleanup.invoke(activation); // let activation tidy up
-			} 
 			currentRow = null;
 	        source.close();
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/MergeJoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -49,7 +49,7 @@
  * result set) MUST be unique for this to work correctly.
  *
  */
-public class MergeJoinResultSet extends JoinResultSet
+class MergeJoinResultSet extends JoinResultSet
 {
 	private static final int GREATER_THAN = 1;
 	private static final int EQUAL = 0;
@@ -77,7 +77,7 @@
 	 * @param optimizerEstimatedCost		self-explanatory
 	 * @param closeCleanup					self-explanatory
      */
-    public MergeJoinResultSet(NoPutResultSet leftResultSet,
+    MergeJoinResultSet(NoPutResultSet leftResultSet,
 								   int leftNumCols,
 								   NoPutResultSet rightResultSet,
 								   int rightNumCols,
@@ -94,7 +94,7 @@
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 
 			  oneRowRightSide, notExistsRightSide, optimizerEstimatedRowCount, 
-			  optimizerEstimatedCost, null, closeCleanup);
+			  optimizerEstimatedCost, null);
 
 		this.leftGreaterThanRight = leftGreaterThanRight;
     }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopJoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -45,7 +45,7 @@
  * Takes 2 NoPutResultSets and a join filter and returns
  * the join's rows satisfying the filter as a result set.
  */
-public class NestedLoopJoinResultSet extends JoinResultSet
+class NestedLoopJoinResultSet extends JoinResultSet
 {
 	private boolean returnedRowMatchingRightSide = false;
 	private ExecRow rightTemplate;
@@ -277,7 +277,7 @@
      * class interface
      *
      */
-    public NestedLoopJoinResultSet(NoPutResultSet leftResultSet,
+    NestedLoopJoinResultSet(NoPutResultSet leftResultSet,
 								   int leftNumCols,
 								   NoPutResultSet rightResultSet,
 								   int rightNumCols,
@@ -288,13 +288,12 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
     {
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 
 			  oneRowRightSide, notExistsRightSide, optimizerEstimatedRowCount, 
-			  optimizerEstimatedCost, userSuppliedOptimizerOverrides, closeCleanup);
+			  optimizerEstimatedCost, userSuppliedOptimizerOverrides);
 		if (notExistsRightSide)
 			rightTemplate = getExecutionFactory().getValueRow(rightNumCols);
     }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NestedLoopLeftOuterJoinResultSet.java Fri Sep  8 08:35:32 2006
@@ -48,7 +48,7 @@
  * the right when there is no matching row in the right
  * result set.
  */
-public class NestedLoopLeftOuterJoinResultSet extends NestedLoopJoinResultSet
+class NestedLoopLeftOuterJoinResultSet extends NestedLoopJoinResultSet
 {
 	protected GeneratedMethod emptyRowFun;
 	/* Was this originally a right outer join? */
@@ -270,7 +270,7 @@
      * class interface
      *
      */
-    public NestedLoopLeftOuterJoinResultSet(
+    NestedLoopLeftOuterJoinResultSet(
 						NoPutResultSet leftResultSet,
 						int leftNumCols,
 						NoPutResultSet rightResultSet,
@@ -284,14 +284,13 @@
 					    boolean notExistsRightSide,
  					    double optimizerEstimatedRowCount,
 						double optimizerEstimatedCost,
-						String userSuppliedOptimizerOverrides,
-						GeneratedMethod closeCleanup)
+						String userSuppliedOptimizerOverrides)
     {
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 
 			  oneRowRightSide, notExistsRightSide,
 			  optimizerEstimatedRowCount, optimizerEstimatedCost, 
-			  userSuppliedOptimizerOverrides, closeCleanup);
+			  userSuppliedOptimizerOverrides);
 		this.emptyRowFun = emptyRowFun;
 		this.wasRightOuterJoin = wasRightOuterJoin;
     }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/NormalizeResultSet.java Fri Sep  8 08:35:32 2006
@@ -54,7 +54,7 @@
  * result set for the entire statement.
  */
 
-public class NormalizeResultSet extends NoPutResultSetImpl
+class NormalizeResultSet extends NoPutResultSetImpl
 	implements CursorResultSet
 {
 	/*
@@ -72,8 +72,6 @@
 	 */
 	private ResultDescription resultDescription;
 
-    private GeneratedMethod closeCleanup;
-
 	/* info for caching DTSs */
 	private DataTypeDescriptor[] desiredTypes;
 
@@ -94,8 +92,7 @@
 							  int erdNumber,
 	 					      double optimizerEstimatedRowCount,
 							  double optimizerEstimatedCost,
-							  boolean forUpdate,
-							  GeneratedMethod c) throws StandardException
+							  boolean forUpdate) throws StandardException
 	{
 		super(activation, resultSetNumber, optimizerEstimatedRowCount, 
 			  optimizerEstimatedCost);
@@ -133,7 +130,6 @@
 	*/
 		startCol = (forUpdate) ? ((numCols - 1)/ 2) + 1 : 1;
 		normalizedRow = activation.getExecutionFactory().getValueRow(numCols);
-        closeCleanup = c;
 		constructorTime += getElapsedMillis(beginTime);
 	}
 
@@ -227,9 +223,6 @@
 		beginTime = getCurrentTimeMillis();
 	    if ( isOpen )
 	    {
-			if (closeCleanup != null) {
-				closeCleanup.invoke(activation); // let activation tidy up
-			}
 			currentRow = null;
 	        source.close();