Repository: trafodion Updated Branches: refs/heads/master d0431cbad -> 96de4b4c1
TRAFODION-3166 enhance 8427 error detail when thrown by sequence operator Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/5c51fa32 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/5c51fa32 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/5c51fa32 Branch: refs/heads/master Commit: 5c51fa32902cafeda6bcbdcef17e5c5c0d974369 Parents: 20724db Author: Prashant Vasudev <[email protected]> Authored: Thu Jul 26 01:19:49 2018 +0000 Committer: Prashant Vasudev <[email protected]> Committed: Thu Jul 26 01:19:49 2018 +0000 ---------------------------------------------------------------------- core/sql/executor/ExSequence.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/5c51fa32/core/sql/executor/ExSequence.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExSequence.cpp b/core/sql/executor/ExSequence.cpp index 9458c19..aa2d905 100644 --- a/core/sql/executor/ExSequence.cpp +++ b/core/sql/executor/ExSequence.cpp @@ -1487,7 +1487,35 @@ void ExSequenceTcb::updateDiagsArea( ExeErrorCode rc_) } if (!da->contains((Lng32) -rc_)) { - *da << DgSqlCode(-rc_); + char msg[512]; + if(rc_ == EXE_SORT_ERROR) + { + char errorMsg[100]; + Lng32 scratchError = 0; + Lng32 scratchSysError = 0; + Lng32 scratchSysErrorDetail = 0; + + if(clusterDb_) + { + clusterDb_->getScratchErrorDetail(scratchError, + scratchSysError, + scratchSysErrorDetail, + errorMsg); + + str_sprintf(msg, "Sequence Scratch IO Error occurred. Scratch Error: %d, System Error: %d, System Error Detail: %d, Details: %s", + scratchError, scratchSysError, scratchSysErrorDetail, errorMsg); + } + else + { + str_sprintf(msg, "Sequence Scratch IO Error occurred." ); + } + } + else + { + str_sprintf(msg, "Sequence Operator Error occurred."); + } + + *da << DgString0(msg); } } //
