Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10.1.1
    • Component/s: JDBC
    • Labels:
      None
    • Urgency:
      Normal

      Description

      Open JDK 8 will include maintenance rev 4.2 of JDBC. The public discussion of JDBC 4.2 will take place here: http://openjdk.java.net/jeps/170. We will want to build Derby support for JDBC 4.2 after a public spec appears. At this time, it is unclear what Derby release will carry this support.

      1. JDBC_4.2_Changes.html
        22 kB
        Rick Hillegas
      2. derby-6000-01-aa-executeLargeUpdateEmbedded.diff
        14 kB
        Rick Hillegas
      3. derby-6000-02-ad-executeLargeUpdateClient.diff
        48 kB
        Rick Hillegas
      4. derby-6000-03-aa-executeLargeBatch.diff
        14 kB
        Rick Hillegas
      5. derby-6000-04-aa-setLargeMaxRows.diff
        17 kB
        Rick Hillegas
      6. derby-6000-05-aa-executeLargeUpdatePS.diff
        11 kB
        Rick Hillegas
      7. derby-6000-06-aa-DatabaseMetaData.diff
        11 kB
        Rick Hillegas
      8. derby-6000-07-ab-batchUpdateException.diff
        42 kB
        Rick Hillegas
      9. derby-6000-08-aa-batchUpdateExceptionConstructor.diff
        5 kB
        Rick Hillegas
      10. derby-6000-09-ac-setObjectPS.diff
        58 kB
        Rick Hillegas
      11. derby-6000-10-aa-rename_getMaxLogicalLobSize.diff
        5 kB
        Rick Hillegas
      12. derby-6000-11-aa-ResultSet.updateObject.diff
        19 kB
        Rick Hillegas
      13. derby-6000-12-aa-CallableStatement.registerOutParameter.diff
        36 kB
        Rick Hillegas
      14. derby-6000-12-ab-CallableStatement.registerOutParameter.diff
        38 kB
        Rick Hillegas
      15. derby-6000-13-aa-fixJavadoc.diff
        3 kB
        Rick Hillegas
      16. derby-6000-14-aa-unsupportedVetter.diff
        3 kB
        Rick Hillegas
      17. derby-6000-15-aa-CallableStatement.setObject.diff
        17 kB
        Rick Hillegas
      18. derby-6000-16-aa-fixJavadocOnJava8.diff
        39 kB
        Rick Hillegas
      19. derby-6000-17-aa-getMaxLogicalLobSize.diff
        3 kB
        Rick Hillegas
      20. JDBC_4.2_Changes.html
        24 kB
        Rick Hillegas
      21. derby-6000-18-aa-checkForClosedBeforeForwarding.diff
        1 kB
        Rick Hillegas
      22. derby-6000-19-ab-miscBuddyTestingFixes.diff
        19 kB
        Rick Hillegas
      23. derby-6000-19-ac-miscBuddyTestingFixes.diff
        20 kB
        Rick Hillegas
      24. derby-6000-20-aa-negativeUpdateObject.diff
        2 kB
        Rick Hillegas
      25. derby-6000-21-aa-fixUnsupportedVetterForDerby10_9onJDK8.diff
        4 kB
        Rick Hillegas
      26. derby-6000-22-aa-disableUnsupportedVetterForDerby10_9onJDK8.diff
        2 kB
        Rick Hillegas
      27. derby-6000-23-aa-suppressDiagnosticInUnsupportedVetter.diff
        0.7 kB
        Rick Hillegas

        Issue Links

          Activity

          Hide
          Rick Hillegas added a comment -

          Attaching JDBC_4.2_Changes.html, the first rev of a functional spec for this work. The changes are defined by the javadoc specdiffs published by JDBC spec lead Lance Andersen. The latest specdiffs can be found here: http://cr.openjdk.java.net/~lancea/8005080/specdiffs.01/

          Show
          Rick Hillegas added a comment - Attaching JDBC_4.2_Changes.html, the first rev of a functional spec for this work. The changes are defined by the javadoc specdiffs published by JDBC spec lead Lance Andersen. The latest specdiffs can be found here: http://cr.openjdk.java.net/~lancea/8005080/specdiffs.01/
          Hide
          Rick Hillegas added a comment -

          I have built Open JDK 8 on my mac by following the instructions here:

          https://wikis.oracle.com/display/OpenJDK/Mac+OS+X+Port

          However, the mercurial source indicated on that page does not contain the recent Open JDK checkin of JDBC 4.2. To get that more complete source, I issued the following command:

          hg clone http://hg.openjdk.java.net/jdk8/tl

          Probably a similar sequence of steps on the platform of your choice will help you build an Open JDK 8 which contains the JDBC 4.2 changes.

          Show
          Rick Hillegas added a comment - I have built Open JDK 8 on my mac by following the instructions here: https://wikis.oracle.com/display/OpenJDK/Mac+OS+X+Port However, the mercurial source indicated on that page does not contain the recent Open JDK checkin of JDBC 4.2. To get that more complete source, I issued the following command: hg clone http://hg.openjdk.java.net/jdk8/tl Probably a similar sequence of steps on the platform of your choice will help you build an Open JDK 8 which contains the JDBC 4.2 changes.
          Hide
          Rick Hillegas added a comment - - edited

          Unfortunately, this version of OpenJDK 8 causes Derby to fail on VerifyErrors whenever Derby tries to load an interface which JDBC 4.2 extends with a default method. For example, when you try to connect to Derby, you get this error:

          JAVA ERROR: java.lang.VerifyError: (class: org/apache/derby/impl/jdbc/EmbedDatabaseMetaData, method: supportsRefCursors signature: ()Z) Illegal use of nonvirtual function call

          ...and when you try to run a statement, you get this error:

          JAVA ERROR: java.lang.VerifyError: (class: org/apache/derby/impl/jdbc/EmbedStatement, method: executeLargeUpdate signature: (Ljava/lang/String;[Ljava/lang/String;)J) Illegal use of nonvirtual function call

          This is an OpenJDK bug tracked by http://bugs.sun.com/view_bug.do?bug_id=8004967

          For the moment, this bug prevents Derby from building cleanly under OpenJDK 8. I made some changes to get the classes to build, but the VerifyErrors kill the generation of toursdb, and that kills the Derby build.

          For the moment, it's probably best to work on the pieces of JDBC 4.2 which can be pushed into Derby's JDBC 3.0 implementation.

          Show
          Rick Hillegas added a comment - - edited Unfortunately, this version of OpenJDK 8 causes Derby to fail on VerifyErrors whenever Derby tries to load an interface which JDBC 4.2 extends with a default method. For example, when you try to connect to Derby, you get this error: JAVA ERROR: java.lang.VerifyError: (class: org/apache/derby/impl/jdbc/EmbedDatabaseMetaData, method: supportsRefCursors signature: ()Z) Illegal use of nonvirtual function call ...and when you try to run a statement, you get this error: JAVA ERROR: java.lang.VerifyError: (class: org/apache/derby/impl/jdbc/EmbedStatement, method: executeLargeUpdate signature: (Ljava/lang/String;[Ljava/lang/String;)J) Illegal use of nonvirtual function call This is an OpenJDK bug tracked by http://bugs.sun.com/view_bug.do?bug_id=8004967 For the moment, this bug prevents Derby from building cleanly under OpenJDK 8. I made some changes to get the classes to build, but the VerifyErrors kill the generation of toursdb, and that kills the Derby build. For the moment, it's probably best to work on the pieces of JDBC 4.2 which can be pushed into Derby's JDBC 3.0 implementation.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-01-aa-executeLargeUpdateEmbedded.diff. This patch adds the new Statement.executeLargeUpdate() methods introduced by JDBC 4.2. I am running tests now.

          This patch adds the following new methods to Derby's embedded JDBC 3.0 implementation of java.sql.Statement:

          public long executeLargeUpdate( String sql ) throws SQLException;
          public long executeLargeUpdate( String sql, int autoGeneratedKeys) throws SQLException;
          public long executeLargeUpdate( String sql, int[] columnIndexes ) throws SQLException;
          public long executeLargeUpdate( String sql, String[] columnNames ) throws SQLException;

          This involved three changes:

          1) Changing the type of the update counter from int to long.

          2) Adding the new methods.

          3) Forwarding the executeUpdate() overloads to the corresponding newly added executeLargeUpdate() overloads.

          I have put off adding regression tests until I have added parallel methods to the client JDBC implementation.

          Touches the following files:

          -----------------------

          M java/engine/org/apache/derby/iapi/sql/ResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java
          M java/engine/org/apache/derby/impl/sql/execute/RealResultSetStatisticsFactory.java
          M java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java
          M java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java

          Step (1).

          -----------------------

          M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java

          Steps (2) and (3).

          Show
          Rick Hillegas added a comment - Attaching derby-6000-01-aa-executeLargeUpdateEmbedded.diff. This patch adds the new Statement.executeLargeUpdate() methods introduced by JDBC 4.2. I am running tests now. This patch adds the following new methods to Derby's embedded JDBC 3.0 implementation of java.sql.Statement: public long executeLargeUpdate( String sql ) throws SQLException; public long executeLargeUpdate( String sql, int autoGeneratedKeys) throws SQLException; public long executeLargeUpdate( String sql, int[] columnIndexes ) throws SQLException; public long executeLargeUpdate( String sql, String[] columnNames ) throws SQLException; This involved three changes: 1) Changing the type of the update counter from int to long. 2) Adding the new methods. 3) Forwarding the executeUpdate() overloads to the corresponding newly added executeLargeUpdate() overloads. I have put off adding regression tests until I have added parallel methods to the client JDBC implementation. Touches the following files: ----------------------- M java/engine/org/apache/derby/iapi/sql/ResultSet.java M java/engine/org/apache/derby/impl/sql/execute/TemporaryRowHolderResultSet.java M java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java M java/engine/org/apache/derby/impl/sql/execute/BasicNoPutResultSetImpl.java M java/engine/org/apache/derby/impl/sql/execute/RealResultSetStatisticsFactory.java M java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java M java/engine/org/apache/derby/impl/sql/execute/DeleteResultSet.java M java/engine/org/apache/derby/impl/sql/execute/NoRowsResultSetImpl.java M java/engine/org/apache/derby/impl/sql/execute/UpdateResultSet.java Step (1). ----------------------- M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java Steps (2) and (3).
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-01-aa-executeLargeUpdateEmbedded.diff. Committed at subversion revision 1438600.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-01-aa-executeLargeUpdateEmbedded.diff. Committed at subversion revision 1438600.
          Hide
          Rick Hillegas added a comment - - edited

          Attaching derby-6000-02-ad-executeLargeUpdateClient.diff. This adds large update support to Statements in the client JDBC driver. I am running tests now.

          This adds the following method to the embedded driver:

          Statement.getLargeUpdateCount()

          ...and the following methods to the client driver:

          Statement.executeLargeUpdate( String )
          Statement.executeLargeUpdate( String, int )
          Statement.executeLargeUpdate( String, int[] )
          Statement.executeLargeUpdate( String, String[] )
          Statement.getLargeUpdateCount()

          The following changes are made:

          1) The update count on the client side is expanded from an int to a long.

          2) The update count is passed from the server to the client in the SQLCard descriptor. Previously, only an int sized update count was passed. Now a long sized update count is passed. This is done by leaving the low order 32 bits of the update count in the slot of the SQLCard which was previously used for the update count. Then the upper 32 bits are put in a previously unused slot of the SQLCard. This should mean that when clients and servers are at different revs, the client will still get the correct update count except in cases when the update count is greater than Integer.MAX_VALUE. In those oddball cases, the client used to receive garbage from the server. In these mixed rev situations, the client will continue to receive garbage for the update count if the number of updated rows exceeds Integer.MAX_VALUE.

          3) Magic numbers were eliminated when processing the SQLCard. Hopefully, this will make this code easier to study and debug.

          4) Factory methods were added for client-side BatchUpdateExceptions. These will be expanded when we add support for the new BatchUpdateException constructor added by JDBC 4.2.

          5) The new methods were added.

          6) The engine ResultSet code was tweaked to let tests force the engine to return absurdly large update counts. Otherwise, it is practically impossible to test the large update methods since this involves generating more than 2 billion rows for each test case.

          7) Tests were added for large updates for both the embedded and client drivers.

          Touches the following files:

          -----------------------

          M java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
          M java/client/org/apache/derby/client/am/PreparedStatement.java
          M java/client/org/apache/derby/client/am/Agent.java

          Changes for (1) and (2).

          -----------------------

          M java/client/org/apache/derby/client/net/NetConnectionReply.java
          M java/client/org/apache/derby/client/net/NetCursor.java
          M java/client/org/apache/derby/client/am/Sqlca.java

          Changes for (3).

          -----------------------

          M java/client/org/apache/derby/client/am/Utils.java
          M java/client/org/apache/derby/client/am/BatchUpdateException.java

          Changes for (4).

          -----------------------

          M java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
          M java/client/org/apache/derby/client/am/Statement.java
          M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
          M java/drda/org/apache/derby/impl/drda/DRDAStatement.java
          M java/client/org/apache/derby/client/am/LogicalStatementEntity.java

          Changes for (5).

          -----------------------

          M java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/RowUtil.java

          Changes for (6).

          -----------------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/XA40Test.java

          Changes for (7).

          Show
          Rick Hillegas added a comment - - edited Attaching derby-6000-02-ad-executeLargeUpdateClient.diff. This adds large update support to Statements in the client JDBC driver. I am running tests now. This adds the following method to the embedded driver: Statement.getLargeUpdateCount() ...and the following methods to the client driver: Statement.executeLargeUpdate( String ) Statement.executeLargeUpdate( String, int ) Statement.executeLargeUpdate( String, int[] ) Statement.executeLargeUpdate( String, String[] ) Statement.getLargeUpdateCount() The following changes are made: 1) The update count on the client side is expanded from an int to a long. 2) The update count is passed from the server to the client in the SQLCard descriptor. Previously, only an int sized update count was passed. Now a long sized update count is passed. This is done by leaving the low order 32 bits of the update count in the slot of the SQLCard which was previously used for the update count. Then the upper 32 bits are put in a previously unused slot of the SQLCard. This should mean that when clients and servers are at different revs, the client will still get the correct update count except in cases when the update count is greater than Integer.MAX_VALUE. In those oddball cases, the client used to receive garbage from the server. In these mixed rev situations, the client will continue to receive garbage for the update count if the number of updated rows exceeds Integer.MAX_VALUE. 3) Magic numbers were eliminated when processing the SQLCard. Hopefully, this will make this code easier to study and debug. 4) Factory methods were added for client-side BatchUpdateExceptions. These will be expanded when we add support for the new BatchUpdateException constructor added by JDBC 4.2. 5) The new methods were added. 6) The engine ResultSet code was tweaked to let tests force the engine to return absurdly large update counts. Otherwise, it is practically impossible to test the large update methods since this involves generating more than 2 billion rows for each test case. 7) Tests were added for large updates for both the embedded and client drivers. Touches the following files: ----------------------- M java/drda/org/apache/derby/impl/drda/DRDAConnThread.java M java/client/org/apache/derby/client/am/PreparedStatement.java M java/client/org/apache/derby/client/am/Agent.java Changes for (1) and (2). ----------------------- M java/client/org/apache/derby/client/net/NetConnectionReply.java M java/client/org/apache/derby/client/net/NetCursor.java M java/client/org/apache/derby/client/am/Sqlca.java Changes for (3). ----------------------- M java/client/org/apache/derby/client/am/Utils.java M java/client/org/apache/derby/client/am/BatchUpdateException.java Changes for (4). ----------------------- M java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java M java/client/org/apache/derby/client/am/Statement.java M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java M java/drda/org/apache/derby/impl/drda/DRDAStatement.java M java/client/org/apache/derby/client/am/LogicalStatementEntity.java Changes for (5). ----------------------- M java/engine/org/apache/derby/impl/sql/execute/DMLWriteResultSet.java M java/engine/org/apache/derby/impl/sql/execute/RowUtil.java Changes for (6). ----------------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/XA40Test.java Changes for (7).
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-02-ad-executeLargeUpdateClient.diff.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-02-ad-executeLargeUpdateClient.diff.
          Hide
          Rick Hillegas added a comment -

          Committed derby-6000-02-ad-executeLargeUpdateClient.diff at subversion revision 1439883.

          Show
          Rick Hillegas added a comment - Committed derby-6000-02-ad-executeLargeUpdateClient.diff at subversion revision 1439883.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-03-aa-executeLargeBatch.diff. This patch adds large batch support. I am running tests now.

          Adds the following method to the embedded and client drivers:

          Statement.executeLargeBatch()

          Most of the machinery needed for this was added as part of implementing large updates.

          Touches the following files:

          ----------

          M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
          M java/engine/org/apache/derby/impl/jdbc/Util.java

          Embedded changes.

          ----------

          M java/client/org/apache/derby/client/am/Statement.java
          M java/client/org/apache/derby/client/am/LogicalStatementEntity.java

          Client changes.

          ----------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
          M java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

          New tests.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-03-aa-executeLargeBatch.diff. This patch adds large batch support. I am running tests now. Adds the following method to the embedded and client drivers: Statement.executeLargeBatch() Most of the machinery needed for this was added as part of implementing large updates. Touches the following files: ---------- M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java M java/engine/org/apache/derby/impl/jdbc/Util.java Embedded changes. ---------- M java/client/org/apache/derby/client/am/Statement.java M java/client/org/apache/derby/client/am/LogicalStatementEntity.java Client changes. ---------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java M java/testing/org/apache/derbyTesting/junit/BaseTestCase.java New tests.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-03-aa-executeLargeBatch.diff. Committed at subversion revision 1440035.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-03-aa-executeLargeBatch.diff. Committed at subversion revision 1440035.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-04-aa-setLargeMaxRows.diff. This patch adds support for setting/getting large limits on returned row counts. I will run regression tests.

          This patch adds the following JDBC 4.2 methods to the embedded and client drivers:

          Statement.setLargeMaxRows( long )
          Statement.getLargeMaxRows()

          Mostly this involved changing the datatype of some variables from int to long and then adding the new methods. As with the previous patch, some debug entry points were added so that we can test the new methods without actually generating more than 2 billion rows.

          Touches the following files:

          ----------

          M java/engine/org/apache/derby/iapi/sql/Activation.java
          M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java
          M java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java
          M java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
          M java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java

          Embedded changes.

          ----------

          M java/client/org/apache/derby/client/am/Statement.java
          M java/client/org/apache/derby/client/am/Cursor.java
          M java/client/org/apache/derby/client/am/LogicalStatementEntity.java
          M java/client/org/apache/derby/client/am/ResultSet.java

          Client changes.

          ----------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java

          New tests.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-04-aa-setLargeMaxRows.diff. This patch adds support for setting/getting large limits on returned row counts. I will run regression tests. This patch adds the following JDBC 4.2 methods to the embedded and client drivers: Statement.setLargeMaxRows( long ) Statement.getLargeMaxRows() Mostly this involved changing the datatype of some variables from int to long and then adding the new methods. As with the previous patch, some debug entry points were added so that we can test the new methods without actually generating more than 2 billion rows. Touches the following files: ---------- M java/engine/org/apache/derby/iapi/sql/Activation.java M java/engine/org/apache/derby/iapi/jdbc/BrokeredStatement.java M java/engine/org/apache/derby/iapi/jdbc/EngineStatement.java M java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java M java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java M java/engine/org/apache/derby/impl/sql/GenericActivationHolder.java M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java Embedded changes. ---------- M java/client/org/apache/derby/client/am/Statement.java M java/client/org/apache/derby/client/am/Cursor.java M java/client/org/apache/derby/client/am/LogicalStatementEntity.java M java/client/org/apache/derby/client/am/ResultSet.java Client changes. ---------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java New tests.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-04-aa-setLargeMaxRows.diff. Committed at subversion revision 1440656.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-04-aa-setLargeMaxRows.diff. Committed at subversion revision 1440656.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-05-aa-executeLargeUpdatePS.diff. This patch adds JDBC 4.2 large update support to PreparedStatements. I am running tests now.

          This patch adds the following method to the embedded and client implementations of PreparedStatement:

          public long executeLargeUpdate()

          Touches the following files:

          --------------

          M java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java
          M java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java

          Embedded changes.

          --------------

          M java/client/org/apache/derby/client/am/PreparedStatement.java
          M java/client/org/apache/derby/client/am/LogicalPreparedStatement.java

          Client changes.

          --------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java

          New tests.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-05-aa-executeLargeUpdatePS.diff. This patch adds JDBC 4.2 large update support to PreparedStatements. I am running tests now. This patch adds the following method to the embedded and client implementations of PreparedStatement: public long executeLargeUpdate() Touches the following files: -------------- M java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement.java M java/engine/org/apache/derby/iapi/jdbc/EnginePreparedStatement.java M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java Embedded changes. -------------- M java/client/org/apache/derby/client/am/PreparedStatement.java M java/client/org/apache/derby/client/am/LogicalPreparedStatement.java Client changes. -------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest.java New tests.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-05-aa-executeLargeUpdatePS.diff. Committed at subversion revision 1441088.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-05-aa-executeLargeUpdatePS.diff. Committed at subversion revision 1441088.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-06-aa-DatabaseMetaData.diff. This patch makes the JDBC 4.2 changes to DatabaseMetaData. I will run regression tests.

          This patch makes the following changes to the embedded and client drivers:

          1) Changes the datatype of the CARDINALITY and PAGES columns returned by getIndexInfo(). The column types are changed from INT to BIGINT.

          2) Adds a getMaxLogicalLOBSize() method. This method is supposed to return the maximum size of a LOB in bytes. For Derby that is the maximum size of a CLOB. A CLOB can have Integer.MAX_VALUE chars, which works out to Integer.MAX_VALUE * 2 bytes.

          3) Adds a supportsRefCursors() method. This returns false because Derby does not support the Types.REF_CURSOR type.

          Touches the following files:

          --------------

          M java/engine/org/apache/derby/iapi/reference/Limits.java
          M java/engine/org/apache/derby/impl/jdbc/metadata.properties
          M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java

          Embedded changes.

          --------------

          M java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java
          M java/client/org/apache/derby/client/am/DatabaseMetaData.java

          Client changes.

          --------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper41DBMD.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
          A java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper42DBMD.java

          Tests.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-06-aa-DatabaseMetaData.diff. This patch makes the JDBC 4.2 changes to DatabaseMetaData. I will run regression tests. This patch makes the following changes to the embedded and client drivers: 1) Changes the datatype of the CARDINALITY and PAGES columns returned by getIndexInfo(). The column types are changed from INT to BIGINT. 2) Adds a getMaxLogicalLOBSize() method. This method is supposed to return the maximum size of a LOB in bytes. For Derby that is the maximum size of a CLOB. A CLOB can have Integer.MAX_VALUE chars, which works out to Integer.MAX_VALUE * 2 bytes. 3) Adds a supportsRefCursors() method. This returns false because Derby does not support the Types.REF_CURSOR type. Touches the following files: -------------- M java/engine/org/apache/derby/iapi/reference/Limits.java M java/engine/org/apache/derby/impl/jdbc/metadata.properties M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java Embedded changes. -------------- M java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java M java/client/org/apache/derby/client/am/DatabaseMetaData.java Client changes. -------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper41DBMD.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java A java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper42DBMD.java Tests.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-06-aa-DatabaseMetaData.diff except for the heisenbug in NetworkServerControlClientCommandTest. testPingWithWrongHost.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-06-aa-DatabaseMetaData.diff except for the heisenbug in NetworkServerControlClientCommandTest. testPingWithWrongHost.
          Hide
          Rick Hillegas added a comment -

          Committed derby-6000-06-aa-DatabaseMetaData.diff at subversion revision 1441436.

          Show
          Rick Hillegas added a comment - Committed derby-6000-06-aa-DatabaseMetaData.diff at subversion revision 1441436.
          Hide
          Rick Hillegas added a comment - - edited

          Attaching derby-6000-07-ab-batchUpdateException.diff. This patch adds support for the new constructor and accessor method added by JDBC 4.2 to BatchUpdateException. I am running tests now.

          The build and the new tests seem to work on Java 7. In addition, I can build the new support on Java 8. However, I can't test on Java 8 because of http://bugs.sun.com/view_bug.do?bug_id=8004967. So this patch will have to be re-built and tested with Java 8 once http://bugs.sun.com/view_bug.do?bug_id=8004967 is fixed.

          This patch makes Derby create BatchUpdateExceptions with the following new constructor when running on Java 8. This is a constructor which treats the update counts as longs rather than ints:

          public BatchUpdateException
          (
          java.lang.String reason,
          java.lang.String SQLState,
          int vendorCode,
          long[] updateCounts,
          java.lang.Throwable cause
          )

          In addition, this patch tests that the correct values are returned by the following new accessor method which JDBC 4.2 added to BatchUpdateException:

          public long[] getLargeUpdateCounts()

          This patch makes the following changes:

          1) Simple change to the embedded driver.

          2) For the client driver, the patch eliminates Derby's special subclass of BatchUpdateException. Instead, the patch introduces a factory method which invokes the correct BatchUpdateException depending on the VM level.

          3) For the client driver, build changes were necessary in order to compile a ClientJDBCObjectFactory for Java 8. This factory will be expanded as other JDBC 4.2 extensions are added.

          4) Revamps the batch update tests to evaluate the new BatchUpdateException accessor method when running on Java 8. Also adds a new test to verify BatchUpdateException behavior when your batches generate very large update counts.

          Touches the following files:

          -------------

          M java/engine/org/apache/derby/impl/jdbc/Util.java

          Changes for (1).

          -------------

          M java/client/org/apache/derby/jdbc/ClientDriver.java
          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
          A java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
          M java/client/org/apache/derby/client/am/Statement.java
          M java/client/org/apache/derby/client/am/Configuration.java
          M java/client/org/apache/derby/client/am/PreparedStatement.java
          D java/client/org/apache/derby/client/am/BatchUpdateException.java
          M java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java
          M java/client/org/apache/derby/client/am/Agent.java

          Changes for (2).

          -------------

          M java/client/build.xml
          M build.xml
          A tools/jar/dnc.1.8.properties

          Changes for (3).

          -------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java
          M java/testing/org/apache/derbyTesting/junit/BaseTestCase.java

          Changes for (4).

          Show
          Rick Hillegas added a comment - - edited Attaching derby-6000-07-ab-batchUpdateException.diff. This patch adds support for the new constructor and accessor method added by JDBC 4.2 to BatchUpdateException. I am running tests now. The build and the new tests seem to work on Java 7. In addition, I can build the new support on Java 8. However, I can't test on Java 8 because of http://bugs.sun.com/view_bug.do?bug_id=8004967 . So this patch will have to be re-built and tested with Java 8 once http://bugs.sun.com/view_bug.do?bug_id=8004967 is fixed. This patch makes Derby create BatchUpdateExceptions with the following new constructor when running on Java 8. This is a constructor which treats the update counts as longs rather than ints: public BatchUpdateException ( java.lang.String reason, java.lang.String SQLState, int vendorCode, long[] updateCounts, java.lang.Throwable cause ) In addition, this patch tests that the correct values are returned by the following new accessor method which JDBC 4.2 added to BatchUpdateException: public long[] getLargeUpdateCounts() This patch makes the following changes: 1) Simple change to the embedded driver. 2) For the client driver, the patch eliminates Derby's special subclass of BatchUpdateException. Instead, the patch introduces a factory method which invokes the correct BatchUpdateException depending on the VM level. 3) For the client driver, build changes were necessary in order to compile a ClientJDBCObjectFactory for Java 8. This factory will be expanded as other JDBC 4.2 extensions are added. 4) Revamps the batch update tests to evaluate the new BatchUpdateException accessor method when running on Java 8. Also adds a new test to verify BatchUpdateException behavior when your batches generate very large update counts. Touches the following files: ------------- M java/engine/org/apache/derby/impl/jdbc/Util.java Changes for (1). ------------- M java/client/org/apache/derby/jdbc/ClientDriver.java M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java A java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java M java/client/org/apache/derby/client/am/Statement.java M java/client/org/apache/derby/client/am/Configuration.java M java/client/org/apache/derby/client/am/PreparedStatement.java D java/client/org/apache/derby/client/am/BatchUpdateException.java M java/client/org/apache/derby/client/am/ClientJDBCObjectFactory.java M java/client/org/apache/derby/client/am/Agent.java Changes for (2). ------------- M java/client/build.xml M build.xml A tools/jar/dnc.1.8.properties Changes for (3). ------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/StatementTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BatchUpdateTest.java M java/testing/org/apache/derbyTesting/junit/BaseTestCase.java Changes for (4).
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-07-ab-batchUpdateException.diff. Committed at subversion revision 1442195.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-07-ab-batchUpdateException.diff. Committed at subversion revision 1442195.
          Hide
          Rick Hillegas added a comment - - edited

          Attaching derby-6000-08-aa-batchUpdateExceptionConstructor.diff. This patch adjusts how Derby constructs BatchUpdateExceptions. I am running tests now.

          Despite http://bugs.sun.com/view_bug.do?bug_id=8004967 , you can test on Open JDK 8 by specifying the -noverify switch on the java command line. When I did this, I tripped across errors in the BatchUpdateTests caused by this behavior of BatchUpdateException:

          o If you use the new constructor which takes long update counts, then you can't use initCause() to poke a cause into the BatchUpdateException.

          This patch fixes those errors by reworking how Derby constructs BatchUpdateExceptions.

          Touches the following files:

          ------------

          M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java
          M java/engine/org/apache/derby/impl/jdbc/Util.java

          Embedded changes.

          ------------

          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java
          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java

          Client changes.

          Show
          Rick Hillegas added a comment - - edited Attaching derby-6000-08-aa-batchUpdateExceptionConstructor.diff. This patch adjusts how Derby constructs BatchUpdateExceptions. I am running tests now. Despite http://bugs.sun.com/view_bug.do?bug_id=8004967 , you can test on Open JDK 8 by specifying the -noverify switch on the java command line. When I did this, I tripped across errors in the BatchUpdateTests caused by this behavior of BatchUpdateException: o If you use the new constructor which takes long update counts, then you can't use initCause() to poke a cause into the BatchUpdateException. This patch fixes those errors by reworking how Derby constructs BatchUpdateExceptions. Touches the following files: ------------ M java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java M java/engine/org/apache/derby/impl/jdbc/Util.java Embedded changes. ------------ M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl.java M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java Client changes.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-08-aa-batchUpdateExceptionConstructor.diff. Committed at subversion revision 1443086.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-08-aa-batchUpdateExceptionConstructor.diff. Committed at subversion revision 1443086.
          Hide
          Knut Anders Hatlen added a comment -

          derby-6000-06-aa-DatabaseMetaData.diff added a DatabaseMetaData method named getMaxLogicalLOBSize(). In my copy of OpenJDK, it is actually called getMaxLogicalLobSize(), so I guess it needs to be renamed.

          The javadoc in the specification says it returns "the maximum number of bytes this database allows for the logical size for a LOB." For a CLOB, I'd say the number of bytes would be the physical size, not the logical size, so I'm not sure exactly what we should return here. The patch assumes UTF-16 with two bytes per character, which matches the in-memory representation. On disk, CLOBs are stored in UTF-8, which may have more than two bytes per character.

          Right now we return 4294967294. But we don't allow BLOBs to be more than 2147483647 bytes. Could this trick applications into attempting to create tables with BLOB columns whose declared size is greater than the maximum length?

          4294967294 is the maximum number of bytes we could possibly accept (assuming CLOBs are UTF-16 encoded) in a LOB column, but we don't always accept that many bytes.

          2147483647 is the maximum number of bytes we know we can always accept in a LOB column.

          Returning the latter number would have been more in line with my expectation of how that method should work, I think. But I agree that the implemented behaviour is a just as reasonable interpretation of the words in the spec. I suppose the text was written for databases that store CLOBs as BLOBs internally, and whose maximum CLOB size is limited by the maximum number of bytes a BLOB can hold.

          Show
          Knut Anders Hatlen added a comment - derby-6000-06-aa-DatabaseMetaData.diff added a DatabaseMetaData method named getMaxLogicalLOBSize(). In my copy of OpenJDK, it is actually called getMaxLogicalLobSize(), so I guess it needs to be renamed. The javadoc in the specification says it returns "the maximum number of bytes this database allows for the logical size for a LOB." For a CLOB, I'd say the number of bytes would be the physical size, not the logical size, so I'm not sure exactly what we should return here. The patch assumes UTF-16 with two bytes per character, which matches the in-memory representation. On disk, CLOBs are stored in UTF-8, which may have more than two bytes per character. Right now we return 4294967294. But we don't allow BLOBs to be more than 2147483647 bytes. Could this trick applications into attempting to create tables with BLOB columns whose declared size is greater than the maximum length? 4294967294 is the maximum number of bytes we could possibly accept (assuming CLOBs are UTF-16 encoded) in a LOB column, but we don't always accept that many bytes. 2147483647 is the maximum number of bytes we know we can always accept in a LOB column. Returning the latter number would have been more in line with my expectation of how that method should work, I think. But I agree that the implemented behaviour is a just as reasonable interpretation of the words in the spec. I suppose the text was written for databases that store CLOBs as BLOBs internally, and whose maximum CLOB size is limited by the maximum number of bytes a BLOB can hold.
          Hide
          Rick Hillegas added a comment -

          Thanks for looking at that patch, Knut. I was working from the specdiffs, which give the method name as getMaxLogicalLOBSize(). I've tripped across some other cases where names in the specdiffs don't agree with what's in the actual Open JDK 8 classes. I'll correct this one.

          I'll ask Lance if he has any advice about what this method should return on Derby. Seems to me there are at least 2 theories about this:

          o 4294967294 - The maximum number of bytes which an in-memory CLOB can consume. This is misleading for people interested in the maximum number of bytes which can be stored in the database.

          o 2147483647 - The maximum number of bytes in a LOB stored in the database. This is misleading for people who are interested in the memory representation.

          Thanks,
          -Rick

          Show
          Rick Hillegas added a comment - Thanks for looking at that patch, Knut. I was working from the specdiffs, which give the method name as getMaxLogicalLOBSize(). I've tripped across some other cases where names in the specdiffs don't agree with what's in the actual Open JDK 8 classes. I'll correct this one. I'll ask Lance if he has any advice about what this method should return on Derby. Seems to me there are at least 2 theories about this: o 4294967294 - The maximum number of bytes which an in-memory CLOB can consume. This is misleading for people interested in the maximum number of bytes which can be stored in the database. o 2147483647 - The maximum number of bytes in a LOB stored in the database. This is misleading for people who are interested in the memory representation. Thanks, -Rick
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-09-ac-setObjectPS.diff. This patch adds support for the new PreparedStatement.setObject() overloads added by JDBC 4.2. I am running tests now.

          Adds the following methods to the embedded and client drivers:

          PreparedStatement.setObject(int parameterIndex, java.lang.Object x, SQLType targetSqlType)
          PreparedStatement.setObject(int parameterIndex, java.lang.Object x, SQLType targetSqlType, int scaleOrLength)

          The new overloads implement the following logic:

          a) Raise an exception if SQLType is not a JDBCType whose corresponding type in java.sql.Types is supported by Derby.

          b) Otherwise forward the call to the corresponding setObject() overload, using the corresponding type from java.sql.Types.

          This patch adds a new JDBC 4.2 module to the engine. Additional JDBC 4.2 work can expand this module. Some temporary build logic has been added to allow the build to succeed if you are building with a version of Java before version 8. We can remove this temporary logic once Java 8 goes live and we can create JDBC 4.2 stubs parallel to the stubs for previous JDBC versions.

          Touches the following files:

          ----------

          M java/build/org/apache/derbyBuild/classlister.java
          M java/engine/org/apache/derby/iapi/jdbc/build.xml
          M java/engine/org/apache/derby/impl/jdbc/build.xml
          M java/engine/org/apache/derby/jdbc/build.xml
          M java/engine/org/apache/derby/modules.properties
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml

          Build logic.

          ----------

          M java/engine/org/apache/derby/iapi/types/HarmonySerialBlob.java
          M java/engine/org/apache/derby/iapi/types/SQLBlob.java

          Removed an unneeded exception declaration from a HarmonySerialBlob constructor.

          ----------

          M java/shared/org/apache/derby/shared/common/reference/JDBC40Translation.java
          M java/engine/org/apache/derby/iapi/types/TypeId.java

          JDBC 4.2 adds a new type id: REF_CURSOR.

          ----------

          M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
          A java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection42.java
          A java/engine/org/apache/derby/jdbc/Driver42.java

          New JDBC 4.2 engine module.

          ----------

          M java/client/org/apache/derby/client/am/CrossConverters.java

          The tests for this patch tripped over an existing bug in the client driver: PreparedStatement.setObject( int, Object, int ) fails if you are trying to set a UDT. The simpler overload of this method (setObject( int, Object )) was tested and worked. I have added a little logic to make the failing overload work in this case. The overload which used to fail is tested by the new tests added for this feature.

          ----------

          A java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement42.java
          A java/engine/org/apache/derby/impl/jdbc/Util42.java
          A java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement42.java
          M java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java
          M java/engine/org/apache/derby/impl/jdbc/Util.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java

          Embedded support for the new PreparedStatement.setObject() overloads.

          ----------

          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
          M java/client/org/apache/derby/client/am/PreparedStatement.java
          A java/client/org/apache/derby/client/am/LogicalPreparedStatement42.java
          A java/client/org/apache/derby/client/am/PreparedStatement42.java
          A java/client/org/apache/derby/client/am/Utils42.java

          Client support for the new PreparedStatement.setObject() overloads.

          ----------

          M java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/_Suite.java
          A java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

          Tests for the new overloads. The tests execute if you are running on Java 8 or higher.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-09-ac-setObjectPS.diff. This patch adds support for the new PreparedStatement.setObject() overloads added by JDBC 4.2. I am running tests now. Adds the following methods to the embedded and client drivers: PreparedStatement.setObject(int parameterIndex, java.lang.Object x, SQLType targetSqlType) PreparedStatement.setObject(int parameterIndex, java.lang.Object x, SQLType targetSqlType, int scaleOrLength) The new overloads implement the following logic: a) Raise an exception if SQLType is not a JDBCType whose corresponding type in java.sql.Types is supported by Derby. b) Otherwise forward the call to the corresponding setObject() overload, using the corresponding type from java.sql.Types. This patch adds a new JDBC 4.2 module to the engine. Additional JDBC 4.2 work can expand this module. Some temporary build logic has been added to allow the build to succeed if you are building with a version of Java before version 8. We can remove this temporary logic once Java 8 goes live and we can create JDBC 4.2 stubs parallel to the stubs for previous JDBC versions. Touches the following files: ---------- M java/build/org/apache/derbyBuild/classlister.java M java/engine/org/apache/derby/iapi/jdbc/build.xml M java/engine/org/apache/derby/impl/jdbc/build.xml M java/engine/org/apache/derby/jdbc/build.xml M java/engine/org/apache/derby/modules.properties M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/build.xml Build logic. ---------- M java/engine/org/apache/derby/iapi/types/HarmonySerialBlob.java M java/engine/org/apache/derby/iapi/types/SQLBlob.java Removed an unneeded exception declaration from a HarmonySerialBlob constructor. ---------- M java/shared/org/apache/derby/shared/common/reference/JDBC40Translation.java M java/engine/org/apache/derby/iapi/types/TypeId.java JDBC 4.2 adds a new type id: REF_CURSOR. ---------- M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java A java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection42.java A java/engine/org/apache/derby/jdbc/Driver42.java New JDBC 4.2 engine module. ---------- M java/client/org/apache/derby/client/am/CrossConverters.java The tests for this patch tripped over an existing bug in the client driver: PreparedStatement.setObject( int, Object, int ) fails if you are trying to set a UDT. The simpler overload of this method (setObject( int, Object )) was tested and worked. I have added a little logic to make the failing overload work in this case. The overload which used to fail is tested by the new tests added for this feature. ---------- A java/engine/org/apache/derby/iapi/jdbc/BrokeredPreparedStatement42.java A java/engine/org/apache/derby/impl/jdbc/Util42.java A java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement42.java M java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java M java/engine/org/apache/derby/impl/jdbc/Util.java M java/engine/org/apache/derby/impl/jdbc/EmbedPreparedStatement.java Embedded support for the new PreparedStatement.setObject() overloads. ---------- M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java M java/client/org/apache/derby/client/am/PreparedStatement.java A java/client/org/apache/derby/client/am/LogicalPreparedStatement42.java A java/client/org/apache/derby/client/am/PreparedStatement42.java A java/client/org/apache/derby/client/am/Utils42.java Client support for the new PreparedStatement.setObject() overloads. ---------- M java/testing/org/apache/derbyTesting/functionTests/tests/lang/Price.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/_Suite.java A java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java Tests for the new overloads. The tests execute if you are running on Java 8 or higher.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-09-ac-setObjectPS.diff. Committed at subversion revision 1443697.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-09-ac-setObjectPS.diff. Committed at subversion revision 1443697.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-10-aa-rename_getMaxLogicalLobSize.diff. This patch renames DatabaseMetaData.getMaxLogicalLOBSize() to getMaxLogicalLobSize(). Committed at subversion revision 1443712.

          Touches the following files:

          M java/engine/org/apache/derby/iapi/reference/Limits.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper42DBMD.java
          M java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java
          M java/client/org/apache/derby/client/am/DatabaseMetaData.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-10-aa-rename_getMaxLogicalLobSize.diff. This patch renames DatabaseMetaData.getMaxLogicalLOBSize() to getMaxLogicalLobSize(). Committed at subversion revision 1443712. Touches the following files: M java/engine/org/apache/derby/iapi/reference/Limits.java M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/Wrapper42DBMD.java M java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java M java/client/org/apache/derby/client/am/DatabaseMetaData.java
          Hide
          Kristian Waagan added a comment -

          > I'll ask Lance if he has any advice about what this method should return on Derby.
          > Seems to me there are at least 2 theories about this:
          >
          > o 4294967294 - The maximum number of bytes which an in-memory CLOB can consume.
          > This is misleading for people interested in the maximum number of bytes which can be stored in the database.
          >
          > o 2147483647 - The maximum number of bytes in a LOB stored in the database.
          > This is misleading for people who are interested in the memory representation.

          My take on this is that people would use this method to figure out how big LOBs they can store in the database. I don't think they care about representation (i.e. on-disk vs in-memory). This gives rise to two questions:
          a) How many bytes can I stuff into a single BLOB?
          b) How many characters can I stuff into a single CLOB?

          I hope the above is the intention of the method - I fail to immediately see any other meaningful uses of it.

          The answers to (a) and (b) may be different for some databases, for instance because the DBMS has an internal limitation on how many bytes it can store/handle. Combined with the fact that one character doesn't always equal one byte, that could make the maximum size of a CLOB data dependent (i.e. storing English vs Chinese text).

          Show
          Kristian Waagan added a comment - > I'll ask Lance if he has any advice about what this method should return on Derby. > Seems to me there are at least 2 theories about this: > > o 4294967294 - The maximum number of bytes which an in-memory CLOB can consume. > This is misleading for people interested in the maximum number of bytes which can be stored in the database. > > o 2147483647 - The maximum number of bytes in a LOB stored in the database. > This is misleading for people who are interested in the memory representation. My take on this is that people would use this method to figure out how big LOBs they can store in the database. I don't think they care about representation (i.e. on-disk vs in-memory). This gives rise to two questions: a) How many bytes can I stuff into a single BLOB? b) How many characters can I stuff into a single CLOB? I hope the above is the intention of the method - I fail to immediately see any other meaningful uses of it. The answers to (a) and (b) may be different for some databases, for instance because the DBMS has an internal limitation on how many bytes it can store/handle. Combined with the fact that one character doesn't always equal one byte, that could make the maximum size of a CLOB data dependent (i.e. storing English vs Chinese text).
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-11-aa-ResultSet.updateObject.diff. This patch adds the new ResultSet methods introduced by JDBC 4.2. I am running regression tests now.

          This patch adds the following new methods to the embedded and client implementations of java.sql.ResultSet:

          public void updateObject( int columnIndex, Object x, SQLType targetSqlType )
          public void updateObject( int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength )
          public void updateObject( String columnName, Object x, SQLType targetSqlType )
          public void updateObject( String columnName, Object x, SQLType targetSqlType, int scaleOrLength )

          Touches the following files:

          -------------

          M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java
          A java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java
          M java/engine/org/apache/derby/jdbc/Driver42.java

          Embedded changes.

          -------------

          A java/client/org/apache/derby/client/net/NetResultSet42.java
          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java

          Client changes.

          -------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

          Tests for new methods.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-11-aa-ResultSet.updateObject.diff. This patch adds the new ResultSet methods introduced by JDBC 4.2. I am running regression tests now. This patch adds the following new methods to the embedded and client implementations of java.sql.ResultSet: public void updateObject( int columnIndex, Object x, SQLType targetSqlType ) public void updateObject( int columnIndex, Object x, SQLType targetSqlType, int scaleOrLength ) public void updateObject( String columnName, Object x, SQLType targetSqlType ) public void updateObject( String columnName, Object x, SQLType targetSqlType, int scaleOrLength ) Touches the following files: ------------- M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet.java A java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java M java/engine/org/apache/derby/jdbc/Driver42.java Embedded changes. ------------- A java/client/org/apache/derby/client/net/NetResultSet42.java M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java Client changes. ------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java Tests for new methods.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-11-aa-ResultSet.updateObject.diff. Committed at subversion revision 1444210.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-11-aa-ResultSet.updateObject.diff. Committed at subversion revision 1444210.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-12-aa-CallableStatement.registerOutParameter.diff. This patch adds the new JDBC 4.2 registerOutParameter overloads to CallableStatement. I am running tests now.

          This patch adds the following new overloads to the embedded and client implementations of java.sql.CallableStatement:

          public void registerOutParameter(int parameterIndex, SQLType sqlType)
          public void registerOutParameter(int parameterIndex, SQLType sqlType,int scale)
          public void registerOutParameter(int parameterIndex, SQLType sqlType, java.lang.String typeName)
          public void registerOutParameter(java.lang.String parameterName, SQLType sqlType)
          public void registerOutParameter(java.lang.String parameterName, SQLType sqlType, int scale)
          public void registerOutParameter(java.lang.String parameterName, SQLType sqlType, java.lang.String typeName)

          This patch also corrects the behavior of the following CallableStatement methods. Derby was throwing an "unimplemented feature" exception. For drivers which don't need the typeName argument, the correct behavior is to ignore it:

          public void registerOutParameter(int parameterIndex, int sqlType, java.lang.String typeName)
          public void registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName)

          Touches the following files:

          -------------

          A java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement42.java
          M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java
          M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection42.java
          A java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java
          M java/engine/org/apache/derby/jdbc/Driver42.java

          Embedded changes.

          -------------

          M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java
          A java/client/org/apache/derby/client/am/LogicalCallableStatement42.java
          A java/client/org/apache/derby/client/am/CallableStatement42.java
          M java/client/org/apache/derby/client/am/CallableStatement.java

          Client changes.

          -------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/XA40Test.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

          New tests. At this point, PreparedStatementTest42 should probably be renamed to something like SQLTypeTest42. That can be done in a later patch.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-12-aa-CallableStatement.registerOutParameter.diff. This patch adds the new JDBC 4.2 registerOutParameter overloads to CallableStatement. I am running tests now. This patch adds the following new overloads to the embedded and client implementations of java.sql.CallableStatement: public void registerOutParameter(int parameterIndex, SQLType sqlType) public void registerOutParameter(int parameterIndex, SQLType sqlType,int scale) public void registerOutParameter(int parameterIndex, SQLType sqlType, java.lang.String typeName) public void registerOutParameter(java.lang.String parameterName, SQLType sqlType) public void registerOutParameter(java.lang.String parameterName, SQLType sqlType, int scale) public void registerOutParameter(java.lang.String parameterName, SQLType sqlType, java.lang.String typeName) This patch also corrects the behavior of the following CallableStatement methods. Derby was throwing an "unimplemented feature" exception. For drivers which don't need the typeName argument, the correct behavior is to ignore it: public void registerOutParameter(int parameterIndex, int sqlType, java.lang.String typeName) public void registerOutParameter(java.lang.String parameterName, int sqlType, java.lang.String typeName) Touches the following files: ------------- A java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement42.java M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection40.java M java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection42.java A java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java M java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement.java M java/engine/org/apache/derby/jdbc/Driver42.java Embedded changes. ------------- M java/client/org/apache/derby/client/net/ClientJDBCObjectFactoryImpl42.java A java/client/org/apache/derby/client/am/LogicalCallableStatement42.java A java/client/org/apache/derby/client/am/CallableStatement42.java M java/client/org/apache/derby/client/am/CallableStatement.java Client changes. ------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/XA40Test.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java New tests. At this point, PreparedStatementTest42 should probably be renamed to something like SQLTypeTest42. That can be done in a later patch.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly except that they stumbled over a case which canonized the previous wrong behavior of CallableStatement.registerOutParameter(int, int, String). The first rev of this patch corrected the behavior of that method. The wrong behavior canon was added by work on DERBY-1184.

          Attaching a new version of the patch, which removes the offending test case: derby-6000-12-ab-CallableStatement.registerOutParameter. Committed at subversion revision 1444960.

          Touches the following additional file:

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java

          Show
          Rick Hillegas added a comment - Tests passed cleanly except that they stumbled over a case which canonized the previous wrong behavior of CallableStatement.registerOutParameter(int, int, String). The first rev of this patch corrected the behavior of that method. The wrong behavior canon was added by work on DERBY-1184 . Attaching a new version of the patch, which removes the offending test case: derby-6000-12-ab-CallableStatement.registerOutParameter. Committed at subversion revision 1444960. Touches the following additional file: M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/CallableTest.java
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-13-aa-fixJavadoc.diff. This patch fixes the javadoc when built on Java 7. Committed at subversion revision 1445196.

          Myrna noticed that the automated javadoc builds were spewing pages of warnings caused by the fact that the Java 7 javadoc tool can't find the new java.sql classes referenced by the *42 Derby classes. This patch makes the javadoc build exclude the Derby *42 classes. After applying this patch, the javadoc builds cleanly for me on Java 7.

          Note that the javadoc does not build cleanly on Java 8. I see pages of warnings because of missing @param and @throws annotations. I regard that as a separate problem which deserves its own patch.

          Touches the following files:

          M build.xml
          A tools/javadoc/derbydocs_java8_exclusions.ant
          M tools/javadoc/derbydocs_exclusions.ant

          Show
          Rick Hillegas added a comment - Attaching derby-6000-13-aa-fixJavadoc.diff. This patch fixes the javadoc when built on Java 7. Committed at subversion revision 1445196. Myrna noticed that the automated javadoc builds were spewing pages of warnings caused by the fact that the Java 7 javadoc tool can't find the new java.sql classes referenced by the *42 Derby classes. This patch makes the javadoc build exclude the Derby *42 classes. After applying this patch, the javadoc builds cleanly for me on Java 7. Note that the javadoc does not build cleanly on Java 8. I see pages of warnings because of missing @param and @throws annotations. I regard that as a separate problem which deserves its own patch. Touches the following files: M build.xml A tools/javadoc/derbydocs_java8_exclusions.ant M tools/javadoc/derbydocs_exclusions.ant
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-14-aa-unsupportedVetter.diff. This patch excludes some new JDBC 4.2 methods from the checks performed by the UnsupportedVetter test. Committed at subversion revision 1445235.

          Previously, this test excluded all overloads of CallableStatement.registerOutParameter() which identified the parameter by its string name. JDBC 4.2 adds 3 more overloads of this sort. The patch excludes those overloads.

          After applying this patch, UnsupportedVetter continues to fail on Java 8. It correctly flags the couple remaining JDBC 4.2 methods which have not been implemented yet.

          UnsupportedVetter continues to run cleanly on Java 7.

          Touches the following file:

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-14-aa-unsupportedVetter.diff. This patch excludes some new JDBC 4.2 methods from the checks performed by the UnsupportedVetter test. Committed at subversion revision 1445235. Previously, this test excluded all overloads of CallableStatement.registerOutParameter() which identified the parameter by its string name. JDBC 4.2 adds 3 more overloads of this sort. The patch excludes those overloads. After applying this patch, UnsupportedVetter continues to fail on Java 8. It correctly flags the couple remaining JDBC 4.2 methods which have not been implemented yet. UnsupportedVetter continues to run cleanly on Java 7. Touches the following file: M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-15-aa-CallableStatement.setObject.diff. This patch adds the new CallableStatement.setObject() overloads introduced by JDBC 4.2. I am running tests now.

          This patch adds the following methods to the embedded and client implementations of CallableStatement:

          public void setObject( int parameterIndex, java.lang.Object x, SQLType targetSqlType )
          public void setObject( int parameterIndex, java.lang.Object x, SQLType targetSqlType, int scaleOrLength )
          public void setObject( String parameterName, Object x, SQLType sqlType )
          public void setObject( String parameterName, Object x, SQLType sqlType, int scaleOrLength )

          Touches the following files:

          -------------

          M java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement42.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java

          Embedded changes.

          -------------

          M java/client/org/apache/derby/client/am/LogicalCallableStatement42.java
          M java/client/org/apache/derby/client/am/CallableStatement42.java

          Client changes.

          -------------

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

          Tests.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-15-aa-CallableStatement.setObject.diff. This patch adds the new CallableStatement.setObject() overloads introduced by JDBC 4.2. I am running tests now. This patch adds the following methods to the embedded and client implementations of CallableStatement: public void setObject( int parameterIndex, java.lang.Object x, SQLType targetSqlType ) public void setObject( int parameterIndex, java.lang.Object x, SQLType targetSqlType, int scaleOrLength ) public void setObject( String parameterName, Object x, SQLType sqlType ) public void setObject( String parameterName, Object x, SQLType sqlType, int scaleOrLength ) Touches the following files: ------------- M java/engine/org/apache/derby/iapi/jdbc/BrokeredCallableStatement42.java M java/engine/org/apache/derby/impl/jdbc/EmbedCallableStatement42.java Embedded changes. ------------- M java/client/org/apache/derby/client/am/LogicalCallableStatement42.java M java/client/org/apache/derby/client/am/CallableStatement42.java Client changes. ------------- M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java Tests.
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-15-aa-CallableStatement.setObject.diff. Committed at subversion revision 1445327.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-15-aa-CallableStatement.setObject.diff. Committed at subversion revision 1445327.
          Hide
          Rick Hillegas added a comment -

          Concerning DatabaseMetaData.getMaxLogicalLobSize(), JDBC spec lead Lance Andersen suggests that Derby should return 0, the default, which means "unknown".

          Show
          Rick Hillegas added a comment - Concerning DatabaseMetaData.getMaxLogicalLobSize(), JDBC spec lead Lance Andersen suggests that Derby should return 0, the default, which means "unknown".
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-16-aa-fixJavadocOnJava8.diff. This patch fixes the javadoc build on Java 8. Committed at subversion revision 1445393.

          There were 2 problems in the javadoc build on Java 8:

          1) The spew of warnings about missing @throws and @param annotations was caused by http://openjdk.java.net/jeps/172 . It can be turned off by adding a -Xdoclint:none to the javadoc invocation.

          2) Then there were a bunch of complaints that the standalone _ character may not be a legal identifier in future revs of Java. This is fixed by replacing _ with another character in all of the test tables where we were using _ to mean "false" or "unknown".

          After applying this patch, I can build javadoc cleanly on Java 7 and Java 8.

          Touches the following files:

          M java/testing/org/apache/derbyTesting/functionTests/tests/lang/CastingTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LobRsGetterTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java
          M build.xml

          Show
          Rick Hillegas added a comment - Attaching derby-6000-16-aa-fixJavadocOnJava8.diff. This patch fixes the javadoc build on Java 8. Committed at subversion revision 1445393. There were 2 problems in the javadoc build on Java 8: 1) The spew of warnings about missing @throws and @param annotations was caused by http://openjdk.java.net/jeps/172 . It can be turned off by adding a -Xdoclint:none to the javadoc invocation. 2) Then there were a bunch of complaints that the standalone _ character may not be a legal identifier in future revs of Java. This is fixed by replacing _ with another character in all of the test tables where we were using _ to mean "false" or "unknown". After applying this patch, I can build javadoc cleanly on Java 7 and Java 8. Touches the following files: M java/testing/org/apache/derbyTesting/functionTests/tests/lang/CastingTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/LobRsGetterTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/JDBCDriverTest.java M java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/JDBCDriverTest.java M build.xml
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-17-aa-getMaxLogicalLobSize.diff. This patch makes DatabaseMetaData.getMaxLogicalLobSize() return 0 as Lance suggests. Tests passed cleanly for me. Committed at revision 1445591.

          Touches the following files:

          M java/engine/org/apache/derby/iapi/reference/Limits.java
          M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
          M java/client/org/apache/derby/client/am/DatabaseMetaData.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-17-aa-getMaxLogicalLobSize.diff. This patch makes DatabaseMetaData.getMaxLogicalLobSize() return 0 as Lance suggests. Tests passed cleanly for me. Committed at revision 1445591. Touches the following files: M java/engine/org/apache/derby/iapi/reference/Limits.java M java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java M java/client/org/apache/derby/client/am/DatabaseMetaData.java
          Hide
          Rick Hillegas added a comment -

          Attaching a revised version of the functional spec. This includes a status column which I added to the tables in order to track progress on this JIRA. At this point, I believe that I have addressed all of the changes made by JDBC 4.2. The UnsupportedVetter test now runs cleanly for me on Java 8.

          I plan to do more testing and put more effort into improving the build/test experience on Java 8. However, I think that this project is ready for buddy-testing now.

          Thanks,
          -Rick

          Show
          Rick Hillegas added a comment - Attaching a revised version of the functional spec. This includes a status column which I added to the tables in order to track progress on this JIRA. At this point, I believe that I have addressed all of the changes made by JDBC 4.2. The UnsupportedVetter test now runs cleanly for me on Java 8. I plan to do more testing and put more effort into improving the build/test experience on Java 8. However, I think that this project is ready for buddy-testing now. Thanks, -Rick
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-18-aa-checkForClosedBeforeForwarding.diff. This fixes a problem in ClosedObjectTest when running on Java 8. I am running tests now.

          ClosedObjectTest trips across an NPE because the new ResultSet.updateObject() overloads try to forward themselves before checking whether the ResultSet is closed. This patch makes them first check whether the ResultSet is closed.

          Touches the following file:

          M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-18-aa-checkForClosedBeforeForwarding.diff. This fixes a problem in ClosedObjectTest when running on Java 8. I am running tests now. ClosedObjectTest trips across an NPE because the new ResultSet.updateObject() overloads try to forward themselves before checking whether the ResultSet is closed. This patch makes them first check whether the ResultSet is closed. Touches the following file: M java/engine/org/apache/derby/impl/jdbc/EmbedResultSet42.java
          Hide
          Rick Hillegas added a comment -

          Tests passed cleanly for me on derby-6000-18-aa-checkForClosedBeforeForwarding.diff. Committed at subversion revision 1446562.

          Show
          Rick Hillegas added a comment - Tests passed cleanly for me on derby-6000-18-aa-checkForClosedBeforeForwarding.diff. Committed at subversion revision 1446562.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-19-ab-miscBuddyTestingFixes.diff. This patch addresses concerns raised by buddy testing. Those concerns are described here: http://wiki.apache.org/db-derby/TenTenOneBuddyTesting . I am running tests now.

          This patch makes the following changes:

          1) Implementations of the new CallableStatement overloads were made more readable by removing try-catch blocks and factoring a status check into a common helper method.

          2) DERBY-6088 is addressed by adding a failure condition to PreparedStatementTest42.

          3) Driver.acceptsURL() and connect() now throw a SQLException if the url is null, per the JDBC 4.2 spec clarification.

          4) The list of illegal JDBC types is longer now.

          Touches the following files:

          ------------

          M java/client/org/apache/derby/client/am/PreparedStatement.java
          M java/client/org/apache/derby/client/am/CallableStatement42.java
          M java/client/org/apache/derby/client/am/PreparedStatement42.java

          Changes for (1).

          ------------

          M java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java
          M java/client/org/apache/derby/client/am/Agent.java

          Changes for (2) and (4).

          ------------

          M java/engine/org/apache/derby/jdbc/JDBC.java
          M java/engine/org/apache/derby/jdbc/InternalDriver.java
          M java/engine/org/apache/derby/mbeans/JDBCMBean.java
          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
          M java/client/org/apache/derby/jdbc/ClientDriver.java

          Changes for (3).

          Show
          Rick Hillegas added a comment - Attaching derby-6000-19-ab-miscBuddyTestingFixes.diff. This patch addresses concerns raised by buddy testing. Those concerns are described here: http://wiki.apache.org/db-derby/TenTenOneBuddyTesting . I am running tests now. This patch makes the following changes: 1) Implementations of the new CallableStatement overloads were made more readable by removing try-catch blocks and factoring a status check into a common helper method. 2) DERBY-6088 is addressed by adding a failure condition to PreparedStatementTest42. 3) Driver.acceptsURL() and connect() now throw a SQLException if the url is null, per the JDBC 4.2 spec clarification. 4) The list of illegal JDBC types is longer now. Touches the following files: ------------ M java/client/org/apache/derby/client/am/PreparedStatement.java M java/client/org/apache/derby/client/am/CallableStatement42.java M java/client/org/apache/derby/client/am/PreparedStatement42.java Changes for (1). ------------ M java/engine/org/apache/derby/impl/jdbc/ConnectionChild.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java M java/client/org/apache/derby/client/am/Agent.java Changes for (2) and (4). ------------ M java/engine/org/apache/derby/jdbc/JDBC.java M java/engine/org/apache/derby/jdbc/InternalDriver.java M java/engine/org/apache/derby/mbeans/JDBCMBean.java M java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java M java/client/org/apache/derby/jdbc/ClientDriver.java Changes for (3).
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-19-ac-miscBuddyTestingFixes.diff. The previous rev of the patch tripped one error in the tests. This rev fixes that problem. Committed at subversion revision 1450422.

          The problem is that I made java.sql.Types.NULL an illegal type. The value of java.sql.Type.NULL is 0. This is the default value for integer args used by the UnsupportedVetter test. That test was reporting that Derby no longer supported various type-aware overloads. The fix was to change the default value used by UnsupportedVetter from 0 to 1 (java.sql.Types.CHAR).

          Touches the following additional file:

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-19-ac-miscBuddyTestingFixes.diff. The previous rev of the patch tripped one error in the tests. This rev fixes that problem. Committed at subversion revision 1450422. The problem is that I made java.sql.Types.NULL an illegal type. The value of java.sql.Type.NULL is 0. This is the default value for integer args used by the UnsupportedVetter test. That test was reporting that Derby no longer supported various type-aware overloads. The fix was to change the default value used by UnsupportedVetter from 0 to 1 (java.sql.Types.CHAR). Touches the following additional file: M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-20-aa-negativeUpdateObject.diff. This patch adds negative tests for the new ResultSet.updateObject() overloads as suggested by buddy testing (see http://wiki.apache.org/db-derby/TenTenOneBuddyTesting). Committed at subversion revision 1450776.

          Touches the following file:

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-20-aa-negativeUpdateObject.diff. This patch adds negative tests for the new ResultSet.updateObject() overloads as suggested by buddy testing (see http://wiki.apache.org/db-derby/TenTenOneBuddyTesting ). Committed at subversion revision 1450776. Touches the following file: M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/PreparedStatementTest42.java
          Hide
          Rick Hillegas added a comment -

          I believe that work on this issue is done.

          Show
          Rick Hillegas added a comment - I believe that work on this issue is done.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-21-aa-fixUnsupportedVetterForDerby10_9onJDK8.diff. This is the first patch to fix the UnsupportedVetter test when run with 10.9 jars on Java 8. The new methods added by JDBC 4.2 cause UnsupportedVetter to fail on that platform. Committed at subversion revision 1464103.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-21-aa-fixUnsupportedVetterForDerby10_9onJDK8.diff. This is the first patch to fix the UnsupportedVetter test when run with 10.9 jars on Java 8. The new methods added by JDBC 4.2 cause UnsupportedVetter to fail on that platform. Committed at subversion revision 1464103.
          Hide
          Rick Hillegas added a comment -

          Ported 1464103 from trunk to 10.10 branch at subversion revision 1464107.

          Show
          Rick Hillegas added a comment - Ported 1464103 from trunk to 10.10 branch at subversion revision 1464107.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-22-aa-disableUnsupportedVetterForDerby10_9onJDK8.diff. This patch disables the UnsupportedVetter test when running 10.9 on JDK 8. We don't expect to see Derby support for JDBC 4.2 on that release of Derby. Committed to 10.9 branch at subversion revision 1464117.

          Show
          Rick Hillegas added a comment - Attaching derby-6000-22-aa-disableUnsupportedVetterForDerby10_9onJDK8.diff. This patch disables the UnsupportedVetter test when running 10.9 on JDK 8. We don't expect to see Derby support for JDBC 4.2 on that release of Derby. Committed to 10.9 branch at subversion revision 1464117.
          Hide
          Rick Hillegas added a comment -

          Committed derby-6000-22-aa-disableUnsupportedVetterForDerby10_9onJDK8.diff to the 10.8 branch at subversion revision 1464120. There is no need to port this fix to the 10.7 branch because the UnsupportedVetter test has already been disabled when 10.7 runs on Java 7 or higher.

          Show
          Rick Hillegas added a comment - Committed derby-6000-22-aa-disableUnsupportedVetterForDerby10_9onJDK8.diff to the 10.8 branch at subversion revision 1464120. There is no need to port this fix to the 10.7 branch because the UnsupportedVetter test has already been disabled when 10.7 runs on Java 7 or higher.
          Hide
          Rick Hillegas added a comment -

          Attaching derby-6000-23-aa-suppressDiagnosticInUnsupportedVetter.diff. This patch suppresses a diagnostic in UnsupportedVetter when debug printing isn't on. That test handles the debug printing knob differently than most tests. Committed as follows:

          trunk: 1465600
          10.10: 1465601
          10.9: 1465604
          10.8: 1465608

          Touches the following file:

          M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java

          Show
          Rick Hillegas added a comment - Attaching derby-6000-23-aa-suppressDiagnosticInUnsupportedVetter.diff. This patch suppresses a diagnostic in UnsupportedVetter when debug printing isn't on. That test handles the debug printing knob differently than most tests. Committed as follows: trunk: 1465600 10.10: 1465601 10.9: 1465604 10.8: 1465608 Touches the following file: M java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/UnsupportedVetter.java
          Hide
          Kathey Marsden added a comment -

          I noticed one of the changes in this issue was:

          1) Changes the datatype of the CARDINALITY and PAGES columns returned by getIndexInfo(). The column types are changed from INT to BIGINT.

          I think there should be a release note for this change.

          Show
          Kathey Marsden added a comment - I noticed one of the changes in this issue was: 1) Changes the datatype of the CARDINALITY and PAGES columns returned by getIndexInfo(). The column types are changed from INT to BIGINT. I think there should be a release note for this change.
          Hide
          Rick Hillegas added a comment -

          I have logged DERBY-6187 as a vehicle for carrying a release note describing the change to the CARDINALITY and PAGES columns. I have attached a release note to that issue.

          Show
          Rick Hillegas added a comment - I have logged DERBY-6187 as a vehicle for carrying a release note describing the change to the CARDINALITY and PAGES columns. I have attached a release note to that issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development