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/01 18:28:21 UTC

svn commit: r439370 - in /db/derby/code/branches/10.2: java/client/org/apache/derby/client/am/ java/drda/org/apache/derby/impl/drda/ java/engine/org/apache/derby/impl/sql/catalog/ java/engine/org/apache/derby/loc/ java/testing/org/apache/derbyTesting/f...

Author: rhillegas
Date: Fri Sep  1 09:28:19 2006
New Revision: 439370

URL: http://svn.apache.org/viewvc?rev=439370&view=rev
Log:
DERBY-1725: Port the following patches from trunk to the 10.2 branch: No JIRA (438578, 438489, 438289, 438273, 438211), DERBY-1559 (438478), DERBY-1555 (438299), DERBY-1130 (438122).

Added:
    db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/EXTDTAReaderInputStream.java
      - copied unchanged from r438579, db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/EXTDTAReaderInputStream.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/NistScripts.java
      - copied unchanged from r438579, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/nist/NistScripts.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeUserSetup.java
      - copied unchanged from r438579, db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/ChangeUserSetup.java
Modified:
    db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/Connection.java
    db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DDMReader.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/sql/catalog/TabInfoImpl.java
    db/derby/code/branches/10.2/java/engine/org/apache/derby/loc/messages_en.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/basetab.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema1.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema5.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite_app.properties
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/basetab.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/readme
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema1.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema5.sql
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeConfigurationSetup.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
    db/derby/code/branches/10.2/tools/release/build.xml

Modified: db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/Connection.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/Connection.java (original)
+++ db/derby/code/branches/10.2/java/client/org/apache/derby/client/am/Connection.java Fri Sep  1 09:28:19 2006
@@ -177,12 +177,15 @@
         user_ = user;
 
         // Extract common properties.
-        // Derby-409 fix
-        if (dataSource.getConnectionAttributes() != null) {
-            databaseName_ = dataSource.getDatabaseName() + ";" + dataSource.getConnectionAttributes();
-        } else {
-            databaseName_ = dataSource.getDatabaseName();
-        }
+        // Derby-409 fix - Append connectionAttributes only if it is non-null. 
+        // DERBY-1130 - Append connectionAttributes only if database name is
+        // non-null. This will prevent use of database name set using 
+        // "setConnectionAttributes" method.  
+        databaseName_ = dataSource.getDatabaseName();
+        String connAtrrs = dataSource.getConnectionAttributes();
+        if(databaseName_ != null && connAtrrs != null)
+        	databaseName_ = databaseName_ + ";" + connAtrrs;
+
         retrieveMessageText_ = dataSource.getRetrieveMessageText();
 
         loginTimeout_ = dataSource.getLoginTimeout();

