db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r370059 [4/4] - in /db/derby/code/trunk/java: testing/org/apache/derbyTesting/functionTests/harness/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/j9_foundation/ testing/org/apach...
Date Wed, 18 Jan 2006 05:43:44 GMT
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
Tue Jan 17 21:43:13 2006
@@ -84,7 +84,7 @@
 lang/logop.sql
 lang/lojreorder.sql
 lang/longStringColumn.java
-lang/maxMemPerTab.sql
+lang/maxMemPerTab.java
 lang/miscerrors.sql
 lang/modifyColumn.sql
 lang/nestedCommit.sql
@@ -134,7 +134,7 @@
 lang/triggerGeneral.sql
 lang/triggerRecursion.sql
 lang/triggerRefClause.sql
-lang/triggerStream.sql
+lang/triggerStream.java
 lang/unaryArithmeticDynamicParameter.java
 lang/ungroupedAggregatesNegative.sql
 lang/union.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.properties
Tue Jan 17 21:43:13 2006
@@ -1 +1,4 @@
-jdk14test=true
+runwithj9=false
+runwithibm13=false
+runwithjdk13=false
+

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.runall
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.runall?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/jdk14.runall
Tue Jan 17 21:43:13 2006
@@ -7,4 +7,4 @@
 jdbcapi/resultsetJdbc30.java
 jdbcapi/statementJdbc30.java
 jdbcapi/savepointJdbc30.java
-store/bootLock.java
+

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/iepnegativetests_ES_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/iepnegativetests_ES_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/iepnegativetests_ES_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/i18n/iepnegativetests_ES_app.properties
Tue Jan 17 21:43:13 2006
@@ -1,6 +1,9 @@
 ij.protocol=jdbc:derby:
-database=jdbc:derby:wombat;create=true;territory=es_MX;unicode=true
+ij.database=jdbc:derby:wombat;create=true;territory=es_MX;unicode=true
 useextdirs=true
 
-#Exclude for J2ME/Foundation - test requires java.sql.Driver
-runwithfoundation=false
+# DataSource properties, only used if ij.dataSource is set
+ij.dataSource.databaseName=wombat
+ij.dataSource.createDatabase=create
+ij.dataSource.connectionAttributes=territory=es_MX;unicode=true
+

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LOBTest_app.properties
Tue Jan 17 21:43:13 2006
@@ -1,5 +1,2 @@
-#Exclude for J2ME/Foundation - test requires java.math.BigDecimal
-runwithfoundation=false
-
 usedefaults=true
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/autoGeneratedJdbc30.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/autoGeneratedJdbc30.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/autoGeneratedJdbc30.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/autoGeneratedJdbc30.java
Tue Jan 17 21:43:13 2006
@@ -44,6 +44,20 @@
 
 	private static String[] testObjects= {"table t11","table t21","table t31"};
 
+
+	private static boolean HAVE_DRIVER_MANAGER_CLASS;
+
+	static{
+		try{
+			Class.forName("java.sql.DriverManager");
+			HAVE_DRIVER_MANAGER_CLASS = true;
+		}
+		catch(ClassNotFoundException e){
+			//Used for JSR169
+			HAVE_DRIVER_MANAGER_CLASS = false;
+		}
+	}
+	
 	public static void main(String[] args) {
 
 		Connection con = null;
@@ -64,7 +78,8 @@
 
 			positiveTests(con);
 
-			doTest1920(s, con);
+			if(HAVE_DRIVER_MANAGER_CLASS)
+				doTest1920(s, con);
 
 			negativeTests(con);
 
@@ -817,7 +832,8 @@
 			dumpRS(ps.getGeneratedKeys());
 			ps.executeUpdate();
 			dumpRS(ps.getGeneratedKeys());
-  }
+			
+	}
 
 	public static void negativeTests(Connection con) throws SQLException
 	{

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30_app.properties?rev=370059&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30_app.properties
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30_app.properties
Tue Jan 17 21:43:13 2006
@@ -0,0 +1,4 @@
+#Exclude for J2ME/Foundation - tests all DataSource classes
+runwithfoundation=false
+
+usedefaults=true
\ No newline at end of file

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/checkDataSource30_app.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/copyfiles.ant
Tue Jan 17 21:43:13 2006
@@ -6,6 +6,7 @@
 blobclob4BLOB_derby.properties
 bestrowidentifier.sql
 bestrowidentifier_app.properties
+checkDataSource30_app.properties
 checkDriver_app.properties
 checkDriver_derby.properties
 dataSourceReference_app.properties

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30.java
Tue Jan 17 21:43:13 2006
@@ -66,8 +66,13 @@
 							   "." + met.getDriverMinorVersion() +
 							   " (" + met.getDriverVersion() + ")");
 
