Commit 90024205 authored by unknown's avatar unknown
Browse files

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/jonas/src/mysql-4.1


ndb/src/cw/cpcd/Process.cpp:
  Auto merged
ndb/src/kernel/error/ErrorReporter.cpp:
  Auto merged
parents 27da9ccc 645a7131
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ ParserRow<CPCDAPISession> commands[] =
    CPCD_ARG("stderr", String, Optional,  "Redirection of stderr"),
    CPCD_ARG("stdin",  String, Optional,  "Redirection of stderr"),
    CPCD_ARG("ulimit", String, Optional,  "ulimit"),
    CPCD_ARG("shutdown", String, Optional,  "shutdown options"),  

  CPCD_CMD("undefine process", &CPCDAPISession::undefineProcess, ""),
    CPCD_CMD_ALIAS("undef", "undefine process", 0),
+6 −0
Original line number Diff line number Diff line
@@ -243,6 +243,12 @@ public:
     * @desc Format c:unlimited d:0 ...
     */
    BaseString m_ulimit;

    /**
     * @brief shutdown options
     */
    BaseString m_shutdown_options;

  private:
    class CPCD *m_cpcd;
    void do_exec();
+8 −1
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ CPCD::Process::print(FILE * f){
  fprintf(f, "stdout: %s\n", m_stdout.c_str() ? m_stdout.c_str() : "");
  fprintf(f, "stderr: %s\n", m_stderr.c_str() ? m_stderr.c_str() : "");
  fprintf(f, "ulimit: %s\n", m_ulimit.c_str() ? m_ulimit.c_str() : "");
  fprintf(f, "shutdown: %s\n", m_shutdown_options.c_str() ? 
	  m_shutdown_options.c_str() : "");
}

CPCD::Process::Process(const Properties & props, class CPCD *cpcd) {
@@ -64,6 +66,7 @@ CPCD::Process::Process(const Properties & props, class CPCD *cpcd) {
  props.get("stdout", m_stdout);
  props.get("stderr", m_stderr);
  props.get("ulimit", m_ulimit);
  props.get("shutdown", m_shutdown_options);
  m_status = STOPPED;

  if(strcasecmp(m_type.c_str(), "temporary") == 0){
@@ -454,7 +457,11 @@ CPCD::Process::stop() {
  m_status = STOPPING;
  
  errno = 0;
  int ret = kill(-m_pid, SIGTERM);
  int signo= SIGTERM;
  if(m_shutdown_options == "SIGKILL")
    signo= SIGKILL;

  int ret = kill(-m_pid, signo);
  switch(ret) {
  case 0:
    logger.debug("Sent SIGTERM to pid %d", (int)-m_pid);
+2 −28
Original line number Diff line number Diff line
@@ -585,34 +585,8 @@ public:
   */
  ArrayPool<TcIndexOperation> c_theIndexOperationPool;

  /**
   * The list of index operations
   */  
  ArrayList<TcIndexOperation> c_theIndexOperations;

  UintR c_maxNumberOfIndexOperations;   

  struct TcSeizedIndexOperation {
    /**
     * Next ptr (used in pool/list)
     */
    union {
      Uint32 nextPool;
      Uint32 nextList;
    };
    /**
     * Prev pointer (used in list)
     */
    Uint32 prevList;
  };

  /**
   * Pool of seized index operations
   */
  ArrayPool<TcSeizedIndexOperation> c_theSeizedIndexOperationPool;

  typedef Ptr<TcSeizedIndexOperation> TcSeizedIndexOperationPtr;

  /************************** API CONNECT RECORD ***********************
   * The API connect record contains the connection record to which the
   * application connects.  
@@ -650,7 +624,7 @@ public:

  struct ApiConnectRecord {
    ApiConnectRecord(ArrayPool<TcFiredTriggerData> & firedTriggerPool,
		     ArrayPool<TcSeizedIndexOperation> & seizedIndexOpPool):
		     ArrayPool<TcIndexOperation> & seizedIndexOpPool):
      theFiredTriggers(firedTriggerPool),
      isIndexOp(false),
      theSeizedIndexOperations(seizedIndexOpPool) 
@@ -763,7 +737,7 @@ public:
    UintR accumulatingIndexOp;
    UintR executingIndexOp;
    UintR tcIndxSendArray[6];
    ArrayList<TcSeizedIndexOperation> theSeizedIndexOperations;
    ArrayList<TcIndexOperation> theSeizedIndexOperations;
  };
  
  typedef Ptr<ApiConnectRecord> ApiConnectRecordPtr;
+1 −3
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ void Dbtc::initData()
  c_theFiredTriggerPool.setSize(c_maxNumberOfFiredTriggers);
  c_theIndexPool.setSize(c_maxNumberOfIndexes);
  c_theIndexOperationPool.setSize(c_maxNumberOfIndexOperations);
  c_theSeizedIndexOperationPool.setSize(c_maxNumberOfIndexOperations);
  c_theAttributeBufferPool.setSize(c_transactionBufferSpace);
  c_firedTriggerHash.setSize((c_maxNumberOfFiredTriggers+10)/10);
}//Dbtc::initData()
@@ -85,7 +84,7 @@ void Dbtc::initRecords()
  for(unsigned i = 0; i<capiConnectFilesize; i++) {
    p = &apiConnectRecord[i];
    new (p) ApiConnectRecord(c_theFiredTriggerPool, 
			     c_theSeizedIndexOperationPool);
			     c_theIndexOperationPool);
  }
  // Init all fired triggers
  DLFifoList<TcFiredTriggerData> triggers(c_theFiredTriggerPool);
@@ -177,7 +176,6 @@ Dbtc::Dbtc(const class Configuration & conf):
  c_maxNumberOfFiredTriggers(0),
  c_theIndexes(c_theIndexPool),
  c_maxNumberOfIndexes(0),
  c_theIndexOperations(c_theIndexOperationPool),
  c_maxNumberOfIndexOperations(0),
  m_commitAckMarkerHash(m_commitAckMarkerPool)
{
Loading