Skip to content

Commit

Permalink
Merge pull request #26 from RussWhitehead/debugTrace
Browse files Browse the repository at this point in the history
ODBC-33 Release mode build fails due to debug code

Reviewed-By: Rodrigo Pastrana <[email protected]>
Reviewed-By: Richard Chapman <[email protected]>
  • Loading branch information
richardkchapman committed Jun 9, 2015
2 parents 50527dd + e76e45b commit 70477db
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
4 changes: 0 additions & 4 deletions src/hpcc_drv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,9 +487,7 @@ int OAIP_execute(IP_HDBC hdbc,
if (DAM_SUCCESS == iRetCode && szSqlBuffer[0])
sqlBuff.set(szSqlBuffer);
}
#ifdef _DEBUG
DUMP(sqlBuff.get());
#endif

//-----------------------------------
//execute the SELECT query
Expand Down Expand Up @@ -639,9 +637,7 @@ int OAIP_procedure(IP_HDBC hdbc, DAM_HSTMT hstmt, int iType, int *pi
}
if (iNumInputs)
sqlBuff.append(");");
#ifdef _DEBUG
DUMP(sqlBuff.str());
#endif

//----------------------------------------------------------
//Call HPCC to execute the stored procedure (Deployed Query)
Expand Down
2 changes: 0 additions & 2 deletions src/hpcc_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ int hpcc_exec(const char * sqlQuery, const char * targetQuerySet, HP
bool bRowAvail = pHPCCdb->ReadFirstRow(&pRow);
while (bRowAvail)
{
#ifdef _DEBUG
DUMPPTREE(pRow);
#endif
hrow = dam_allocRow(pStmtDA->dam_hstmt);//allocate a new row
aindex_t iNumColumns = pHPCCdb->queryOutputColumnDescriptorCount();
for (aindex_t col = 0; col < iNumColumns; col++)//iterate over each column in this row
Expand Down
8 changes: 0 additions & 8 deletions src/hpccdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,17 +616,13 @@ bool HPCCdb::executeSQL(const char * sql, const char * targetQuerySet, StringBuf
//-----------------
const char * resultXML = resp->getResult();

#ifdef _DEBUG
DUMP(resultXML);
#endif
Owned<IPropertyTree> resultsTree;
{
Owned<IPTreeMaker> maker = createRootLessPTreeMaker(ipt_ordered);
resultsTree.setown(createPTreeFromXMLString(resultXML, ipt_none, (PTreeReaderOptions)(ptr_noRoot | ptr_ignoreWhiteSpace), maker));
}
#ifdef _DEBUG
DUMPPTREE(resultsTree);
#endif
Owned<IPropertyTreeIterator> datasetIterator;
datasetIterator.setown(resultsTree->getElements("Dataset"));
ForEach(*datasetIterator)
Expand Down Expand Up @@ -808,17 +804,13 @@ bool HPCCdb::getMoreResults(const char * _wuid, const char * _dsName, aindex_t _
//-----------------
const char * resultXML = resp->getResult();

#ifdef _DEBUG
DUMP(resultXML);
#endif
Owned<IPropertyTree> resultsTree;
{
Owned<IPTreeMaker> maker = createRootLessPTreeMaker();
resultsTree.setown(createPTreeFromXMLString(resultXML, ipt_none, (PTreeReaderOptions)(ptr_noRoot | ptr_ignoreWhiteSpace), maker));
}
#ifdef _DEBUG
DUMPPTREE(resultsTree);
#endif
Owned<IPropertyTreeIterator> datasetIterator;
datasetIterator.setown(resultsTree->getElements("Dataset"));
ForEach(*datasetIterator)
Expand Down
3 changes: 3 additions & 0 deletions src/hpccdb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#ifdef _DEBUG
#define DUMPPTREE(pt) {StringBuffer sb;toXML(pt,sb);OutputDebugString("\n");OutputDebugString(sb.str());OutputDebugString("\n");}
#define DUMP(s) {OutputDebugString("\n");OutputDebugString(s);OutputDebugString("\n");}
#else
#define DUMPPTREE(pt) {}
#define DUMP(s) {}
#endif

//---------------------------------------------
Expand Down

0 comments on commit 70477db

Please sign in to comment.