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.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---