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

CallableStatement#registerOutParameter on client lacks check of legal types.

    XMLWordPrintableJSON

Details

    • Repro attached
    • Deviation from standard

    Description

      Cf the attached negative test in a patch to PreparedStatement42.

      In JDBC 4.2, the Javadoc for registerOutParameter(int parameterIndex,
      int sqlType, String typeName) reads:

      :
      @exception SQLFeatureNotSupportedException if sqlType is a ARRAY,
      BLOB, CLOB, DATALINK, JAVA_OBJECT, NCHAR, NCLOB, NVARCHAR,
      LONGNVARCHAR, REF, ROWID, SQLXML or STRUCT data type and the JDBC
      driver does not support this data type
      :

      For the new overloads, for embedded this is checked inside Util42#getTypeAsInt. The similar
      client method, Utils42#getTypeAsInt does not do this checking.

      Attachments

        1. 6089-repro.diff
          1 kB
          Dag H. Wanvik
        2. 6089-repro-old-overloads.diff
          2 kB
          Dag H. Wanvik
        3. derby-6089-01-aa-addCheckToClient.diff
          12 kB
          Richard N. Hillegas
        4. derby-6089-01-ab-addCheckToClient.diff
          12 kB
          Richard N. Hillegas
        5. derby-6089-02-aa-addCheckToOldOverloads.diff
          16 kB
          Richard N. Hillegas
        6. derby-6089-02-ab-addCheckToOldOverloads.diff
          95 kB
          Richard N. Hillegas

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              dagw Dag H. Wanvik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: