Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-7160

Why do we see test failure/regression cause ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 10.17.1.0
    • 10.17.1.1
    • None
    • None
    • Regression

    Description

      This may be a regression or maybe a design change, not sure of which as the same tests pass for us on Java SE 11/17 with https://dlcdn.apache.org//db/derby/db-derby-10.15.2.0/db-derby-10.15.2.0-bin.zip.

      We are seeing a JDBC TCK test failure (Jakarta EE 10 TCK) when testing against https://db.apache.org/derby/releases/release-10_17_1_0.cgi on java 21 with the external project https://github.com/wildfly/wildfly that I contribute to.

      I marked this issue as a bug but I really have no idea where the bug is.  The JDBC test that is failing is https://github.com/jakartaee/platform-tck/blob/10.0.x/src/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java#L968 when run on Java 21 with 10.17.1.0.

      The failure is:

      Caused by: ERROR 22003: The resulting value is outside the range for the data type DECIMAL/NUMERIC(30,15).
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.am.ClientStatement.completeExecute(ClientStatement.java:1868)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.parseEXCSQLSTTreply(NetStatementReply.java:323)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.net.NetStatementReply.readExecuteCall(NetStatementReply.java:107)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.net.StatementReply.readExecuteCall(StatementReply.java:84)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.net.NetStatement.readExecuteCall_(NetStatement.java:193)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.am.ClientStatement.readExecuteCall(ClientStatement.java:1831)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.flowExecute(ClientPreparedStatement.java:2180)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdateX(ClientPreparedStatement.java:410)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) at org.apache.derby.client//org.apache.derby.client.am.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:396)
      \u001b[0m\u001b[0m12:39:19,524 INFO [stdout] (Thread-69) ... 16 more

       

      The called stored procedure source is at https://github.com/jakartaee/platform-tck/blob/10.0.x/sql/derby/derby.ddl.sprocs.sql#L224 which contains:

      create procedure Decimal_In_Max (in MAX_PARAM DECIMAL(30,15)) language java external name 'com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max' parameter style java;

      The referenced com.sun.ts.lib.tests.jdbc.CS_Procs.Decimal_In_Max contains:

      
          Connection con = DriverManager.getConnection("jdbc:default:connection");
          PreparedStatement ps = con
              .prepareStatement("update Decimal_Tab set MAX_VAL=?");
      
          ps.setBigDecimal(1, max_param);
          ps.executeUpdate();
      
          ps.close();
          ps = null;
          con.close();
          con = null;
        }
      

      More details are being added soon ...

      Attachments

        1. DERBY_7160-1.java
          2 kB
          Richard N. Hillegas
        2. DERBY_7160.java
          1 kB
          Richard N. Hillegas

        Activity

          People

            Unassigned Unassigned
            smarlow@redhat.com Scott Marlow
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: