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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 10.4.1.3
    • None
    • JDBC
    • Normal
    • 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.

      Attachments

        1. ZeroScaleTest.java
          3 kB
          Katherine Marsden

        Activity

          People

            Unassigned Unassigned
            kmarsden Katherine Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: