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 "Tomohito Nakayama (JIRA)" <de...@db.apache.org> on 2005/10/01 09:00:49 UTC

[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I surveyed where to add test and found next test program .
I think this  program is good place to add test for this issue .

./functionTests/tests/jdbcapi/resultsetStream.java

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.
I was continuing seeing failure in the test ....


In the part where next difference  was found , the test code seems that length of data was intentionally broken
I read these messages that error was correctly handled in network environment .

12 del
< EXPECTED SQLSTATE(XSDA4): An unexpected exception was thrown
13 del
< EXPECTED SQLSTATE(XJ001): Java exception: 'Input stream held less data than requested length.: java.io.IOException'.
14 del
< EXPECTED SQLSTATE(XSDA4): An unexpected exception was thrown
15 del
< EXPECTED SQLSTATE(XJ001): Java exception: 'Input stream held less data than requested length.: java.io.IOException'.
15a13,14
> EXPECTED SQLSTATE(null): End of Stream prematurely reached while reading InputStream, parameter #2.  Remaining data has been 
> padded with 0x0.
> EXPECTED SQLSTATE(null): The specified size of the InputStream, parameter #2, is less than the actual InputStream length


On the other hand , next error seems to not be a just error messaging problem .
8a9
> FAIL - stream was not closed after a get*() call. class java.io.ByteArrayInputStream


Well, these are completely different problems than DERBY-525.
I will make them as new issue on JIRA .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati" <ks...@gmail.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 3:02 PM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> TomohitoNakayama wrote:
>
>> Hello .
>>
>> I have executed resultsetStream.java in network environment .
>> And found error attached to this mail as resultsetStream.diff .
>>
>> It seems that output of part commented as next in resultsetStream.java is different between network and embedded environments .
>>
> I think we should add a jira bug and link it to Derby 310, so this difference in behavior can be addressed.
> I am concerned about this line in the diff , it may not be per the standard ?
> > EXPECTED SQLSTATE(null): End of Stream prematurely reached while
> reading InputStream, parameter #2.  Remaining data has been padded with 0x0.
>
> Do you know why there is this append in  the diff file ..
> 8a9
> > FAIL - stream was not closed after a get*() call. class
> java.io.ByteArrayInputStream
>
> If it is something that needs to be looked into, maybe a jira entry needs to be added.
>
> Thanks,
> Sunitha.
>
>>   // check binary input streams of invalid length.
>>   // JDBC 3.0 tutorial says stream contents must match length.
>>
>> Now, I'm thinking to add resultsetStream_sed.properties to avoid this problem .
>>
>> Best regards .
>>
>> /*
>>
>>         Tomohito Nakayama
>>         tomonaka@basil.ocn.ne.jp
>>         tomohito@rose.zero.ad.jp
>>         tmnk@apache.org
>>
>>         Naka
>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>
>> */
>> ----- Original Message ----- From: "TomohitoNakayama" <to...@basil.ocn.ne.jp>
>> To: "Derby Development" <de...@db.apache.org>
>> Sent: Sunday, October 02, 2005 1:36 PM
>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
>>
>>
>>> Hello.
>>>
>>> I didn't realize it was excluded. Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network 
>>> environment test before modify ./functionTests/tests/jdbcapi/resultsetStream.java .
>>>
>>> //If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .
>>>
>>> Best regards.
>>>
>>> /*
>>>
>>>         Tomohito Nakayama
>>>         tomonaka@basil.ocn.ne.jp
>>>         tomohito@rose.zero.ad.jp
>>>         tmnk@apache.org
>>>
>>>         Naka
>>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>>
>>> */
>>> ----- Original Message ----- From: "Sunitha Kambhampati" <ks...@gmail.com>
>>> To: "Derby Development" <de...@db.apache.org>
>>> Sent: Sunday, October 02, 2005 2:12 AM
>>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
>>>
>>>
>>>> Tomohito Nakayama (JIRA) wrote:
>>>>
>>>>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ]
>>>>> Tomohito Nakayama commented on DERBY-525:
>>>>> -----------------------------------------
>>>>>
>>>>> I surveyed where to add test and found next test program .
>>>>> I think this  program is good place to add test for this issue .
>>>>>
>>>>> ./functionTests/tests/jdbcapi/resultsetStream.java
>>>>>
>>>> Maybe you already noticed, this test seems to be currently excluded and wont run against the network server. 
>>>> (.../functionTests/suites/DerbyNetClient.exclude ).
>>>> I am not sure why it doesnt run against the server as yet but suspect maybe it is because of lob materialization issues  If you 
>>>> plan to enable this test to run against server, that sounds good.
>>>>
>>>> Thanks,
>>>> Sunitha.
>>>>
>>>>
>>>>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
TomohitoNakayama wrote:

