Derby
  1. Derby
  2. DERBY-2810

getParameterType behavior is different in Embedded and Network Client when set by registerOutParameter

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: None
    • Component/s: JDBC, Network Client
    • Environment:
      Fedora Core release 6
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Embedded/Client difference

      Description

      Description:
      =========
      The behavior of getParameterType is different in embedded and network client
      as shown by the following code snippet:
      --------------------------------------------------------------------------------------------------------
      public void testCallableStatementReturnedScale () throws SQLException {

      Statement stmt = createStatement();
      stmt.executeUpdate("create procedure dummy_numeric_Proc(out a NUMERIC(30,15), out b NUMERIC(30,15)) language java parameter style java external name 'org.apache.derbyTesting.functionTests.tests.jdbcapi.parameterMetaDataJdbc30.dummy_numeric_Proc'");
      CallableStatement cs = prepareCall("CALL dummy_numeric_Proc(?,?)");
      cs.registerOutParameter(1, Types.NUMERIC);
      cs.registerOutParameter(2, Types.NUMERIC,15);
      cs.execute();

      int numParam = cs.getParameterMetaData().getParameterCount();

      for (int i=1; i<=numParam; i++)

      { System.out.println("getParameterType: " + cs.getParameterMetaData().getParameterType(i)); }

      cs.close();
      }
      --------------------------------------------------------------------------------------------------------

      Results:
      ======

      • Testing with org.apache.derby.jdbc.ClientDriver
        getParameterType: 3 <-------Types.DECIMAL
      • Testing with org.apache.derby.jdbc.EmbeddedDriver
        getParameterType: 2 <-------Types.NUMERIC

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ramin Moazeni
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development