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 18:12:20 UTC

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

     [ 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.