[ https://issues.apache.org/jira/browse/TRAFODION-3009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16424459#comment-16424459 ]
ASF GitHub Bot commented on TRAFODION-3009: ------------------------------------------- Github user selvaganesang commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1504#discussion_r178932278 --- Diff: core/sql/executor/ExExeUtilCommon.cpp --- @@ -669,7 +669,9 @@ short ExExeUtilTcb::executeQuery(char * task, char * stringParam1 = NULL; Lng32 intParam1 = ComDiags_UnInitialized_Int; - retcode = (short)cliInterface()->retrieveSQLDiagnostics(getDiagsArea()); + setDiagsArea(cliInterface()->allocAndRetrieveSQLDiagnostics(getDiagsArea())); + if (getDiagsArea() != NULL) + retcode = 0; --- End diff -- Yes. We can rely on that assumption. It is strange that the earlier code sets the sqlcode to the return code of SQL_EXEC_MergeDiagnosticsInternal to be the sqlcode. See line 700 below. When we are able to obtain the diagnostics area, the sqlcode is set the main error code > Streamline error handling in Executor utility commands > ------------------------------------------------------ > > Key: TRAFODION-3009 > URL: https://issues.apache.org/jira/browse/TRAFODION-3009 > Project: Apache Trafodion > Issue Type: Improvement > Components: -exe, sql-exe > Reporter: Selvaganesan Govindarajan > Assignee: Selvaganesan Govindarajan > Priority: Major > > Executor utility commands are the commands that issue sql statements during > its execution to complete its task. These operators are derived from > ExExeUtilTcb operator in Trafodion. These commands assume ComDiagsArea is > allocated in advance. This is not in accordance with the design as outlined in > [https://cwiki.apache.org/confluence/display/TRAFODION/SQL+Diagnostics+Architecture+and+Design] > -- This message was sent by Atlassian JIRA (v7.6.3#76005)