Modified: db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DDMReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DDMReader.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DDMReader.java (original)
+++ db/derby/code/branches/10.2/java/drda/org/apache/derby/impl/drda/DDMReader.java Fri Sep  1 09:28:19 2006
@@ -24,6 +24,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.ByteArrayInputStream;
 import java.math.BigDecimal;
 
 /**
@@ -945,6 +946,85 @@
 		return  getExtData(ddmScalarLen, checkNullability);
 	}
 
+	
+	/**
+	 * Creates an InputStream which can stream EXTDTA objects.
+	 * The InputStream uses this DDMReader to read data from network. The 
+	 * DDMReader should not be used before all data in the stream has been read.
+	 * @param checkNullability used to check if the stream is null. If it is 
+	 * null, this method returns null
+	 * @return EXTDTAReaderInputStream object which can be passed to prepared
+	 *         statement as a binary stream.
+	 * @exception DRDAProtocolException standard DRDA protocol exception
+	 */
+	EXTDTAReaderInputStream getEXTDTAReaderInputStream
+		(final boolean checkNullability)
+		throws DRDAProtocolException
+	{
+		if (checkNullability && isEXTDTANull()) {
+			return null;
+		} else {
+			return new EXTDTAReaderInputStream(this);
+		}
+	}
+
+	/**
+	 * This method is used by EXTDTAReaderInputStream to read the first chunk 
+	 * of data.
+	 * @param desiredLength the desired length of chunk
+	 * @exception DRDAProtocolException standard DRDA protocol exception
+	 */
+	ByteArrayInputStream readLOBInitStream(final long desiredLength) 
+		throws DRDAProtocolException
+	{
+		return readLOBChunk(false, desiredLength);
+	}
+	
+	/**
+	 * This method is used by EXTDTAReaderInputStream to read the next chunk 
+	 * of data.
+	 * @param desiredLength the desired length of chunk
+	 * @exception IOException IOException
+	 */
+	ByteArrayInputStream readLOBContinuationStream (final long desiredLength)
+		throws IOException
+	{		
+		try {
+			return readLOBChunk(true, desiredLength);
+		} catch (DRDAProtocolException e) {
+			e.printStackTrace(agent.getServer().logWriter);
+			throw new IOException(e.getMessage());
+		}
+	}
+
+	/**
+	 * This method is used by EXTDTAReaderInputStream to read the next chunk 
+	 * of data.
+	 * @param readHeader set to true if the dss continuation should be read
+	 * @param desiredLength the desired length of chunk
+	 * @exception DRDAProtocolException standard DRDA protocol exception
+	 */
+	private ByteArrayInputStream readLOBChunk
+		(final boolean readHeader, final long desiredLength)
+		throws DRDAProtocolException
+	{		
+		if (readHeader) {			
+			readDSSContinuationHeader();
+		}
+		int copySize = (int) Math.min(dssLength, desiredLength);
+		
+		// read the segment
+		ensureALayerDataInBuffer (copySize);
+		adjustLengths (copySize);
+		
+		// Create ByteArrayInputStream on top of buffer. 
+		// This will not make a copy of the buffer.
+		ByteArrayInputStream bais = 
+			new ByteArrayInputStream(buffer, pos, copySize);
+		pos += copySize;
+		
+		return bais;
+	}
 
 	byte[] getExtData (long desiredLength, boolean checkNullability) throws DRDAProtocolException
   {

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?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- 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  1 09:28:19 2006
@@ -1976,7 +1976,7 @@
 						break;
 					// optional
 					case CodePoint.EXTDTA:	
-						readAndSetAllExtParams(stmt);
+						readAndSetAllExtParams(stmt, false);
 						break;
 					default:
 						invalidCodePoint(codePoint);
@@ -3778,24 +3778,28 @@
 		// set the statement as the current statement
 		database.setCurrentStatement(stmt);
 		
-		
-		if (reader.isChainedWithSameID())
-			parseEXCSQLSTTobjects(stmt);
-		else if (isProcedure  && (needPrepareCall))
+		boolean hasResultSet;
+		if (reader.isChainedWithSameID()) 
+		{
+			hasResultSet = parseEXCSQLSTTobjects(stmt);
+		} else 
 		{
-			// if we had parameters the callable statement would
-			// be prepared with parseEXCQLSTTobjects, otherwise we
-			// have to do it here
-			String prepareString = "call " + stmt.procName +"()";
-			if (SanityManager.DEBUG) 
-				trace ("$$$prepareCall is: "+prepareString);
-			database.getConnection().clearWarnings();
-			CallableStatement cs = (CallableStatement) stmt.prepare(prepareString);
+			if (isProcedure  && (needPrepareCall))
+			{
+				// if we had parameters the callable statement would
+				// be prepared with parseEXCQLSTTobjects, otherwise we
+				// have to do it here
+				String prepareString = "call " + stmt.procName +"()";
+				if (SanityManager.DEBUG) 
+					trace ("$$$prepareCall is: "+prepareString);
+				database.getConnection().clearWarnings();
+				CallableStatement cs = (CallableStatement) stmt.prepare(prepareString);
+			}
+			stmt.ps.clearWarnings();
+			hasResultSet = stmt.execute();
 		}
-
-		stmt.ps.clearWarnings();
-
-		boolean hasResultSet = stmt.execute();
+		
+		
 		ResultSet rs = null;
 		if (hasResultSet)
 		{
@@ -3922,10 +3926,11 @@
 	 * @throws DRDAProtocolException
      * @throws SQLException
 	 */
-	private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException
+	private boolean parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException
 	{
 		int codePoint;
-		boolean gotSQLDTA = false, typeDefChanged = false;
+		boolean gotSQLDTA = false, gotEXTDTA = false;
+		boolean result = false;
 		do
 		{
 			correlationID = reader.readDssHeader();
@@ -3937,12 +3942,12 @@
 					// optional
 					case CodePoint.TYPDEFNAM:
 						setStmtOrDbByteOrder(false, stmt, parseTYPDEFNAM());
-						typeDefChanged = true;
+						stmt.setTypDefValues();
 						break;
 					// optional
 					case CodePoint.TYPDEFOVR:
 						parseTYPDEFOVR(stmt);
-						typeDefChanged = true;
+						stmt.setTypDefValues();
 						break;
 					// required
 					case CodePoint.SQLDTA:
@@ -3951,7 +3956,10 @@
 						break;
 					// optional
 					case CodePoint.EXTDTA:	
-						readAndSetAllExtParams(stmt);
+						readAndSetAllExtParams(stmt, true);
+						stmt.ps.clearWarnings();
+						result = stmt.execute();
+						gotEXTDTA = true;
 						break;
 					// optional
 					case CodePoint.OUTOVR:
@@ -3966,8 +3974,13 @@
 		// SQLDTA is required
 		if (! gotSQLDTA)
 			missingCodePoint(CodePoint.SQLDTA);
-		if (typeDefChanged)
-			stmt.setTypDefValues();
+		
+		if (! gotEXTDTA) {
+			stmt.ps.clearWarnings();
+			result = stmt.execute();
+		}
+		
+		return result;
 	}
 
 	/**
@@ -4206,7 +4219,7 @@
 					stmt.cliParamLens = paramLens;	
 					break;
 				case CodePoint.EXTDTA:
-					readAndSetAllExtParams(stmt);
+					readAndSetAllExtParams(stmt, false);
 					break;
 				default:
 					invalidCodePoint(codePoint);
@@ -4453,16 +4466,19 @@
 	}
 	
 
-	private void readAndSetAllExtParams(DRDAStatement stmt) 
+	private void readAndSetAllExtParams(final DRDAStatement stmt, final boolean streamLOB) 
 		throws SQLException, DRDAProtocolException
 	{
 		int numExt = stmt.cliParamExtPositions.size();
 		for (int i = 0; i < stmt.cliParamExtPositions.size(); i++)
 					{
 						int paramPos = ((Integer) (stmt.cliParamExtPositions).get(i)).intValue();
+						final boolean doStreamLOB = (streamLOB && i == numExt -1);
 						readAndSetExtParam(paramPos,
 										   stmt,
-										   ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue());
+										   ((Byte)stmt.cliParamDrdaTypes.elementAt(paramPos)).intValue(),
+										   ((Integer)(stmt.cliParamLens.elementAt(paramPos))).intValue(),
+										   doStreamLOB);
 						// Each extdta in it's own dss
 						if (i < numExt -1)
 						{
@@ -4484,7 +4500,7 @@
      * @throws SQLException
 	 */
 	private void readAndSetExtParam( int i, DRDAStatement stmt,
-									  int drdaType, int extLen)
+									 int drdaType, int extLen, boolean streamLOB)
 				throws DRDAProtocolException, SQLException
 		{
 			PreparedStatement ps = stmt.getPreparedStatement();
@@ -4495,24 +4511,55 @@
 				checkNullability = true;
 	
 			try {	
-				byte[] paramBytes = reader.getExtData(checkNullability);
-				String paramString = null;
+				final byte[] paramBytes;
+				final String paramString;
+				
 				switch (drdaType)
 				{
 					case  DRDAConstants.DRDA_TYPE_LOBBYTES:
 					case  DRDAConstants.DRDA_TYPE_NLOBBYTES:
-						if (SanityManager.DEBUG) {
-							if (paramBytes==null) {
-								trace("parameter value is NULL (LOB)");
+						paramString = "";
+						final boolean useSetBinaryStream = 
+							stmt.getParameterMetaData().getParameterType(i+1)==Types.BLOB;
+						
+						if (streamLOB && useSetBinaryStream) {
+							paramBytes = null;
+							final EXTDTAReaderInputStream stream = 
+								reader.getEXTDTAReaderInputStream(checkNullability);
+							if (stream==null) {
+								ps.setBytes(i+1, null);
 							} else {
-								trace("parameter value is a LOB with length: " + 
-									  paramBytes.length);
+								ps.setBinaryStream(i+1, stream, (int) stream.getLength());
+							}
+							
+							if (SanityManager.DEBUG) {
+								if (stream==null) {
+									trace("parameter value : NULL");
+								} else {
+									trace("parameter value will be streamed");
+								}
+							}
+						} else {
+							paramBytes = reader.getExtData(checkNullability);
+							if (paramBytes==null || !useSetBinaryStream) {
+								ps.setBytes(i+1, paramBytes);
+							} else {
+								ps.setBinaryStream(i+1, new ByteArrayInputStream(paramBytes),
+												   paramBytes.length);
+							}
+							if (SanityManager.DEBUG) {
+								if (paramBytes==null) {
+									trace("parameter value : NULL");
+								} else {
+									trace("parameter value is a LOB with length:" +
+										  paramBytes.length);
+								}
 							}
 						}
-						ps.setBytes(i+1, paramBytes);
 						break;
 					case DRDAConstants.DRDA_TYPE_LOBCSBCS:
 					case DRDAConstants.DRDA_TYPE_NLOBCSBCS:
+						paramBytes = reader.getExtData(checkNullability);
 						paramString = new String(paramBytes, stmt.ccsidSBCEncoding);
 						if (SanityManager.DEBUG)
 							trace("parameter value is: "+ paramString);
@@ -4520,6 +4567,7 @@
 						break;
 					case DRDAConstants.DRDA_TYPE_LOBCDBCS:
 					case DRDAConstants.DRDA_TYPE_NLOBCDBCS:
+						paramBytes = reader.getExtData(checkNullability);
 						paramString = new String(paramBytes, stmt.ccsidDBCEncoding );
 						if (SanityManager.DEBUG)
 							trace("parameter value is: "+ paramString);
@@ -4527,12 +4575,16 @@
 						break;
 					case DRDAConstants.DRDA_TYPE_LOBCMIXED:
 					case DRDAConstants.DRDA_TYPE_NLOBCMIXED:
+						paramBytes = reader.getExtData(checkNullability);
 						paramString = new String(paramBytes, stmt.ccsidMBCEncoding);
 						if (SanityManager.DEBUG)
 							trace("parameter value is: "+ paramString);
 						ps.setString(i+1,paramString);
 						break;
 					default:
+						paramBytes = null;
+						paramString = "";
+
 						invalidValue(drdaType);
 				}
 			     

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java (original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/catalog/TabInfoImpl.java Fri Sep  1 09:28:19 2006
@@ -234,7 +234,7 @@
     /**
      * Get the index name.
      *
-     * @param indexID   Index number for index for table
+     * @param indexId   Index number for index for table
      *
      * @return String   The index name.
      */
@@ -833,7 +833,7 @@
       * LOCKING: shared row locking.
       *
       * @param  tc          transaction controller
-      * @param  heap        heap to look in
+      * @param  heapCC      heap to look in
       * @param  key         key to read by.
       * @param  indexNumber Key is appropriate for this index.
       * @exception StandardException        Thrown on failure

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?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- 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  1 09:28:19 2006
@@ -1343,7 +1343,7 @@
 
 XXXXX.C.6=Normal database session close.
 
-08001.C.1=Required property {0} not set.
+08001.C.1=Required Derby DataSource property {0} not set.
 08001.C.2={0} : Error connecting to server {1} on port {2} with message {3}.
 08001.C.3=SocketException: ''{0}''
 08001.C.4=Unable to open stream on socket: ''{0}''.

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource.out Fri Sep  1 09:28:19 2006
@@ -555,4 +555,95 @@
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00
+DataSource - EMPTY
+  getConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+DataSource - connectionAttributes=databaseName=wombat
+  getConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+DataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getConnection() - OK
+  getConnection(null, null) - 08001:User id can not be null.
+  getConnection(fred, null) - OK
+  getConnection(fred, wilma) - OK
+  getConnection(null, wilma) - 08001:User id can not be null.
+  getConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getConnection(fred, databaseName=wombat) - OK
+  getConnection(fred, databaseName=wombat;password=wilma) - OK
+  getConnection(fred, databaseName=wombat;password=betty) - OK
+ConnectionPoolDataSource - EMPTY
+  getPooledConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+ConnectionPoolDataSource - connectionAttributes=databaseName=wombat
+  getPooledConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+ConnectionPoolDataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getPooledConnection() - OK
+  getPooledConnection(null, null) - 08001:User id can not be null.
+  getPooledConnection(fred, null) - OK
+  getPooledConnection(fred, wilma) - OK
+  getPooledConnection(null, wilma) - 08001:User id can not be null.
+  getPooledConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getPooledConnection(fred, databaseName=wombat) - OK
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - OK
+  getPooledConnection(fred, databaseName=wombat;password=betty) - OK
+XADataSource - EMPTY
+  getXAConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+XADataSource - connectionAttributes=databaseName=wombat
+  getXAConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+XADataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getXAConnection() - OK
+  getXAConnection(null, null) - 08001:User id can not be null.
+  getXAConnection(fred, null) - OK
+  getXAConnection(fred, wilma) - OK
+  getXAConnection(null, wilma) - 08001:User id can not be null.
+  getXAConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getXAConnection(fred, databaseName=wombat) - OK
+  getXAConnection(fred, databaseName=wombat;password=wilma) - OK
+  getXAConnection(fred, databaseName=wombat;password=betty) - OK
+Checked class declared as: javax.sql.DataSource
 Completed checkDataSource

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/checkDataSource30.out Fri Sep  1 09:28:19 2006
@@ -672,6 +672,96 @@
 acxs 3
 testing jira 95 for DataSource; ok - expected exception: XCY00
 testing jira 95 for XADataSource; ok - expected exception: XCY00
+DataSource - EMPTY
+  getConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+DataSource - connectionAttributes=databaseName=wombat
+  getConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+DataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getConnection() - OK
+  getConnection(null, null) - 08001:User id can not be null.
+  getConnection(fred, null) - OK
+  getConnection(fred, wilma) - OK
+  getConnection(null, wilma) - 08001:User id can not be null.
+  getConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getConnection(fred, databaseName=wombat) - OK
+  getConnection(fred, databaseName=wombat;password=wilma) - OK
+  getConnection(fred, databaseName=wombat;password=betty) - OK
+ConnectionPoolDataSource - EMPTY
+  getPooledConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+ConnectionPoolDataSource - connectionAttributes=databaseName=wombat
+  getPooledConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getPooledConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+ConnectionPoolDataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getPooledConnection() - OK
+  getPooledConnection(null, null) - 08001:User id can not be null.
+  getPooledConnection(fred, null) - OK
+  getPooledConnection(fred, wilma) - OK
+  getPooledConnection(null, wilma) - 08001:User id can not be null.
+  getPooledConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getPooledConnection(fred, databaseName=wombat) - OK
+  getPooledConnection(fred, databaseName=wombat;password=wilma) - OK
+  getPooledConnection(fred, databaseName=wombat;password=betty) - OK
+XADataSource - EMPTY
+  getXAConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+XADataSource - connectionAttributes=databaseName=wombat
+  getXAConnection() - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, null) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(null, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=wilma) - 08001:Required Derby DataSource property databaseName not set.
+  getXAConnection(fred, databaseName=wombat;password=betty) - 08001:Required Derby DataSource property databaseName not set.
+XADataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo
+  getXAConnection() - OK
+  getXAConnection(null, null) - 08001:User id can not be null.
+  getXAConnection(fred, null) - OK
+  getXAConnection(fred, wilma) - OK
+  getXAConnection(null, wilma) - 08001:User id can not be null.
+  getXAConnection(null, databaseName=wombat) - 08001:User id can not be null.
+  getXAConnection(fred, databaseName=wombat) - OK
+  getXAConnection(fred, databaseName=wombat;password=wilma) - OK
+  getXAConnection(fred, databaseName=wombat;password=betty) - OK
 START XA HOLDABILITY TEST
 By default, autocommit is true for a connection
 Default holdability for a connection is HOLD_CURSORS_OVER_COMMIT
@@ -740,4 +830,5 @@
 Get a new connection with XAConnection.getConnection()
 Isolation level should be reset to READ_COMMITTED
 PASS: Expected lock timeout for READ_COMMITTED
+Checked class declared as: javax.sql.DataSource
 Completed checkDataSource30

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/basetab.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/basetab.out?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/basetab.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/basetab.out Fri Sep  1 09:28:19 2006
@@ -168,4 +168,4 @@
 ij> -- PASS:Setup if count = 6?
 -- *************************************************////END-OF-MODULE
 disconnect;
-ij> exit;
+ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema1.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema1.out?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema1.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema1.out Fri Sep  1 09:28:19 2006
@@ -397,4 +397,4 @@
 ij> CREATE VIEW VSTAFF3 AS SELECT * FROM STAFF3;
 0 rows inserted/updated/deleted
 ij> disconnect;
-ij> exit;
+ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema5.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema5.out?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema5.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/schema5.out Fri Sep  1 09:28:19 2006
@@ -119,4 +119,4 @@
 ij> --0 PASS: if an error is returned that the view is circular
 -- ************* End of Schema *************
 disconnect;
-ij> exit;
+ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite_app.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite_app.properties?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite_app.properties (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/_Suite_app.properties Fri Sep  1 09:28:19 2006
@@ -1,6 +1,3 @@
 #Don't want harness to start up network server.
 #It will be started in test
 startServer=false
-#Don't want harness to start up network server.
-#It will be started in test
-startServer=false

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource.java Fri Sep  1 09:28:19 2006
@@ -47,6 +47,10 @@
 import org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource;
 import org.apache.derby.jdbc.EmbeddedDataSource;
 import org.apache.derby.jdbc.EmbeddedXADataSource;
+import org.apache.derby.jdbc.ClientConnectionPoolDataSource;
+import org.apache.derby.jdbc.ClientDataSource;
+import org.apache.derby.jdbc.ClientXADataSource;
+
 import org.apache.derby.tools.JDBCDisplayUtil;
 import org.apache.derby.tools.ij;
 import org.apache.derbyTesting.functionTests.util.SecurityCheck;
@@ -686,11 +690,13 @@
 		} catch (Exception e) {
 				System.out.println("; wrong, unexpected exception: " + e.toString());
 		}
-		// skip testDSRequestAuthentication for  client because of these 
-		// two issues:
-		// DERBY-1130 : Client should not allow databaseName to be set with
-		// setConnectionAttributes
+		
+		if (TestUtil.isDerbyNetClientFramework())
+			testClientDSConnectionAttributes();
+		
+		// skip testDSRequestAuthentication for  client because of this issue: 
 		// DERBY-1131 : Deprecate  Derby DataSource property attributesAsPassword
+		// First part of this test is covered by testClientDSConnectionAttributes()
 		if (TestUtil.isDerbyNetClientFramework())
 			return;
 		testDSRequestAuthentication();
@@ -1383,6 +1389,69 @@
 		xads.setDatabaseName(null);
 	}
 
+	/**
+	 * Check that database name set using setConnectionAttributes is not used
+	 * by ClientDataSource. This method tests DERBY-1130.
+	 * 
+	 * @throws SQLException
+	 */
+	private static void testClientDSConnectionAttributes() throws SQLException {
+
+		ClientDataSource ds = new ClientDataSource();
+
+		System.out.println("DataSource - EMPTY");
+		dsConnectionRequests(ds);
+
+		System.out.println("DataSource - connectionAttributes=databaseName=wombat");
+		ds.setConnectionAttributes("databaseName=wombat");
+		dsConnectionRequests(ds);
+		ds.setConnectionAttributes(null);
+		
+		// Test that database name specified in connection attributes is not used
+		System.out.println("DataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo");
+		ds.setConnectionAttributes("databaseName=kangaroo");
+		ds.setDatabaseName("wombat");
+		dsConnectionRequests(ds);
+		ds.setConnectionAttributes(null);
+		ds.setDatabaseName(null);
+		
+		// now with ConnectionPoolDataSource
+		ClientConnectionPoolDataSource cpds = new ClientConnectionPoolDataSource();
+		System.out.println("ConnectionPoolDataSource - EMPTY");
+		dsConnectionRequests((ConnectionPoolDataSource)cpds);
+
+		System.out.println("ConnectionPoolDataSource - connectionAttributes=databaseName=wombat");
+		cpds.setConnectionAttributes("databaseName=wombat");
+		dsConnectionRequests((ConnectionPoolDataSource)cpds);
+		cpds.setConnectionAttributes(null);
+		
+		// Test that database name specified in connection attributes is not used
+		System.out.println("ConnectionPoolDataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo");
+		cpds.setConnectionAttributes("databaseName=kangaroo");
+		cpds.setDatabaseName("wombat");
+		dsConnectionRequests((ConnectionPoolDataSource)cpds);
+		cpds.setConnectionAttributes(null);
+		cpds.setDatabaseName(null);
+		
+		// now with XADataSource
+		ClientXADataSource xads = new ClientXADataSource();
+		System.out.println("XADataSource - EMPTY");
+		dsConnectionRequests((XADataSource) xads);
+
+		System.out.println("XADataSource - connectionAttributes=databaseName=wombat");
+		xads.setConnectionAttributes("databaseName=wombat");
+		dsConnectionRequests((XADataSource) xads);
+		xads.setConnectionAttributes(null);
+		
+		// Test that database name specified in connection attributes is not used
+		System.out.println("XADataSource - databaseName=wombat and connectionAttributes=databaseName=kangaroo");
+		xads.setConnectionAttributes("databaseName=kangaroo");
+		xads.setDatabaseName("wombat");
+		dsConnectionRequests((XADataSource) xads);
+		xads.setConnectionAttributes(null);
+		xads.setDatabaseName(null);
+	}
+	
 	private static void dsConnectionRequests(DataSource ds) {
 		
 		SecurityCheck.inspect(ds, "javax.sql.DataSource");

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/basetab.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/basetab.sql?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/basetab.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/basetab.sql Fri Sep  1 09:28:19 2006
@@ -102,4 +102,3 @@
 -- PASS:Setup if count = 6?
 -- *************************************************////END-OF-MODULE
 disconnect;
-exit;

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/build.xml Fri Sep  1 09:28:19 2006
@@ -58,7 +58,7 @@
 
 <!--             ============ Begin Targets ==============                -->
  
-  <target name="FTOtestsubdir" depends="copyfiles"/>
+  <target name="FTOtestsubdir" depends="copyfiles,nistsuites"/>
 
   <!-- mkdir / init target may not be necessary, just here for reference... -->
   <target name="init">
@@ -72,6 +72,28 @@
     </copy>
   </target> 
 
+	  <target name="nistsuites" 
+	          description="Build Nist">
+	    <javac
+	      source="1.3"
+	      target="1.3"
+	      bootclasspath="${empty}"
+	      nowarn="on"
+	      debug="${debug}"
+	      depend="${depend}"
+	      deprecation="${deprecation}"
+	      optimize="${optimize}"
+	      proceed="${proceed}"
+	      verbose="${verbose}" 
+	      srcdir="${derby.testing.src.dir}"
+	      destdir="${out.dir}">
+	      <classpath>
+	        <pathelement path="${compile.classpath}"/>
+	        <pathelement path="${junit}"/>
+	      </classpath>
+	      <include name="${derby.testing.functest.dir}/tests/nist/*.java"/>
+	    </javac>
+	  </target>
 
 <!--             ============= End Targets ==============                -->
 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/readme
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/readme?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/readme (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/readme Fri Sep  1 09:28:19 2006
@@ -44,6 +44,12 @@
 
 - CHAR_LENGTH has been changed to LENGTH
 
+- exit commands removed from basetab.sql, schema1.sql and schema5.sql (possibly
+  were not in original scripts)
+
+- SQL routine creation and call to check if the suite is running with a Java
+  SecurityManager added to dml160.sql
+
 
 
 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema1.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema1.sql?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema1.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema1.sql Fri Sep  1 09:28:19 2006
@@ -427,4 +427,3 @@
    CREATE VIEW VSTAFF3 AS SELECT * FROM STAFF3;
 
 disconnect;
-exit;

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema5.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema5.sql?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema5.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/nist/schema5.sql Fri Sep  1 09:28:19 2006
@@ -122,4 +122,3 @@
 -- ************* End of Schema *************
 
 disconnect;
-exit;

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeConfigurationSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeConfigurationSetup.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeConfigurationSetup.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/ChangeConfigurationSetup.java Fri Sep  1 09:28:19 2006
@@ -1,3 +1,22 @@
+/*
+ *
+ * Derby - Class org.apache.derbyTesting.junit.ChangeConfigurationSetup
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, 
+ * software distributed under the License is distributed on an 
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
+ * either express or implied. See the License for the specific 
+ * language governing permissions and limitations under the License.
+ */
 package org.apache.derbyTesting.junit;
 
 import junit.extensions.TestSetup;

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java Fri Sep  1 09:28:19 2006
@@ -112,7 +112,10 @@
         return (Test) sm.invoke(null, null);
     }  
     
-    
+    public static Test changeUserDecorator(Test test, String user, String password)
+    {
+        return new ChangeUserSetup(test, user, password);
+    }    
     /**
      * Default embedded configuration
      *
@@ -129,7 +132,7 @@
         url = createJDBCUrlWithDatabaseName(dbName);
  
     }
-    
+
     private TestConfiguration(TestConfiguration copy, JDBCClient client,
             String hostName, int port)
     {
@@ -145,6 +148,30 @@
         this.hostName = hostName;
         
         this.url = createJDBCUrlWithDatabaseName(dbName);
+    }
+
+    
+    /**
+     * Obtain a new configuration identical to the passed in
+     * one except for the default user and password.
+     * @param copy Configuration to copy.
+     * @param user New default user
+     * @param password New default password.
+     */
+    TestConfiguration(TestConfiguration copy, String user, String password)
+    {
+        this.dbName = copy.dbName;
+        this.userName = user;
+        this.userPassword = password;
+
+        this.isVerbose = copy.isVerbose;
+        this.singleLegXA = copy.singleLegXA;
+        this.port = copy.port;
+        
+        this.jdbcClient = copy.jdbcClient;
+        this.hostName = copy.hostName;
+        
+        this.url = copy.url;
     }
 
     /**

Modified: db/derby/code/branches/10.2/tools/release/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/tools/release/build.xml?rev=439370&r1=439369&r2=439370&view=diff
==============================================================================
--- db/derby/code/branches/10.2/tools/release/build.xml (original)
+++ db/derby/code/branches/10.2/tools/release/build.xml Fri Sep  1 09:28:19 2006
@@ -174,10 +174,10 @@
       			  prefix="${derby.lib}/"/>
       <zipfileset dir="${basedir}/jars/insane" prefix="${derby.lib}/lib" includes="derby*.*"
 	              excludes="derby_core_plugin*,derbyTesting.jar"/>
-      <zipfileset dir="${basedir}/jars/insane" prefix="${derby.bin}/test" includes="derbyTesting.jar"/>
-      <zipfileset dir="${basedir}/java/testing" prefix="${derby.bin}/test" 
+      <zipfileset dir="${basedir}/jars/insane" prefix="${derby.lib}/test" includes="derbyTesting.jar"/>
+      <zipfileset dir="${basedir}/java/testing" prefix="${derby.lib}/test" 
                   includes="README.htm"/>
-      <zipfileset dir="${basedir}/tools/java" prefix="${derby.bin}/test" 
+      <zipfileset dir="${basedir}/tools/java" prefix="${derby.lib}/test" 
                   includes="jakarta-oro-2.0.8.jar"/>
     </zip>
   </target>
@@ -188,10 +188,10 @@
       			  prefix="${derby.lib}/"/>
       <tarfileset dir="${basedir}/jars/insane" prefix="${derby.lib}/lib" includes="derby*.*"
 	              excludes="derby_core_plugin*,derbyTesting.jar"/>
-      <tarfileset dir="${basedir}/jars/insane" prefix="${derby.bin}/test" includes="derbyTesting.jar"/>
-      <tarfileset dir="${basedir}/java/testing" prefix="${derby.bin}/test" 
+      <tarfileset dir="${basedir}/jars/insane" prefix="${derby.lib}/test" includes="derbyTesting.jar"/>
+      <tarfileset dir="${basedir}/java/testing" prefix="${derby.lib}/test" 
                   includes="README.htm"/>
-      <tarfileset dir="${basedir}/tools/java" prefix="${derby.bin}/test" 
+      <tarfileset dir="${basedir}/tools/java" prefix="${derby.lib}/test" 
                   includes="jakarta-oro-2.0.8.jar"/>
     </tar>
   </target>