Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2309] Memory leak observed in Repository context #783

Merged
merged 1 commit into from
Oct 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -1026,6 +1049,9 @@ static void* SessionWatchDog(void* arg)
}
}
}

pSrvrStmt->cleanupAll();
REALLOCSQLMXHDLS(pSrvrStmt);
}//End while

}
Expand Down
1 change: 1 addition & 0 deletions core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,7 @@ rePrepare2( SRVR_STMT_HDL *pSrvrStmt
&pSrvrStmt->m_need_21036_end_msg,
inSqlNewQueryType);
delete inSqlString;
delete tmpSqlString;
}
//end rs
} // end rePrepare2
Expand Down