> Hello .
>
> I have executed resultsetStream.java in network environment .
> And found error attached to this mail as resultsetStream.diff .
>
> It seems that output of part commented as next in resultsetStream.java 
> is different between network and embedded environments .
>
I think we should add a jira bug and link it to Derby 310, so this 
difference in behavior can be addressed.  

I am concerned about this line in the diff , it may not be per the 
standard ?
 > EXPECTED SQLSTATE(null): End of Stream prematurely reached while 
reading InputStream, parameter #2.  Remaining data has been padded with 0x0.

Do you know why there is this append in  the diff file ..
8a9
 > FAIL - stream was not closed after a get*() call. class 
java.io.ByteArrayInputStream

If it is something that needs to be looked into, maybe a jira entry 
needs to be added.

Thanks,
Sunitha.

>   // check binary input streams of invalid length.
>   // JDBC 3.0 tutorial says stream contents must match length.
>
> Now, I'm thinking to add resultsetStream_sed.properties to avoid this 
> problem .
>
> Best regards .
>
> /*
>
>         Tomohito Nakayama
>         tomonaka@basil.ocn.ne.jp
>         tomohito@rose.zero.ad.jp
>         tmnk@apache.org
>
>         Naka
>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>
> */
> ----- Original Message ----- From: "TomohitoNakayama" 
> <to...@basil.ocn.ne.jp>
> To: "Derby Development" <de...@db.apache.org>
> Sent: Sunday, October 02, 2005 1:36 PM
> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould 
> replace non-ASCII characters with 0x3f, '?' to match embedded
>
>
>> Hello.
>>
>> I didn't realize it was excluded. Well, I will try executing  
>> ./functionTests/tests/jdbcapi/resultsetStream.java in network 
>> environment test before modify 
>> ./functionTests/tests/jdbcapi/resultsetStream.java .
>>
>> //If there exists what must be done in resultsetStream.java , I think 
>> new issue may be needed for that .
>>
>> Best regards.
>>
>> /*
>>
>>         Tomohito Nakayama
>>         tomonaka@basil.ocn.ne.jp
>>         tomohito@rose.zero.ad.jp
>>         tmnk@apache.org
>>
>>         Naka
>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>
>> */
>> ----- Original Message ----- From: "Sunitha Kambhampati" 
>> <ks...@gmail.com>
>> To: "Derby Development" <de...@db.apache.org>
>> Sent: Sunday, October 02, 2005 2:12 AM
>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould 
>> replace non-ASCII characters with 0x3f, '?' to match embedded
>>
>>
>>> Tomohito Nakayama (JIRA) wrote:
>>>
>>>>    [ 
>>>> http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 
>>>> ]
>>>> Tomohito Nakayama commented on DERBY-525:
>>>> -----------------------------------------
>>>>
>>>> I surveyed where to add test and found next test program .
>>>> I think this  program is good place to add test for this issue .
>>>>
>>>> ./functionTests/tests/jdbcapi/resultsetStream.java
>>>>  
>>>>
>>> Maybe you already noticed, this test seems to be currently excluded 
>>> and wont run against the network server. 
>>> (.../functionTests/suites/DerbyNetClient.exclude ).
>>> I am not sure why it doesnt run against the server as yet but 
>>> suspect maybe it is because of lob materialization issues  If you 
>>> plan to enable this test to run against server, that sounds good.
>>>
>>> Thanks,
>>> Sunitha.
>>>
>>>
>>>


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello .

