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 "Dag H. Wanvik (JIRA)" <ji...@apache.org> on 2010/02/01 16:07:51 UTC

[jira] Created: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

Client setCharacterStream closes its Reader argument stream in finalizer
------------------------------------------------------------------------

                 Key: DERBY-4531
                 URL: https://issues.apache.org/jira/browse/DERBY-4531
             Project: Derby
          Issue Type: Bug
          Components: Network Client
            Reporter: Dag H. Wanvik
            Priority: Minor


The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will be read to the number of chaaracters required or to EOF, whatever happens first.
For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.


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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

The client driver does not similarly close an InputStream given as as argument to setBinaryStream.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will be read to the number of chaaracters required or to EOF, whatever happens first.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Affects Version/s: 10.2.1.6
                       10.2.2.0
                       10.3.1.4
                       10.3.2.1
                       10.3.3.0
                       10.4.1.3
                       10.4.2.0
                       10.5.1.1
                       10.5.2.0
                       10.5.3.0

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will be read to the number of chaaracters required or to EOF, whatever happens first.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

Lance informs me that the spec is silent on this, but that the JDBC 3.0 book says: 

"length - the number of bytes to be read from the stream & sent to the database.  Note that if the stream contains more or less bytes than are specified in length, an exception is thrown".

If we want to go this way, we would need to change both drivers, increasing potential for breaking existing apps that supply too long streams.
Any thoughts on which way to go? Lance said he's check what other vendors do. 

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Issue Comment Edited: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Dag H. Wanvik edited comment on DERBY-4531 at 5/10/10 7:03 PM:
---------------------------------------------------------------

Uploading a patch that removes the finalizer close. Regrressions ran ok. I have asked Lance to comment on the JDBC semantics, and I intend to hold back commit until we agree that this change is the right way to go.
It does change behavior, so I mark it with release note needed.

      was (Author: dagw):
    Uploading a patch that removes the finalizer close. Regrressions ran ok. I have asked Lance to comment on the JDBC semantics, and I intend to hold back commit until we agree that this change is the right way to go.
It does change behavior, so I make it with release note needed.
  
> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

Apparently, there is no consensus among the vendors. I propose to commit the current patch for now to get alignment between the drivers. Then, if we later decide to move to the restrictive behavior if/when this is clarified in the spec, we could do it to both drivers.


> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Attachment: Repro.java

Attaching a repro.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Attachment: derby-4531b.diff
                derby-4531b.stat

Attaching a new rev of the patch which makes the client driver behave like the embedded driver in this respect: derby-4531b.

It adds a regression test. At least on my box with Sun JDK 1.6.0_16, the new test fails for the client driver prior to the patch proper, but as always when explicitly calling gc, YMMV. With the full patch the test should work reliably in any case.

Running full regressions.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Attachment: derby-4531.diff

Uploading a patch that removes the finalizer close. Regrressions ran ok. I have asked Lance to comment on the JDBC semantics, and I intend to hold back commit until we agree that this change is the right way to go.
It does change behavior, so I make it with release note needed.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861798#action_12861798 ] 

Rick Hillegas commented on DERBY-4531:
--------------------------------------

Some additional discussion of this issue can be found on this email thread: http://old.nabble.com/instability-in-StreamingColumnTest-tt28369553.html#a28369553

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

Derby will throw if the stream does not hold the exact amount of data specified in setCharacterStream, so one might argue that keeping the stream open doesn't accomplish much. Still, I think that since the API does not prescribe closing the stream, a driver should refrain from doing it.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Description: 
The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.


  was:
The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will be read to the number of chaaracters required or to EOF, whatever happens first.
For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.



> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Closed: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Dag H. Wanvik closed DERBY-4531.
--------------------------------

    Resolution: Fixed

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Bug behavior facts: [Embedded/Client difference, Regression]  (was: [Embedded/Client difference])

This behavior was introduced in 10.2 with svn 414562, so marking
as regression until somebody convinces me this is not a bug ;-)

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will be read to the number of chaaracters required or to EOF, whatever happens first.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

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

Since this patch removes the regression, I don't believe we require a release note, so unsetting that flag, and closing.


> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

No, not yet. If I don't get any, the community should decide what to do with this one. I am inclined to commit it (i.e. the driver should not close the stream).

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

Committed derby-4531b as svn 987331.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Issue & fix info: [Repro attached]

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Assigned: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Dag H. Wanvik reassigned DERBY-4531:
------------------------------------

    Assignee: Dag H. Wanvik

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Issue & fix info: [Patch Available, Release Note Needed, Repro attached]  (was: [Repro attached])

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Issue & fix info: [Release Note Needed, Repro attached]  (was: [Patch Available, Release Note Needed, Repro attached])

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

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

    Fix Version/s: 10.7.0.0

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.7.0.0
>
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Kristian Waagan updated DERBY-4531:
-----------------------------------

    Affects Version/s: 10.6.1.0

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0
>            Reporter: Dag H. Wanvik
>            Assignee: Dag H. Wanvik
>            Priority: Minor
>             Fix For: 10.7.0.0
>
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, derby-4531b.diff, derby-4531b.stat, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Commented: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Kristian Waagan commented on DERBY-4531:
----------------------------------------

Any feedback that will allow us to move forward on this issue yet?

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, derby-4531.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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


[jira] Updated: (DERBY-4531) Client setCharacterStream closes its Reader argument stream in finalizer

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

Kristian Waagan updated DERBY-4531:
-----------------------------------

    Attachment: derby-4531-1a-test_workaround.diff

Attached patch 1a, which is a work-around for an intermittent test failure caused by the client driver closing the stream in the finalizer.

Committed to trunk with revision 938972.
I plan to back-port this to the 10.6 branch.

> Client setCharacterStream closes its Reader argument stream in finalizer
> ------------------------------------------------------------------------
>
>                 Key: DERBY-4531
>                 URL: https://issues.apache.org/jira/browse/DERBY-4531
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.2.1.6, 10.2.2.0, 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0
>            Reporter: Dag H. Wanvik
>            Priority: Minor
>         Attachments: derby-4531-1a-test_workaround.diff, Repro.java
>
>
> The javadoc for PreparedStatement.setCharacterStream does not specify that the stream passed in will be closed, only that it will read to the number of characters specified.
> For the embedded driver, the stream is not closed after execution; the client driver, however, will close the stream when the internal stream object EncodedInputStream is garbage collected, which can happen any time after the statement has been executed.
> I am not sure this a bug vs. the JDBC specification, but it would be nice to harmonize client and embedded behavior on this.

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