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

Clob.truncate(0) throws exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.3.3.1, 10.4.2.1, 10.6.1.0
    • 10.4.2.1, 10.5.2.0, 10.6.1.0
    • JDBC
    • None
    • Newcomer, Release Note Needed
    • 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.

      Attachments

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

        Activity

          People

            yunlee Yun Lee
            kristwaa Kristian Waagan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: