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

Client's ResultSet#getLong does not range check when converting from a DECIMAL column

    Details

    • Bug behavior facts:
      Deviation from standard, Embedded/Client difference, Wrong query result

      Description

      Derby's DECIMAL can contain an integer of 31 digits. This can overflow a long. The embedded JDBC driver catches this, but the client does not and can yield a corrupt long, cf enclosed repro.

        Attachments

        1. MissingRangeCheck.java
          4 kB
          Dag H. Wanvik
        2. derby-5536-refactor.diff
          6 kB
          Dag H. Wanvik
        3. derby-5536-3.stat
          0.2 kB
          Dag H. Wanvik
        4. derby-5536-3.diff
          12 kB
          Dag H. Wanvik
        5. derby-5536-2.stat
          0.2 kB
          Dag H. Wanvik
        6. derby-5536-2.diff
          11 kB
          Dag H. Wanvik
        7. derby-5536.stat
          0.2 kB
          Dag H. Wanvik
        8. derby-5536.diff
          10 kB
          Dag H. Wanvik

          Issue Links

            Activity

              People

              • Assignee:
                dagw Dag H. Wanvik
                Reporter:
                dagw Dag H. Wanvik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: