[
https://issues.apache.org/jira/browse/TRAFODION-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14629202#comment-14629202
]
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_r34756095
--- Diff: core/conn/jdbc_type2/native/SqlInterface.cpp ---
@@ -4440,3 +4440,45 @@ void CreateModulePlan(long inputParamCount,
InputDescInfo *inputDescInfo, char *
}
}
}
+
+SQLRETURN COMMIT_ROWSET(long dialogueId, bool& bSQLMessageSet,
odbc_SQLSvc_SQLError* SQLError, Int32 currentRowCount)
+{
+ SQLRETURN retcode;
+ long sqlcode;
+ SQLValueList_def inValueList;
+ inValueList._buffer = NULL;
+ inValueList._length = 0;
+
+ SRVR_STMT_HDL *CmwSrvrStmt = getInternalSrvrStmt(dialogueId,
"STMT_COMMIT_1", &sqlcode);
+ /* Should process the error here if CmwSrvrStmt is NULL */
--- End diff --
For now we make sure this statement is prepared during the connection
phase, MXOSRVR do it the same way without a NULL validation, I'm not sure has
anyone ever met this kind of problem yet. T2 now has no mechanism to process
this kind of null statement error. I'm thinking to return the error back to
JAVA layer to throw an exception out, it will be included in the new rowset
execute() operation code.
> 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)