db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhille...@apache.org
Subject svn commit: r441540 [6/6] - in /db/derby/code/branches/10.2/java: client/ client/org/apache/derby/client/am/ client/org/apache/derby/jdbc/ drda/org/apache/derby/impl/drda/ engine/org/apache/derby/impl/jdbc/ engine/org/apache/derby/impl/sql/catalog/ eng...
Date Fri, 08 Sep 2006 15:35:37 GMT
Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/parameterMapping.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/parameterMapping.out?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/parameterMapping.out (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/parameterMapping.out Fri Sep  8 08:35:32 2006
@@ -207,7 +207,7 @@
 P3=cs.getDouble=77.0 was null false
 INOUT SMALLINT registerOutParameter(Types.DECIMAL) -- OK
 OUT SMALLINT registerOutParameter(Types.DECIMAL) -- OK
-SQLSTATE(22018): SQL Exception: Invalid character string format for type SMALLINT.
+SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type SMALLINT.
 INOUT SMALLINT registerOutParameter(Types.NUMERIC) -- OK
 OUT SMALLINT registerOutParameter(Types.NUMERIC) -- OK
 INOUT SMALLINT registerOutParameter(Types.BIT) -- OK
@@ -442,7 +442,7 @@
 P3=cs.getDouble=88.0 was null false
 INOUT INTEGER registerOutParameter(Types.DECIMAL) -- OK
 OUT INTEGER registerOutParameter(Types.DECIMAL) -- OK
-SQLSTATE(22018): SQL Exception: Invalid character string format for type INTEGER.
+SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type INTEGER.
 INOUT INTEGER registerOutParameter(Types.NUMERIC) -- OK
 OUT INTEGER registerOutParameter(Types.NUMERIC) -- OK
 INOUT INTEGER registerOutParameter(Types.BIT) -- OK
@@ -677,7 +677,7 @@
 P3=cs.getDouble=99.0 was null false
 INOUT BIGINT registerOutParameter(Types.DECIMAL) -- OK
 OUT BIGINT registerOutParameter(Types.DECIMAL) -- OK
-SQLSTATE(22018): SQL Exception: Invalid character string format for type BIGINT.
+SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type BIGINT.
 INOUT BIGINT registerOutParameter(Types.NUMERIC) -- OK
 OUT BIGINT registerOutParameter(Types.NUMERIC) -- OK
 INOUT BIGINT registerOutParameter(Types.BIT) -- OK
@@ -1566,6 +1566,10 @@
   setObject(java.lang.String) as batch  (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. JDBC FAIL DECIMAL(10,5)
   setObject(java.lang.Boolean) getBigDecimal=1.00000 was null false JDBC MATCH(OK)
   setObject(java.lang.Boolean) as batch  (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. JDBC FAIL DECIMAL(10,5)
+  setObject(java.lang.Byte) getBigDecimal=2.00000 was null false JDBC MATCH(OK)
+  setObject(java.lang.Byte) as batch  (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. JDBC FAIL DECIMAL(10,5)
+  setObject(java.lang.Short) getBigDecimal=11.00000 was null false JDBC MATCH(OK)
+  setObject(java.lang.Short) as batch  (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. JDBC FAIL DECIMAL(10,5)
   setObject(java.lang.Integer) getBigDecimal=74.00000 was null false JDBC MATCH(OK)
   setObject(java.lang.Integer) as batch  (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. (22005):An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'DECIMAL'. JDBC FAIL DECIMAL(10,5)
   setObject(java.lang.Long) getBigDecimal=79.00000 was null false JDBC MATCH(OK)
@@ -1767,25 +1771,25 @@
 CREATE PROCEDURE PMP.TYPE_AS(IN P1 CHAR(60), INOUT P2 CHAR(60), OUT P3 CHAR(60)) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL  EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.SimpleProcedureTest.pmap'
 INOUT CHAR(60) registerOutParameter(Types.TINYINT) -- OK
 OUT CHAR(60) registerOutParameter(Types.TINYINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type byte.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type byte.
 INOUT CHAR(60) registerOutParameter(Types.SMALLINT) -- OK
 OUT CHAR(60) registerOutParameter(Types.SMALLINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type short.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type short.
 INOUT CHAR(60) registerOutParameter(Types.INTEGER) -- OK
 OUT CHAR(60) registerOutParameter(Types.INTEGER) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type int.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type int.
 INOUT CHAR(60) registerOutParameter(Types.BIGINT) -- OK
 OUT CHAR(60) registerOutParameter(Types.BIGINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type long.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type long.
 INOUT CHAR(60) registerOutParameter(Types.REAL) -- OK
 OUT CHAR(60) registerOutParameter(Types.REAL) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type float.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type float.
 INOUT CHAR(60) registerOutParameter(Types.FLOAT) -- OK
 OUT CHAR(60) registerOutParameter(Types.FLOAT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type double.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type double.
 INOUT CHAR(60) registerOutParameter(Types.DOUBLE) -- OK
 OUT CHAR(60) registerOutParameter(Types.DOUBLE) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type double.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type double.
 INOUT CHAR(60) registerOutParameter(Types.DECIMAL) -- OK
 OUT CHAR(60) registerOutParameter(Types.DECIMAL) -- OK
 P2=cs.getBigDecimal=32.0P2-PMAP                                                  was null false
@@ -1812,13 +1816,13 @@
 OUT CHAR(60) registerOutParameter(Types.VARBINARY) -- XCL25
 INOUT CHAR(60) registerOutParameter(Types.DATE) -- OK
 OUT CHAR(60) registerOutParameter(Types.DATE) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT CHAR(60) registerOutParameter(Types.TIME) -- OK
 OUT CHAR(60) registerOutParameter(Types.TIME) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
 OUT CHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT CHAR(60) registerOutParameter(Types.CLOB) -- XCL25
 OUT CHAR(60) registerOutParameter(Types.CLOB) -- XCL25
 INOUT CHAR(60) registerOutParameter(Types.BLOB) -- XCL25
@@ -1998,25 +2002,25 @@
 CREATE PROCEDURE PMP.TYPE_AS(IN P1 VARCHAR(60), INOUT P2 VARCHAR(60), OUT P3 VARCHAR(60)) LANGUAGE JAVA PARAMETER STYLE JAVA NO SQL  EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.SimpleProcedureTest.pmap'
 INOUT VARCHAR(60) registerOutParameter(Types.TINYINT) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.TINYINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type byte.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type byte.
 INOUT VARCHAR(60) registerOutParameter(Types.SMALLINT) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.SMALLINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type short.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type short.
 INOUT VARCHAR(60) registerOutParameter(Types.INTEGER) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.INTEGER) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type int.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type int.
 INOUT VARCHAR(60) registerOutParameter(Types.BIGINT) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.BIGINT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type long.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type long.
 INOUT VARCHAR(60) registerOutParameter(Types.REAL) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.REAL) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type float.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type float.
 INOUT VARCHAR(60) registerOutParameter(Types.FLOAT) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.FLOAT) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type double.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type double.
 INOUT VARCHAR(60) registerOutParameter(Types.DOUBLE) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.DOUBLE) -- OK
-P2=SQLSTATE(22018): SQL Exception: Invalid character string format for type double.
+P2=SQLSTATE(22018): java.sql.SQLException: Invalid character string format for type double.
 INOUT VARCHAR(60) registerOutParameter(Types.DECIMAL) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.DECIMAL) -- OK
 P2=cs.getBigDecimal=32.0P2-PMAP was null false
@@ -2043,13 +2047,13 @@
 OUT VARCHAR(60) registerOutParameter(Types.VARBINARY) -- XCL25
 INOUT VARCHAR(60) registerOutParameter(Types.DATE) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.DATE) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT VARCHAR(60) registerOutParameter(Types.TIME) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.TIME) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
 OUT VARCHAR(60) registerOutParameter(Types.TIMESTAMP) -- OK
-P2=SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+P2=SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT VARCHAR(60) registerOutParameter(Types.CLOB) -- XCL25
 OUT VARCHAR(60) registerOutParameter(Types.CLOB) -- XCL25
 INOUT VARCHAR(60) registerOutParameter(Types.BLOB) -- XCL25
@@ -2595,6 +2599,10 @@
   setObject(java.lang.String) as batch  (22007):The syntax of the string representation of a datetime value is incorrect. JDBC FAIL DATE
   setObject(java.lang.Boolean) IC JDBC MATCH (INVALID)
   setObject(java.lang.Boolean) as batch IC JDBC MATCH (INVALID)
+  setObject(java.lang.Byte) IC JDBC MATCH (INVALID)
+  setObject(java.lang.Byte) as batch IC JDBC MATCH (INVALID)
+  setObject(java.lang.Short) IC JDBC MATCH (INVALID)
+  setObject(java.lang.Short) as batch IC JDBC MATCH (INVALID)
   setObject(java.lang.Integer) IC JDBC MATCH (INVALID)
   setObject(java.lang.Integer) as batch IC JDBC MATCH (INVALID)
   setObject(java.lang.Long) IC JDBC MATCH (INVALID)
@@ -2638,13 +2646,13 @@
 OUT DATE registerOutParameter(Types.BIT) -- XCL25
 INOUT DATE registerOutParameter(Types.CHAR) -- OK
 OUT DATE registerOutParameter(Types.CHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT DATE registerOutParameter(Types.VARCHAR) -- OK
 OUT DATE registerOutParameter(Types.VARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT DATE registerOutParameter(Types.LONGVARCHAR) -- OK
 OUT DATE registerOutParameter(Types.LONGVARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT DATE registerOutParameter(Types.VARBINARY) -- XCL25
 OUT DATE registerOutParameter(Types.VARBINARY) -- XCL25
 INOUT DATE registerOutParameter(Types.DATE) -- OK
@@ -2655,7 +2663,7 @@
 OUT DATE registerOutParameter(Types.TIME) -- XCL25
 INOUT DATE registerOutParameter(Types.TIMESTAMP) -- OK
 OUT DATE registerOutParameter(Types.TIMESTAMP) -- OK
-P2=SQLSTATE(22005): SQL Exception: An attempt was made to get a data value of type 'java.sql.Time' from a data value of type 'DATE'.
+P2=SQLSTATE(22005): java.sql.SQLException: An attempt was made to get a data value of type 'java.sql.Time' from a data value of type 'DATE'.
 INOUT DATE registerOutParameter(Types.CLOB) -- XCL25
 OUT DATE registerOutParameter(Types.CLOB) -- XCL25
 INOUT DATE registerOutParameter(Types.BLOB) -- XCL25
@@ -2856,13 +2864,13 @@
 OUT TIME registerOutParameter(Types.BIT) -- XCL25
 INOUT TIME registerOutParameter(Types.CHAR) -- OK
 OUT TIME registerOutParameter(Types.CHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIME registerOutParameter(Types.VARCHAR) -- OK
 OUT TIME registerOutParameter(Types.VARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIME registerOutParameter(Types.LONGVARCHAR) -- OK
 OUT TIME registerOutParameter(Types.LONGVARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIME registerOutParameter(Types.VARBINARY) -- XCL25
 OUT TIME registerOutParameter(Types.VARBINARY) -- XCL25
 INOUT TIME registerOutParameter(Types.DATE) -- XCL25
@@ -3075,13 +3083,13 @@
 OUT TIMESTAMP registerOutParameter(Types.BIT) -- XCL25
 INOUT TIMESTAMP registerOutParameter(Types.CHAR) -- OK
 OUT TIMESTAMP registerOutParameter(Types.CHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIMESTAMP registerOutParameter(Types.VARCHAR) -- OK
 OUT TIMESTAMP registerOutParameter(Types.VARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIMESTAMP registerOutParameter(Types.LONGVARCHAR) -- OK
 OUT TIMESTAMP registerOutParameter(Types.LONGVARCHAR) -- OK
-SQLSTATE(22007): SQL Exception: The syntax of the string representation of a datetime value is incorrect.
+SQLSTATE(22007): java.sql.SQLException: The syntax of the string representation of a datetime value is incorrect.
 INOUT TIMESTAMP registerOutParameter(Types.VARBINARY) -- XCL25
 OUT TIMESTAMP registerOutParameter(Types.VARBINARY) -- XCL25
 INOUT TIMESTAMP registerOutParameter(Types.DATE) -- OK
@@ -3421,10 +3429,6 @@
   setObject(java.lang.String) as batch IC JDBC MATCH (INVALID)
   setObject(java.lang.Boolean) IC JDBC MATCH (INVALID)
   setObject(java.lang.Boolean) as batch IC JDBC MATCH (INVALID)
-  setObject(java.lang.Byte) IC JDBC MATCH (INVALID)
-  setObject(java.lang.Byte) as batch IC JDBC MATCH (INVALID)
-  setObject(java.lang.Short) IC JDBC MATCH (INVALID)
-  setObject(java.lang.Short) as batch IC JDBC MATCH (INVALID)
   setObject(java.lang.Byte) IC JDBC MATCH (INVALID)
   setObject(java.lang.Byte) as batch IC JDBC MATCH (INVALID)
   setObject(java.lang.Short) IC JDBC MATCH (INVALID)

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNet.exclude
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNet.exclude?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNet.exclude (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/DerbyNet.exclude Fri Sep  8 08:35:32 2006
@@ -15,6 +15,7 @@
 #           regardless of framework
 # excluding largedata/LobLimits.java to run with the network server because currently lobs are materialized and this test tests for 2G lobs.
 # 			see DERBY-326 and DERBY-550 issues
+# excluding jdbcapi/UpdatableResultSetTest.java - Test fails with JCC
 jdbcapi/resultsetStream.java
 lang/errorStream.java
 lang/scrollCursors2.java
@@ -45,3 +46,4 @@
 # DERBY-1691: when run against JCC, exceptions in blobclob4BLOB can appear in
 # different places in the output.
 jdbcapi/blobclob4BLOB.java
+jdbcapi/UpdatableResultSetTest.junit

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/derbylang.runall Fri Sep  8 08:35:32 2006
@@ -1,7 +1,6 @@
 jdbcapi/metadata.java
 jdbcapi/metadataMultiConn.java
 jdbcapi/odbc_metadata.java
-lang/GroupByExpressionTest.junit
 lang/AIjdbc.java
 lang/AggregateClassLoading.java
 lang/CharUTF8.java
@@ -65,6 +64,7 @@
 lang/forupdate.sql
 lang/functions.sql
 lang/grantRevokeDDL.sql
+lang/grantRevokeDDL2.sql
 lang/grantRevoke.java
 lang/groupBy.sql
 lang/holdCursorIJ.sql

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/suites/jdbcapi.runall Fri Sep  8 08:35:32 2006
@@ -22,3 +22,4 @@
 jdbcapi/Stream.java
 jdbcapi/SURTest_ij.sql
 jdbcapi/_Suite.junit
+jdbcapi/UpdatableResultSetTest.junit

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/OutBufferedStream.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/OutBufferedStream.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/OutBufferedStream.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/OutBufferedStream.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // lang/OutBufferedStream.java
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   permission java.lang.RuntimePermission "setIO";
   
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/dataSourcePermissions_net.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // lang/dataSourcePermissions_net.java
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   permission java.lang.RuntimePermission "setIO";
   
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // derbynet/sysinfo.java
 //
-grant codeBase "${derbyTesting.codejar}/derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}/derbyTesting.jar" {
   //client side: test execs another jvm with relative path
   permission java.io.FilePermission "<<ALL FILES>>", "execute";
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/sysinfo_withproperties.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // derbynet/sysinfo_withproperties.java
 //
-grant codeBase "${derbyTesting.codejar}/derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}/derbyTesting.jar" {
   //client side: test execs another jvm with relative path
   permission java.io.FilePermission "<<ALL FILES>>", "execute";
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties.java Fri Sep  8 08:35:32 2006
@@ -223,8 +223,11 @@
                     try {
                         currentThread.wait(1000);
 						waitTime += 1000;
-						if (waitTime >= timeToWait)
+						if (waitTime >= timeToWait) {
+                            System.out.println(
+                                "Giving up on wait, waited: " + waitTime);
 							throw e;
+                        }
                     } catch (InterruptedException ie) {
                     }
 				}
@@ -266,7 +269,7 @@
 			propFile.close();
 			//test start no parameters - Pickup 1528 from derby.properties
 			derbyServerCmd("start",null);	
-			waitForStart("1528",15000);
+			waitForStart("1528",60000);
 			System.out.println("Successfully Connected");
 			//shutdown - also picks up from derby.properties
 			derbyServerCmd("shutdown",null);
@@ -274,13 +277,13 @@
 			//test start with system property. Overrides derby.properties
 			derbyServerCmd("start","-Dderby.drda.portNumber=1529");
 
-			waitForStart("1529",15000);	
+			waitForStart("1529",60000);	
 			System.out.println("Successfully Connected");
 			//shutdown - also picks up from System Properties
 			derbyServerCmd("shutdown","1529");
 			System.out.println("Testing command line option. Port 1530");
 			derbyServerCmd("start","1530");
-			waitForStart("1530",15000);		
+			waitForStart("1530",60000);		
 			System.out.println("Successfully Connected");
 			//shutdown - with command line option
 			derbyServerCmd("shutdown","1530");
@@ -294,7 +297,7 @@
 			//Shutdown the server started by test
 			derbyServerCmd("shutdown","1527");
             execCmdDumpResults(startServerCmd, false);
-			waitForStart("1527",15000);
+			waitForStart("1527",60000);
 			//check that default properties are used
 			listProperties("1527");
 			

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProperties_derby.properties Fri Sep  8 08:35:32 2006
@@ -4,16 +4,5 @@
 derby.language.logStatementText=true
 
 #added to cover call to memCheck class
-derby.drda.debug=true#defaults
-derby.infolog.append=true
-derby.locks.waitTimeout=120
-derby.language.logStatementText=true
+derby.drda.debug=true
 
-#added to cover call to memCheck class
-derby.drda.debug=true#defaults
-derby.infolog.append=true
-derby.locks.waitTimeout=120
-derby.language.logStatementText=true
-
-#added to cover call to memCheck class
-derby.drda.debug=true
\ No newline at end of file

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testProtocol.policy Fri Sep  8 08:35:32 2006
@@ -7,7 +7,7 @@
   permission java.io.FilePermission "${derby.system.home}${/}*", "write";  
 };
 
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.java Fri Sep  8 08:35:32 2006
@@ -506,8 +506,8 @@
      * then client will do an automatic switching (upgrade) of
      * security mechanism to use. The logic is as follows :
      * if password is available, and if the JVM in which the client is running 
-     * supports EUSRIDPWD mechanism, in that case the security mechanism is 
-     * upgraded to EUSRIDPWD.
+     * supports EUSRIDPWD mechanism, in that case also, USRIDPWD security mechanism is 
+     * used. 
      * if password is available, and if the JVM in which the client is running 
      * does not support EUSRIDPWD mechanism, in that case the client will then
      * default to USRIDPWD.
@@ -550,7 +550,7 @@
 	 b) Connection request specifies a password or not
 	 c) Connection request specifies securityMechanism or not. the valid
 	 values are 4(USRIDONL), 3(USRIDPWD), 9(EUSRIDPWD) and 8(USRSSBPWD).
-	 d) support eusridpwd means whether this jvm supports encrypted userid/
+	 d) support eusridpwd means whether this client jvm supports encrypted userid/
 	 password security mechanism or not.  A value of Y means it supports
 	 and N means no.
 	 The next three columns specify what the client sends to the server
@@ -572,9 +572,9 @@
 	 =================================================================
      |SecMec not specified on connection request                    
 	 =================================================================
-	 |Y    |Y     |-       |Y         |Y        Y       9            |
+	 |Y    |Y     |-       |Y         |Y        Y       3            |
 	 |----------------------------------------------------------------
-	 |     |Y     |-       |Y         |Y        Y       9            |
+	 |     |Y     |-       |Y         |Y        Y       3            |
 	 -----------------------------------------------------------------
 	 |Y    |      |-       |Y         |Y        N       4            |
 	 -----------------------------------------------------------------

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/testSecMec.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // lang/testSecMec.java
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   permission java.lang.RuntimePermission "setIO";
   
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/RowIdNotImplementedTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/RowIdNotImplementedTest.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/RowIdNotImplementedTest.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/RowIdNotImplementedTest.java Fri Sep  8 08:35:32 2006
@@ -21,7 +21,6 @@
 package org.apache.derbyTesting.functionTests.tests.jdbc4;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
-import org.apache.derby.impl.jdbc.EmbedRowId;
 
 import junit.framework.*;
 
@@ -153,46 +152,6 @@
         meta = null;
     }
 
-    public void testRowIdEquals() {
-        RowId rowId = getRowId();
-        try {
-            rowId.equals(rowId);
-            fail("RowId.equals should not be implemented");
-        } catch (UnsupportedOperationException uoe) {
-            // Do nothing, we are fine.
-        }
-    }
-    
-    public void testRowIdGetBytes() {
-        RowId rowId = getRowId();
-        try {
-            rowId.getBytes();
-            fail("RowId.getBytes should not be implemented");
-        } catch (UnsupportedOperationException uoe) {
-            // Do nothing, we are fine.
-        }
-    }
-
-    public void testRowIdToString() {
-        RowId rowId = getRowId();
-        try {
-            rowId.toString();
-            fail("RowId.toString should not be implemented");
-        } catch (UnsupportedOperationException uoe) {
-            // Do nothing, we are fine.
-        }
-    }
-
-    public void testRowIdHashCode() {
-        RowId rowId = getRowId();
-        try {
-            rowId.hashCode();
-            fail("RowId.hashCode should not be implemented");
-        } catch (UnsupportedOperationException uoe) {
-            // Do nothing, we are fine.
-        }
-    }
-
     /**
      * Create a callable statement.
      *
@@ -215,14 +174,6 @@
         throws SQLException {
         // Create a very simple resultset.
         return createStatement().executeQuery("values 1");
-    }
-    
-    /**
-     * Create a <code>RowId</code>-object.
-     */
-    public java.sql.RowId getRowId() {
-        EmbedRowId embRowId = new EmbedRowId();
-        return (java.sql.RowId)embRowId;
     }
     
     /**

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java Fri Sep  8 08:35:32 2006
@@ -59,6 +59,9 @@
 
 		// suite.addTest(PrepareExecuteDDL.suite());
 		suite.addTest(LangScripts.suite());
+        suite.addTest(GroupByExpressionTest.suite());
+        suite.addTest(MathTrigFunctionsTest.suite());
+        suite.addTest(TimeHandlingTest.suite());
 		
 		// Tests that are compiled using 1.4 target need to
 		// be added this way, otherwise creating the suite

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable.sql?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/altertable.sql Fri Sep  8 08:35:32 2006
@@ -581,3 +581,16 @@
 -- show that a column which has a UNIQUE constraint cannot be modified NULL:
 create table atmcn_5 (a integer not null, b integer not null unique);
 alter table atmcn_5 alter column b null;
+
+-- tests for ALTER TABLE ALTER COLUMN DEFAULT
+create table atmod_1 (a integer, b varchar(10));
+insert into atmod_1 values (1, 'one');
+alter table atmod_1 alter column a default -1;
+insert into atmod_1 values (default, 'minus one');
+insert into atmod_1 (b) values ('b');
+select * from atmod_1;
+alter table atmod_1 alter a default 42;
+insert into atmod_1 values(3, 'three');
+insert into atmod_1 values (default, 'forty two');
+select * from atmod_1;
+

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/errorStream.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/errorStream.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/errorStream.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/errorStream.policy Fri Sep  8 08:35:32 2006
@@ -2,7 +2,7 @@
 // test specific permissions for test:
 // lang/errorStream.java
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   permission java.lang.RuntimePermission "setIO";
   
 };

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/grantRevokeDDL.sql Fri Sep  8 08:35:32 2006
@@ -468,11 +468,12 @@
 
 -- connect as mamta2 and give select privilege on v22 to mamta3
 set connection mamta2;
+-- should fail
 grant select on v22 to mamta3;
 set connection mamta3;
--- mamta3 has the required privileges now, so following should work
+-- should fail
 create view v31 as select * from mamta2.v22;
--- following will pass because mamta3 has direct access to v22 and public access to t11
+-- following will fail because mamta3 has no access to v22
 create view v32 as select v22.c111 as a, t11.c111 as b from mamta2.v22 v22, mamta1.t11 t11;
 -- following will still fail because mamta3 doesn't have access to mamta1.t12.c121
 create view v33 as select v22.c111 as a, t12.c121 as b from mamta2.v22 v22, mamta1.t12 t12;
@@ -481,11 +482,9 @@
 set connection mamta2;
 grant select on v23 to mamta3;
 set connection mamta3;
--- although mamta3 doesn't have direct access to mamta1.t12, it can look at it through view mamta2.v23 since mamta3 has select privilege
--- on mamta2.v23
+-- should fail
 create view v34 as select * from mamta2.v23;
--- following should work fine because mamta3 has access to all the
--- objects in it's schema
+-- should fail
 create view v35 as select * from v34;
 
 -- Write some views based on a routine
@@ -636,10 +635,10 @@
 -- mamta3 has not been granted select privileges on mamta2.v21ViewTest
 select * from mamta2.v21ViewTest;
 set connection mamta2;
--- give select privileges on the view to mamta3
+-- give select privileges on the view to mamta3, should fail
 grant select on v21ViewTest to mamta3;
 set connection mamta3;
--- select from mamta2.v21ViewTest will pass this time for mamta3 because mamta3 has select privilege on mamta2.v21ViewTest
+-- select from mamta2.v21ViewTest will fail for mamta3 because mamta3 has no select privilege on mamta2.v21ViewTest
 select * from mamta2.v21ViewTest;
 set connection satConnection;
 -- have the dba take away select privilege on mamta2.v21ViewTest from mamta3
@@ -787,6 +786,7 @@
 grant select on t11TriggerTest to mamta2;
 set connection mamta2;
 create view v21ViewTest as select * from mamta1.t11TriggerTest;
+-- should fail
 grant select on v21ViewTest to mamta3;
 select * from v21ViewTest;
 set connection mamta3;
@@ -794,7 +794,7 @@
 create table t31TriggerTest (c311 int); 
 drop table t32TriggerTest;
 create table t32TriggerTest (c321 int); 
--- following should pass because all the privileges are in place
+-- following should fail because not all the privileges are in place
 create trigger tr31t31TriggerTest after insert on t31TriggerTest for each statement mode db2sql
 	insert into t32TriggerTest values (select c111 from mamta2.v21ViewTest where c112=1);
 insert into t31TriggerTest values(1);
@@ -948,18 +948,16 @@
 set connection mamta2;
 create view v21ViewTest as select t1.c111, t2.c122 from mamta1.t11ViewTest as t1, mamta1.t12ViewTest as t2;
 select * from v21ViewTest;
--- grant permission to mamta3 so mamta3 can create a view based on v21ViewTest
+-- grant permission to mamta3, should fail
 grant select on v21ViewTest to mamta3;
 set connection mamta3;
 create view v31ViewTest as select * from mamta2.v21ViewTest;
 select * from v31ViewTest;
 set connection mamta1;
--- can't revoke the privilege because the view that relies on this privilege has another view defined on it and since Derby does not
---   support cascade view drop, we can't automatically drop view relying on the privilege below
+-- revoke the privilege from mamta2, should be ok, previous view is not created. 
 revoke select on t11ViewTest from mamta2;
 set connection mamta2;
--- view is still around, it couldn't be dropped automatically as a result of the revoke because there is another view dependent on the
---   view below. Need to drop that dependent view first in order for revoke to drop following view automatically 
+-- this view is not created, should fail
 select * from v21ViewTest;
 set connection mamta3;
 -- drop the dependent view
@@ -1423,7 +1421,7 @@
 set connection mamta1;
 grant select  on t12RoutineTest to mamta2;
 set connection mamta2;
--- now the view select will succeed
+-- should fail
 select * from mamta3.v21ViewTest; 
 
 -- In this test, the trigger is accessing a view. Any user that has insert privilege
@@ -1855,6 +1853,27 @@
 lock table user1.t100 in exclusive mode;
 lock table user1.t100 in share mode;
 commit;
+autocommit on;
+
+-- DERBY-1686
+set connection user1;
+create table t1 (i int);
+insert into t1 values 1,2,3;
+grant select on t1 to user2;
+set connection user2;
+create view v1 as select * from user1.t1;
+-- attempt to grant this view to others, should fail since user2
+-- does not have grant privilege on object user1.t1
+grant select on user1.t1 to user3;
+-- expect error
+grant select on v1 to user3;
+-- cleanup
+set connection user2;
+drop view v1;
+set connection user1;
+drop table t1;
+autocommit on;
+set connection user2;
 autocommit on;
 
 -- Simple test case for DERBY-1583: column privilege checking should not

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/ProcedureTest.java Fri Sep  8 08:35:32 2006
@@ -759,5 +759,23 @@
 
 		rs[0] = st1.executeQuery(query.toString());
 	}
+
+	public static void grantSelect() throws SQLException
+	{
+		Connection conn = DriverManager.getConnection("jdbc:default:connection");
+		PreparedStatement ps = conn.prepareStatement("grant select on t1 to user2");
+		ps.execute();
+		ps.close();
+		conn.close();
+	}
+
+	public static void revokeSelect() throws SQLException
+	{
+		Connection conn = DriverManager.getConnection("jdbc:default:connection");
+		PreparedStatement ps = conn.prepareStatement("revoke select on t1 from user2");
+		ps.execute();
+		ps.close();
+		conn.close();
+	}
 }
 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/derby_tests.policy Fri Sep  8 08:35:32 2006
@@ -70,7 +70,7 @@
 //
 // Permissions for the network client (derbyclient.jar)
 //
-grant codeBase "${derbyTesting.codejar}derbyclient.jar" {
+grant codeBase "${derbyTesting.clientjar}derbyclient.jar" {
   permission java.net.SocketPermission "127.0.0.1", "connect,resolve";
   permission java.net.SocketPermission "localhost", "connect,resolve";
   permission java.net.SocketPermission "${derbyTesting.serverhost}", "connect,resolve";
@@ -98,7 +98,7 @@
 // We are liberal here, it's not a goal to make the test harness
 // or tests secure.
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   // Access all properties using System.getProperties
   permission java.util.PropertyPermission "*", "read, write";
   

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/util/useprocessfalse.policy Fri Sep  8 08:35:32 2006
@@ -1,7 +1,7 @@
 //
 // policy file for running with useprocess=false
 //
-grant codeBase "${derbyTesting.codejar}derbyTesting.jar" {
+grant codeBase "${derbyTesting.testjar}derbyTesting.jar" {
   // When running with useprocess=false need to install and uninstall
   // the security manager and allow setIO to change the system err and out
   // streams. Currently the nist suite runs with useprocess=false.

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/CleanDatabaseTestSetup.java Fri Sep  8 08:35:32 2006
@@ -24,6 +24,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.derbyTesting.functionTests.tests.lang.TimeHandlingTest;
+
 
 import junit.framework.Test;
 
@@ -31,6 +33,21 @@
  * Test decorator that cleans a database on setUp and
  * tearDown to provide a test with a consistent empty
  * database as a starting point.
+ * <P>
+ * Tests can extend to provide a decorator that defines
+ * some schema items and then have CleanDatabaseTestSetup
+ * automatically clean them up by implementing the decorateSQL method.. 
+ * As an example:
+ * <code>
+        return new CleanDatabaseTestSetup(suite) {
+            protected void decorateSQL(Statement s) throws SQLException {
+
+                s.execute("CREATE TABLE T (I INT)");
+                s.execute("CREATE INDEX TI ON T(I)")
+
+            }
+        };
+ * </code>
  * 
  */
 public class CleanDatabaseTestSetup extends BaseJDBCTestSetup {
@@ -43,23 +60,49 @@
     }
 
     /**
-     * Clean the default database using the default connection.
+     * Clean the default database using the default connection
+     * and calls the decorateSQL to allow sub-classes to
+     * initialize their schema requirments.
      */
     protected void setUp() throws Exception {
         Connection conn = getConnection();
         conn.setAutoCommit(false);
-        CleanDatabaseTestSetup.cleanDatabase(conn);
+        CleanDatabaseTestSetup.cleanDatabase(conn);  
+        
+        Statement s = conn.createStatement();
+        decorateSQL(s);
+
+        s.close();
+        conn.commit();
         conn.close();
     }
+    
+    /**
+     * Sub-classes can override this method to execute
+     * SQL statements executed at setUp time once the
+     * database has been cleaned.
+     * Once this method returns the statement will be closed,
+     * commit called and the connection closed. The connection
+     * returned by s.getConnection() is the default connection
+     * and is in auto-commit false mode.
+     * <BR>
+     * This implementation does nothing. Sub-classes need not call it.
+     * @throws SQLException
+     */
+    protected void decorateSQL(Statement s) throws SQLException
+    {
+        // nothing in the default case.
+    }
 
     /**
      * Clean the default database using the default connection.
      */
     protected void tearDown() throws Exception {
-        setUp();
+        Connection conn = getConnection();
+        conn.setAutoCommit(false);
+        CleanDatabaseTestSetup.cleanDatabase(conn);       
         super.tearDown();
     }
-
 
     /**
      * Clean a complete database

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/JDBC.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/JDBC.java Fri Sep  8 08:35:32 2006
@@ -153,8 +153,7 @@
 	 * TODO: Handle dependencies by looping in some intelligent
 	 * way until everything can be dropped.
 	 * 
-	 * TODO: Drop Functions
-	 * TODO: Drop Synonyms
+
 	 * 
 	 * @param dmd DatabaseMetaData object for database
 	 * @param schema Name of the schema
@@ -165,8 +164,20 @@
 		Connection conn = dmd.getConnection();
 		Assert.assertFalse(conn.getAutoCommit());
 		Statement s = dmd.getConnection().createStatement();
-		// Procedures first
-		ResultSet rs = dmd.getProcedures((String) null,
+        
+        // Functions - not supported by JDBC meta data until JDBC 4
+        PreparedStatement psf = conn.prepareStatement(
+                "SELECT ALIAS FROM SYS.SYSALIASES A, SYS.SYSSCHEMAS S" +
+                " WHERE A.SCHEMAID = S.SCHEMAID " +
+                " AND A.ALIASTYPE = 'F' " +
+                " AND S.SCHEMANAME = ?");
+        psf.setString(1, schema);
+        ResultSet rs = psf.executeQuery();
+        dropUsingDMD(s, rs, schema, "ALIAS", "FUNCTION");        
+        psf.close();
+  
+		// Procedures
+		rs = dmd.getProcedures((String) null,
 				schema, (String) null);
 		
 		dropUsingDMD(s, rs, schema, "PROCEDURE_NAME", "PROCEDURE");
@@ -182,7 +193,14 @@
 				new String[] {"TABLE"});
 		
 		dropUsingDMD(s, rs, schema, "TABLE_NAME", "TABLE");
-		
+
+        // Synonyms - need work around for DERBY-1790 where
+        // passing a table type of SYNONYM fails.
+        rs = dmd.getTables((String) null, schema, (String) null,
+                new String[] {"AA_DERBY-1790-SYNONYM"});
+        
+        dropUsingDMD(s, rs, schema, "TABLE_NAME", "SYNONYM");
+        
 		// Finally drop the schema if it is not APP
 		if (!schema.equals("APP")) {
 			s.execute("DROP SCHEMA " + JDBC.escape(schema) + " RESTRICT");
@@ -217,8 +235,8 @@
 		int batchCount = 0;
 		while (rs.next())
 		{
-			String view = rs.getString(mdColumn);
-			s.addBatch(dropLeadIn + JDBC.escape(schema, view));
+            String objectName = rs.getString(mdColumn);
+			s.addBatch(dropLeadIn + JDBC.escape(schema, objectName));
 			batchCount++;
 		}
 		rs.close();

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java?view=diff&rev=441540&r1=441539&r2=441540
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java (original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/junit/SecurityManagerSetup.java Fri Sep  8 08:35:32 2006
@@ -54,6 +54,7 @@
 		// Determine what the set of properties
 		// describing the environment is.
 		externalSecurityManagerInstalled = determineClasspath();
+        
 	}
 	
 	private final String decoratorPolicyResource;
@@ -182,7 +183,7 @@
 	 * Looks for three items:
 	 * 
 	 * Location of derbyTesting.jar via this class
-	 * Location of derby.jar via org.apache.derby.jdbc.EmbeddedDataSource
+	 * Location of derby.jar via org.apache.derby.jdbc.EmbeddedSimpleDataSource
 	 * Location of derbyclient.jar via org.apache.derby.jdbc.ClientDataSource
 	 * 
 	 * Two options are supported, either all are in jar files or
@@ -243,6 +244,19 @@
 		
 		return false;
 	}
+    
+    /**
+     * Return the policy file system properties for use
+     * by the old test harness. This ensures a consistent
+     * approach to setting the properties. There are the
+     * properties used to define the jar file location in
+     * any policy files.
+     * @return
+     */
+    public static Properties getPolicyFilePropertiesForOldHarness()
+    {
+        return classPathSet;
+    }
 	
 	/**
 	 * Strip of the last token which will be the jar name.



Mime
View raw message