本文整理汇总了C++中RUASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ RUASSERT函数的具体用法?C++ RUASSERT怎么用?C++ RUASSERT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RUASSERT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RUASSERT
void CRUTbl::BuildListOfIncrementalInvolvedMVsUsingMe()
{
// Verify that the list is not initialized already
RUASSERT(TRUE == pIncInvolvedMVsUsingMe_->IsEmpty());
DSListPosition pos = pOnRequestInvolvedMVsUsingMe_->GetHeadPosition();
while (NULL != pos)
{
CRUMV *pMV = pOnRequestInvolvedMVsUsingMe_->GetNext(pos);
RUASSERT(CDDObject::eON_REQUEST == pMV->GetRefreshType()
&&
TRUE == pMV->IsInvolved()
);
if (TRUE == pMV->WillBeRecomputed())
{
continue;
}
pIncInvolvedMVsUsingMe_->AddTail(pMV);
CDDObject::EMVQueryType qt = pMV->GetQueryType();
if (CDDObject::eMJV == qt
||
CDDObject::eOTHER == qt // Is this MJV on single table?
)
{
isUsedByIncrementalMJV_ = TRUE;
}
}
}
示例2: RUASSERT
void CRUDupElimLogScanner::StartScan(Int32 phase)
{
RUASSERT(NULL == pCurrentStmt_ && NULL == pResultSet_);
if (0 == phase)
{
pCurrentStmt_ = GetPreparedStatement(CRUDupElimConst::PHASE_0_QUERY);
}
else
{
RUASSERT(phase > 0);
// The same statement for each phase starting from 1
pCurrentStmt_ = GetPreparedStatement(CRUDupElimConst::PHASE_1_QUERY);
// Set the parameters for the lower bound ...
CopyLowerBoundParams();
}
// Start the execution ...
pCurrentStmt_->ExecuteQuery();
pResultSet_ = pCurrentStmt_->GetResultSet();
if (0 == phase)
{
// Allocate the buffer space and setup the output descriptors
SetupScan();
}
else
{
// Nothing. Both queries have the same result set's structure.
// Hence, we need not re-allocate the buffers.
}
}
示例3: AddRngDeltaStatisticsClause
void CRURefreshSQLComposer::
AddRngDeltaStatisticsClause(const CRUDeltaDef *pDdef)
{
sql_ += "\n\t";
if (FALSE == pDdef->isRangeLogNonEmpty_)
{
sql_ += " USE NO RANGELOG";
return;
}
CRUDeltaStatistics *pStat = pDdef->pStat_;
RUASSERT(CRUDeltaDef::NO_DE != pDdef->deLevel_ && NULL != pStat);
// USE RANGELOG <number> NUM_OF_RANGES <number> ROWS_COVERED
TInt32 nRanges = pStat->nRanges_;
RUASSERT(nRanges > 0);
sql_ += "USE RANGELOG " + TInt32ToStr(nRanges) + " NUM_OF_RANGES ";
TInt32 nCoveredRows = pStat->nRangeCoveredRows_;
if (CRUDeltaStatistics::RANGE_SIZE_UNKNOWN != nCoveredRows)
{
sql_ += TInt32ToStr(nCoveredRows) + " ROWS_COVERED";
}
}
示例4: switch
void CRULogCleanupTaskExecutor::Work()
{
switch(GetState())
{
case EX_START:
{
RUASSERT(FALSE == IsTransactionOpen());
Start();
break;
}
case EX_CLEAN:
{
RUASSERT(FALSE == IsTransactionOpen());
Clean();
break;
}
case EX_EPILOGUE:
{
RUASSERT(FALSE == IsTransactionOpen());
Epilogue();
break;
}
default: RUASSERT(FALSE);
}
}
示例5: RUASSERT
CRUTblList& CRUTblEquivSetBuilder::GetSet(Int32 num)
{
RUASSERT (GetNumOfSets() >= num && 0 <= num );
CRUTblList *pTblList = equivSetsList_.GetAt(num);
RUASSERT (NULL != pTblList);
return *pTblList;
}
示例6: RUASSERT
void CRUTopologicalDGIterator::Next()
{
RUASSERT(FALSE == allTasksLinkMap_.IsEmpty());
CRUTask *pTask = GetCurrentTask();
if (NULL == pTask)
{
return; // all the tasks have been already traversed
}
// The tasks that need to be traversed after me
CRUTaskList &refTaskList =
(DIRECT == dir_) ?
pTask->GetTasksThatDependOnMe() :
pTask->GetTasksThatIDependOn();
// For all of these tasks, decrecase the reference count
// Update the "ready" list, if any of the tasks have become ready.
UpdateIterator(refTaskList);
// Select a new current task
if (TRUE == readyTasksList_.IsEmpty())
{
SetCurrentTask(NULL); // The last task has just been traversed
}
else
{
// Retrieve a new task from the "ready" list
SetCurrentTask(readyTasksList_.RemoveHead());
}
}
示例7: while
void CRUTopologicalDGIterator::UpdateIterator(CRUTaskList &taskList)
{
TaskLink link = {NULL, 0};
DSListPosition pos = taskList.GetHeadPosition();
while (NULL != pos)
{
CRUTask *pTask = taskList.GetNext(pos);
// Locate the link in the link map
BOOL ret = allTasksLinkMap_.Lookup(pTask->GetId(), link);
RUASSERT(TRUE == ret);
// One reference less to the task
link.refCount_--;
if (0 == link.refCount_)
{
// One more task has no dependencies, place it to the ready list
readyTasksList_.AddHead(link.pTask_);
}
else
{
// Update the link's reference count in the hash
allTasksLinkMap_[pTask->GetId()] = link;
}
}
}
示例8: RUASSERT
void CRUUnAuditRefreshTaskExecutor::PopulateIndexes()
{
RUASSERT(TRUE == isPopindex_);
if (0 == numOfIndexes_)
{
return;
}
// ?????
// Temporary - Should be removed when read commited from unaudited table is implemented
BeginTransaction();
#ifdef _DEBUG
CDSString msg(
"\nPopulating the secondary indexes of materialized view "
+ GetRootMVName() + "...\n");
CRUGlobals::GetInstance()->
LogDebugMessage(CRUGlobals::DUMP_POPINDEX,"",msg);
#endif
ExecuteIndexStatmenents(*pUnAuditPopIndexdynamicContainer_, IDS_RU_POPINDEX_FAILED);
// ?????
// Temporary - Should be removed when read commited from unaudited table is implemented
CommitTransaction();
TESTPOINT2(CRUGlobals::TESTPOINT105, GetRootMVName());
SetState(EX_EPILOGUE);
}
示例9: GetRefreshTask
void CRURefreshSQLComposer::AddPipeLineClause()
{
CRUMVList &mvList = GetRefreshTask().GetMVList();
RUASSERT(mvList.GetCount() > 1);
DSListPosition pos = mvList.GetHeadPosition();
mvList.GetNext(pos); // Skip the root MV
// Generate root clause
CRUMV *pTopMV = mvList.GetNext(pos);
sql_ += " PIPELINE " ;
sql_ += "(" + pTopMV->GetFullName() + ")";
// Continue with the upper mv's
while (NULL != pos)
{
sql_ += pTopMV->GetFullName();
// Retrieve the next MV from the list
pTopMV = mvList.GetNext(pos);
sql_ += " PIPELINE " ;
sql_ += "(" + pTopMV->GetFullName() + ")";
if (NULL != pos)
{
sql_ += ",";
}
else
{
return;
}
}
}
示例10: GetRefreshTask
//--------------------------------------------------------------------------//
// CRURefreshTaskExecutor::ComposeControlTableStmtForUsedTables()
//
// Compose the Control MDAM option for all base tables for forced tables
//--------------------------------------------------------------------------//
// LCOV_EXCL_START :rfi
void CRURefreshTaskExecutor::ComposeControlTableStmtForUsedTables()
{
CRUMV &rootMV = GetRefreshTask()->GetRootMV();
const CRUMVForceOptions* pForceOption = rootMV.GetMVForceOption();
CRUForceOptions::MdamOptions mdamOpt = CRUForceOptions::MDAM_NO_FORCE;
Int32 stmtIndex = FIRST_TBL_STAT;
if (NULL != pForceOption)
{
VerifyForceTblListCorrectness();
if (pForceOption->IsTableStarUsed())
{
mdamOpt = pForceOption->GetTableStarOption();
}
}
CRUTblList &tblList = rootMV.GetTablesUsedByMe();
DSListPosition pos = tblList.GetHeadPosition();
while (NULL != pos)
{
CRUTbl *pTbl = tblList.GetNext(pos);
RUASSERT(NULL != pTbl);
ComposeControlTableStmtForUsedTable(*pTbl,stmtIndex,mdamOpt);
}
}
示例11: RUASSERT
void CRUDependenceGraph::InsertTask(CRUTask *pTask)
{
RUASSERT (NULL != pTask);
allTaskList_.AddTail(pTask);
availableTaskList_.AddTail(pTask);
}
示例12: RUASSERT
CRUEmpCheckVector &CRUEmpCheckVector::
operator = (const CRUEmpCheckVector& other)
{
if (this == &other)
{
return *this;
}
if (NULL != pVec_)
{
RUASSERT(size_ == other.size_);
}
else
{
size_ = other.size_;
pVec_ = new Elem[size_];
}
for (Int32 i=0; i<size_; i++)
{
pVec_[i] = other.pVec_[i]; // Default copy
}
return *this;
}
示例13: datatype
void CRUDupElimSQLComposer::ComposeIUDUpdateBitmapText()
{
CDSString pred;
sql_ += "UPDATE " + iudLogName_;
const CRULogCtlColDesc &desc =
iudLogCtlColDescVec[CRUDupElimConst::OFS_UPD_BMP];
// Compose the real datatype
// of the @UPDATE_BITMAP column - CHAR(<size>)
CDSString datatype(desc.datatype_);
RUASSERT(updateBmpSize_ > 0);
datatype += "(" + TInt32ToStr(updateBmpSize_) + ")";
// -------------------------------------------------------------
// Date: 2008-03-19 Caroline:
// In UNICODE config: ISO_MAPPING=UTF8, DEFAULT_CHARSET= UCS2
// The IUD_LOG_TABLE Clause:
// SET "@UPDATE_BITMAP" = CAST (? AS CHAR(8))
// The "@UPDATE_BITMAP" column is in ISO88591, and the CAST Clause
// is implied to UCS2, so we got the incompatible error.
// To fix the error, we explicitly say "CHARACTER SET ISO88591".
datatype += " CHARACTER SET ISO88591 ";
//---------------------------------------------
sql_ += "\nSET " + ComposeQuotedColName(desc.name_) + " = ";
sql_ += ComposeCastExpr(datatype);
ComposeUpdateRecsSearchPredicate(pred);
sql_+= pred + ";";
}
示例14: GetAllTasksList
void CRUTopologicalDGIterator::Build()
{
TaskLink link;
// Fill the data structures by references to available tasks
DSListPosition pos = GetAllTasksList().GetHeadPosition();
while (NULL != pos)
{
CRUTask *pTask = GetAllTasksList().GetNext(pos);
link.pTask_ = pTask;
// The tasks that need to be traversed before me
CRUTaskList &refTaskList =
(DIRECT == dir_) ?
pTask->GetTasksThatIDependOn() :
pTask->GetTasksThatDependOnMe();
link.refCount_ = refTaskList.GetCount();
// Place the link into the hash
allTasksLinkMap_[pTask->GetId()] = link;
// If this is a ready task,
// place a reference to it into the ready list
if (0 == link.refCount_)
{
readyTasksList_.AddHead(link.pTask_);
}
}
// My guess is that this is a circular graph
RUASSERT(FALSE == readyTasksList_.IsEmpty());
SetCurrentTask(readyTasksList_.RemoveHead());
}
示例15: FetchSingleInvolvedMV
void CRUCache::RecursiveFetchCascadedMVs(CDDMV *pddRootMV)
{
// Setup the wrapper object for the MV
FetchSingleInvolvedMV(pddRootMV);
CDDUIDTripleList &uList = pddRootMV->GetUsedObjects();
DSListPosition pos = uList.GetHeadPosition();
while (NULL != pos)
{
CDDUIDTriple& uidt = uList.GetNext(pos);
// Skip the regular tables
if (FALSE == pddRootMV->IsUsedObjectAnMV(uidt.objUID))
{
continue;
}
CDDMV *pddMV = GetDDMVByUID(uidt);
// An ON STATEMENT MV is a regular table
// for the purpose of cascade. Stop drilling inside.
if (CDDObject::eON_STATEMENT == pddMV->GetRefreshType())
{
continue;
}
// Since the same object cannot be used twice by the same MV,
// the used MV should not have been referenced before
// (and placed in the MV list).
RUASSERT (NULL != GetMV(pddRootMV->GetUID()));
RecursiveFetchCascadedMVs(pddMV);
}
}