You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "V.Narayanan (JIRA)" <ji...@apache.org> on 2007/03/31 17:38:25 UTC

[jira] Created: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

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




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


[jira] Closed: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan closed DERBY-2506.
------------------------------


All patches submitted and committed.

> 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
>          Components: Network Server
>            Reporter: V.Narayanan
>            Assignee: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff, PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Derby Info: [Patch Available]

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat
>
>


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


[jira] Assigned: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan reassigned DERBY-2506:
----------------------------------

    Assignee: V.Narayanan

> 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
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485768 ] 

V.Narayanan commented on DERBY-2506:
------------------------------------

I ran derbyall and see some failures in jdbcapi/parameterMapping.java and jdbcapi/resultsetStream.java in the DerbyNetClient framework. I haven't looked more into these failures. I will post the results as soon as I am done looking into them.

> 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: PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492681 ] 

Rick Hillegas commented on DERBY-2506:
--------------------------------------

Thanks for the patch, Narayanan. I have a couple questions:

1) You have added some trace code to DRDAConnThread. Do you really want these tracesto be printed out whenever we are running debug jars? Should these traces be enabled by some particular tracepoint? Alternatively, is this just scaffolding which can be removed when you are done debugging this code?

2) In NetStatementRequest.computeProtocolTypesAndLengths(), you are using the non-nullable DRDA types for locators. All of the other cases in this switch statement are using the nullable DRDA types. If you are sure that you should be using DRDA_TYPE_LOBLOC and DRDA_TYPE_CLOBLOC rather than DRDA_TYPE_NLOBLOC and DRDA_TYPE_NCLOBLOC, could you include a comment explaining why the locator cases are different from the other cases?

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ 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: org.apache.derbyTesting.functionTests.tests.junitTests.compatibility.JDBCDriverTest$MyBlob 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 a
user implementation of the java.sql.Blob interface. In the JDBCDriverTest MyBlob extends from java.sql.Blob
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 method
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.


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_Test_diff.stat
                PreparedCallable_DRDA_Test_diff.diff

Attached is the code that contains the changes I had to make to test the DRDA patch attached earlier.
The following is a detailed explanation of the changes made in this patch.

M      java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

Contains DRDA changes same as in the previous patch submitted.

M      java/client/org/apache/derby/client/net/NetConnection40.java

Moved the createClob and the createBlob methods into Connection.

M      java/client/org/apache/derby/client/net/NetStatementRequest.java

Contains the DRDA changes same as in previous patch submitted.

M      java/client/org/apache/derby/client/am/Connection.java

Contains the implementaion of the createClob and the createBlob methods. 
In order to implement these methods I call CLOBCREATELOCATOR and 
BLOBCREATELOCATOR repectively to creat a valid locator value and then 
supply this locator as a parameter to the Blob and Clob constructor.

M      java/client/org/apache/derby/client/am/Blob.java
M      java/client/org/apache/derby/client/am/Clob.java

Implemented a constructor that will accept as locator as a parameter. 

M      java/client/org/apache/derby/client/am/Lob.java

The getLocator method that returns the locator value associated with this LOB.
The isLocator method that indicates whether this LOB is locator enabled or not. 

X      tools/testing/derby

Performing status on external item at 'tools/testing/derby/10.1'

> 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: 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.


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12485732 ] 

V.Narayanan commented on DERBY-2506:
------------------------------------

This DRDA related work will be useful for modification of the PreparedStatement and the CallableStatement LOB related methods (e.g. setClob, setBlob) to use locators.

> 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
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_Test_diff_v3.stat
                PreparedCallable_DRDA_Test_diff_v3.diff

Made the corresponding change to the test code I wrote too. (Did not make the private change here since this is only test code and is not for a commit). Named it as v3 corresponding to the main patch.

NOTE:

PreparedCallable_DRDA_v3.diff is for commit

PreparedCallable_DRDA_Test_diff_v3.diff is test code and is *NOT* for commit.

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_v4.stat
                PreparedCallable_DRDA_v4.diff

Derby-2496 adds a constructor that accepts a locator value to the Blob implementation in the Network Client (am/Blob.java).

I have modified this patch to include the constructor in patch for Derby-2496. 