-			System.out.println("The URL is: " + met.getURL());
-
+			try {
+				System.out.println("The URL is: " + met.getURL());
+			} catch (NoSuchMethodError msme)
+			{
+				System.out.println("DatabaseMetaData.getURL not present - correct for JSR169");
+			}
+			
 			System.out.println();
 			System.out.println("supportsSavepoints() : " + met.supportsSavepoints());
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMetaDataJdbc30_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMetaDataJdbc30_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMetaDataJdbc30_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/parameterMetaDataJdbc30_app.properties
Tue Jan 17 21:43:13 2006
@@ -1,3 +1,6 @@
 usedefaults=true
 runwithjdk13=false
 runwithibm13=false
+
+#Exclude for J2ME/Foundation - tests ParameterMetaData - not available in JSR169
+runwithfoundation=false

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetJdbc30.java
Tue Jan 17 21:43:13 2006
@@ -86,7 +86,10 @@
 			  System.out.println("trying rs.updateRef(int, Ref) :");
 			  rs.updateRef(8,null);
 			  System.out.println("Shouldn't reach here. Method not implemented yet.");
- 			} catch (SQLException ex) {
+			} catch (NoSuchMethodError nsme) {
+				System.out.println("ResultSet.updateRef not present - correct for JSR169");
+			}
+			catch (SQLException ex) {
 			  System.out.println("Expected : " + ex.getMessage());
  			}
 
@@ -95,7 +98,9 @@
 			  System.out.println("trying rs.updateRef(String, Ref) :");
 			  rs.updateRef("c",null);
 			  System.out.println("Shouldn't reach here. Method not implemented yet.");
- 			} catch (SQLException ex) {
+ 			} catch (NoSuchMethodError nsme) {
+				System.out.println("ResultSet.updateRef not present - correct for JSR169");
+			} catch (SQLException ex) {
 			  System.out.println("Expected : " + ex.getMessage());
  			}
 
@@ -140,16 +145,20 @@
 			  System.out.println("trying rs.updateArray(int, Array) :");
 			  rs.updateArray(8,null);
 			  System.out.println("Shouldn't reach here. Method not implemented yet.");
- 			} catch (SQLException ex) {
+ 			} catch (NoSuchMethodError nsme) {
+				System.out.println("ResultSet.updateArray not present - correct for JSR169");
+			} catch (SQLException ex) {
 			  System.out.println("Expected : " + ex.getMessage());
  			}
 
 			try {
 			  System.out.println();
-			  System.out.println("trying rs.updateClob(String, Array) :");
+			  System.out.println("trying rs.updateArray(String, Array) :");
 			  rs.updateArray("c",null);
 			  System.out.println("Shouldn't reach here. Method not implemented yet.");
- 			} catch (SQLException ex) {
+ 			} catch (NoSuchMethodError nsme) {
+				System.out.println("ResultSet.updateArray not present - correct for JSR169");
+			}catch (SQLException ex) {
 			  System.out.println("Expected : " + ex.getMessage());
  			}
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/users_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/users_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/users_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/users_app.properties
Tue Jan 17 21:43:13 2006
@@ -8,10 +8,7 @@
 ij.showNoCountForSelect=true
 
 # DataSource properties, only used if ij.dataSource is set
-ij.dataSource.databaseName=wombat
+# User and password are specified in databaseName itself so that
+# they don't get re-used for other connections in the test
+ij.dataSource.databaseName=wombat;user=francois;password=paceesalute
 ij.dataSource.createDatabase=create
-ij.dataSource.user=francois
-ij.dataSource.password=paccesalute
-
-#Exclude for J2ME/Foundation - test requires java.sql.DriverManager
-runwithfoundation=false
\ No newline at end of file

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant
Tue Jan 17 21:43:13 2006
@@ -136,7 +136,6 @@
 logStream_app.properties
 lojreorder.sql
 longStringColumn_derby.properties
-maxMemPerTab.sql
 maxMemPerTab_app.properties
 maxMemPerTab_derby.properties
 miscerrors.sql
@@ -227,7 +226,6 @@
 triggerRecursion_derby.properties
 triggerRefClause.sql
 triggerRefClause_app.properties
-triggerStream.sql
 triggerStream_app.properties
 triggerStream_derby.properties
 unaryArithmeticDynamicParameter_app.properties
