Repository: trafodion
Updated Branches:
  refs/heads/master e718915a3 -> 9f4e549d0


TRAFODION-2981 mxosrvr crashes during explain using EXPLAIN_QID


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/6b8fc454
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/6b8fc454
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/6b8fc454

Branch: refs/heads/master
Commit: 6b8fc454df57076d54c3e566eec8bcd3ea806a6d
Parents: 360427c
Author: aven <shengchen...@esgyn.cn>
Authored: Tue Mar 6 17:59:04 2018 +0800
Committer: aven <shengchen...@esgyn.cn>
Committed: Tue Mar 6 17:59:04 2018 +0800

----------------------------------------------------------------------
 core/sql/executor/ExExplain.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/6b8fc454/core/sql/executor/ExExplain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExplain.cpp b/core/sql/executor/ExExplain.cpp
index b0e2a90..50c2447 100644
--- a/core/sql/executor/ExExplain.cpp
+++ b/core/sql/executor/ExExplain.cpp
@@ -1724,9 +1724,9 @@ short ExExplainTcb::getExplainFromRepos(char * qid, Lng32 
qidLen)
   if (vi->get(0, ptr, len))
     goto label_error2;
   
-  explainFragLen_ = str_decoded_len(len); // remove trailing null terminator
+  explainFragLen_ = str_decoded_len(len - 1); // remove trailing null 
terminator
   explainFrag_ = new(getHeap()) char[explainFragLen_];
-  if (str_decode(explainFrag_, explainFragLen_, ptr, len) < 0)
+  if (str_decode(explainFrag_, explainFragLen_, ptr, len - 1) < 0)
     {
       diagsArea = pEntryDown->getAtp()->getDiagsArea();
       ExRaiseSqlError(getGlobals()->getDefaultHeap(), 

Reply via email to