the assert is good, just need to fix the comments
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/df89cd6c Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/df89cd6c Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/df89cd6c Branch: refs/heads/master Commit: df89cd6c4f77f36031ca6f5000d0612d3edf0394 Parents: 159a26d Author: Liu Ming <[email protected]> Authored: Sun Sep 9 11:17:48 2018 +0000 Committer: Liu Ming <[email protected]> Committed: Sun Sep 9 11:17:48 2018 +0000 ---------------------------------------------------------------------- core/sql/executor/ExExeUtilCli.cpp | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/df89cd6c/core/sql/executor/ExExeUtilCli.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExExeUtilCli.cpp b/core/sql/executor/ExExeUtilCli.cpp index 058ea11..434e4dd 100644 --- a/core/sql/executor/ExExeUtilCli.cpp +++ b/core/sql/executor/ExExeUtilCli.cpp @@ -46,6 +46,8 @@ OutputInfo::OutputInfo(Lng32 numEntries) : numEntries_(numEntries) { + ex_assert( numEntries <= MAX_OUTPUT_ENTRIES, "try to fetch more than max columns allowed"); + for (Int32 i = 0; i < numEntries_; i++) { data_[i] = NULL;
