本文整理汇总了C++中NdbTransaction::OpCompleteSuccess方法的典型用法代码示例。如果您正苦于以下问题:C++ NdbTransaction::OpCompleteSuccess方法的具体用法?C++ NdbTransaction::OpCompleteSuccess怎么用?C++ NdbTransaction::OpCompleteSuccess使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NdbTransaction
的用法示例。
在下文中一共展示了NdbTransaction::OpCompleteSuccess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleReceivedSignal
//.........这里部分代码省略.........
NdbReceiver* const tRec = void2rec(tFirstDataPtr);
if(!tRec->checkMagicNumber()){
return;
}
tCon = tRec->getTransaction();
if((tCon!=NULL) &&
tCon->checkState_TransId(((const TransIdAI*)tDataPtr)->transId)){
Uint32 com;
if(aSignal->m_noOfSections > 0){
if(tRec->getType()==NdbReceiver::NDB_QUERY_OPERATION){
com = ((NdbQueryOperationImpl*)(tRec->m_owner))
->execTRANSID_AI(ptr[0].p, ptr[0].sz);
}else{
com = tRec->execTRANSID_AI(ptr[0].p, ptr[0].sz);
}
} else {
assert(tRec->getType()!=NdbReceiver::NDB_QUERY_OPERATION);
com = tRec->execTRANSID_AI(tDataPtr + TransIdAI::HeaderLength,
tLen - TransIdAI::HeaderLength);
}
{
tCon->theNdb->theImpl->incClientStat(Ndb::ReadRowCount, 1);
if (refToNode(aSignal->theSendersBlockRef) == tCon->theDBnode)
tCon->theNdb->theImpl->incClientStat(Ndb::TransLocalReadRowCount,1);
}
if(com == 0)
return;
switch(tRec->getType()){
case NdbReceiver::NDB_OPERATION:
case NdbReceiver::NDB_INDEX_OPERATION:
if(tCon->OpCompleteSuccess() != -1){ //More completions pending?
completedTransaction(tCon);
}
return;
case NdbReceiver::NDB_SCANRECEIVER:
tCon->theScanningOp->receiver_delivered(tRec);
tNewState = (((WaitSignalType) tWaitState) == WAIT_SCAN ?
(Uint32) NO_WAIT : tWaitState);
break;
case NdbReceiver::NDB_QUERY_OPERATION:
{
// Handled differently whether it is a scan or lookup
NdbQueryOperationImpl* tmp = (NdbQueryOperationImpl*)(tRec->m_owner);
if (tmp->getQueryDef().isScanQuery()) {
tNewState = (((WaitSignalType) tWaitState) == WAIT_SCAN ?
(Uint32) NO_WAIT : tWaitState);
break;
} else {
if (tCon->OpCompleteSuccess() != -1) { //More completions pending?
completedTransaction(tCon);
}
return;
}
}
default:
goto InvalidSignal;
}
break;
} else {
/**
* This is ok as transaction can have been aborted before TRANSID_AI
* arrives (if TUP on other node than TC)
*/