[
https://issues.apache.org/jira/browse/DERBY-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kristian Waagan updated DERBY-1595:
-----------------------------------
Attachment: derby-1595-1a-client_write6bytes.diff
Attaching patch 1a, which is client change only.
The number of extended length bytes depends on the length of the value to be
transferred. The code is capable of choosing between 2, 4, 6 or 8 bytes. At
some point an invalid change was introduced into the client, where a long (8
bytes) was written onto the wire when only 6 bytes were required for the
length. The server expected 6 bytes, and this disagreement resulted in a
protocol error.
I'm not sure using 6 instead of 8 bytes matters regarding performance, but I
chose to use 6 bytes because:
o the DRDA spec may mandate this (I haven't checked)
o the server already expects 6 bytes, using 8 would require server side
changes as well and would lead to incompatibilities when using the new client
driver with old server versions
Note that this patch itself doesn't necessarily solve the reported problem, as
the client code is likely to run into an int overflow. I'll address this in a
separate patch.
suites.All ran without failures, I'm running derbyall now
Patch ready for review. I expect to commit the patch tomorrow.
> Network server fails with DRDAProtocolException if a BLOB with size
> 2147483647 is streamed from client
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-1595
> URL: https://issues.apache.org/jira/browse/DERBY-1595
> Project: Derby
> Issue Type: Bug
> Components: Network Server
> Affects Versions: 10.2.1.6
> Reporter: Andreas Korneliussen
> Assignee: Kristian Waagan
> Priority: Minor
> Fix For: 10.7.0.0
>
> Attachments: derby-1595-1a-client_write6bytes.diff
>
>
> When executing a program which inserts a BLOB of size 2GB-1, the Network
> server fails with DRDAProtocolException. This happens before it starts
> handling the actual LOB data:
> java org.apache.derby.drda.NetworkServerControl start
> Apache Derby Network Server - 10.2.0.4 alpha started and ready to accept
> connections on port 1527 at 2006-07-26 14:15:21.284 GMT
> Execution failed because of a Distributed Protocol Error:
> DRDA_Proto_SYNTAXRM; CODPNT arg = 0; Error Code Value = c
> org.apache.derby.impl.drda.DRDAProtocolException
> at
> org.apache.derby.impl.drda.DRDAConnThread.throwSyntaxrm(DRDAConnThread.java:441)
> at
> org.apache.derby.impl.drda.DDMReader.readLengthAndCodePoint(DDMReader.java:554)
> at
> org.apache.derby.impl.drda.DDMReader.getCodePoint(DDMReader.java:617)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA_work(DRDAConnThread.java:4072)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA(DRDAConnThread.java:3928)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnThread.java:3806)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.java:3640)
> at
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:928)
> at
> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:254)
> null
> org.apache.derby.impl.drda.DRDAProtocolException
> at
> org.apache.derby.impl.drda.DRDAConnThread.throwSyntaxrm(DRDAConnThread.java:441)
> at
> org.apache.derby.impl.drda.DDMReader.readLengthAndCodePoint(DDMReader.java:554)
> at
> org.apache.derby.impl.drda.DDMReader.getCodePoint(DDMReader.java:617)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA_work(DRDAConnThread.java:4072)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseSQLDTA(DRDAConnThread.java:3928)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTTobjects(DRDAConnThread.java:3806)
> at
> org.apache.derby.impl.drda.DRDAConnThread.parseEXCSQLSTT(DRDAConnThread.java:3640)
> at
> org.apache.derby.impl.drda.DRDAConnThread.processCommands(DRDAConnThread.java:928)
> at
> org.apache.derby.impl.drda.DRDAConnThread.run(DRDAConnThread.java:254)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.