[
https://issues.apache.org/jira/browse/TRAFODION-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628440#comment-14628440
]
ASF GitHub Bot commented on TRAFODION-37:
-----------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/28#discussion_r34707304
--- 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 --
Is this what the T2 driver code normally does on a memory allocation
failure? How will we know that it was a memory allocation failure?
> 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)