[ 
https://issues.apache.org/jira/browse/TRAFODION-3327?focusedWorklogId=322131&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-322131
 ]

ASF GitHub Bot logged work on TRAFODION-3327:
---------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Oct/19 18:38
            Start Date: 02/Oct/19 18:38
    Worklog Time Spent: 10m 
      Work Description: DaveBirdsall commented on pull request #1857: 
[TRAFODION-3327] LOB support in T2 driver
URL: https://github.com/apache/trafodion/pull/1857#discussion_r330703710
 
 

 ##########
 File path: core/conn/jdbc_type2/native/SrvrOthers.cpp
 ##########
 @@ -1529,3 +1529,127 @@ odbc_SQLSvc_CloseUsingLabel_sme_(
     }
     FUNCTION_RETURN_VOID((NULL));
 }
+
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+    /* In    */ void *objtag_
+  , /* In    */ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In    */ long dialogueId
+  , /* In    */ IDL_short extractLobAPI
+  , /* In    */ IDL_string lobHandle
+  , /* In    */ IDL_long_long &lobLength
+  , /* Out   */ IDL_long_long &extractLen
+  , /* Out   */ BYTE *& extractData
+  )
+{
+    char lobExtractQuery[1000] = {0};
+    long sqlcode;
+    SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+    if ((QryLobExtractSrvrStmt = createSrvrStmt(dialogueId, 
"MXOSRVR_EXTRACTLOB", &sqlcode, 
+                       NULL, 0, 0, TYPE_UNKNOWN, false,false)) == NULL) 
+    {
+       exception_->exception_nr = odbc_SQLSvc_ExtractLob_SQLInvalidhandle_exn_;
+       return;
+    }
+    switch (extractLobAPI) {
+    case 0:
+        snprintf(lobExtractQuery, sizeof(lobExtractQuery), "EXTRACT 
LOBLENGTH(LOB'%s') LOCATION %llu", lobHandle, (Int64)&lobLength);
 
 Review comment:
   Is there a maximum size on strlen(lobHandle)? If not, then long lobHandle 
values (on the order of 980 characters or so) will cause truncation of 
lobExtractQuery, resulting in a SQL error. One way to work around this is to 
use a dynamic array size when declaring the lobExtractQuery array, so we can 
guarantee enough space.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 322131)
    Time Spent: 40m  (was: 0.5h)

> LOB support in T2 driver
> ------------------------
>
>                 Key: TRAFODION-3327
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-3327
>             Project: Apache Trafodion
>          Issue Type: New Feature
>          Components: client-jdbc-t2
>            Reporter: Selvaganesan Govindarajan
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> LOB support in T2 driver doesn't use the concepts of LOB in Trafodion SQL 
> engine.  The existing code used the legacy code that was inherited from HP 
> that couldn't be used with new CLOB/BLOB concepts in Trafodion SQL engine.  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to