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 "V.Narayanan (JIRA)" <ji...@apache.org> on 2007/06/05 16:17:25 UTC

[jira] Created: (DERBY-2764) Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
----------------------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-2764
                 URL: https://issues.apache.org/jira/browse/DERBY-2764
             Project: Derby
          Issue Type: Bug
          Components: Network Client
    Affects Versions: 10.3.0.0
            Reporter: V.Narayanan
             Fix For: 10.3.0.0


Currently the Embedded and Network Client would differ 
in behaviour when the following series of steps is 
followed.

a) Create an empty Clob (Using Connnection.createClob())
b) get an InputStream using Clob.getAsciiStream()
c) write data into this Clob
   c.1) Get an OutputStream
   c.2) Use OutputStream.write(byte [] b) to write
        into this Clob.
d) Now read from the InputStream obtained in step b)
   and print the number of bytes read as output.

The output of step d) differs in the client and in the Embedded side.


In the Client
-------------

The number of bytes read would always be -1.

In the Embedded
---------------

The number of bytes would be the number of bytes we
reflected.

The above behaviour in the NetworkClient is because
the length of the Clob is read once and stored in the 
constructor of the locator Stream returned (in the 
attribute maxPos).

This instead should be read each time we use the streams.

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


[jira] Commented: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502667 ] 

V.Narayanan commented on DERBY-2764:
------------------------------------

I am looking into this issue and will revert back with a solution to this issue before I leave for home today evening.

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: LOBLengthPersists_v1.java, LOBLengthPersists_v2.java
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Commented: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501571 ] 

V.Narayanan commented on DERBY-2764:
------------------------------------

This issue is similar to DERBY-2763

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Closed: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

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

V.Narayanan closed DERBY-2764.
------------------------------

    Resolution: Duplicate

The issue pointed out as part of this issue is addressed in DERBY-2763

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: LOBLengthPersists_v1.java, LOBLengthPersists_v2.java
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Assigned: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

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

V.Narayanan reassigned DERBY-2764:
----------------------------------

    Assignee: V.Narayanan

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Commented: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

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

Myrna van Lunteren commented on DERBY-2764:
-------------------------------------------

Does this need to be fixed in 10.3?  Or can it be added as another difference between server & client (i.e. link it to DERBY-310)?

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: LOBLengthPersists_v1.java, LOBLengthPersists_v2.java
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Updated: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

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

V.Narayanan updated DERBY-2764:
-------------------------------

    Attachment: LOBLengthPersists_v2.java
                LOBLengthPersists_v1.java

Attaching reproducible for this issue.

v1 - for Clob.getAsciiStream()
v2 - for Clob.getCharacterStream()

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: LOBLengthPersists_v1.java, LOBLengthPersists_v2.java
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Commented: (DERBY-2764) Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501569 ] 

V.Narayanan commented on DERBY-2764:
------------------------------------

I have not written a reproducible for this as yet. I will write this and post it tommorrow.

> Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>             Fix For: 10.3.0.0
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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


[jira] Updated: (DERBY-2764) In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.

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

V.Narayanan updated DERBY-2764:
-------------------------------

    Summary: In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.  (was: Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.)

> In the Network Client Streams returned using Clob.getAsciiStream() and Clob.getCharacterStream() should reflect the changes made to the underlying Clob.
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2764
>                 URL: https://issues.apache.org/jira/browse/DERBY-2764
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Client
>    Affects Versions: 10.3.0.0
>            Reporter: V.Narayanan
>             Fix For: 10.3.0.0
>
>
> Currently the Embedded and Network Client would differ 
> in behaviour when the following series of steps is 
> followed.
> a) Create an empty Clob (Using Connnection.createClob())
> b) get an InputStream using Clob.getAsciiStream()
> c) write data into this Clob
>    c.1) Get an OutputStream
>    c.2) Use OutputStream.write(byte [] b) to write
>         into this Clob.
> d) Now read from the InputStream obtained in step b)
>    and print the number of bytes read as output.
> The output of step d) differs in the client and in the Embedded side.
> In the Client
> -------------
> The number of bytes read would always be -1.
> In the Embedded
> ---------------
> The number of bytes would be the number of bytes we
> reflected.
> The above behaviour in the NetworkClient is because
> the length of the Clob is read once and stored in the 
> constructor of the locator Stream returned (in the 
> attribute maxPos).
> This instead should be read each time we use the streams.

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