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/22 19:08:44 UTC

svn commit: r449004 [1/2] - in /db/derby/code/branches/10.2: java/engine/org/apache/derby/iapi/services/io/ java/engine/org/apache/derby/iapi/sql/dictionary/ java/engine/org/apache/derby/iapi/sql/execute/ java/engine/org/apache/derby/iapi/types/ java/e...

Author: rhillegas
Date: Fri Sep 22 10:08:40 2006
New Revision: 449004

URL: http://svn.apache.org/viewvc?view=rev&rev=449004
Log:
DERBY-1725: Merge the following patches from the trunk to the 10.2 branch: DERBY-1811 (448456), DERBY-1787 (448424), DERBY-1700 (448338, 448286), DERBY-1775 (448258), DERBY-1869 (448133), DERBY-1834 (448101), DERBY-1718 (448085), DERBY-1772 (448048), DERBY-1766 (448034), DERBY-1304 (448026), DERBY-1547 (448003), DERBY-1846 (447970).

Added:
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_sed.properties
      - copied unchanged from r448464, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSinSameJVM_sed.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_sed.properties
      - copied unchanged from r448464, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_sed.properties
    db/derby/code/branches/10.2/tools/jdbc4/modules.patch
      - copied unchanged from r448464, db/derby/code/trunk/tools/jdbc4/modules.patch
Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTime.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
    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/DistinctNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.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/ProjectRestrictNode.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/RowResultSetNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.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/MergeJoinResultSet.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.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/loc/messages_en.properties
    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/master/DerbyNet/xml_general.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/xml_general.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/grantRevokeDDL2.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/views.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/xml_general.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TimeHandlingTest.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/timestampArith.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/views.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/xml_general.sql
    db/derby/code/branches/10.2/tools/jdbc4/update-with-jdbc4
    db/derby/code/branches/10.2/tools/jdbc4/update-with-jdbc4.bat

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/RegisteredFormatIds.java Fri Sep 22 10:08:40 2006
@@ -525,5 +525,6 @@
         /* 461 */   "org.apache.derby.impl.sql.catalog.CoreDDFinderClassInfo",
         /* 462 */   "org.apache.derby.impl.sql.catalog.CoreDDFinderClassInfo",
         /* 463 */   "org.apache.derby.impl.sql.catalog.CoreDDFinderClassInfo",
+        /* 464 */   "org.apache.derby.iapi.types.SqlXmlUtil",        
 };
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/services/io/StoredFormatIds.java Fri Sep 22 10:08:40 2006
@@ -491,6 +491,12 @@
                 (MIN_ID_2 + 456);
         
         /**
+         	class org.apache.derby.iapi.types.SqlXmlUtil
+        */
+        static public final int SQL_XML_UTIL_V01_ID =
+                (MIN_ID_2 + 464);
+        
+        /**
             class org.apache.derby.iapi.types.JSQLType
          */
         static public final int JSQLTYPEIMPL_ID =
@@ -1853,7 +1859,7 @@
          * Make sure this is updated when a new module is added
          */
         public static final int MAX_ID_2 =
-                (MIN_ID_2 + 463);
+                (MIN_ID_2 + 464);
 
         // DO NOT USE 4 BYTE IDS ANYMORE
         static public final int MAX_ID_4 =

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java Fri Sep 22 10:08:40 2006
@@ -259,11 +259,11 @@
 	public DataDescriptorGenerator	getDataDescriptorGenerator();
 
 	/**
-	 * Get authorizationID of DBA
+	 * Get authorizationID of Database Owner
 	 *
 	 * @return	authorizationID
 	 */
