Github user zellerh commented on a diff in the pull request: https://github.com/apache/trafodion/pull/1504#discussion_r178898607 --- 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 -- Should we rely on the assumption that retcode is non-zero when we reach here? Maybe better to set it explicitly to some defined value, something indicating that an error occurred but that we found no diagnostics information?
---