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

        Kathey Marsden created issue -
        Kathey Marsden made changes -
        Field Original Value New Value
        Attachment ZeroScaleTest.java [ 12367650 ]
        Kathey Marsden made changes -
        Summary embedded: Inserting BigDecimal value into non-DECIMAL column with setObject using specified scale does not adjust scale embedded: Inserting object into non-DECIMAL column with setObject using specified scale does not adjust scale
        Kathey Marsden made changes -
        Affects Version/s 10.4.0.0 [ 12312540 ]
        Kathey Marsden made changes -
        Bug behavior facts [Deviation from standard]
        Urgency Normal
        Kathey Marsden made changes -
        Labels derby_triage10_5_2
        Gavin made changes -
        Workflow jira [ 12414890 ] Default workflow, editable Closed status [ 12799492 ]

          People

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

            Dates

            • Created:
              Updated:

              Development