You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/10/18 11:42:10 UTC
[3/4] incubator-trafodion git commit: Fix to take care of review
comments by Dave Birdsall
Fix to take care of review comments by Dave Birdsall
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/fe0cc2ff
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/fe0cc2ff
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/fe0cc2ff
Branch: refs/heads/master
Commit: fe0cc2fff730a474bf0a1c7345261b68970283e7
Parents: fe5ca99
Author: Narendra Goyal <na...@esgyn.com>
Authored: Mon Oct 10 17:58:54 2016 +0000
Committer: Narendra Goyal <na...@esgyn.com>
Committed: Mon Oct 10 17:58:54 2016 +0000
----------------------------------------------------------------------
core/sql/exp/exp_fixup.cpp | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/fe0cc2ff/core/sql/exp/exp_fixup.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_fixup.cpp b/core/sql/exp/exp_fixup.cpp
index 12fa932..ed39d1e 100644
--- a/core/sql/exp/exp_fixup.cpp
+++ b/core/sql/exp/exp_fixup.cpp
@@ -1804,20 +1804,21 @@ void ex_conv_clause::populateInstrOffsetIndex()
}
// Allocate a sparsely populated array
- sv_convIndexSparse = (int *) calloc(sizeof(int),
- (sv_MaxOpTypeValue+1));
+ int *lv_convIndexSparse = (int *) calloc(sizeof(int),
+ (sv_MaxOpTypeValue+1));
// Initialize to -1
for (j = 0; j <= sv_MaxOpTypeValue; j++) {
- sv_convIndexSparse[j] = -1;
+ lv_convIndexSparse[j] = -1;
}
// Setup the sparsely populated array
j = 0;
while (j <= lv_MaxIndex) {
- sv_convIndexSparse[lv_convIndex[j].type_op1] = lv_convIndex[j].offset;
+ lv_convIndexSparse[lv_convIndex[j].type_op1] = lv_convIndex[j].offset;
j++;
}
+ sv_convIndexSparse = lv_convIndexSparse;
sv_instrOffsetIndexPopulated = true;
}
@@ -1826,10 +1827,6 @@ void ex_conv_clause::populateInstrOffsetIndex()
*/
int ex_conv_clause::getInstrOffset(short pv_op1)
{
- if (! sv_instrOffsetIndexPopulated) {
- ex_conv_clause::populateInstrOffsetIndex();
- }
-
if ((pv_op1 < 0) ||
(pv_op1 > sv_MaxOpTypeValue)) {
return -1;