Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2694

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.3.1.4
    • Network Server
    • None
    • all

    Description

      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.

      Attachments

        1. derby-2694.diff
          1 kB
          Anurag Aggarwal
        2. derby-2694-v2.diff
          1 kB
          Anurag Aggarwal
        3. derby-2694-v3.diff
          2 kB
          Anurag Aggarwal
        4. derby-2694-v3.diff
          2 kB
          Anurag Aggarwal
        5. TestProc_TruncateRep.java
          2 kB
          Anurag Aggarwal
        6. TestProc.java
          2 kB
          Anurag Aggarwal
        7. unused.diff
          1 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              anurag Anurag Aggarwal
              anurag Anurag Aggarwal
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: