[
https://issues.apache.org/jira/browse/TRAFODION-37?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14628232#comment-14628232
]
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_r34690758
--- Diff: core/conn/jdbc_type2/native/CSrvrConnect.cpp ---
@@ -457,6 +461,23 @@ SRVR_STMT_HDL *SRVR_CONNECT_HDL::getSrvrStmt(long
dialogueId,long stmtId,long
FUNCTION_RETURN_PTR(NULL,(NULL));
}
+SRVR_STMT_HDL *SRVR_CONNECT_HDL::getInternalSrvrStmt(long dialogueId,
const char* stmtLabel, long *sqlcode)
+{
+ FUNCTION_ENTRY("getInternalSrvrStmt",("dialogueId=0x%08x,
stmtLabel=0x%08x, sqlcode=0x%08x",
+ dialogueId,
+ stmtLabel,
+ sqlcode));
+
+ SRVR_STMT_HDL *pSrvrStmt = NULL;
+
+ MapOfInternalSrvrStmt::iterator iterOfStmtId =
mapOfInternalSrvrStmt.find(stmtLabel);
+ if( !(iterOfStmtId == mapOfInternalSrvrStmt.end()) )
+ pSrvrStmt =(SRVR_STMT_HDL *)iterOfStmtId->second;
+
+ if(pSrvrStmt != NULL)
+ FUNCTION_RETURN_PTR(pSrvrStmt,(NULL));
+}
--- End diff --
What happens if pSrvrStmt is NULL? (I don't see a return statement for this
case.)
> 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)