[
https://issues.apache.org/jira/browse/DERBY-2923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Øystein Grøvlen updated DERBY-2923:
-----------------------------------
Attachment: softupgradefix.diff
The attached patch, softupgradefix.diff, fixes the problem with soft upgrade.
It turns out one is determining nullability in a different way when writing
EXTDTA than for other data. When using OUTOVR to override types, a type value
of 0 is a request for using the default type. DRDAResultSet#getRsDRDAType(int)
had been fixed to handle this, but DRDAResultSet#isExtDtaValueNullable() uses
DRDAResultSet#getRsDRDATypes() and fetches the entire array and does the lookup
itself.
This fix makes DRDAResultSet#isExtDtaValueNullable() use
DRDAResultSet#getRsDRDAType(int), instead.
I have manually tested that the failure during soft upgrade does not happen
anymore. I am running the Junit All suite and derbyall and will report back
with the result tomorrow.
I will also consider whether is possible to remove the
DRDAResultSet#getRsDRDATypes() entirely in order to avoid similar mistakes in
the future.
> Incorrect reading of nullable Blob/Clob columns during soft upgrade with
> client/server
> --------------------------------------------------------------------------------------
>
> Key: DERBY-2923
> URL: https://issues.apache.org/jira/browse/DERBY-2923
> Project: Derby
> Issue Type: Bug
> Components: Network Server
> Affects Versions: 10.3.0.0, 10.3.1.0, 10.3.1.1
> Environment: Client/server soft upgrade
> Reporter: Øystein Grøvlen
> Assignee: Øystein Grøvlen
> Priority: Blocker
> Fix For: 10.3.1.1
>
> Attachments: SimpleBlobTest.java, softupgradefix.diff
>
>
> Select operations with client/server and soft upgrade mode will not see first
> byte of the Blob/Clob if the LOB column is nullable.
> The reason seems to be that during soft upgrade, the network server does not
> prepend the LOB data with the byte indicating whether the column is null or
> not. Hence, the first data byte will be interpreted by the client as the
> null byte, and the reading of the LOB will start at the second byte.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.