@@ -241,7 +239,7 @@
 updatableResultSet_sed.properties
 valuesclause.sql
 views.sql
-wisconsin.sql
+wisc_setup.sql
 wisconsin_app.properties
 wisconsin_derby.properties
 wisconsin_sed.properties

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJava.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJava.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJava.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/holdCursorJava.java
Tue Jan 17 21:43:13 2006
@@ -42,6 +42,18 @@
   private static String[] databaseObjects = {"PROCEDURE MYPROC", "TABLE T1", "TABLE T2",
                                  "TABLE TESTTABLE1", "TABLE TESTTABLE2",
                                  "TABLE BUG4385"};
+  private static boolean HAVE_DRIVER_MANAGER_CLASS;
+	
+  static{
+  	try{
+  		Class.forName("java.sql.DriverManager");
+  		HAVE_DRIVER_MANAGER_CLASS = true;
+	}
+	catch(ClassNotFoundException e){
+	  //Used for JSR169
+	  HAVE_DRIVER_MANAGER_CLASS = false;
+	}
+  } 	
 
   public static void main (String args[])
   {
@@ -54,10 +66,14 @@
 
 		createAndPopulateTable(conn);
 
-    //set autocommit to off after creating table and inserting data
-    conn.setAutoCommit(false);
-    testHoldability(conn,ResultSet.HOLD_CURSORS_OVER_COMMIT);
-    testHoldability(conn,ResultSet.CLOSE_CURSORS_AT_COMMIT);
+		//set autocommit to off after creating table and inserting data
+		conn.setAutoCommit(false);
+    
+		if(HAVE_DRIVER_MANAGER_CLASS){
+			testHoldability(conn,ResultSet.HOLD_CURSORS_OVER_COMMIT);
+			testHoldability(conn,ResultSet.CLOSE_CURSORS_AT_COMMIT);
+		}
+    
 		testHoldCursorOnMultiTableQuery(conn);
 		testIsolationLevelChange(conn);
 

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab.java?rev=370059&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab.java
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab.java
Tue Jan 17 21:43:13 2006
@@ -0,0 +1,152 @@
+/*
+
+Derby - Class org.apache.derbyTesting.functionTests.tests.lang.maxMemPerTab
+
+Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable.
+
+Licensed 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.functionTests.tests.lang;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import org.apache.derby.tools.JDBCDisplayUtil;
+import org.apache.derby.tools.ij;
+import org.apache.derbyTesting.functionTests.util.Formatters;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
+
+public class maxMemPerTab {
+
+	public static void main(String[] args) {
+		try {
+			ij.getPropertyArg(args); 
+		    Connection conn = ij.startJBMS();
+		    conn.setAutoCommit(false);
+		    
+		    createTablesAndInsertData(conn);
+		    getStatistics(conn);
+		
+		    conn.rollback();
+		    conn.close();  
+		} catch (SQLException e) {
+			TestUtil.dumpSQLExceptions(e);
+		} catch (Throwable e) {
+			System.out.println("FAIL -- unexpected exception:" + e.toString());
+		}
+	}
+
+	private static void createTablesAndInsertData(Connection conn) throws SQLException {
+		
+		System.out.println("Start creating tables and inserting data ...");
+		
+		//create tables
+		PreparedStatement ps = conn.prepareStatement("create table tab1 (c1 int, c2 varchar(20000))");
+		ps.execute();
+		ps = conn.prepareStatement("create table tab2 (c1 int, c2 varchar(20000))");
+		ps.execute();
+		ps = conn.prepareStatement("create table tab3 (c1 int, c2 varchar(2000))");
+		ps.execute();
+		ps = conn.prepareStatement("create table tab4 (c1 int, c2 varchar(2000))");
+		ps.execute();
+		
+		//insert data
+		String largeStringA20000 = new String(Formatters.repeatChar("a",20000));
+		String largeStringA2000 = new String(Formatters.repeatChar("a",2000));
+		String largeStringB20000 = new String(Formatters.repeatChar("b",20000));
+		String largeStringB2000 = new String(Formatters.repeatChar("b",2000));
+		String largeStringC20000 = new String(Formatters.repeatChar("c",20000));
+		String largeStringC2000 = new String(Formatters.repeatChar("c",2000));
+		String largeStringD20000 = new String(Formatters.repeatChar("d",20000));
+		String largeStringD2000 = new String(Formatters.repeatChar("d",2000));
+
+		ps = conn.prepareStatement("insert into tab1 values (?, ?)");
+		ps.setInt(1, 1);
+		ps.setString(2, largeStringA20000);
+		ps.executeUpdate();
+		ps.setInt(1, 2);
+		ps.setString(2, largeStringB20000);
+		ps.executeUpdate();
+		ps.setInt(1, 3);
+		ps.setString(2, largeStringC20000);
+		ps.executeUpdate();
+		ps.close();
+		ps = conn.prepareStatement("insert into tab2 values (?, ?)");
+		ps.setInt(1, 1);
+		ps.setString(2, largeStringA20000);
+		ps.executeUpdate();
+		ps.setInt(1, 2);
+		ps.setString(2, largeStringC20000);
+		ps.executeUpdate();
+		ps.setInt(1, 3);
+		ps.setString(2, largeStringD20000);
+		ps.executeUpdate();
+		ps.close();
+		ps = conn.prepareStatement("insert into tab3 values (?, ?)");
+		ps.setInt(1, 1);
+		ps.setString(2, largeStringA2000);
+		ps.executeUpdate();
+		ps.setInt(1, 2);
+		ps.setString(2, largeStringB2000);
+		ps.executeUpdate();
+		ps.setInt(1, 3);
+		ps.setString(2, largeStringC2000);
+		ps.executeUpdate();
+		ps.close();
+		ps = conn.prepareStatement("insert into tab4 values (?, ?)");
+		ps.setInt(1, 1);
+		ps.setString(2, largeStringA2000);
+		ps.executeUpdate();
+		ps.setInt(1, 2);
+		ps.setString(2, largeStringC2000);
+		ps.executeUpdate();
+		ps.setInt(1, 3);
+		ps.setString(2, largeStringD2000);
+		ps.executeUpdate();
+		ps.close();
+		
+		System.out.println("... done creating tables and inserting data.");
+	}
+	
+	private static void getStatistics(Connection conn) throws SQLException {
+		
+		Statement stmt = conn.createStatement();
+		stmt.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
+		System.out.println("Called SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
+		
+		JDBCDisplayUtil.setMaxDisplayWidth(2500);
+		
+		//should use nested loop join due to maxMemoryPerTable property setting
+		executeQuery(stmt,conn,"select * from tab1, tab2 where tab1.c2 = tab2.c2");
+		executeQuery(stmt,conn,"values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
+		
+		//should use hash join, maxMemoryPerTable property value is big enough
+		executeQuery(stmt,conn,"select * from tab3, tab4 where tab3.c2 = tab4.c2");
+		executeQuery(stmt,conn,"values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()");
+		
+		stmt.close();
+	}
+	
+	private static void executeQuery(Statement stmt, Connection conn, String query) throws SQLException{
+		System.out.println("#### Executing \""+ query + "\"");
+		//Display results for select statements
+		ResultSet rs = stmt.executeQuery(query);
+		JDBCDisplayUtil.DisplayResults(System.out,rs,conn);
+		rs.close();
+	}
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/maxMemPerTab_app.properties
Tue Jan 17 21:43:13 2006
@@ -1,5 +1,2 @@
-#Exclude for J2ME/Foundation - test uses procedure with server-side JDBC
-runwithfoundation=false
-
 usedefaults=true
 

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30_app.properties?rev=370059&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30_app.properties
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30_app.properties
Tue Jan 17 21:43:13 2006
@@ -0,0 +1,4 @@
+#Exclude for J2ME/Foundation - tests procedures with server-side JDBC
+runwithfoundation=false
+
+usedefaults=true
\ No newline at end of file

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedureJdbc30_app.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream.java?rev=370059&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream.java
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream.java
Tue Jan 17 21:43:13 2006
@@ -0,0 +1,230 @@
+/*
+
+Derby - Class org.apache.derbyTesting.functionTests.tests.lang.triggerStream
+
+Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable.
+
+Licensed 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.functionTests.tests.lang;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.sql.SQLException;
+
+import org.apache.derby.tools.JDBCDisplayUtil;
+import org.apache.derby.tools.ij;
+import org.apache.derbyTesting.functionTests.util.StreamUtil;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
+
+/*
+Small trigger stream test.  Make sure we can read streams ok from the context
+of a row or statement trigger.
+*/
+public class triggerStream {
+
+	public static void main(String[] args) {
+		try{
+			ij.getPropertyArg(args); 
+	        Connection conn = ij.startJBMS();
+	        
+	        //create tables and functions to be used in triggers
+	        createTablesAndFunctions(conn);
+	        
+	        //create triggers for Ascii test
+	        createTriggersWithAsciiStream(conn);
+	        //test triggers for Ascii stream
+	        testTriggersWithAsciiStream(conn);
+	        
+	        //create triggers for binary test
+	        createTriggersWithBinaryStream(conn);
+	        //test triggers for binary stream
+	        testTriggersWithBinaryStream(conn);
+	        
+	        conn.close();
+		} catch (SQLException e) {
+			TestUtil.dumpSQLExceptions(e);
+		} catch (Throwable e) {
+			System.out.println("FAIL -- unexpected exception:" + e.toString());
+		}
+	}
+	
+	private static void createTablesAndFunctions(Connection conn) throws SQLException{
+		
+		System.out.println("Start creating tables and functions to be used in triggers ...");
+		
+		Statement stmt = conn.createStatement();
+		
+		stmt.execute("create table x1 (x int, c1 long varchar, y int, slen int)");
+		stmt.execute("create table x2 (x int, c1 long varchar for bit data, y int, slen int)");
+		
+		// getAsciiColumn() method reads in the stream and verifies each byte and prints 
+		// out the length of the column
+		stmt.execute("create function getAsciiColumn(whichRS int,colNumber int,value varchar(128))"
+				+ " returns int PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL EXTERNAL NAME "
+				+"'org.apache.derbyTesting.functionTests.util.StreamUtil.getAsciiColumn'");
+		
+		// getBinaryColumn() method reads in the stream and verifies each byte and prints
+		// out the length of the column
+		stmt.execute("create function getBinaryColumn( whichRS int, colNumber int, value varchar(128))"
+				+ " returns int PARAMETER STYLE JAVA LANGUAGE JAVA NO SQL EXTERNAL NAME "
+				+ "'org.apache.derbyTesting.functionTests.util.StreamUtil.getBinaryColumn'");
+		
+		stmt.close();
+		
+		System.out.println("... done creating tables and functions to be used in triggers.");
+	}
+	
+	private static void createTriggersWithAsciiStream(Connection conn) throws SQLException{
+		
+		System.out.println("Start creating triggers for Ascii stream tests ...");
+		
+		Statement stmt = conn.createStatement();
+		
+		stmt.execute("create trigger t11 NO CASCADE before update of x,y on x1 "
+				+ "for each statement mode db2sql values getAsciiColumn( 0, 2, 'a')");
+		stmt.execute("create trigger t12 after update of x,y on x1 for each row"
+				+ " mode db2sql values getAsciiColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t13 after insert on x1 for each statement" 
+				+ " mode db2sql values getAsciiColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t14 NO CASCADE before insert on x1 for each row" 
+				+ " mode db2sql values getAsciiColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t15 NO CASCADE before delete on x1 "
+				+ "for each statement mode db2sql values getAsciiColumn( 0, 2, 'a')");
+		stmt.execute("create trigger t16 after delete on x1 for each row "
+				+ "mode db2sql values getAsciiColumn( 0, 2, 'a')");
+		
+		stmt.close();
+		
+		System.out.println("... done creating triggers for Ascii stream tests.");
+	}
+	
+	private static void testTriggersWithAsciiStream(Connection conn) throws Throwable{
+		
+		int count = 1;
+		insertAsciiColumn(count++,conn,"insert into x1 values (1, ?, 1, ?)", 1, "a", 1);
+		insertAsciiColumn(count++,conn,"insert into x1 values (2, ?, 2, ?)", 1, "a", 10);
+		insertAsciiColumn(count++,conn,"insert into x1 values (3, ?, 3, ?)", 1, "a", 100);
+		insertAsciiColumn(count++,conn,"insert into x1 values (4, ?, 4, ?)", 1, "a", 1000);
+		insertAsciiColumn(count++,conn,"insert into x1 values (5, ?, 5, ?)", 1, "a", 5000);
+		insertAsciiColumn(count++,conn,"insert into x1 values (6, ?, 6, ?)", 1, "a", 10000);
+		insertAsciiColumn(count++,conn,"insert into x1 values (7, ?, 7, ?)", 1, "a", 16500);
+		insertAsciiColumn(count++,conn,"insert into x1 values (8, ?, 8, ?)", 1, "a", 32500);
+		insertAsciiColumn(count++,conn,"insert into x1 values (9, ?, 9, ?)", 1, "a", 0);
+		insertAsciiColumn(count++,conn,"insert into x1 values (10, ?, 10, ?)", 1, "a", 666);
+		
+		executeStatement(conn,"update x1 set x = x+1");
+		executeStatement(conn,"update x1 set x = null");
+		executeStatement(conn,"insert into x1 select * from x1");
+		executeStatement(conn,"delete from x1");
+	}
+	
+	private static void createTriggersWithBinaryStream(Connection conn) throws SQLException{
+		
+		System.out.println("Start creating triggers for binary stream tests ...");
+		
+		Statement stmt = conn.createStatement();
+		stmt.execute("create trigger t21 NO CASCADE before update of x,y on x2 "
+				+ "for each statement  mode db2sql values getBinaryColumn( 0, 2, 'a')");
+		stmt.execute("create trigger t22 after update of x,y on x2 for each row"
+				+ " mode db2sql values getBinaryColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t23 after insert on x2 for each statement"
+				+ " mode db2sql values getBinaryColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t24 NO CASCADE before insert on x2 for each row"
+				+ " mode db2sql values getBinaryColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t25 NO CASCADE before delete on x2 for each statement"
+				+ " mode db2sql values getBinaryColumn( 1, 2, 'a')");
+		stmt.execute("create trigger t26 after delete on x2 for each row  mode db2sql"
+				+ " values getBinaryColumn( 0, 2, 'a')");
+		stmt.close();
+		
+		System.out.println("... done creating triggers for binary stream tests.");
+	}
+	
+	private static void testTriggersWithBinaryStream(Connection conn) throws Throwable{
+		
+		int count = 1;
+		insertBinaryColumn(count++,conn,"insert into x2 values (1, ?, 1, ?)", 1, "a", 1);
+		insertBinaryColumn(count++,conn,"insert into x2 values (2, ?, 2, ?)", 1, "a", 10);
+		insertBinaryColumn(count++,conn,"insert into x2 values (3, ?, 3, ?)", 1, "a", 100);
+		insertBinaryColumn(count++,conn,"insert into x2 values (4, ?, 4, ?)", 1, "a", 1000);
+		insertBinaryColumn(count++,conn,"insert into x2 values (5, ?, 5, ?)", 1, "a", 10000);
+		insertBinaryColumn(count++,conn,"insert into x2 values (6, ?, 6, ?)", 1, "a", 32700);
+		insertBinaryColumn(count++,conn,"insert into x2 values (7, ?, 7, ?)", 1, "a", 32699);
+		insertBinaryColumn(count++,conn,"insert into x2 values (8, ?, 8, ?)", 1, "a", 16384);
+		insertBinaryColumn(count++,conn,"insert into x2 values (9, ?, 9, ?)", 1, "a", 16383);
+		insertBinaryColumn(count++,conn,"insert into x2 values (10, ?, 10, ?)", 1, "a", 0);
+		insertBinaryColumn(count++,conn,"insert into x2 values (11, ?, 11, ?)", 1, "a", 666);
+		
+		
+		executeStatement(conn,"select x, length(c1) from x2 order by 1");
+		executeStatement(conn,"update x2 set x = x+1");
+		executeStatement(conn,"select x, length(c1) from x2 order by 1");
+		executeStatement(conn,"update x2 set x = null");
+		executeStatement(conn,"select x, length(c1) from x2 order by 2");
+		executeStatement(conn,"insert into x2 select * from x2");
+		executeStatement(conn,"select x, length(c1) from x2 order by 2");
+		executeStatement(conn,"delete from x2");
+		
+	}
+	
+	private static void executeStatement(Connection conn, String str) throws SQLException{
+		System.out.println("#### Executing \""+ str + "\"");
+		Statement stmt = conn.createStatement();
+		
+		//Display results for select statements
+		if(str.startsWith("select")) {
+			ResultSet rs = stmt.executeQuery(str);
+			JDBCDisplayUtil.DisplayResults(System.out,rs,conn);
+			rs.close();
+		} else 
+			stmt.execute(str);
+		
+		
+		stmt.close();
+	}
+	
+	private static void insertAsciiColumn
+	(
+		int 			count,	
+		Connection 		conn,	
+		String 			stmtText, 
+		int				colNumber,
+		String 			value, 
+		int 			length
+	)
+		throws Throwable 
+	{
+		System.out.println("Call #" + count + " to insertAsciiColumn"); 
+		StreamUtil.insertAsciiColumn(conn, stmtText, colNumber, value, length);
+	}
+	
+	private static void insertBinaryColumn
+	(
+		int 			count,
+		Connection 		conn,
+		String 			stmtText, 
+		int				colNumber,
+		String 			value, 
+		int 			length
+	)
+		throws Throwable
+	{
+		System.out.println("Call #" + count + " to insertBinaryColumn");
+		StreamUtil.insertBinaryColumn(conn, stmtText, colNumber, value, length);
+	}
+	
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerStream_app.properties
Tue Jan 17 21:43:13 2006
@@ -1,5 +1,2 @@
 usedefaults=true
 jvmflags=-ms32M -mx128M
-
-#Exclude for J2ME/Foundation - test requires java.sql.DriverManager
-runwithfoundation=false
\ No newline at end of file

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock.java
Tue Jan 17 21:43:13 2006
@@ -37,6 +37,8 @@
 
 import org.apache.derby.tools.ij;
 import org.apache.derby.tools.JDBCDisplayUtil;
+import java.util.Properties;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 
 /**
  *Testing for FileLocks that prevent Derby Double Boot.
@@ -63,7 +65,7 @@
 			stmt.close();
 			con.close();
 			try{
-				con = DriverManager.getConnection("jdbc:derby:wombat;shutdown=true");
+				TestUtil.shutdownUsingDataSource("wombat");
 			}catch(Exception e)
 			{
 				//Shutdown will throw exception , just ignore it.	
@@ -83,7 +85,9 @@
 			//Now if we try to boot , we should get an multiple 
 			//instance exception
 			try{
-				con = DriverManager.getConnection("jdbc:derby:wombat");
+				Properties prop = new Properties();
+				prop.setProperty("databaseName", "wombat");
+				TestUtil.getDataSourceConnection(prop);
 			}catch(SQLException e) {
 				System.out.println("expected exception");
 				dumpSQLExceptions(e);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock1.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock1.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock1.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock1.java
Tue Jan 17 21:43:13 2006
@@ -27,9 +27,11 @@
 import java.sql.Statement;
 import java.sql.SQLException;
 import java.sql.Types;
+import java.util.Properties;
 
 import org.apache.derby.tools.ij;
 import org.apache.derby.tools.JDBCDisplayUtil;
+import org.apache.derbyTesting.functionTests.util.TestUtil;
 
 /**
  *Just make a connection to wombat , 
@@ -48,8 +50,10 @@
 			// use the ij utility to read the property file and
 			// make the initial connection.
 			ij.getPropertyArg(args);
-			Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
-			con = DriverManager.getConnection("jdbc:derby:wombat");
+			Properties prop = new Properties();
+			prop.setProperty("databaseName", "wombat");
+			con = TestUtil.getDataSourceConnection(prop);
+
 			stmt = con.createStatement();
 			// while we're here, let's cleanup
 			stmt.execute("drop table t1");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock_app.properties
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock_app.properties?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock_app.properties
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/bootLock_app.properties
Tue Jan 17 21:43:13 2006
@@ -6,9 +6,6 @@
 
 usedefaults=true
 
-#Exclude for J2ME/Foundation - test requires java.sql.DriverManager
-runwithfoundation=false
-
 #exclude with SecurityManager
 # test execs another jvm with a relative path that means
 # the permission FilePermission("<<ALL FILES>>","execute")

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
Tue Jan 17 21:43:13 2006
@@ -47,88 +47,6 @@
 		conn.close();
 	}
 
-	public static void maxMemPerTabTest() throws SQLException {
-/*		StringBuffer sbA = new StringBuffer(20000);
-		for (int i = 0; i < 20000; i++)
-			sbA.append('a');
-		String largeStringA20000 = new String(sbA);
-    largeStringA20000.substring(0,2000);
-
-		StringBuffer sbB = new StringBuffer(20000);
-		for (int i = 0; i < 20000; i++)
-			sbB.append('b');
-		String largeStringB20000 = new String(sbB);
-		String largeStringB2000 = largeStringB20000.substring(0,2000);
-
-		StringBuffer sbC = new StringBuffer(20000);
-		for (int i = 0; i < 20000; i++)
-			sbC.append('b');
-		String largeStringC20000 = new String(sbC);
-		String largeStringC2000 = largeStringC20000.substring(0,2000);
-
-		StringBuffer sbD = new StringBuffer(20000);
-		for (int i = 0; i < 20000; i++)
-			sbD.append('b');
-		String largeStringD20000 = new String(sbD);
-		String largeStringD2000 = largeStringD20000.substring(0,2000); */
-
-		String largeStringA20000 = new String(Formatters.repeatChar("a",20000));
-		String largeStringA2000 = new String(Formatters.repeatChar("a",2000));
-		String largeStringB20000 = new String(Formatters.repeatChar("b",20000));
-		String largeStringB2000 = new String(Formatters.repeatChar("b",2000));
-		String largeStringC20000 = new String(Formatters.repeatChar("c",20000));
-		String largeStringC2000 = new String(Formatters.repeatChar("c",2000));
-		String largeStringD20000 = new String(Formatters.repeatChar("d",20000));
-		String largeStringD2000 = new String(Formatters.repeatChar("d",2000));
-
-		Connection conn = DriverManager.getConnection("jdbc:default:connection");
-		PreparedStatement ps = conn.prepareStatement("insert into tab1 values (?, ?)");
-		ps.setInt(1, 1);
-		ps.setString(2, largeStringA20000);
-		ps.executeUpdate();
-		ps.setInt(1, 2);
-		ps.setString(2, largeStringB20000);
-		ps.executeUpdate();
-		ps.setInt(1, 3);
-		ps.setString(2, largeStringC20000);
-		ps.executeUpdate();
-		ps.close();
-		ps = conn.prepareStatement("insert into tab2 values (?, ?)");
-		ps.setInt(1, 1);
-		ps.setString(2, largeStringA20000);
-		ps.executeUpdate();
-		ps.setInt(1, 2);
-		ps.setString(2, largeStringC20000);
-		ps.executeUpdate();
-		ps.setInt(1, 3);
-		ps.setString(2, largeStringD20000);
-		ps.executeUpdate();
-		ps.close();
-		ps = conn.prepareStatement("insert into tab3 values (?, ?)");
-		ps.setInt(1, 1);
-		ps.setString(2, largeStringA2000);
-		ps.executeUpdate();
-		ps.setInt(1, 2);
-		ps.setString(2, largeStringB2000);
-		ps.executeUpdate();
-		ps.setInt(1, 3);
-		ps.setString(2, largeStringC2000);
-		ps.executeUpdate();
-		ps.close();
-		ps = conn.prepareStatement("insert into tab4 values (?, ?)");
-		ps.setInt(1, 1);
-		ps.setString(2, largeStringA2000);
-		ps.executeUpdate();
-		ps.setInt(1, 2);
-		ps.setString(2, largeStringC2000);
-		ps.executeUpdate();
-		ps.setInt(1, 3);
-		ps.setString(2, largeStringD2000);
-		ps.executeUpdate();
-		ps.close();
-		conn.close();
-	}
-
 	private static void insertInBig(Connection conn, String A, String B, String C, String D)
throws SQLException {
 		PreparedStatement ps = conn.prepareStatement("insert into big values (?, ?, ?, ?)");
 		ps.setString(1, A);

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/StreamUtil.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/StreamUtil.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/StreamUtil.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/util/StreamUtil.java
Tue Jan 17 21:43:13 2006
@@ -37,6 +37,7 @@
 
 	public static void insertAsciiColumn
 	(
+		Connection 		conn,	
 		String 			stmtText, 
 		int				colNumber,
 		String 			value, 
@@ -44,7 +45,6 @@
 	)
 		throws Throwable
 	{
-		Connection conn = DriverManager.getConnection("jdbc:default:connection");
 		PreparedStatement ps = conn.prepareStatement(stmtText);
 		setAsciiColumn(ps, colNumber, value.charAt(0), length);
 		ps.setInt(colNumber + 1, length);
@@ -53,6 +53,7 @@
 	
 	public static void insertBinaryColumn
 	(
+		Connection 		conn,
 		String 			stmtText, 
 		int				colNumber,
 		String 			value, 
@@ -60,7 +61,6 @@
 	)
 		throws Throwable
 	{
-		Connection conn = DriverManager.getConnection("jdbc:default:connection");
 		PreparedStatement ps = conn.prepareStatement(stmtText);
 		setBinaryColumn(ps, colNumber, value.charAt(0), length);
 		ps.setInt(colNumber + 1, length);

Modified: db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTestCase.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTestCase.java?rev=370059&r1=370058&r2=370059&view=diff
==============================================================================
--- db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTestCase.java (original)
+++ db/derby/code/trunk/java/tools/org/apache/derby/impl/tools/ij/mtTestCase.java Tue Jan
17 21:43:13 2006
@@ -176,6 +176,17 @@
                }
             }
             
+			// If the initial connection is being specified as a DataSource
+			// on the command line using -Dij.dataSource=<dsclassname>
+			// then remove the ij.database and ij.protocol property.
+            // This is because the ij.database and ij.protocol 
+            // will override the ij.dataSource property.
+			if (System.getProperty("ij.dataSource") != null)
+			{
+				p.remove("ij.database");
+				p.remove("ij.protocol");
+			}
+            
 			System.setProperties(p);
 		}
 		// set input stream



Mime
View raw message