Attached is a patch that does two things:

1) makes a small modification to some of the ".sed" files used for filtering test output in the Derby harness. This change will filter out a broader set of JCC version numbers, thus overcoming some of the false failures that can occur when running the tests against newer versions of the IBM Universal Driver.

2) removes explicit uses of "commit" and "rollback" from some situations where autocommit=true, except when such uses are crucial to the functionality being tested. This (again) overcomes some false failures that can occur with the latest versions of the IBM Universal Driver.

I ran the derbynetmats suite on Windows using JDK 142 with these changes, and 
there were no new failures.

Could a committer please submit?

Many thanks,
Army
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java    
    (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/lang/procedure.java    
    (working copy)
@@ -343,14 +343,16 @@
                ir1.close();
                ir2.close();
 
-               conn.commit();
+               if (!conn.getAutoCommit())
+                       conn.commit();
 
 
 
                ResultSet rs = s.executeQuery("select * from t1");
                
org.apache.derby.tools.JDBCDisplayUtil.DisplayResults(System.out, rs, conn);
 
-               conn.commit();
+               if (!conn.getAutoCommit())
+                       conn.commit();
 
                callExceptionExpected(conn, "CALL IR2(2, 'no way')");
                callExceptionExpected(conn, "CALL IR2(?, 'no way')");
@@ -1278,8 +1280,10 @@
                showMatchingProcedures(conn, "SQLCONTROL2_%");
                showMatchingProcedures(conn, "SQLCONTROL3_%");
                showMatchingProcedures(conn, "SQLCONTROL4_%");
-               conn.commit();
 
+               if (!conn.getAutoCommit())
+                       conn.commit();
+
                for (int i = 0; i < control.length; i++) {
                        String type = control[i];
                        if (type.length() == 0)
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/callable.java
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/callable.java 
    (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/callable.java 
    (working copy)
@@ -687,7 +687,6 @@
                  System.out.println("cstmt.getBigDecimal(3): " + retVal3);
                  cstmt.close();
                  ps.close();
-                 conn.commit();
                  
                  }catch (SQLException e) { 
                          System.out.println(e.getMessage());
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
   (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/csPrepStmt.java
   (working copy)
@@ -369,7 +369,6 @@
                        System.out.println("SQLState: " + e.getSQLState() + " 
message: " + e.getMessage());
                }
 
-               conn.rollback();
        }
 
 
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java 
    (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/prepStmt.java 
    (working copy)
@@ -365,7 +365,6 @@
                        System.out.println("SQLState: " + e.getSQLState() + " 
message: " + e.getMessage());
                }
 
-               conn.rollback();
        }
 
 
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30_sed.properties
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30_sed.properties
    (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/dbMetaDataJdbc30_sed.properties
    (working copy)
@@ -6,4 +6,4 @@
 # Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
 #   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
 # No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]?.$;version (EXPECTED 
VERSION),version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION)
+substitute=version 
[0-9].[0-9]..[0-9].[0-9].[0-9][0-9]?[0-9]?.[A-Za-z]*.$;version (EXPECTED 
VERSION),version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION)
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadataJdbc20_sed.properties
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadataJdbc20_sed.properties
      (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadataJdbc20_sed.properties
      (working copy)
@@ -6,4 +6,4 @@
 # Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
 #   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
 # No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]?.$;version (EXPECTED 
VERSION),version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION)
+substitute=version 
[0-9].[0-9]..[0-9].[0-9].[0-9][0-9]?[0-9]?.[A-Za-z]*.$;version (EXPECTED 
VERSION),version [0-9].[0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION)
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/odbc_metadata_sed.properties
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/odbc_metadata_sed.properties
       (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/odbc_metadata_sed.properties
       (working copy)
@@ -6,22 +6,4 @@
 # Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
 #   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
 # No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?.$;version 
(EXPECTED VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test 
Build.$;version (EXPECTED VERSION),getDriverVersion....2.*$;getDriverVersion(): 
EXPECTED VERSION
-# Filters and substitutes for SED
-# Multiple patterns for DELETE: comma separated
-#   delete=pattern1,pattern2,...,patternn
-# No commas can be allowed in the patterns.
-#
-# Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
-#   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
-# No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?.$;version 
(EXPECTED VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test 
Build.$;version (EXPECTED VERSION),getDriverVersion....2.*$;getDriverVersion(): 
EXPECTED VERSION
-# Filters and substitutes for SED
-# Multiple patterns for DELETE: comma separated
-#   delete=pattern1,pattern2,...,patternn
-# No commas can be allowed in the patterns.
-#
-# Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
-#   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
-# No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?.$;version 
(EXPECTED VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test 
Build.$;version (EXPECTED VERSION),getDriverVersion....2.*$;getDriverVersion(): 
EXPECTED VERSION
+substitute=version 
[0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?[0-9]?.[A-Za-z]*.$;version (EXPECTED 
VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION),getDriverVersion....[2-3].*$;getDriverVersion(): EXPECTED 
VERSION
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_sed.properties
===================================================================
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_sed.properties
    (revision 160956)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/metadata_sed.properties
    (working copy)
@@ -6,4 +6,4 @@
 # Multiple patterns for SUBSTITUTE: comma separated <pattern;substitute> pair
 #   
substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
 # No commas or semicolons can be allowed in the patterns/subsitutes.
-substitute=version [0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?.$;version 
(EXPECTED VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test 
Build.$;version (EXPECTED VERSION),getDriverVersion....2.*$;getDriverVersion(): 
EXPECTED VERSION
+substitute=version 
[0-9][.][0-9]..[0-9][.][0-9][.][0-9][0-9]?[0-9]?.[A-Za-z]*.$;version (EXPECTED 
VERSION),version [0-9][.][0-9]..[0-9].[0-9].[0-9][0-9]? Test Build.$;version 
(EXPECTED VERSION),getDriverVersion....[2-3].*$;getDriverVersion(): EXPECTED 
VERSION

Reply via email to