You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/08/17 14:16:46 UTC
[2/3] trafodion git commit: for not nullalble column bypass the
indicator get to avoid core dump
for not nullalble column bypass the indicator get to avoid core dump
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/5ddd7bfc
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/5ddd7bfc
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/5ddd7bfc
Branch: refs/heads/master
Commit: 5ddd7bfc89c9230d14aeb4b61272036a9797830a
Parents: e2a4b80
Author: Liu Ming <ov...@sina.com>
Authored: Sat Aug 11 20:17:39 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Sat Aug 11 20:17:39 2018 +0000
----------------------------------------------------------------------
core/sql/executor/ExExeUtilCli.cpp | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/5ddd7bfc/core/sql/executor/ExExeUtilCli.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExExeUtilCli.cpp b/core/sql/executor/ExExeUtilCli.cpp
index 8a47f4d..1c827f6 100644
--- a/core/sql/executor/ExExeUtilCli.cpp
+++ b/core/sql/executor/ExExeUtilCli.cpp
@@ -1304,10 +1304,19 @@ short ExeCliInterface::fetchAllRows(Queue * &infoList,
Lng32 type;
short nulind=0;
short *indaddr=&nulind;
- short **ind;
+ short **ind=&indaddr;
getAttributes(j+1, FALSE, type, len, NULL, NULL);
getPtrAndLen(j+1, ptr, len, ind);
- if( ((char*)*ind)[0] == -1 ) // NULL value
+ NABoolean nullableCol = TRUE, isNullVal = FALSE;
+ if(*ind == NULL) // It is not a nullable value
+ isNullVal = FALSE;
+ else
+ {
+ if( ((char*)*ind)[0] == -1 ) // NULL value
+ isNullVal = TRUE;
+ }
+
+ if(isNullVal)
{
oi->insert(j, NULL, 0, type);
}