Also the isLocator() method that is part of v3 is not right either since it is not supposed to tell whether locators are supported or not, but whether this specific object is locator based.

Also I will mark this issue as dependent on the same.

Pls Note that v4 can be committed only after the patch for Derby-2496 is committed.


> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: BlobLocatorTestProgram.java

This is a very simple test program that tests that after applying PreparedCallable_DRDA_Test_diff.diff a empty Clob and a empty Blob are properly inserted into the database. This would help ensure that the DRDA changes made as part of  PreparedCallable_DRDA_v2.diff are correct.

> 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.


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-2506:
-----------------------------------

    Derby Info:   (was: [Patch Available])

Another task with "Patch Available" set, but apparently no patch is available... (it has been committed)

Has it been resolved as well?
Should "Fix Version/s" be updated?

> 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
>          Components: Network Server
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff, PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_v3.stat
                PreparedCallable_DRDA_v3.diff

Fixed the failure. I ran junit tests and derbyall and they ran fine. (After running Tests, in addition to the change mentioned earlier, I made one small change in changing locator_ attribute in the Lob class to private since it will not be used outside this class. Since it was a small change and ouldn't affect anything I did not rerun the tests after changing this attribute to private).

Pls consider PreparedCallable_DRDA_v3.diff for reviews and comments and if everything is OK a commit too.

> 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, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_v5.stat
                PreparedCallable_DRDA_v5.diff

Thanx a ton for the reviews and comments Rick.

Pls find some answers to the issues pointed.

>1) You have added some trace code to DRDAConnThread. Do you really want these tracesto be printed out >whenever we are running debug jars? Should these traces be enabled by some particular tracepoint? >Alternatively, is this just scaffolding which can be removed when you are done debugging this code?

I got the following extract from http://wiki.apache.org/db-derby/ProtocolDebuggingTips

Server SanityManager.DEBUG Output

With a sane build, you can set the derby property, derby.drda.debug=true. This will produce debug output on the server console which can be helpful in debugging protocol issues. This property also launches a thread which will print periodic memory usage information for the server jvm, so can be useful in debugging memory leaks as well. 

Also these traces exist for other Lid constant cases as well. 

>2) In NetStatementRequest.computeProtocolTypesAndLengths(), you are using the non-nullable DRDA types for >locators. All of the other cases in this switch statement are using the nullable DRDA types. If you are sure that >you should be using DRDA_TYPE_LOBLOC and DRDA_TYPE_CLOBLOC rather than DRDA_TYPE_NLOBLOC >and DRDA_TYPE_NCLOBLOC, could you include a comment explaining why the locator cases are different from >the other cases?

You are correct. These should have been Nullable. The patch attached addresses this issue. 

I am running tests on this patch and shall post the results as soon as the tests complete.

I request for this patch to be considered for reviews and comments.

Thanx again for the comments and review Rick.

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "Mike Matrigali (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Matrigali updated DERBY-2506:
----------------------------------

    Component/s: Network Server

> 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
>          Components: Network Server
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff, PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493072 ] 

V.Narayanan commented on DERBY-2506:
------------------------------------

I ran tests (junit All) on v5 and there were no failures. I request for v5 to be considered for reviews and comments and if everything is OK a commit too.

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Resolved: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan resolved DERBY-2506.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 10.3.0.0

The final patch to this issue has been committed, hence resolving the issue.

> 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
>          Components: Network Server
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>             Fix For: 10.3.0.0
>
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff, PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493201 ] 

Rick Hillegas commented on DERBY-2506:
--------------------------------------

Thanks for the explanation and changes, Narayanan. The tests run cleanly for me too. Committed v5 at subversion revision 534610.

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_v2.stat
                PreparedCallable_DRDA_v2.diff

I have fixed the errors I encountered in the previous patch.

Failures due to
---------------------

* When a column was being initialized to null the check in 
   computeProtocolTypesAndLengths (i.e.)
   if(inputRow[i] instanceof java.sql.Blob) returns false and
   the FDODSC field in the SQLDTA was being initialized to
   contain a valid locator type causing the failures of the tests.

In the current patch I have made the following changes
---------------------------------------------------------------------------
   
   1) I have added a isLocator method to am/Lob class that 
        return a boolean to inicate of locator support is available
        or not. As of now the method always returns false.
         Added a getLocator method to the Lob class that returns
         the locator value associated with this LOB. As of now
         it returns -1 always.
   2) In the computProtocolsAndLengths method I use the isLocator
        check to determine if the LOB supports locator and set the 
         LID (local identifier)
   3)  In the buildFDODTA I use the LID to determine that the inputs array
         is supposed to contain a locator value and use the getLocator
         method to set the locator value in the FDODTA field of the SQLDTA.

I ran the junit and non-junit tests of the jdbcapi suite and they ran fine. I have run derbyall on this patch and shall report the results tomorrow.

Subsequent attachment contains the code that represents the changes I had to make to check the working of this patch.

Pls consider this patch for reviews and comments.    

> 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: 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.


[jira] Updated: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

V.Narayanan updated DERBY-2506:
-------------------------------

    Attachment: PreparedCallable_DRDA_v1.stat
                PreparedCallable_DRDA_v1.diff

The patch attached contains the modifications to the following files

M      java/client/org/apache/derby/client/net/NetStatementRequest.java

Here the LID local identifier in the FDODSC FD:OCA descriptor should be initialized as to contain a LOB locator. These changes are made in the computeProtocolTypesAndLengths method. Here when the jdbctype is found to be of type 
java.sql.Types.CLOB or java.sql.Types.BLOB the Local Identifier (LID) is initialized to contain the DRDA_TYPE_NLOB and DRDA_TYPE_NCLOB. This information will be used in the server upon the parsing of the SQLDTA object.

The locator value associated with the LOB is set in the FDODTA FD:OCA data object. This is done in the buildFDODTA method.

M      java/drda/org/apache/derby/impl/drda/DRDAConnThread.java

The information got upon parsing the SQLDTA is used to obtain the locator value. This locator value is then mapped to the corresponding locator object that would be stored in the HashMap.

I tested this code with crude implementations of the following methods. I call it crude because there now exists a JIRA for the creation of a framework for calling the stored procedures DERBY-2495. I had however called then directly without using the framework. I implemented the following methods

1) Connection.createClob 
2) Connection.createBlob
3) PreparedStatement.setBlob
4) PreparedStatement.setBlob
5) added a constructor that will accept a locator in Blob (useful when called from con.createBlob())
6) added a constructor that will accept a locator in Clob (useful when called from con.createClob())

I will post that patch also which can be used as a test for this DRDA patch. I need to do a bit of cleanup on that patch and will be posting it tomorrow or on Monday.

I also have not run derbyall and junit all on this patch yet. I will post the results of these runs tomorrow.

Pls consider this patch for reviews and comments.


> 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: PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494303 ] 

V.Narayanan commented on DERBY-2506:
------------------------------------

Thank you Kristian. I will not be submitting any more patches to the issue since the final patch has been committed. I will mark it resolved.

> 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
>          Components: Network Server
>            Reporter: V.Narayanan
>         Assigned To: V.Narayanan
>         Attachments: BlobLocatorTestProgram.java, PreparedCallable_DRDA_Test_diff.diff, PreparedCallable_DRDA_Test_diff.stat, PreparedCallable_DRDA_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat, PreparedCallable_DRDA_v5.diff, PreparedCallable_DRDA_v5.stat
>
>


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


[jira] Commented: (DERBY-2506) Adding the locator information to FD:OCA descriptor (FDODSC) andFD:OCA data (FDODTA) of the SQLDTA objects

Posted by "V.Narayanan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-2506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492637 ] 

V.Narayanan commented on DERBY-2506:
------------------------------------

Derby-2496 has been committed. Hence this patch is not blocked anymore. I applied this patch to a freshworkspace and ran tests(junit All) they ran cleanly. I request for someone to consider this patch for reviews and comments and if everything is ok a commit too.

> 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_Test_diff_v3.diff, PreparedCallable_DRDA_Test_diff_v3.stat, PreparedCallable_DRDA_v1.diff, PreparedCallable_DRDA_v1.stat, PreparedCallable_DRDA_v2.diff, PreparedCallable_DRDA_v2.stat, PreparedCallable_DRDA_v3.diff, PreparedCallable_DRDA_v3.stat, PreparedCallable_DRDA_v4.diff, PreparedCallable_DRDA_v4.stat
>
>


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