[ 
https://issues.apache.org/jira/browse/TRAFODION-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629213#comment-14629213
 ] 

ASF GitHub Bot commented on TRAFODION-37:
-----------------------------------------

Github user ryzuo commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/28#discussion_r34756383
  
    --- Diff: core/conn/jdbc_type2/native/SrvrKds.cpp ---
    @@ -193,3 +196,43 @@ void kdsCopyToSQLValueSeq(SQLValueList_def 
*SQLValueList,
        SQLValueList->_length++;
        FUNCTION_RETURN_VOID((NULL));
     }
    +void kdsCopySQLErrorExceptionAndRowCount(
    +                                                   odbc_SQLSvc_SQLError 
*SQLError, 
    +                                                   char *msg_buf,
    +                                                   long sqlcode,
    +                                                   char *sqlState,
    +                                                   long currentRowCount)
    +{
    +   SRVRTRACE_ENTER(FILE_KDS+6);
    +   ERROR_DESC_def *SqlErrorDesc;
    +   size_t  len;
    +
    +   len = strlen(msg_buf);
    +   // Allocate String Buffer
    +   
    +   SqlErrorDesc = (ERROR_DESC_def *)SQLError->errorList._buffer + 
SQLError->errorList._length;
    +   SqlErrorDesc->errorText = new char[len+1];
    +   if (SqlErrorDesc->errorText == NULL)
    +   {
    +           exit(0);
    --- End diff --
    
    T2 do has no memory allocation failure management, even in its wrapped 
MEMORY_ALLOC macros, it always simply exit. Memory control enhancement is 
another thing that we are trying to do. In the past in MXOSRVR, this kind of 
error is written into event repository, but now we don't have repository 
enabled yet, so we just keep it this way shortly.


> Get "ROLLBACK WORK" and "COMMIT WORK" transactions be prepared when T2 driver 
> is establishing connection
> --------------------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-37
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-37
>             Project: Apache Trafodion
>          Issue Type: Improvement
>            Reporter: RuoYu Zuo
>            Assignee: RuoYu Zuo
>              Labels: features
>
> To make T2 driver supports rowset operation to enhance the performance of 
> batch insert and update, two SQL transactions ("commit" to make a succeeded 
> execution and "rollback" for failure) are required to be prepared in advance, 
> which shall be triggered in executing phase of rowset operation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to