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


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

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


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

示例1: sqlci_parser_handle_error

Int32 sqlci_parser_handle_error(SqlciNode **node, Lng32 retval)
{
  NABoolean syntaxError_ = sqlci_DA.contains(-SQLCI_SYNTAX_ERROR);
  
  if (retval && syntaxError_)
    {	
      if (SqlciEnvGlobal->isReportWriterMode())
	{
	  SqlciParseTree = (SqlciNode *)new SqlciRWQueryCmd(SqlciParse_OriginalStr,
			(Lng32)strlen(SqlciParse_OriginalStr));
	  assert(SqlciParseTree->isSqlciNode());
	  *node = SqlciParseTree;	
	  sqlci_DA.clear(); // clear the diagonistics
	  return 0;
	}
      else if (SqlciEnvGlobal->isMXCSMode())
      {
        SqlciParseTree = (SqlciNode *)new SqlciCSQueryCmd(SqlciParse_OriginalStr,
                               (Lng32)strlen(SqlciParse_OriginalStr));
	  assert(SqlciParseTree->isSqlciNode());
	  *node = SqlciParseTree;	
	  sqlci_DA.clear(); // clear the diagonistics
	  return 0;
      }
      else
	return retval;
    }
  else
    return retval;
  
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:31,代码来源:SqlciParser.cpp

示例2: updateDiagsArea

// LCOV_EXCL_START
void ExSequenceTcb::updateDiagsArea(  ExeErrorCode rc_)
{                   
    ComDiagsArea *da = workAtp_->getDiagsArea();
    if(!da) 
    {
      da = ComDiagsArea::allocate(heap_);
      workAtp_->setDiagsArea(da);
    }
    if (!da->contains((Lng32) -rc_))
    {
      *da << DgSqlCode(-rc_);
    }
}
开发者ID:AlexPeng19,项目名称:incubator-trafodion,代码行数:14,代码来源:ExSequence.cpp

示例3: work


//.........这里部分代码省略.........
                  ComDiagsArea::allocate(getGlobals()->getDefaultHeap());
            if (getenv("HP_FAKE_ERROR_8142"))
            {
               *diagsArea << DgSqlCode(-8142);
               *diagsArea << DgString0(__FILE__);
               *diagsArea << DgString1("cbServer_ is NULL");
            }
            else
               *diagsArea << DgSqlCode(-2024);
          }
          else
            cbServer_ = cliGlobals->getCbServerClass()->allocateServerProcess(
                      &diagsArea, 
                      cliGlobals->getEnvironment()->getHeap(),
                      nodeName_,
                      cpu_,
                      IPC_PRIORITY_DONT_CARE,
                      FALSE,  // usesTransactions 
                      TRUE,   // waitedCreation
                      2       // maxNowaitRequests -- cancel+(1 extra).
                      );


          if (cbServer_ == NULL || cbServer_->getControlConnection() == NULL)
          {
            ex_assert(diagsArea != NULL, 
                      "allocateServerProcess failed, but no diags");

            // look for SQLCode 2024 
            // "*** ERROR[2024] Server Process $0~string0 
            // is not running or could not be created. Operating System 
            // Error $1~int0 was returned."
            // Remap to cancel-specfic error 8028.
            if (diagsArea->contains(-2024)  &&
                cancelTdb().actionIsCancel())
            {
              diagsArea->deleteError(diagsArea->returnIndex(-2024));
              reportError(diagsArea, true, EXE_CANCEL_PROCESS_NOT_FOUND, 
                          nodeName_, cpu_);
            }
            else
              reportError(diagsArea);

            step_ = DONE;
            break;
          }

          // the reportError method was not called -- see break above.
          if (diagsArea != NULL)
            diagsArea->decrRefCount();

          //Create the stream on the IpcHeap, since we don't dispose 
          // of it immediately.  We just add it to the list of completed 
          // messages in the IpcEnv, and it is disposed of later.

          cancelStream_  = new (cliGlobals->getIpcHeap())
                CancelMsgStream(cliGlobals->getEnvironment(), this);

          cancelStream_->addRecipient(cbServer_->getControlConnection());

        }

        step_ = SEND_MESSAGE;

        break;
      }  // end case NOT_STARTED
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:67,代码来源:ExCancel.cpp


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