I have executed resultsetStream.java in network environment .
And found error attached to this mail as resultsetStream.diff .

It seems that output of part commented as next in resultsetStream.java is different between network and embedded environments .

   // check binary input streams of invalid length.
   // JDBC 3.0 tutorial says stream contents must match length.

Now, I'm thinking to add resultsetStream_sed.properties to avoid this problem .

Best regards .

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "TomohitoNakayama" <to...@basil.ocn.ne.jp>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 1:36 PM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Hello.
> 
> I didn't realize it was excluded. 
> Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network environment test 
> before modify ./functionTests/tests/jdbcapi/resultsetStream.java .
> 
> //If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .
> 
> Best regards.
> 
> /*
> 
>         Tomohito Nakayama
>         tomonaka@basil.ocn.ne.jp
>         tomohito@rose.zero.ad.jp
>         tmnk@apache.org
> 
>         Naka
>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
> 
> */
> ----- Original Message ----- 
> From: "Sunitha Kambhampati" <ks...@gmail.com>
> To: "Derby Development" <de...@db.apache.org>
> Sent: Sunday, October 02, 2005 2:12 AM
> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
> 
> 
>> Tomohito Nakayama (JIRA) wrote:
>> 
>>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>>>
>>>Tomohito Nakayama commented on DERBY-525:
>>>-----------------------------------------
>>>
>>>I surveyed where to add test and found next test program .
>>>I think this  program is good place to add test for this issue .
>>>
>>>./functionTests/tests/jdbcapi/resultsetStream.java
>>>  
>>>
>> Maybe you already noticed, this test seems to be currently excluded and 
>> wont run against the network server. 
>> (.../functionTests/suites/DerbyNetClient.exclude ).
>> I am not sure why it doesnt run against the server as yet but suspect 
>> maybe it is because of lob materialization issues  If you plan to enable 
>> this test to run against server, that sounds good.
>> 
>> Thanks,
>> Sunitha.
>> 
>> 
>> 
>> 
>> -- 
>> No virus found in this incoming message.
>> Checked by AVG Anti-Virus.
>> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>> 
>>
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>

Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

I didn't realize it was excluded. 
Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network environment test 
before modify ./functionTests/tests/jdbcapi/resultsetStream.java .

//If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati" <ks...@gmail.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 2:12 AM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Tomohito Nakayama (JIRA) wrote:
> 
>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>>
>>Tomohito Nakayama commented on DERBY-525:
>>-----------------------------------------
>>
>>I surveyed where to add test and found next test program .
>>I think this  program is good place to add test for this issue .
>>
>>./functionTests/tests/jdbcapi/resultsetStream.java
>>  
>>
> Maybe you already noticed, this test seems to be currently excluded and 
> wont run against the network server. 
> (.../functionTests/suites/DerbyNetClient.exclude ).
> I am not sure why it doesnt run against the server as yet but suspect 
> maybe it is because of lob materialization issues  If you plan to enable 
> this test to run against server, that sounds good.
> 
> Thanks,
> Sunitha.
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
> 
>


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Tomohito Nakayama (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>
>Tomohito Nakayama commented on DERBY-525:
>-----------------------------------------
>
>I surveyed where to add test and found next test program .
>I think this  program is good place to add test for this issue .
>
>./functionTests/tests/jdbcapi/resultsetStream.java
>  
>
Maybe you already noticed, this test seems to be currently excluded and 
wont run against the network server. 
(.../functionTests/suites/DerbyNetClient.exclude ).
 I am not sure why it doesnt run against the server as yet but suspect 
maybe it is because of lob materialization issues  If you plan to enable 
this test to run against server, that sounds good.

Thanks,
Sunitha.