Derby
  1. Derby
  2. DERBY-3128

embedded: Inserting object into non-DECIMAL column with setObject using specified scale does not adjust scale

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
      Normal
    • Bug behavior facts:
      Deviation from standard

      Description

      For embedded specifying target type java.sql.Types.DECIMAL and inserting into a non-decimal column, e.g. REAL, DOUBLE, VARCHAR, does not properly adjust the scale when using the api calls below:

      public void setObject(int parameterIndex,
      Object x,
      int targetSqlType)

      and

      public void setObject(int parameterIndex,
      Objec x,
      int targetSqlType,
      int scale)

      For example, with a scale specified as zero embeded will not truncate the fractional digits if inserted into a DOUBLE column (DECIMAL columns are fine). Client will truncate the fractional digits properly.

      1. ZeroScaleTest.java
        3 kB
        Kathey Marsden

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development