Derby
  1. Derby
  2. DERBY-3991

Clob.truncate(0) throws exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.3.1, 10.4.2.1, 10.6.1.0
    • Fix Version/s: 10.4.2.1, 10.5.2.0, 10.6.1.0
    • Component/s: JDBC
    • Labels:
      None
    • Issue & fix info:
      Newcomer, Release Note Needed
    • Bug behavior facts:
      Deviation from standard

      Description

      Truncating a Clob to zero length is allowed according to the JDBC specification, which says the following about the len argument (in the @throws tag):
      "SQLException - if there is an error accessing the CLOB value or if len is less than 0 "

      Derby throws an exception if zero is passed to truncate.

      A quick inspection of the code suggests that truncating a Clob to the empty string is easy to support.

      1. releaseNote.html
        5 kB
        Kristian Waagan
      2. releaseNote.html
        4 kB
        Yun Lee
      3. releaseNote.html
        4 kB
        Myrna van Lunteren
      4. derby-3991-3.stat
        0.1 kB
        Yun Lee
      5. derby-3991-3.releaseNote.html
        4 kB
        Yun Lee
      6. derby-3991-3.diff
        3 kB
        Yun Lee
      7. derby-3991-2a.diff
        3 kB
        Yun Lee
      8. derby-3991-1a-ClobTruncateZeroTest.diff
        2 kB
        Kristian Waagan

        Activity

        Gavin made changes -
        Workflow jira [ 12448499 ] Default workflow, editable Closed status [ 12799447 ]
        Kathey Marsden made changes -
        Fix Version/s 10.5.2.0 [ 12314116 ]
        Fix Version/s 10.5.1.2 [ 12313870 ]
        Dag H. Wanvik made changes -
        Issue & fix info [Newcomer] [Newcomer, Release Note Needed]
        Dag H. Wanvik made changes -
        Issue & fix info [Release Note Needed] [Newcomer]
        Myrna van Lunteren made changes -
        Attachment releaseNote.html [ 12409798 ]
        Kristian Waagan made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Kathey Marsden made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Myrna van Lunteren made changes -
        Affects Version/s 10.5.1.0 [ 12313770 ]
        Kristian Waagan made changes -
        Fix Version/s 10.4.2.1 [ 12313401 ]
        Fix Version/s 10.5.1.2 [ 12313870 ]
        Yun Lee made changes -
        Derby Info [Release Note Needed]
        Yun Lee made changes -
        Attachment releaseNote.html [ 12406028 ]
        Yun Lee made changes -
        Derby Info [Release Note Needed]
        Yun Lee made changes -
        Derby Categories [Newcomer] [Deviation from standard, Newcomer]
        Derby Info [Release Note Needed]
        Yun Lee made changes -
        Derby Info [Patch Available]
        Yun Lee made changes -
        Derby Categories [Newcomer, Deviation from standard] [Newcomer]
        Derby Info [Release Note Needed, Patch Available] [Patch Available]
        Yun Lee made changes -
        Derby Info [Release Note Needed] [Patch Available, Release Note Needed]
        Kristian Waagan made changes -
        Attachment releaseNote.html [ 12405427 ]
        Kristian Waagan made changes -
        Fix Version/s 10.6.0.0 [ 12313727 ]
        Derby Info [Release Note Needed]
        Yun Lee made changes -
        Attachment derby-3991-3.diff [ 12405078 ]
        Attachment derby-3991-3.stat [ 12405079 ]
        Attachment derby-3991-3.releaseNote.html [ 12405080 ]
        Kristian Waagan made changes -
        Affects Version/s 10.5.1.0 [ 12313770 ]
        Affects Version/s 10.6.0.0 [ 12313727 ]
        Affects Version/s 10.5.0.0 [ 12313010 ]
        Yun Lee made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Yun Lee made changes -
        Assignee Yun Lee [ yunlee ]
        Yun Lee made changes -
        Attachment derby-3991-2a.diff [ 12403825 ]
        Kristian Waagan made changes -
        Field Original Value New Value
        Attachment derby-3991-1a-ClobTruncateZeroTest.diff [ 12396088 ]
        Kristian Waagan created issue -

          People

          • Assignee:
            Yun Lee
            Reporter:
            Kristian Waagan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development