当前位置: 首页>>代码示例>>C++>>正文


C++ ComDiagsArea::copy方法代码示例

本文整理汇总了C++中ComDiagsArea::copy方法的典型用法代码示例。如果您正苦于以下问题:C++ ComDiagsArea::copy方法的具体用法?C++ ComDiagsArea::copy怎么用?C++ ComDiagsArea::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ComDiagsArea的用法示例。


在下文中一共展示了ComDiagsArea::copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ExRaiseSqlError

ComDiagsArea *ExRaiseSqlError(CollHeap* heap, ex_queue_entry* req,
			      ExeErrorCode err, 
			      Lng32 * intParam1,
			      char * stringParam1,
			      ComCondition** newCond)
{
  ComDiagsArea* da = req->getDiagsArea();
  if (da == NULL)
    da = ComDiagsArea::allocate(heap);
  else
    da = da->copy();
  
  return ExRaiseSqlError(heap, &da, (ExeErrorCode)(-err), newCond, intParam1, NULL, NULL, stringParam1);
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:14,代码来源:ex_error.cpp

示例2: injectErrorOrCancel

void ex_queue::injectErrorOrCancel()
{
#ifdef _DEBUG
  ex_queue_entry *qe = getQueueEntry(tail_-1);

  // DO the ol' switcheroo, but not every time.
  ULng32 freq = insertSubtask_->getTcb()->getGlobals()->getInjectErrorAtQueue();
  if (freq == 0)
      return;
  if (upDown_ == UP_QUEUE)
    {
       if ((rand() & (freq-1)) != 0)
         return;
        NABoolean needsError = FALSE;
        switch (qe->upState.status)
        {
        case Q_OK_MMORE:
          {
            needsError = TRUE;
            qe->upState.status = Q_SQLERROR;
            cerr << "Converting a Q_OK_MMORE to a Q_SQLERROR, from "
                 << NodeTypeToString(unblockSubtask_->getTcb()->getNodeType())
                 << "(" << unblockSubtask_->getTcb() << ")" 
                 << " to "
                 << NodeTypeToString(insertSubtask_->getTcb()->getNodeType())
                 << "(" << insertSubtask_->getTcb() << ")" 
                 << endl;
            break;
          }
        case Q_NO_DATA:
          if (!isFull())
            {
              needsError = TRUE;
              qe->upState.status = Q_SQLERROR;
              ex_queue_entry *newQNODATA = getTailEntry();
              newQNODATA->upState = qe->upState;
              newQNODATA->upState.status  = Q_NO_DATA;
              newQNODATA->getAtp()->copyAtp(qe->getAtp());
              tail_++;
              cerr << "Injecting a Q_SQLERROR before a Q_NO_DATA, from " 
                 << NodeTypeToString(unblockSubtask_->getTcb()->getNodeType())
                 << "(" << unblockSubtask_->getTcb() << ")" 
                 << " to "
                 << NodeTypeToString(insertSubtask_->getTcb()->getNodeType())
                 << "(" << insertSubtask_->getTcb() << ")" 
                 << endl;
            }
          break;
        default:
            break;
        } 
        if (needsError)
          {
            ComDiagsArea * da = qe->getDiagsArea();
            if (!da) 
              da = ComDiagsArea::allocate(insertSubtask_->getTcb()->getHeap());
            else
              da = da->copy();
            qe->setDiagsArea(da);

            *da << DgSqlCode(-EXE_ERROR_INJECTED)
                << DgString0(__FILE__)
                << DgInt0(__LINE__);
          }
    }
#endif

  return;
}
开发者ID:apache,项目名称:incubator-trafodion,代码行数:69,代码来源:ex_queue.cpp


注:本文中的ComDiagsArea::copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。