db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "V.Narayanan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects
Date Wed, 04 Apr 2007 15:33:32 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486678

V.Narayanan commented on DERBY-2506:

My derbyall on this patch finished today morning and I had one failure in the JDBCDriverTest
of the compatibility suite.

> There was 1 error:
> 1) testJDBCDriver(org.apache.derbyTesting.functionTests.tests.junitTests.compatibility.JDBCDriverTest)java.lang.ClassCastException:
cannot be cast to org.apache.derby.client.am.Blob

The error occurred because in the computProtocolAndLengths method of the NetStatementRequest
class I do

else if (((Blob)b).isLocator()){
+                        //we are sending locators.
+                        //Here the LID local identifier in the FDODSC
+                        //FD:OCA descriptor should be initialized as
+                        //to contain a BLOB locator.
+                        lidAndLengths[i][0] = 
+                                    DRDAConstants.DRDA_TYPE_LOBLOC;
+                        lidAndLengths[i][1] = 4;

This fails when you use the setObject method of the PreparedStatement class and pass as parameter
user implementation of the java.sql.Blob interface. In the JDBCDriverTest MyBlob extends from
and a setObject is done on the MyBlob object.

To overcome this the same method as currently followed for the Layer B streaming (i.e)

if( b instanceof Blob &&  ( (Blob) b).willBeLayerBStreamed() ) 

check to see if the Blob is of type org.apache.derby.client.am.Blob and then call the isLocator
should be done.

It is a very small change. I have done this and have restarted the derbyall and junit tests.

I shall report with these test results tommorrow.

> Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA)
 of the SQLDTA objects
> -----------------------------------------------------------------------------------------------------------
>                 Key: DERBY-2506
>                 URL: https://issues.apache.org/jira/browse/DERBY-2506
>             Project: Derby
>          Issue Type: Sub-task
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff,
PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat,
PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat

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

View raw message