You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by su...@apache.org on 2016/10/26 18:21:27 UTC
[1/2] incubator-trafodion git commit: [TRAFODION-2309] Memory leak
observed in Repository context
Repository: incubator-trafodion
Updated Branches:
refs/heads/master db66dc292 -> fe07eda27
[TRAFODION-2309] Memory leak observed in Repository context
Following changes:
1. Use REALLOCSQLMXHDLS() after each execute.
2. Avoid missing stats message in repository context
3. Handle memory leak in reprepare (delete of tmpSqlString
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7f286d27
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7f286d27
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7f286d27
Branch: refs/heads/master
Commit: 7f286d27d1a3f46df0ba1cf10e4624399208a50a
Parents: c1be763
Author: Arvind Narain <na...@gmail.com>
Authored: Tue Oct 25 22:07:04 2016 +0000
Committer: Arvind Narain <na...@gmail.com>
Committed: Tue Oct 25 22:07:04 2016 +0000
----------------------------------------------------------------------
core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp | 26 ++++++++++++++++++++
.../odbc/src/odbc/nsksrvrcore/srvrothers.cpp | 1 +
2 files changed, 27 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7f286d27/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
index ef7efdb..096a4a5 100644
--- a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
@@ -524,6 +524,29 @@ static void* SessionWatchDog(void* arg)
okToGo = false;
}
}
+ if (okToGo)
+ {
+ retcode = pSrvrStmt->ExecDirect(NULL, "CQD HIST_MISSING_STATS_WARNING_LEVEL '0'", INTERNAL_STMT, TYPE_UNKNOWN, SQL_ASYNC_ENABLE_OFF, 0);
+ if (retcode < 0)
+ {
+ errMsg.str("");
+ if(pSrvrStmt->sqlError.errorList._length > 0)
+ p_buffer = pSrvrStmt->sqlError.errorList._buffer;
+ else if(pSrvrStmt->sqlWarning._length > 0)
+ p_buffer = pSrvrStmt->sqlWarning._buffer;
+ if(p_buffer != NULL && p_buffer->errorText)
+ errMsg << "Failed to turn off missing statistics warning - " << p_buffer->errorText;
+ else
+ errMsg << "Failed to turn off missing statistics warning - " << " no additional information";
+
+ errStr = errMsg.str();
+ SendEventMsg(MSG_ODBC_NSK_ERROR, EVENTLOG_ERROR_TYPE,
+ 0, ODBCMX_SERVER, srvrGlobal->srvrObjRef,
+ 1, errStr.c_str());
+ okToGo = false;
+ }
+ }
+
while(!record_session_done && okToGo)
{
@@ -1026,6 +1049,9 @@ static void* SessionWatchDog(void* arg)
}
}
}
+
+ pSrvrStmt->cleanupAll();
+ REALLOCSQLMXHDLS(pSrvrStmt);
}//End while
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7f286d27/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
index b24b7e7..694641f 100644
--- a/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
@@ -2334,6 +2334,7 @@ out:
&pSrvrStmt->m_need_21036_end_msg,
inSqlNewQueryType);
delete inSqlString;
+ delete tmpSqlString;
}
//end rs
} // end rePrepare2
[2/2] incubator-trafodion git commit: Merge [TRAFODION-2309] PR-783
Memory leak observed in Repository context
Posted by su...@apache.org.
Merge [TRAFODION-2309] PR-783 Memory leak observed in Repository 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/fe07eda2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/fe07eda2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/fe07eda2
Branch: refs/heads/master
Commit: fe07eda27854b6bff0e18d89fb8e238764c59234
Parents: db66dc2 7f286d2
Author: Suresh Subbiah <su...@apache.org>
Authored: Wed Oct 26 18:21:05 2016 +0000
Committer: Suresh Subbiah <su...@apache.org>
Committed: Wed Oct 26 18:21:05 2016 +0000
----------------------------------------------------------------------
core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp | 26 ++++++++++++++++++++
.../odbc/src/odbc/nsksrvrcore/srvrothers.cpp | 1 +
2 files changed, 27 insertions(+)
----------------------------------------------------------------------