trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zellerh <...@git.apache.org>
Subject [GitHub] trafodion pull request #1504: [TRAFODION-3009] Streamline error handling in ...
Date Tue, 03 Apr 2018 17:54:55 GMT
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?


---

Mime
View raw message