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 "Anurag Shekhar (JIRA)" <ji...@apache.org> on 2007/05/25 13:21:16 UTC

[jira] Created: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
----------------------------------------------------------------------------------------------------------------------

                 Key: DERBY-2694
                 URL: https://issues.apache.org/jira/browse/DERBY-2694
             Project: Derby
          Issue Type: Bug
          Components: Network Server
         Environment: all
            Reporter: Anurag Shekhar
         Assigned To: Anurag Shekhar


org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.

When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.

The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: derby-2694.diff

org.apache.derby.impl.drda.DDMWriter.writeLDString (String s)  has a code to check if the splited utf-8 byte array ends with a multibyte char (while loop near 1223). In case the last byte is part of the multibyte char it tries to reduce the length of byte array so that it ends at the last byte of last character.

This logic has a small mistake. An if block which should have been after while loop was placed inside it.

junit.All tests run clean with this patch but I am still seeing truncating issue I have mentioned in my previous comments after this patch it client receives string of length 10899.



> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>         Assigned To: Anurag Shekhar
>         Attachments: derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: TestProc.java

TestProc.java is reproduces this bug. In this class I am inserting a 300000 char long clob with tamil char set. And using a function to get the substring of 20000 char. 

The substring returned has \ufffd at the position 10899. The string should have char between \u0B85 and \u0BCC

This class needs derbyTesting.jar in classpath.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>         Assigned To: Anurag Shekhar
>         Attachments: TestProc.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: derby-2694-v3.diff

reattaching the patch with license grant

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Commented: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Rick Hillegas commented on DERBY-2694:
--------------------------------------

Hi, Anurag. I think that the patch does the right thing. However, it's a little tricky to read. I think that the following approach is easier to understand. What do you think? I'm not an expert on utf-8 encoding, but the following web page was useful to me: http://www.unix.org.ua/orelly/java/fclass/appb_01.htm

private static final byte MULTI_BYTE_MASK = (byte) 0xC0;
private static final byte CONTINUATION_BYTE = (byte) 0x80;

if (writeLen != origLen) // if we're truncating the string
{
    while ( isContinuationChar( byteval[ writeLen ] ) ) { writeLen--; }

   //
   // Now byteval[ writeLen ] is either a standalone 1-byte char
   // or the first byte of a multi-byte character. That means that
   // byteval[ writeLen -1 ] is the last (perhaps only) byte of the
   // previous character.
   //
}

private boolean isContinuationChar( byte b )
{    
    return ( (b & MULTI_BYTE_MASK) == CONTINUATION_BYTE );
}

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Closed: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar closed DERBY-2694.
---------------------------------

    Resolution: Fixed

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java, unused.diff
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: derby-2694-v3.diff

updated the code with Rick's snippet.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Myrna van Lunteren updated DERBY-2694:
--------------------------------------

    Fix Version/s: 10.3.0.0

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: derby-2694-v2.diff

I have made minor modification in my patch so that it doesn't skips the last char if thats the last byte of a multibyte char,

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-2694-v2.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Commented: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

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

Is this issue now complete?

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java, unused.diff
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Commented: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Rick Hillegas commented on DERBY-2694:
--------------------------------------

Thanks for the revised patch, Anurag. Committed at subversion revision 544195..

I saw 70 failures and 21 errors in the junit tests, but they were identical to the problems I saw when running without the patch.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Commented: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar commented on DERBY-2694:
---------------------------------------

I think my comments in this issue has been little confusing. 
The patch I have submitted fix of the bug which was corrupting last char while returning from a function. Apart from this issue I have also mentioned another issue in my comments which causes the a large string (containing multibyte chars). These are two different issue. My patch fixes the first issue alone.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-2694-v2.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Anurag Shekhar updated DERBY-2694:
----------------------------------

    Attachment: TestProc_TruncateRep.java

TestProc_TruncateRep is similar to TestProc except that it prints the string size from function and also the length of string received by the client. I am getting the size 10900 in client and 20000 on the server console.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>         Assigned To: Anurag Shekhar
>         Attachments: TestProc.java, TestProc_TruncateRep.java
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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


[jira] Updated: (DERBY-2694) org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.

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

Knut Anders Hatlen updated DERBY-2694:
--------------------------------------

    Attachment: unused.diff

I noticed that the local variable multiByteTrunc is no longer used and can be removed. The attached patch removes it and a couple of unused imports in DDMWriter. Committed revision 544407.

> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid spliting varchar in the middle of a multibyte char.
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2694
>                 URL: https://issues.apache.org/jira/browse/DERBY-2694
>             Project: Derby
>          Issue Type: Bug
>          Components: Network Server
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>             Fix For: 10.3.0.0
>
>         Attachments: derby-2694-v2.diff, derby-2694-v3.diff, derby-2694-v3.diff, derby-2694.diff, TestProc.java, TestProc_TruncateRep.java, unused.diff
>
>
> org.apache.derby.impl.drda.DDMWriter uses wrong algorithm to avoid splitting varchar in the middle of a multibyte char.
> When DMWriter finds that it has to split a varchar while sending it to client it checks if the last byte is a part of a multibyte char and in case it is it tries to find the last byte of previous char and sends only till that byte leaving rest of it for the next send.
> The code it uses is having a bug so it fails when the last byte its checking for is the third byte of a char of 3 byte length.

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