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 2017/12/20 07:05:56 UTC
[1/2] incubator-trafodion git commit: [TRAFODION-2853] Memory leak of
ComDiagsArea in Context
Repository: incubator-trafodion
Updated Branches:
refs/heads/master c0583c994 -> 5635e6399
[TRAFODION-2853] Memory leak of ComDiagsArea in Context
CLI entry points to LOB and Sequence generator didn't deallocate
the local diags area.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/84679539
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/84679539
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/84679539
Branch: refs/heads/master
Commit: 84679539534747e52a18c07070011641062f8783
Parents: c0583c9
Author: selvaganesang <se...@esgyn.com>
Authored: Mon Dec 18 23:18:42 2017 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Mon Dec 18 23:18:42 2017 +0000
----------------------------------------------------------------------
core/sql/cli/Cli.cpp | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/84679539/core/sql/cli/Cli.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp
index 3f88eac..be9181a 100644
--- a/core/sql/cli/Cli.cpp
+++ b/core/sql/cli/Cli.cpp
@@ -9222,8 +9222,10 @@ Lng32 SQLCLI_LOBcliInterface
{
diags.mergeAfter(*myDiags);
}
- return cliRC;
}
+ myDiags->deAllocate();
+ if (cliRC < 0)
+ return cliRC;
else if (cliRC == 100)
return 100;
else
@@ -9510,13 +9512,16 @@ Lng32 SQLCLI_LOB_GC_Interface
{
diags.mergeAfter(*myDiags);
}
- return cliRC;
}
+ myDiags->deAllocate();
+ if (cliRC < 0)
+ return cliRC;
else if (cliRC == 100)
return 100;
else
return 0;
}
+
Lng32 SQLCLI_LOBddlInterface
(
/*IN*/ CliGlobals *cliGlobals,
@@ -9924,8 +9929,10 @@ Lng32 SQLCLI_LOBddlInterface
{
diags.mergeAfter(*myDiags);
}
- return cliRC;
}
+ myDiags->deAllocate();
+ if (cliRC < 0)
+ return cliRC;
else if (cliRC == 100)
return 100;
else
@@ -10035,8 +10042,6 @@ Lng32 SQLCLI_SEcliInterface
ContextCli & currContext = *(cliGlobals->currContext());
ComDiagsArea & diags = currContext.diags();
- ComDiagsArea * myDiags = ComDiagsArea::allocate(currContext.exHeap());
-
ExeCliInterface *cliInterface = NULL;
if (inCliInterface && (*inCliInterface))
{
@@ -10711,8 +10716,10 @@ Lng32 SQLCLI_SeqGenCliInterface
currContext.exHeap(),
nextValue,
endValue);
- if (cliRC < 0)
- return cliRC;
+ if (cliRC < 0) {
+ myDiags->deAllocate();
+ return cliRC;
+ }
if ((sga->getSGCycleOption()) &&
(nextValue > sga->getSGMaxValue()))
@@ -10727,10 +10734,13 @@ Lng32 SQLCLI_SeqGenCliInterface
currContext.exHeap(),
nextValue,
endValue);
- if (cliRC < 0)
- return cliRC;
+ if (cliRC < 0) {
+ myDiags->deAllocate();
+ return cliRC;
+ }
}
+ myDiags->deAllocate();
sga->setSGNextValue(nextValue);
sga->setSGEndValue(endValue);
[2/2] incubator-trafodion git commit: Merge PR 1355 [TRAFODION-2853]
Memory leak of ComDiagsArea in Context
Posted by se...@apache.org.
Merge PR 1355 [TRAFODION-2853] Memory leak of ComDiagsArea in Context
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5635e639
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5635e639
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5635e639
Branch: refs/heads/master
Commit: 5635e6399b6d9a75e1578f51899b6d48fa4d90d3
Parents: c0583c9 8467953
Author: selvaganesang <se...@apache.org>
Authored: Wed Dec 20 07:04:04 2017 +0000
Committer: selvaganesang <se...@apache.org>
Committed: Wed Dec 20 07:04:04 2017 +0000
----------------------------------------------------------------------
core/sql/cli/Cli.cpp | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------