[ 
https://issues.apache.org/jira/browse/DERBY-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tiago R. Espinha updated DERBY-4746:
------------------------------------

    Attachment: DERBY-4746_p3.diff
                TestClient.java

I'm attaching the final patch to this issue. I had some issues with the 
ByteBuffer handling but that's fixed now.

This patch forces the write*String methods within DDMWriter to query the length 
of a String off the CCSID manager. It also forces all the sessions in the 
DRDAConnThread to start as EBCDIC and fixes the issue Knut found on DERBY-4799.

DERBY-4799 is fixed by changing the way the server writes the RDBNAM back to 
the client within DRDAConnThread.writeRDBNAM(String). Before the patch, the 
RDBNAM was being sent back [serv. -> cli] in UTF-8 [surprising, since 
everything should be EBCDIC so far] and the client correctly expected EBCDIC. 
This would be fine for normal ASCII characters but whenever special Latin 
characters were used, this would cause the server to throw an exception and 
consequently, the client to crash.

I've attached a test client that demonstrates this by crashing 10.5.3 and 
10.3.3 servers, using their respective clients. By using a database name with 
more than three extra-ASCII characters, the server will throw the exception 
seen in DERBY-4799 whenever we try to send actual SQL commands to the server.

It's also worth noting that with this patch, old clients will now be able to 
actually create databases with Latin characters on a new server. This could be 
seen as a positive regression as something that used to fail is now working, 
but I don't think it is any matter for concern.

Finally, Knut has provided a test fixture on DERBY-4799 that uncovers part of 
this issue. With this fix the test passes, although I think we can probably add 
another fixture that does the same as my test client (that only would fail upon 
creating the table).

So far suites.All has passed without any failures and I am now running derbyall.

> (Server) Implement UTF8 support on DRDA
> ---------------------------------------
>
>                 Key: DERBY-4746
>                 URL: https://issues.apache.org/jira/browse/DERBY-4746
>             Project: Derby
>          Issue Type: Sub-task
>    Affects Versions: 10.7.0.0
>            Reporter: Tiago R. Espinha
>            Assignee: Tiago R. Espinha
>             Fix For: 10.7.0.0
>
>         Attachments: DERBY-4746.diff, DERBY-4746.diff, DERBY-4746.diff, 
> DERBY-4746_p2-impl.diff, DERBY-4746_p2-impl.diff, DERBY-4746_p2-tests.diff, 
> DERBY-4746_p2-tests.diff, DERBY-4746_p3.diff, DERBY-4746_p3.diff, 
> DERBY-4746_p3.diff, TestClient.java
>
>
> I'm branching out this issue into server and client changes. Since the 
> changes are incremental and small, DERBY-728 would soon become confusing if 
> it had to bear the patches for both server and client.
> For future reference, some patches have actually been applied in DERBY-728. 
> These **ARE** also required for the server implementation.

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

Reply via email to