You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kristian Waagan (JIRA)" <ji...@apache.org> on 2008/12/15 13:49:44 UTC

[jira] Created: (DERBY-3991) Clob.truncate(0) throws exception

Clob.truncate(0) throws exception
---------------------------------

                 Key: DERBY-3991
                 URL: https://issues.apache.org/jira/browse/DERBY-3991
             Project: Derby
          Issue Type: Bug
          Components: JDBC
    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
            Reporter: Kristian Waagan
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

          Derby Info: [Release Note Needed]
    Derby Categories: [Deviation from standard, Newcomer]  (was: [Newcomer])

I'm sorry to make some mistake in operating on the 'edit' option of the issue, now just restore it to the old state.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Attachment: releaseNote.html

Kristian, after receiving your and Knut's advice, I have provided a new releaseNote.html to focus on the change on SQLException message, it's clearer  indeed. Please check it! Thanks!


Yun

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3991:
-----------------------------------

    Attachment: derby-3991-1a-ClobTruncateZeroTest.diff

'derby-3991-1a-ClobTruncateZeroTest.diff' adds two tests demonstrating the issue. When run, you should get 4 failures.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Derby Info: [Release Note Needed]

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3991:
-----------------------------------

    Attachment: releaseNote.html

As a start, I tried to rewrite the release note, but I'm not sure if it is acceptable. Please review.

The file is now attached as 'releaseNote.html' to allow the release note generator to pick it up.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan closed DERBY-3991.
----------------------------------


Closing this issue.
Thanks for doing the work, Yun!

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.1.2, 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694129#action_12694129 ] 

Kristian Waagan commented on DERBY-3991:
----------------------------------------

Regarding the error message, I'm just wondering if the users should be notified about the change through a release note [1]. We have a release note template under "trunk/tools/release/templates/releaseNote.html", if you want to take a look.
I agree the change is a good one, but I don't know if the change requires that the community notifies the users about the changed error message.
Maybe someone else in the community has a stronger opinion about this?


[1] FYI, here are the release notes for 10.4: http://db.apache.org/derby/releases/release-10.4.2.0.cgi#Release%20Notes%20for%20Derby%2010.4.2.0
    Note especially under "Issues" and the "Note for DERBY-X" paragraphs.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3991:
-----------------------------------

    Affects Version/s:     (was: 10.5.0.0)
                       10.6.0.0
                       10.5.1.0

The patch looks good to me.

You could consider trying to access the empty string using a stream too (currently the test I wrote originally only uses getSubString).
Users will also see a different error message with the embedded driver now. Does this warrant a release note?
The new error message is both more specific and it is the same as the one thrown by the client driver, which is justification enough for the change.

I'll kick off a test run.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700814#action_12700814 ] 

Yun Lee commented on DERBY-3991:
--------------------------------

OK, Kristian. I've got it, and will post a new releasenote on SQLState later.

Good luck
Yun

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Derby Info: [Patch Available, Release Note Needed]  (was: [Release Note Needed])

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700587#action_12700587 ] 

Yun Lee commented on DERBY-3991:
--------------------------------

>I think the release note needs some more work. For instance, do we want to describe two issues in one release note (zero length allowed, and the change of error message), or would it be better with a release note for each issue?

Kristian, thanks for your committing, it's a good message. And  I would love to provide two release notes for the two change points. 

However, I have some questions about the name of release notes. You have said 'The file is now attached as 'releaseNote.html' to allow the release note generator to pick it up', do you mean a release note must have the identical name of 'releaseNote.html'? If so, should I post the two release notes in two times with the same name of 'releaseNote.html'?

Thanks.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3991:
-----------------------------------

    Fix Version/s: 10.5.1.2
                   10.4.2.1

Backported patch 3 to 10.5 with revision 768939 and to 10.4 with revision 768940.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.1.2, 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12701511#action_12701511 ] 

Kristian Waagan commented on DERBY-3991:
----------------------------------------

The release note looks good to me.
I'll start the work on backporting the patch to older branches.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Derby Info:   (was: [Release Note Needed])

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Derby Info:   (was: [Patch Available])

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700694#action_12700694 ] 

Kristian Waagan commented on DERBY-3991:
----------------------------------------

Yun,
> However, I have some questions about the name of release notes. You have said 'The file is now attached as 'releaseNote.html' to allow the release note generator to pick it up', do you mean a release note must have the identical name of 'releaseNote.html'? If so, should I post the two release notes in two times with the same name of 'releaseNote.html'?

I don't think we can attach two release notes to the same issue and have the release notes generator pick them both up. If we end up with such a scenario, I think we have to split the issue into two (or create a sub-issue).

The only feedback from the community so far has been to write a release note for the changed SQLState only. If you agree, you can start rewriting the release note again.
You can attach the next version of the release note as 'releaseNote.html' as well. The release notes generator will pick up the newest version.


Thanks,


> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694187#action_12694187 ] 

Dag H. Wanvik commented on DERBY-3991:
--------------------------------------

I think if the error message is documented for the usage case (often they are not..), then it is a API change and we should have 
a release note. If the actual error message is not documented in the user docs, it is less clear to me that a release note is needed..
It may still be prudent do add one, though. I would not object to it.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-3991:
--------------------------------------

    Attachment: releaseNote.html

The releaseNote.html failed the checks performed by the ReleaseNoteReader (java org.apache.derbyBuild.ReleaseNoteReader) because of a missing </p> tag, so I fixed that up.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.1.2, 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12693746#action_12693746 ] 

Kristian Waagan commented on DERBY-3991:
----------------------------------------

derbyall and suites.All ran without failures in my sandbox (Solaris 10, Sun JDK 1.6).

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700687#action_12700687 ] 

Knut Anders Hatlen commented on DERBY-3991:
-------------------------------------------

Do we actually need to mention that truncate(0) no longer throws an exception? We don't normally write release notes for that kind of changes ("something that didn't work now works"). Mentioning the changed SQLState is sufficient, in my opinion.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden resolved DERBY-3991.
-----------------------------------

    Resolution: Fixed

Looks like this has been resolved.

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.1.2, 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Yun,

I have added you as a contributor to the Derby project. This should give 
you the permission you need. Here's a good primer on getting started as 
a Derby developer: http://db.apache.org/derby/derby_comm.html I don't 
think that Apache has an ICLA on file for you yet. The contributor 
checklist points you at the instructions for filing an ICLA so that 
Apache can accept your contributions: 
http://wiki.apache.org/db-derby/DerbyContributorChecklist

Welcome to the Derby developer group!
-Rick


Yun Lee (JIRA) wrote:
>      [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>
> Yun Lee updated DERBY-3991:
> ---------------------------
>
>     Attachment: derby-3991-2a.diff
>
> Hi,  all. I'm a prospective student for GSOC, Yun Lee. I have posted a patch for this issue, wish for your comments. 
>
> At this moment, I'm in the user group, without the permission to assign this issue to myself. How to apply for the developer group, please?
>
> Thanks!
>
>   
>> Clob.truncate(0) throws exception
>> ---------------------------------
>>
>>                 Key: DERBY-3991
>>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>>             Project: Derby
>>          Issue Type: Bug
>>          Components: JDBC
>>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
>>            Reporter: Kristian Waagan
>>            Priority: Minor
>>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>>
>>
>> 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.
>>     
>
>   


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Attachment: derby-3991-2a.diff

Hi,  all. I'm a prospective student for GSOC, Yun Lee. I have posted a patch for this issue, wish for your comments. 

At this moment, I'm in the user group, without the permission to assign this issue to myself. How to apply for the developer group, please?

Thanks!

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12694119#action_12694119 ] 

Yun Lee commented on DERBY-3991:
--------------------------------

Kistian, thanks for your comments. 

>You could consider trying to access the empty string using a stream too (currently the test I wrote originally only uses getSubString). 
I will do it later.

>Users will also see a different error message with the embedded driver now. Does this warrant a release note? 
>The new error message is both more specific and it is the same as the one thrown by the client driver, which is justification enough for the change.
I'm not sure. Do you mean I replaced 'SQLState.BLOB_BAD_POSITION' with 'SQLState.BLOB_NONPOSITIVE_LENGTH' in EmbedClob.java? If you do, I just want to give a clearer exception message.As a new comer, I don't know whether it's proper to do so, and don't know what it does with ' a release note'. Wish for your explanation.

Thanks!



> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12690165#action_12690165 ] 

Yun Lee commented on DERBY-3991:
--------------------------------

The patch derby-3991-2a.diff adopts the test cases in derby-3991-1a-ClobTruncateZeroTest.diff provided by Kristian, and contains a change on  java/engine/org/apache/derby/impl/jdbc/EmbedClob.java. With the patch, Test cases can run without any problem. Please check it. Thanks!

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

          Derby Info: [Patch Available]  (was: [Release Note Needed, Patch Available])
    Derby Categories: [Newcomer]  (was: [Newcomer, Deviation from standard])

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee reassigned DERBY-3991:
------------------------------

    Assignee: Yun Lee

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-3991:
-----------------------------------

       Derby Info: [Release Note Needed]
    Fix Version/s: 10.6.0.0

Thank you, Yun.

I have committed patch 3 to trunk with revision 764800.
I think the release note needs some more work. For instance, do we want to describe two issues in one release note (zero length allowed, and the change of error message), or would it be better with a release note for each issue?

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Yun Lee (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yun Lee updated DERBY-3991:
---------------------------

    Attachment: derby-3991-3.releaseNote.html
                derby-3991-3.stat
                derby-3991-3.diff

Thanks for your detailed advice, Kristian and Dag.

I have added Stream test for empty String. 

Besides, I provide a release note for the change on truncate(). It addresses two changes:
1.Accept zero length. 
2.Give a more specific error message for nonpositive length.

I think accepting zero length is more important than giving a more specific error message. As the type of this issue is 'Bug'.

Wish for your comments!

Yun



> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.5.1.0, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DERBY-3991) Clob.truncate(0) throws exception

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dag H. Wanvik updated DERBY-3991:
---------------------------------

    Issue & fix info: [Newcomer, Release Note Needed]  (was: [Newcomer])

> Clob.truncate(0) throws exception
> ---------------------------------
>
>                 Key: DERBY-3991
>                 URL: https://issues.apache.org/jira/browse/DERBY-3991
>             Project: Derby
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 10.3.3.1, 10.4.2.1, 10.6.0.0
>            Reporter: Kristian Waagan
>            Assignee: Yun Lee
>            Priority: Minor
>             Fix For: 10.4.2.1, 10.5.1.2, 10.6.0.0
>
>         Attachments: derby-3991-1a-ClobTruncateZeroTest.diff, derby-3991-2a.diff, derby-3991-3.diff, derby-3991-3.releaseNote.html, derby-3991-3.stat, releaseNote.html, releaseNote.html, releaseNote.html
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.