-	public String getAuthorizationDBA();
+	public String getAuthorizationDatabaseOwner();
 
 	/**
 	 * Get authorization model in force, SqlStandard or legacy mode

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/dictionary/StatementSchemaPermission.java Fri Sep 22 10:08:40 2006
@@ -68,9 +68,10 @@
 		}
 		else
 		{
-			// Non-DBA Users can only create schemas that match their authid
-			// Also allow only DBA to set authid to another user
-			// Note that for DBA, check interface wouldn't be called at all
+			// Non-Database Owner Users can only create schemas that match 
+			// their authid. Also allow only Database Owner to set authid to 
+			// another user. Note that for Database Owner, check interface 
+			// wouldn't be called at all
 			if (!schemaName.equals(authid) || (aid != null && !aid.equals(authid)))
 				throw StandardException.newException(
 					SQLState.AUTH_NOT_DATABASE_OWNER, authid, schemaName);

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/sql/execute/ResultSetFactory.java Fri Sep 22 10:08:40 2006
@@ -293,7 +293,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.
 		@return the project restrict operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -306,8 +305,7 @@
 		boolean reuseResult,
 		boolean doesProjection,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) throws StandardException;
+		double optimizerEstimatedCost) throws StandardException;
 
 	/**
 		A hash table result set builds a hash table on its source,
@@ -340,7 +338,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.
 		@return the project restrict operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -357,8 +354,7 @@
 		int	initialCapacity,
 		float loadFactor,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			 throws StandardException;
 
 	/**
@@ -385,7 +381,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.
 		@return the distinct operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -398,8 +393,7 @@
 		int rowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException;
 
 	/**
@@ -419,7 +413,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.
 		@return the scalar aggregation operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -433,8 +426,7 @@
 		int resultSetNumber, 
 		boolean singleInputRow,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException;
 
 	/**
@@ -457,7 +449,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.
 		@return the scalar aggregation operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -471,8 +462,7 @@
 		int resultSetNumber, 
 		boolean singleInputRow,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException;
 
 	/**
@@ -491,7 +481,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.
 		@return the scalar aggregation operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -504,8 +493,7 @@
 		int rowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException;
 
 	/**
@@ -527,7 +515,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.
 		@return the scalar aggregation operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -540,8 +527,7 @@
 		int rowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException;
 
 	/**
@@ -623,7 +609,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.
 		@return the row as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -632,8 +617,7 @@
 							  boolean canCacheRow,
 							  int resultSetNumber,
 							  double optimizerEstimatedRowCount,
-							  double optimizerEstimatedCost,
-							  GeneratedMethod closeCleanup)
+							  double optimizerEstimatedCost)
 		throws StandardException;
 
 	/**
@@ -657,7 +641,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.
 		@return the row as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -673,8 +656,7 @@
 									 boolean isTarget,
 									 int scanIsolationLevel,
 									 double optimizerEstimatedRowCount,
-									 double optimizerEstimatedCost,
-								     GeneratedMethod closeCleanup)
+									 double optimizerEstimatedCost)
 		 throws StandardException;
 
 	/**
@@ -734,7 +716,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.
 		@return the table scan operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -767,8 +748,7 @@
 								boolean tableLocked,
 								int isolationLevel,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException;
 
 	/**
@@ -802,7 +782,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.
 		@return the table scan operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -823,8 +802,7 @@
 								boolean tableLocked,
 								int isolationLevel,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException;
 
 	/**
@@ -885,7 +863,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.
 
 		@return the table scan operation as a result set.
 		@exception StandardException thrown when unable to create the
@@ -915,8 +892,7 @@
 								int isolationLevel,
 								boolean oneRowScan,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException;
 
 	/**
@@ -978,7 +954,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.
 
 		@return the table scan operation as a result set.
 		@exception StandardException thrown when unable to create the
@@ -1009,8 +984,7 @@
 								int rowsPerRead,
 								boolean oneRowScan,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException;
 	/**
 		An index row to base row result set gets an index row from its source
@@ -1042,7 +1016,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.
 
 		@return the index row to base row operation as a result set.
 		@exception StandardException thrown when unable to create the
@@ -1061,8 +1034,7 @@
 								GeneratedMethod restriction,
 								boolean forUpdate,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException;
 
 	/**
@@ -1095,7 +1067,6 @@
 											optimizer
 		@param optimizerEstimatedCost		Estimated total cost by optimizer
 		@param userSuppliedOptimizerOverrides		Overrides specified by the user on the sql
-		@param closeCleanup	any cleanup the activation needs to do on close.
 		@return the nested loop join operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -1110,8 +1081,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException;
 
 	/**
@@ -1137,7 +1107,6 @@
 											optimizer
 		@param optimizerEstimatedCost		Estimated total cost by optimizer
 		@param userSuppliedOptimizerOverrides		Overrides specified by the user on the sql
-		@param closeCleanup	any cleanup the activation needs to do on close.
 		@return the nested loop join operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -1152,8 +1121,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException;
 
 
@@ -1189,7 +1157,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.
 		@param userSuppliedOptimizerOverrides		Overrides specified by the user on the sql
 		@return the nested loop join operation as a result set.
 		@exception StandardException thrown when unable to create the
@@ -1207,8 +1174,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException;
 
 	/**
@@ -1237,7 +1203,6 @@
 											optimizer
 		@param optimizerEstimatedCost		Estimated total cost by optimizer
 		@param userSuppliedOptimizerOverrides		Overrides specified by the user on the sql
-		@param closeCleanup	any cleanup the activation needs to do on close.
 		@return the nested loop join operation as a result set.
 		@exception StandardException thrown when unable to create the
 			result set
@@ -1254,8 +1219,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException;
 
 	/**
@@ -1268,7 +1232,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.
 		@return the materialization operation as a result set.
 
 	 	@exception StandardException		Thrown on failure
@@ -1276,8 +1239,7 @@
 	NoPutResultSet getMaterializedResultSet(NoPutResultSet source, 
 											int resultSetNumber,
 											double optimizerEstimatedRowCount,
-											double optimizerEstimatedCost,
-										   GeneratedMethod closeCleanup) 
+											double optimizerEstimatedCost) 
 		throws StandardException;
 
 	/**
@@ -1293,7 +1255,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.
 		@return the materialization operation as a result set.
 
 	 	@exception StandardException		Thrown on failure
@@ -1303,8 +1264,7 @@
 											int sourceRowWidth,
 											boolean scrollable,
 											double optimizerEstimatedRowCount,
-											double optimizerEstimatedCost,
-										   GeneratedMethod closeCleanup) 
+											double optimizerEstimatedCost) 
 		throws StandardException;
 
 	/**
@@ -1317,7 +1277,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.
 		@return the normalization operation as a result set.
 
 	 	@exception StandardException		Thrown on failure
@@ -1326,8 +1285,7 @@
 										 int resultSetNumber, int erdNumber,
 										 double optimizerEstimatedRowCount,
 										 double optimizerEstimatedCost,
-										 boolean forUpdate,
-										 GeneratedMethod closeCleanup) 
+										 boolean forUpdate) 
 		throws StandardException;
 
 	/**
@@ -1356,7 +1314,6 @@
 	 * @param source2	The second ResultSet whose rows go into the
 	 *			union
 	 *	@param resultSetNumber	The resultSetNumber for the ResultSet
-	 *	@param closeCleanup	any cleanup the activation needs to do on close.
 	 *	@param optimizerEstimatedRowCount	Estimated total # of rows by
 	 *										optimizer
 	 *	@param optimizerEstimatedCost		Estimated total cost by optimizer
@@ -1370,8 +1327,7 @@
 					NoPutResultSet source2,
 					int resultSetNumber,
 					double optimizerEstimatedRowCount,
-					double optimizerEstimatedCost,
-					GeneratedMethod closeCleanup)
+					double optimizerEstimatedCost)
 					throws StandardException;
 
 
@@ -1388,7 +1344,6 @@
      * @param opType IntersectOrExceptNode.INTERSECT_OP or EXCEPT_OP
      * @param all true if the operation is an INTERSECT ALL or an EXCEPT ALL,
      *            false if the operation is an INTERSECT DISCTINCT or an EXCEPT DISCTINCT
-     * @param closeCleanup a method to be called by close
      * @param intermediateOrderByColumnsSavedObject The saved object index for the array of order by columns for the
      *        ordering of the left and right sources. That is, both the left and right sources have an order by
      *        clause of the form ORDER BY intermediateOrderByColumns[0],intermediateOrderByColumns[1],...
@@ -1408,7 +1363,6 @@
                                       double optimizerEstimatedCost,
                                       int opType,
                                       boolean all,
-                                      GeneratedMethod closeCleanup,
                                       int intermediateOrderByColumnsSavedObject,
                                       int intermediateOrderByDirectionSavedObject)
         throws StandardException;
@@ -1446,7 +1400,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.
 	 *
 	 * @return the scan operation as a result set.
  	 *
@@ -1467,8 +1420,7 @@
 		boolean				tableLocked,
 		int					isolationLevel,
 		double				optimizerEstimatedRowCount,
-		double 				optimizerEstimatedCost,
-		GeneratedMethod 	closeCleanup
+		double 				optimizerEstimatedCost
 	) throws StandardException;
 
 
@@ -1526,7 +1478,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.
 		@param parentResultSetId  Id to access the materlized temporary result
                             	  set from the refence stored in the activation.
 		@param fkIndexConglomId foreign key index conglomerate id.
@@ -1563,7 +1514,6 @@
 									boolean oneRowScan,
 									double optimizerEstimatedRowCount,
 									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup,
 									String parentResultSetId,
 									long fkIndexConglomId,
 									int fkColArrayItem,

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTime.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTime.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTime.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTime.java Fri Sep 22 10:08:40 2006
@@ -139,30 +139,42 @@
     }
 
 	/**
-		@exception StandardException thrown on failure
+     * Convert a SQL TIME to a JDBC java.sql.Timestamp.
+     * 
+     * Behaviour is to set the date portion of the Timestamp
+     * to the actual current date, which may not match the
+     * SQL CURRENT DATE, which remains fixed for the lifetime
+     * of a SQL statement. JDBC drivers (especially network client drivers)
+     * could not be expected to fetch the CURRENT_DATE SQL value
+     * on every query that involved a TIME value, so the current
+     * date as seen by the JDBC client was picked as the logical behaviour.
+     * See DERBY-1811.
 	 */
-	public Timestamp getTimestamp( Calendar cal) throws StandardException
+	public Timestamp getTimestamp( Calendar cal)
 	{
 		if (isNull())
 			return null;
 		else
 		{
             if( cal == null)
-                cal = new GregorianCalendar();
-			/*
-			** HACK FOR SYMANTEC: in symantec 1.8, the call
-			** to today.getTime().getTime() will blow up 
-			** in GregorianCalendar because year <= 0.
-			** This is a bug in some sort of optimization that
-			** symantic is doing (not related to the JIT).  If 
-			** we do a reference to that field everythings works 
-			** fine, hence this extraneous get(Calendar.YEAR).
-			*/
-			cal.get(Calendar.YEAR);
+            {
+                // Calendar initialized to current date and time.
+                cal = new GregorianCalendar(); 
+            }
+            else
+            {
+                cal.clear();
+                // Set Calendar to current date and time.
+                cal.setTime(new Date(System.currentTimeMillis()));
+            }
+
 			cal.set(Calendar.HOUR_OF_DAY, getHour(encodedTime));
 			cal.set(Calendar.MINUTE, getMinute(encodedTime));
 			cal.set(Calendar.SECOND, getSecond(encodedTime));
+            
+            // Derby's resolution for the TIME type is only seconds.
 			cal.set(Calendar.MILLISECOND, 0);
+            
 			return new Timestamp(cal.getTime().getTime());
 		}
 	}
@@ -797,13 +809,10 @@
 		if (isNull())
 			return null;
 
-        return newTime(cal);
-    }
-
-    protected Time newTime(java.util.Calendar cal)
-    {
         if( cal == null)
             cal = new GregorianCalendar();
+        
+        cal.clear();
 		cal.set(Calendar.YEAR, 1970);
 		cal.set(Calendar.MONTH, Calendar.JANUARY);
 		cal.set(Calendar.DATE, 1);

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SQLTimestamp.java Fri Sep 22 10:08:40 2006
@@ -169,6 +169,7 @@
     {
         if( cal == null)
             cal = new GregorianCalendar();
+        cal.clear();
 		cal.set(Calendar.YEAR, SQLDate.getYear(encodedDate) );
 		cal.set(Calendar.MONTH, SQLDate.getMonth(encodedDate)-1);
 		cal.set(Calendar.DATE, SQLDate.getDay(encodedDate) );
@@ -197,13 +198,14 @@
     {
         if( cal == null)
             cal = new GregorianCalendar();
+        cal.clear();
 		cal.set(Calendar.YEAR, 1970);
 		cal.set(Calendar.MONTH, Calendar.JANUARY);
 		cal.set(Calendar.DATE, 1);
 		cal.set(Calendar.HOUR_OF_DAY, SQLTime.getHour(encodedTime));
 		cal.set(Calendar.MINUTE, SQLTime.getMinute(encodedTime));
 		cal.set(Calendar.SECOND, SQLTime.getSecond(encodedTime));
-		cal.set(Calendar.MILLISECOND, (int)(nanos/1E06));
+		cal.set(Calendar.MILLISECOND, (int)(nanos/1000000));
 		return new Time(cal.getTime().getTime());
 	}
 
@@ -889,7 +891,7 @@
         return newTimestamp(cal);
     }
 
-    protected Timestamp newTimestamp(Calendar currentCal)
+    private Timestamp newTimestamp(Calendar currentCal)
     {
         if( currentCal == null)
             currentCal = new GregorianCalendar();
@@ -901,6 +903,7 @@
 
     private void setCalendar( Calendar cal)
     {
+        cal.clear();
 		cal.set(Calendar.YEAR, SQLDate.getYear(encodedDate));
 		/* Note calendar month is zero based so we subtract 1*/
 		cal.set(Calendar.MONTH, (SQLDate.getMonth(encodedDate)-1));

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java Fri Sep 22 10:08:40 2006
@@ -23,11 +23,16 @@
 
 import org.apache.derby.iapi.error.StandardException;
 import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.io.Formatable;
+import org.apache.derby.iapi.services.io.StoredFormatIds;
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
 import java.util.Properties;
 import java.util.ArrayList;
 
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectInput;
 import java.io.StringReader;
 
 // -- JDBC 3.0 JAXP API classes.
@@ -109,7 +114,7 @@
  *       _if_ s/he is trying to access or operate on XML values.
  */
 
-public class SqlXmlUtil 
+public class SqlXmlUtil implements Formatable
 {
     // Used to parse a string into an XML value (DOM); checks
     // the well-formedness of the string while parsing.
@@ -124,6 +129,12 @@
     private XPath query;
     private XPathContext xpContext;
 
+    // Used to recompile the XPath expression when this formatable
+    // object is reconstructed.  e.g.:  SPS 
+    private String queryExpr;
+    private String opName;
+    private boolean recompileQuery;
+    
     /**
      * Constructor: Initializes objects required for parsing
      * and serializing XML values.  Since most XML operations
@@ -222,7 +233,7 @@
              * run as normal.
              */ 
             throw StandardException.newException(
-                SQLState.LANG_UNEXPECTED_XML_EXCEPTION, t);
+                SQLState.LANG_UNEXPECTED_XML_EXCEPTION, t, t.getMessage());
 
         }
 
@@ -256,6 +267,10 @@
             query = new XPath(queryExpr, null,
                 new PrefixResolverDefault(dBuilder.newDocument()),
                 XPath.SELECT);
+            
+            this.queryExpr = queryExpr;
+            this.opName = opName;
+            this.recompileQuery = false;
 
         } catch (Throwable te) {
 
@@ -275,7 +290,7 @@
              * continue to run as normal. 
              */
             throw StandardException.newException(
-                SQLState.LANG_XML_QUERY_ERROR, te, opName);
+                SQLState.LANG_XML_QUERY_ERROR, te, opName, te.getMessage());
 
         }
     }
@@ -510,6 +525,12 @@
     protected ArrayList evalXQExpression(XMLDataValue xmlContext,
         boolean returnResults, int [] resultXType) throws Exception
     {
+        // if this object is in an SPS, we need to recompile the query
+        if (recompileQuery)
+        {
+        	compileXQExpr(queryExpr, opName);
+        }
+
         // Make sure we have a compiled query.
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(
@@ -668,6 +689,58 @@
         // Load the serializer with the correct properties.
         serializer = SerializerFactory.getSerializer(props);
         return;
+    }
+
+    /* ****
+     * Formatable interface implementation
+     * */
+
+    /** 
+     * @see java.io.Externalizable#writeExternal 
+     * 
+     * @exception IOException on error
+     */
+    public void writeExternal(ObjectOutput out) 
+        throws IOException
+    {
+        // query may be null
+        if (query == null)
+        {
+            out.writeBoolean(false);
+        }
+        else
+        {
+            out.writeBoolean(true);
+            out.writeObject(queryExpr);
+            out.writeObject(opName);
+        }
+    }
+
+    /** 
+     * @see java.io.Externalizable#readExternal 
+     *
+     * @exception IOException on error
+     * @exception ClassNotFoundException on error
+     */
+    public void readExternal(ObjectInput in) 
+        throws IOException, ClassNotFoundException
+    {
+        if (in.readBoolean())
+        {
+            queryExpr = (String)in.readObject();
+            opName = (String)in.readObject();
+            recompileQuery = true;
+	    }
+    }
+
+    /**
+     * Get the formatID which corresponds to this class.
+     *
+     * @return	the formatID of this class
+     */
+    public int getTypeFormatId()
+    { 
+        return StoredFormatIds.SQL_XML_UTIL_V01_ID;
     }
 
     /*

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/iapi/types/XML.java Fri Sep 22 10:08:40 2006
@@ -577,7 +577,7 @@
          * will continue to run as normal.
          */ 
             throw StandardException.newException(
-                SQLState.LANG_INVALID_XML_DOCUMENT, t);
+                SQLState.LANG_INVALID_XML_DOCUMENT, t, t.getMessage());
 
         }
 
@@ -730,7 +730,8 @@
          * fail but Derby will continue to run as normal. 
          */
             throw StandardException.newException(
-                SQLState.LANG_XML_QUERY_ERROR, xe, "XMLEXISTS");
+                SQLState.LANG_XML_QUERY_ERROR, xe,
+                "XMLEXISTS", xe.getMessage());
         }
     }
 
@@ -803,7 +804,8 @@
          * fail but Derby will continue to run as normal. 
          */
             throw StandardException.newException(
-                SQLState.LANG_XML_QUERY_ERROR, xe, "XMLQUERY");
+                SQLState.LANG_XML_QUERY_ERROR, xe,
+                "XMLQUERY", xe.getMessage());
         }
     }
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/DD_Version.java Fri Sep 22 10:08:40 2006
@@ -303,7 +303,7 @@
 	  *
 	  * @param	tc	transaction controller
 	  * @param	fromMajorVersionNumber	version of the on-disk database
-	  * @param	aid						AuthorizationID of current user to be made DBA
+	  * @param	aid	 AuthorizationID of current user to be made Database Owner
 	  *
 	  *	@exception StandardException  Standard Cloudscape error policy.
 	  */
@@ -364,7 +364,7 @@
                 bootingDictionary.getSystemUtilSchemaDescriptor().getUUID());
 
 			if (SanityManager.DEBUG)
-				SanityManager.ASSERT((aid != null), "Failed to get new DBA authorization");
+				SanityManager.ASSERT((aid != null), "Failed to get new Database Owner authorization");
 
 			// Add new system catalogs created for grant and revoke
 			bootingDictionary.upgradeMakeCatalog(tc, DataDictionary.SYSTABLEPERMS_CATALOG_NUM);

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=449004&r1=449003&r2=449004
==============================================================================
--- 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 22 10:08:40 2006
@@ -327,7 +327,7 @@
 	/** Dictionary version of the currently running engine */
 	private DD_Version  softwareVersion;
 
-	private String authorizationDBA;
+	private String authorizationDatabaseOwner;
 	private boolean usesSqlAuthorization;
 
 	/*
@@ -656,7 +656,7 @@
 	
 			if (create) {
 				String userName = IdUtil.getUserNameFromURLProps(startParams);
-				authorizationDBA = IdUtil.getUserAuthorizationId(userName);
+				authorizationDatabaseOwner = IdUtil.getUserAuthorizationId(userName);
 			
 				// create any required tables.
 				createDictionaryTables(startParams, bootingTC, ddg);
@@ -693,7 +693,7 @@
 				loadDictionaryTables(bootingTC, ddg, startParams);
 				SchemaDescriptor sd = locateSchemaRow(SchemaDescriptor.IBM_SYSTEM_SCHEMA_NAME,
 								 bootingTC);
-				authorizationDBA = sd.getAuthorizationId();
+				authorizationDatabaseOwner = sd.getAuthorizationId();
 				String sqlAuth = PropertyUtil.getDatabaseProperty(bootingTC,
 										Property.SQL_AUTHORIZATION_PROPERTY);
 				if (Boolean.valueOf(sqlAuth).booleanValue())
@@ -705,7 +705,7 @@
 			}
 					
 			if (SanityManager.DEBUG)
-				SanityManager.ASSERT((authorizationDBA != null), "Failed to get DBA authorization");
+				SanityManager.ASSERT((authorizationDatabaseOwner != null), "Failed to get Database Owner authorization");
 
 			/* Commit & destroy the create database */
 			bootingTC.commit();
@@ -1177,13 +1177,13 @@
 	}
 
 	/**
-	 * Get authorizationID of DBA
+	 * Get authorizationID of Database Owner
 	 *
 	 * @return	authorizationID
 	 */
-	public String getAuthorizationDBA()
+	public String getAuthorizationDatabaseOwner()
 	{
-		return authorizationDBA;
+		return authorizationDatabaseOwner;
 	}
 
 	/**
@@ -5570,7 +5570,7 @@
 	 * while upgrading pre-10.2 databases to 10.2 or later versions. From 10.2,
 	 * all system schemas would be owned by database owner's authorizationId.
 	 *
-	 * @param aid							AuthorizationID of DBA
+	 * @param aid							AuthorizationID of Database Owner
 	 * @param tc							TransactionController to use
 	 *
 	 * @exception StandardException		Thrown on failure
@@ -6434,7 +6434,7 @@
             new SchemaDescriptor(
                 this, 
                 convertIdToLower ? schema_name.toLowerCase() : schema_name, 
-                authorizationDBA,
+                authorizationDatabaseOwner,
                 uuidFactory.recreateUUID(schema_uuid),
                 true);
 
@@ -8325,7 +8325,7 @@
         return new SchemaDescriptor(
                 this,
                 name,
-                authorizationDBA,
+                authorizationDatabaseOwner,
                 uuidFactory.recreateUUID(uuid),
                 true);
     }
@@ -8334,7 +8334,7 @@
     {
         return new SchemaDescriptor(this,
                                         name,
-                						authorizationDBA,
+                                        authorizationDatabaseOwner,
                                         (UUID) null,
                                         false);
     }
@@ -9688,7 +9688,7 @@
 	UUID routineUUID,
 	TransactionController tc) throws StandardException
 	{
-		createRoutinePermPublicDescriptor(routineUUID, tc, authorizationDBA);
+		createRoutinePermPublicDescriptor(routineUUID, tc, authorizationDatabaseOwner);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DistinctNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DistinctNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DistinctNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DistinctNode.java Fri Sep 22 10:08:40 2006
@@ -324,7 +324,6 @@
 		 *			from the sort
 		 *  arg6: row size
 		 *  arg7: resultSetNumber
-		 *  arg8: closeCleanup
 		 */
 
 		acb.pushGetResultSetFactoryExpression(mb);
@@ -338,8 +337,8 @@
 		mb.push(resultSetNumber);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getSortResultSet", ClassName.NoPutResultSet, 10);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getSortResultSet",
+                ClassName.NoPutResultSet, 9);
 	}
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropViewNode.java Fri Sep 22 10:08:40 2006
@@ -30,8 +30,10 @@
 import org.apache.derby.iapi.sql.ResultSet;
 
 import org.apache.derby.iapi.error.StandardException;
-
+import org.apache.derby.iapi.sql.compile.CompilerContext;
+import org.apache.derby.iapi.sql.dictionary.DataDictionary;
 import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor;
+import org.apache.derby.iapi.sql.dictionary.TableDescriptor;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
 
@@ -63,6 +65,36 @@
 		return "DROP VIEW";
 	}
 
+ 	/**
+ 	 *  Bind the drop view node
+ 	 *
+ 	 * @return	The bound query tree
+ 	 *
+ 	 * @exception StandardException		Thrown on error
+ 	 */
+	
+	public QueryTreeNode bind() throws StandardException
+	{
+		DataDictionary dd = getDataDictionary();
+		CompilerContext cc = getCompilerContext();
+				
+		TableDescriptor td = dd.getTableDescriptor(getRelativeName(), 
+					getSchemaDescriptor());
+	
+		/* 
+		 * Statement is dependent on the TableDescriptor 
+		 * If td is null, let execution throw the error like
+		 * it is before.
+		 */
+		if (td != null)
+		{
+			cc.createDependency(td);
+		}
+			
+		return this;
+	}
+		
+	
 	// inherit generate() method from DDLStatementNode
 
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromBaseTable.java Fri Sep 22 10:08:40 2006
@@ -3143,7 +3143,6 @@
 		**		isolationLevel,
 		**		optimizerEstimatedRowCount,
 		**		optimizerEstimatedRowCost,
-		**		closeCleanupMethod
 		**	);
 		*/
 
@@ -3168,10 +3167,9 @@
 		mb.push(getCompilerContext().getScanIsolationLevel());
 		mb.push(costEstimate.singleScanRowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getLastIndexKeyResultSet",
-					ClassName.NoPutResultSet, 14);
+					ClassName.NoPutResultSet, 13);
 
 
 	}
@@ -3264,11 +3262,9 @@
 		mb.push(getCompilerContext().getScanIsolationLevel());
 		mb.push(costEstimate.singleScanRowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
-
 		
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getDistinctScanResultSet",
-							ClassName.NoPutResultSet, 17);
+							ClassName.NoPutResultSet, 16);
 	}
 
 
@@ -3383,8 +3379,6 @@
 											getCompilerContext().getScanIsolationLevel(),
 											ap.getOptimizer().getMaxMemoryPerTable()
 											);
-
-		closeMethodArgument(acb, mb);
 
 		return nargs;
 	}

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/FromVTI.java Fri Sep 22 10:08:40 2006
@@ -1172,7 +1172,7 @@
 
 		acb.pushGetResultSetFactoryExpression(mb);
 		int nargs = getScanArguments(acb, mb);
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getVTIResultSet", ClassName.NoPutResultSet, nargs);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getVTIResultSet",ClassName.NoPutResultSet, nargs);
 	}
 
 	private int getScanArguments(ActivationClassBuilder acb,
@@ -1264,10 +1264,7 @@
 		// estimated cost
 		mb.push(costEstimate.getEstimatedCost());
 
-		// let the superclass deal with statement level argument
-		closeMethodArgument(acb, mb);
-
-		return 15;
+		return 14;
 	}
 
 	private void generateConstructor(ActivationClassBuilder acb,

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/GroupByNode.java Fri Sep 22 10:08:40 2006
@@ -905,7 +905,6 @@
 		 *  arg7: row size
 		 *  arg8: resultSetNumber
 		 *  arg9: Whether or not to perform min optimization.
-		 *  arg12: closeCleanup
 		 */
 		String resultSet = (addDistinctAggregate) ? "getDistinctScalarAggregateResultSet" : "getScalarAggregateResultSet";
 
@@ -913,9 +912,8 @@
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
 
-		closeMethodArgument(acb, mb);
-
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSet, ClassName.NoPutResultSet, 11);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSet,
+                ClassName.NoPutResultSet, 10);
 	}
 
 	/**
@@ -936,16 +934,14 @@
 		 *			from the sort
 		 *  arg7: row size
 		 *  arg8: resultSetNumber
-		 *  arg11: closeCleanup
 		 */
 		String resultSet = (addDistinctAggregate) ? "getDistinctGroupedAggregateResultSet" : "getGroupedAggregateResultSet";
     
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
 
-		closeMethodArgument(acb, mb);
-
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSet, ClassName.NoPutResultSet, 10);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, resultSet,
+                ClassName.NoPutResultSet, 9);
 
 	}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashJoinStrategy.java Fri Sep 22 10:08:40 2006
@@ -366,7 +366,7 @@
 						tableLocked,
 						isolationLevel);
 
-		return 29;
+		return 28;
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/HashTableNode.java Fri Sep 22 10:08:40 2006
@@ -404,9 +404,9 @@
 		mb.push(loadFactor);
 		mb.push(costEstimate.singleScanRowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getHashTableResultSet", ClassName.NoPutResultSet, 15);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getHashTableResultSet",
+                ClassName.NoPutResultSet, 14);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IndexToBaseRowNode.java Fri Sep 22 10:08:40 2006
@@ -261,10 +261,9 @@
 		mb.push(forUpdate);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getIndexRowToBaseRowResultSet",
-						ClassName.NoPutResultSet, 14);
+						ClassName.NoPutResultSet, 13);
 
 		/* The IndexRowToBaseRowResultSet generator is what we return */
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/IntersectOrExceptNode.java Fri Sep 22 10:08:40 2006
@@ -361,14 +361,13 @@
         mb.push( costEstimate.getEstimatedCost());
         mb.push( getOpType());
         mb.push( all);
-        closeMethodArgument(acb, mb);
         mb.push( getCompilerContext().addSavedObject( intermediateOrderByColumns));
         mb.push( getCompilerContext().addSavedObject( intermediateOrderByDirection));
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE,
                       (String) null,
                       "getSetOpResultSet",
-                      ClassName.NoPutResultSet, 11);
+                      ClassName.NoPutResultSet, 10);
 	} // end of generate
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/JoinNode.java Fri Sep 22 10:08:40 2006
@@ -1652,8 +1652,6 @@
 			mb.push(PropertyUtil.sortProperties(joinOrderStrategyProperties));
 		else
 			mb.pushNull("java.lang.String");
-		
-		closeMethodArgument(acb, mb);
 
 		return numArgs;
 
@@ -1701,7 +1699,7 @@
 	 */
 	protected int getNumJoinArguments()
 	{
-		return 12;
+		return 11;
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/MaterializeResultSetNode.java Fri Sep 22 10:08:40 2006
@@ -119,9 +119,8 @@
 		mb.push(resultSetNumber);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getMaterializedResultSet",
-						ClassName.NoPutResultSet, 5);
+						ClassName.NoPutResultSet, 4);
 	}
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NestedLoopJoinStrategy.java Fri Sep 22 10:08:40 2006
@@ -225,11 +225,11 @@
 
 		if (bulkFetch > 1)
 		{
-			numArgs = 26;
+			numArgs = 25;
 		}
 		else
 		{
-			numArgs = 25;
+			numArgs = 24 ;
 		}
 
 		fillInScanArgs1(tc, mb,

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/NormalizeResultSetNode.java Fri Sep 22 10:08:40 2006
@@ -126,9 +126,9 @@
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
 		mb.push(forUpdate);
-		closeMethodArgument(acb, mb);
+
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getNormalizeResultSet",
-					ClassName.NoPutResultSet, 7);
+					ClassName.NoPutResultSet, 6);
 	}
 
 	/**

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=449004&r1=449003&r2=449004
==============================================================================
--- 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 22 10:08:40 2006
@@ -371,7 +371,6 @@
 		 *  arg7: resultSetNumber
 		 *  arg8: estimated row count
 		 *  arg9: estimated cost
-		 *  arg10: closeCleanup
 		 */
 
 		acb.pushGetResultSetFactoryExpression(mb);
@@ -402,16 +401,8 @@
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
 
-		/**
-			if this is the statement result set (today, it always is), 
-			and there is a current
-			date/time request, then a method will have been generated.
-			Otherwise, a simple null is passed in to the result set method.
-		 */
-        mb.pushNull(ClassName.GeneratedMethod);
-
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getSortResultSet",
-							ClassName.NoPutResultSet, 10);
+							ClassName.NoPutResultSet, 9);
 
 	}
 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ProjectRestrictNode.java Fri Sep 22 10:08:40 2006
@@ -1565,10 +1565,9 @@
 		mb.push(doesProjection);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getProjectRestrictResultSet",
-					ClassName.NoPutResultSet, 11);
+					ClassName.NoPutResultSet, 10);
 	}
 
 	/**

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=449004&r1=449003&r2=449004
==============================================================================
--- 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 22 10:08:40 2006
@@ -1041,20 +1041,6 @@
 	}
 
 	/**
-		This utility method is used by result set nodes that can be
-		statement nodes to determine what their final argument is;
-		if they are the statement result set, and there is a current
-		date/time request, then a method will have been generated.
-		Otherwise, a simple null is passed in to the result set method.
-	 */
-	void closeMethodArgument(ExpressionClassBuilder acb,
-									MethodBuilder mb)
-	{
-
-			mb.pushNull(ClassName.GeneratedMethod);
-	}
-
-	/**
 	 * This ResultSet is the source for an Insert.  The target RCL
 	 * is in a different order and/or a superset of this RCL.  In most cases
 	 * we will reorder and/or add defaults to the current RCL so that is
@@ -1519,10 +1505,9 @@
 		mb.push(getCostEstimate().rowCount());
 		mb.push(getCostEstimate().getEstimatedCost());
 		mb.push(false);
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getNormalizeResultSet",
-					ClassName.NoPutResultSet, 7);
+					ClassName.NoPutResultSet, 6);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/RowResultSetNode.java Fri Sep 22 10:08:40 2006
@@ -693,9 +693,8 @@
 		mb.push(resultSetNumber);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
-
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getRowResultSet", ClassName.NoPutResultSet, 7);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getRowResultSet",
+                ClassName.NoPutResultSet, 6);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/ScrollInsensitiveResultSetNode.java Fri Sep 22 10:08:40 2006
@@ -118,9 +118,8 @@
 
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
 		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getScrollInsensitiveResultSet",
-						ClassName.NoPutResultSet, 8);
+						ClassName.NoPutResultSet, 7);
 	}
 }

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/UnionNode.java Fri Sep 22 10:08:40 2006
@@ -626,9 +626,9 @@
 		mb.push(resultSetNumber);
 		mb.push(costEstimate.rowCount());
 		mb.push(costEstimate.getEstimatedCost());
-		closeMethodArgument(acb, mb);
 
-		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getUnionResultSet", ClassName.NoPutResultSet, 6);
+		mb.callMethod(VMOpcode.INVOKEINTERFACE, (String) null, "getUnionResultSet",
+                ClassName.NoPutResultSet, 5);
 	}
 
 	/**

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Fri Sep 22 10:08:40 2006
@@ -4218,7 +4218,9 @@
 		(getToken(1).kind != CONTENT) })
 	{
 		throw StandardException.newException(
-			SQLState.LANG_XML_KEYWORD_MISSING, "DOCUMENT");
+			SQLState.LANG_XML_KEYWORD_MISSING, "DOCUMENT",
+			new Integer(getToken(1).beginLine),
+			new Integer(getToken(1).beginColumn));
 	}
 |
 	LOOKAHEAD({ getToken(1).kind == CONTENT }) <CONTENT>
@@ -6749,7 +6751,9 @@
 		(getToken(1).kind != PRESERVE) })
 	{
 		throw StandardException.newException(
-			SQLState.LANG_XML_KEYWORD_MISSING, "PRESERVE WHITESPACE");
+			SQLState.LANG_XML_KEYWORD_MISSING, "PRESERVE WHITESPACE",
+			new Integer(getToken(1).beginLine),
+			new Integer(getToken(1).beginColumn));
 	}
 |
 	<STRIP> <WHITESPACE>
@@ -6810,10 +6814,12 @@
 	DataTypeDescriptor targetType;
 }
 {
-	LOOKAHEAD({ (getToken(1).kind != AS) || (getToken(2).kind == RIGHT_PAREN) })
+	LOOKAHEAD({ (getToken(1).kind != AS) })
 	{
 		throw StandardException.newException(
-			SQLState.LANG_XML_KEYWORD_MISSING, "AS");
+			SQLState.LANG_XML_KEYWORD_MISSING, "AS",
+			new Integer(getToken(1).beginLine),
+			new Integer(getToken(1).beginColumn));
 	}
 |
 	<AS> targetType = dataTypeDDL()

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/conn/GenericAuthorizer.java Fri Sep 22 10:08:40 2006
@@ -148,9 +148,10 @@
             List requiredPermissionsList = activation.getPreparedStatement().getRequiredPermissionsList();
             DataDictionary dd = lcc.getDataDictionary();
 
-            // DBA can access any object. Ignore requiredPermissionsList for DBA
+            // Database Owner can access any object. Ignore 
+            // requiredPermissionsList for Database Owner
             if( requiredPermissionsList != null && ! requiredPermissionsList.isEmpty() && 
-				!authorizationId.equals(dd.getAuthorizationDBA()))
+				!authorizationId.equals(dd.getAuthorizationDatabaseOwner()))
             {
                 for( Iterator iter = requiredPermissionsList.iterator();
                      iter.hasNext();)

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/DDLConstantAction.java Fri Sep 22 10:08:40 2006
@@ -247,10 +247,10 @@
 		DataDictionary dd = lcc.getDataDictionary();
 		DependencyManager dm = dd.getDependencyManager();
 		
-		//If a dba is creating this constraint, then no need to collect any 
-		//privilege dependencies because a dba can access any objects without 
-		//any restrictions
-		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDBA())))
+		//If the Database Owner is creating this constraint, then no need to 
+		//collect any privilege dependencies because the Database Owner can   
+		//access any objects without any restrictions
+		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDatabaseOwner())))
 		{
 			PermissionsDescriptor permDesc;
 			//Now, it is time to add into dependency system, constraint's 
@@ -378,10 +378,10 @@
 		DataDictionary dd = lcc.getDataDictionary();
 		DependencyManager dm = dd.getDependencyManager();
 		
-		//If a dba is creating this view/triiger, then no need to collect any 
-		//privilege dependencies because a dba can access any objects without 
-		//any restrictions
-		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDBA())))
+		//If the Database Owner is creating this view/triiger, then no need to  
+		//collect any privilege dependencies because the Database Owner can  
+		//access any objects without any restrictions
+		if (!(lcc.getAuthorizationId().equals(dd.getAuthorizationDatabaseOwner())))
 		{
 			PermissionsDescriptor permDesc;
 			List requiredPermissionsList = activation.getPreparedStatement().getRequiredPermissionsList();

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=449004&r1=449003&r2=449004
==============================================================================
--- 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 22 10:08:40 2006
@@ -233,8 +233,7 @@
 		boolean reuseResult,
 		boolean doesProjection,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
 	{
 		return new ProjectRestrictResultSet(source, source.getActivation(), 
@@ -262,8 +261,7 @@
 		int	initialCapacity,
 		float loadFactor,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
 	{
 		return new HashTableResultSet(source, source.getActivation(), 
@@ -293,8 +291,7 @@
 		int maxRowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup)
+		double optimizerEstimatedCost)
 			throws StandardException
 	{
 		return new SortResultSet(source, 
@@ -322,8 +319,7 @@
 		int resultSetNumber, 
 		boolean singleInputRow,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException
 	{
 		return new ScalarAggregateResultSet(
@@ -346,8 +342,7 @@
 		int resultSetNumber, 
 		boolean singleInputRow,
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException
 	{
 		return new DistinctScalarAggregateResultSet(
@@ -369,8 +364,7 @@
 		int maxRowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException
 	{
 		return new GroupedAggregateResultSet(
@@ -391,8 +385,7 @@
 		int maxRowSize,
 		int resultSetNumber, 
 		double optimizerEstimatedRowCount,
-		double optimizerEstimatedCost,
-		GeneratedMethod closeCleanup) 
+		double optimizerEstimatedCost) 
 			throws StandardException
 	{
 		return new DistinctGroupedAggregateResultSet(
@@ -447,8 +440,7 @@
 									 boolean canCacheRow,
 									 int resultSetNumber,
 									 double optimizerEstimatedRowCount,
-									 double optimizerEstimatedCost,
-								     GeneratedMethod closeCleanup)
+									 double optimizerEstimatedCost)
 	{
 		return new RowResultSet(activation, row, canCacheRow, resultSetNumber, 
 							    optimizerEstimatedRowCount,
@@ -471,8 +463,7 @@
 									 boolean isTarget,
 									 int scanIsolationLevel,
 									 double optimizerEstimatedRowCount,
-									 double optimizerEstimatedCost,
-								     GeneratedMethod closeCleanup)
+									 double optimizerEstimatedCost)
 		throws StandardException
 	{
 		return new VTIResultSet(activation, row, resultSetNumber, 
@@ -521,8 +512,7 @@
 									boolean tableLocked,
 									int isolationLevel,
 									double optimizerEstimatedRowCount,
-									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup)
+									double optimizerEstimatedCost)
 			throws StandardException
 	{
         StaticCompiledOpenConglomInfo scoci = (StaticCompiledOpenConglomInfo)(activation.getPreparedStatement().
@@ -580,8 +570,7 @@
 									boolean tableLocked,
 									int isolationLevel,
 									double optimizerEstimatedRowCount,
-									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup)
+									double optimizerEstimatedCost)
 			throws StandardException
 	{
         StaticCompiledOpenConglomInfo scoci = (StaticCompiledOpenConglomInfo)(activation.getPreparedStatement().
@@ -634,8 +623,7 @@
 									int isolationLevel,
 									boolean oneRowScan,
 									double optimizerEstimatedRowCount,
-									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup)
+									double optimizerEstimatedCost)
 			throws StandardException
 	{
         StaticCompiledOpenConglomInfo scoci = (StaticCompiledOpenConglomInfo)(activation.getPreparedStatement().
@@ -698,8 +686,7 @@
 									int rowsPerRead,
 									boolean oneRowScan,
 									double optimizerEstimatedRowCount,
-									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup)
+									double optimizerEstimatedCost)
 			throws StandardException
 	{
 		//Prior to Cloudscape 10.0 release, holdability was false by default. Programmers had to explicitly
@@ -756,8 +743,7 @@
 								GeneratedMethod restriction,
 								boolean forUpdate,
 								double optimizerEstimatedRowCount,
-								double optimizerEstimatedCost,
-								GeneratedMethod closeCleanup)
+								double optimizerEstimatedCost)
 			throws StandardException
 	{
 		return new IndexRowToBaseRowResultSet(
@@ -792,8 +778,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException
 	{
 		return new NestedLoopJoinResultSet(leftResultSet, leftNumCols,
@@ -822,8 +807,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException
 	{
 		return new HashJoinResultSet(leftResultSet, leftNumCols,
@@ -854,8 +838,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException
 	{
 		return new NestedLoopLeftOuterJoinResultSet(leftResultSet, leftNumCols,
@@ -888,8 +871,7 @@
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
 								   double optimizerEstimatedCost,
-								   String userSuppliedOptimizerOverrides,
-								   GeneratedMethod closeCleanup)
+								   String userSuppliedOptimizerOverrides)
 			throws StandardException
 	{
 		return new HashLeftOuterJoinResultSet(leftResultSet, leftNumCols,
@@ -924,8 +906,7 @@
 	public NoPutResultSet getMaterializedResultSet(NoPutResultSet source,
 							int resultSetNumber,
 						    double optimizerEstimatedRowCount,
-							double optimizerEstimatedCost,
-								   GeneratedMethod closeCleanup)
+							double optimizerEstimatedCost)
 		throws StandardException
 	{
 		return new MaterializedResultSet(source, source.getActivation(), 
@@ -943,8 +924,7 @@
 							int sourceRowWidth,
 							boolean scrollable,
 						    double optimizerEstimatedRowCount,
-							double optimizerEstimatedCost,
-								   GeneratedMethod closeCleanup)
+							double optimizerEstimatedCost)
 		throws StandardException
 	{
 		/* ResultSet tree is dependent on whether or not this is
@@ -974,8 +954,7 @@
 							int erdNumber,
 						    double optimizerEstimatedRowCount,
 							double optimizerEstimatedCost,
-							boolean forUpdate,					
-							GeneratedMethod closeCleanup)
+							boolean forUpdate)
 		throws StandardException
 	{
 		return new NormalizeResultSet(source, source.getActivation(), 
@@ -1024,8 +1003,7 @@
 								   NoPutResultSet rightResultSet,
 								   int resultSetNumber,
 								   double optimizerEstimatedRowCount,
-								   double optimizerEstimatedCost,
-								   GeneratedMethod closeCleanup)
+								   double optimizerEstimatedCost)
 			throws StandardException
 	{
 		return new UnionResultSet(leftResultSet, rightResultSet, 
@@ -1043,8 +1021,7 @@
                                              double optimizerEstimatedCost,
                                              int opType,
                                              boolean all,
-                                             GeneratedMethod closeCleanup,
-                                             int intermediateOrderByColumnsSavedObject,
+                                            int intermediateOrderByColumnsSavedObject,
                                              int intermediateOrderByDirectionSavedObject)
         throws StandardException
     {
@@ -1086,7 +1063,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.
 	 *
 	 * @return the scan operation as a result set.
  	 *
@@ -1107,8 +1083,7 @@
 		boolean				tableLocked,
 		int					isolationLevel,
 		double				optimizerEstimatedRowCount,
-		double 				optimizerEstimatedCost,
-		GeneratedMethod 	closeCleanup
+		double 				optimizerEstimatedCost
 	) throws StandardException
 	{
 		return new LastIndexKeyResultSet(
@@ -1159,7 +1134,6 @@
 									boolean oneRowScan,
 									double optimizerEstimatedRowCount,
 									double optimizerEstimatedCost,
-									GeneratedMethod closeCleanup,
 									String parentResultSetId,
 									long fkIndexConglomId,
 									int fkColArrayItem,

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=449004&r1=449003&r2=449004
==============================================================================
--- 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 22 10:08:40 2006
@@ -75,7 +75,6 @@
 	 * @param oneRowRightSide	ignored
 	 * @param optimizerEstimatedRowCount	self-explanatory
 	 * @param optimizerEstimatedCost		self-explanatory
-	 * @param closeCleanup					self-explanatory
      */
     MergeJoinResultSet(NoPutResultSet leftResultSet,
 								   int leftNumCols,
@@ -88,8 +87,7 @@
 								   boolean oneRowRightSide,
 								   boolean notExistsRightSide,
 								   double optimizerEstimatedRowCount,
-								   double optimizerEstimatedCost,
-								   GeneratedMethod closeCleanup)
+								   double optimizerEstimatedCost)
     {
 		super(leftResultSet, leftNumCols, rightResultSet, rightNumCols,
 			  activation, restriction, resultSetNumber, 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/PrivilegeInfo.java Fri Sep 22 10:08:40 2006
@@ -52,7 +52,7 @@
 
 	/**
 	 * Determines whether a user is the owner of an object
-	 * (table, function, or procedure). Note that DBA can access
+	 * (table, function, or procedure). Note that Database Owner can access
 	 * database objects without needing to be their owner
 	 *
 	 * @param user					authorizationId of current user
@@ -69,7 +69,7 @@
 		throws StandardException
 	{
 		if (!user.equals(sd.getAuthorizationId()) &&
-				!user.equals(dd.getAuthorizationDBA()))
+				!user.equals(dd.getAuthorizationDatabaseOwner()))
 			throw StandardException.newException(SQLState.AUTH_NOT_OWNER,
 									  user,
 									  objectDescriptor.getDescriptorType(),

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/execute/TablePrivilegeInfo.java Fri Sep 22 10:08:40 2006
@@ -135,7 +135,7 @@
 								   LanguageConnectionContext lcc)
 		throws StandardException
 	{
-		if (user.equals(dd.getAuthorizationDBA())) return;
+		if (user.equals(dd.getAuthorizationDatabaseOwner())) return;
 		
 		//  check view specific
 		if (td.getTableType() == TableDescriptor.VIEW_TYPE) 

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties?view=diff&rev=449004&r1=449003&r2=449004
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties Fri Sep 22 10:08:40 2006
@@ -429,11 +429,11 @@
 01522=The newly defined synonym ''{0}'' resolved to the object ''{1}'' which is currently undefined.
 01001=An attempt to update or delete an already deleted row was made: No row was updated or deleted.
 01003=Null values were eliminated from the argument of a column function.
-01006=Privilege not revoked from {0}.
+01006=Privilege not revoked from user {0}.
 0100E=XX Attempt to return too many result sets. 
 02000=No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table.
 # Next one is generic XQuery error per SQL/XML[2006]
-10000=Encountered error while evaluating XML query expression for {0} operator; see next exception for details.
+10000=Encountered error while evaluating XML query expression for {0} operator: {1}
 21000=Scalar subquery is only allowed to return a single row.
 22001=A truncation error was encountered trying to shrink {0} ''{1}'' to length {2}.
 54006=The length resulting from {0} operation is greater than {1}.
@@ -467,7 +467,7 @@
 
 ## SQL/XML errors.
 2200L=Values assigned to XML columns must be well-formed DOCUMENT nodes.
-2200M=Failed to parse XMLPARSE operand; see next exception for details.
+2200M=Invalid XML DOCUMENT: {0}
 2200V=Invalid context item for {0} operator; context items must be well-formed DOCUMENT nodes.
 2200W=XQuery serialization error: Attempted to serialize one or more top-level Attribute nodes.
 # end SQL/XML errors.
@@ -781,15 +781,13 @@
 # Derby-specific XML compile errors (42Z70 - 42Z7Z)
 42Z70=Binding directly to an XML value is not allowed; try using XMLPARSE.
 42Z71=XML values are not allowed in top-level result sets; try using XMLSERIALIZE.
-42Z72=XML syntax error; missing keyword(s): ''{0}''.
+42Z72=Missing SQL/XML keyword(s) ''{0}'' at line {1}, column {2}.
 42Z73=Invalid target type for XMLSERIALIZE: ''{0}''.
 42Z74=XML feature not supported: ''{0}''.
 42Z75=XML query expression must be a string literal.
 42Z76=Multiple XML context items are not allowed.
 42Z77=Context item must have type ''XML''; ''{0}'' is not allowed.
-42Z78=Failed to locate ''{0}'' API or implementation classes.  XML operations are not permitted unless these classes are in your classpath.
 42Z79=Unable to determine the parameter type for XMLPARSE; try using a CAST.
-42Z7Z=Encountered unexpected error while processing XML; see next exception for details.
 
 ## More RUNTIMESTATISTICS messages
 42Z80.U=serializable
@@ -1290,7 +1288,7 @@
 XJ212.S=Invalid attribute syntax: {0}
 XJ213.C=The traceLevel connection property does not have a valid format for a number.
 XJ214.S=An IO Error occurred when calling free() on a CLOB or BLOB.
-XJ215.S=You cannot invoke other Clob/Blob methods after calling free.
+XJ215.S=You cannot invoke other java.sql.Clob/java.sql.Blob methods after calling the free() method.
 
 #XN - Network level messages
 XN001.S=Connection reset is not allowed when inside a unit of work.
@@ -1307,6 +1305,10 @@
 XN017.S=Network protocol error: end of stream prematurely reached, parameter #{0}.  Remaining data has been padded with 0x0.
 XN018.S=Network protocol error: the specified size of the Reader, parameter #{0}, is less than the actual InputStream length.
 XN019.S=Error executing a {0}, server returned {1}.
+
+#XML - Derby-specific XML errors that are not covered by the SQL standard.
+XML00=Failed to locate ''{0}'' API or implementation classes.  XML operations are not permitted unless these classes are in your classpath.
+XML01=Encountered unexpected error while processing XML: {0}
 
 # 0A - SQLState class indicating feature not supported
 0A000.S=Feature not implemented: {0}.