Commit 0a7677b9 authored by unknown's avatar unknown
Browse files

Merge perch.ndb.mysql.com:/home/jonas/src/51-ndb

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new


storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
parents 802afca7 392c15ef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ private:
    BUSY_LOOP = 1,
    CLEANUP_LOOP = 2,
    LCP_LOOP = 3,
    LCP_PREPARE = 4
    LCP_LOCKED = 4
  };
};

+24 −21
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ void * operator new (size_t sz, SIMBLOCKLIST_DUMMY dummy){
#endif

void 
SimBlockList::load(const Configuration & conf){
SimBlockList::load(Configuration & conf){
  noOfBlocks = NO_OF_BLOCKS;
  theList = new SimulatedBlock * [noOfBlocks];
  Dbdict* dbdict = 0;
@@ -78,36 +78,39 @@ SimBlockList::load(const Configuration & conf){
  Lgman* lg = 0;
  Tsman* ts = 0;

  Block_context ctx = 
    { conf, * (Ndbd_mem_manager*)0 };
  
  SimulatedBlock * fs = 0;
  {
    Uint32 dl;
    const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
    if(p && !ndb_mgm_get_int_parameter(p, CFG_DB_DISCLESS, &dl) && dl){
      fs = NEW_BLOCK(VoidFs)(conf);
      fs = NEW_BLOCK(VoidFs)(ctx);
    } else { 
      fs = NEW_BLOCK(Ndbfs)(conf);
      fs = NEW_BLOCK(Ndbfs)(ctx);
    }
  }
  
  theList[0]  = pg = NEW_BLOCK(Pgman)(conf);
  theList[1]  = lg = NEW_BLOCK(Lgman)(conf);
  theList[2]  = ts = NEW_BLOCK(Tsman)(conf, pg, lg);
  theList[3]  = NEW_BLOCK(Dbacc)(conf);
  theList[4]  = NEW_BLOCK(Cmvmi)(conf);
  theList[0]  = pg = NEW_BLOCK(Pgman)(ctx);
  theList[1]  = lg = NEW_BLOCK(Lgman)(ctx);
  theList[2]  = ts = NEW_BLOCK(Tsman)(ctx, pg, lg);
  theList[3]  = NEW_BLOCK(Dbacc)(ctx);
  theList[4]  = NEW_BLOCK(Cmvmi)(ctx);
  theList[5]  = fs;
  theList[6]  = dbdict = NEW_BLOCK(Dbdict)(conf);
  theList[7]  = dbdih = NEW_BLOCK(Dbdih)(conf);
  theList[8]  = NEW_BLOCK(Dblqh)(conf);
  theList[9]  = NEW_BLOCK(Dbtc)(conf);
  theList[10] = NEW_BLOCK(Dbtup)(conf, pg);
  theList[11] = NEW_BLOCK(Ndbcntr)(conf);
  theList[12] = NEW_BLOCK(Qmgr)(conf);
  theList[13] = NEW_BLOCK(Trix)(conf);
  theList[14] = NEW_BLOCK(Backup)(conf);
  theList[15] = NEW_BLOCK(DbUtil)(conf);
  theList[16] = NEW_BLOCK(Suma)(conf);
  theList[17] = NEW_BLOCK(Dbtux)(conf);
  theList[18] = NEW_BLOCK(Restore)(conf);
  theList[6]  = dbdict = NEW_BLOCK(Dbdict)(ctx);
  theList[7]  = dbdih = NEW_BLOCK(Dbdih)(ctx);
  theList[8]  = NEW_BLOCK(Dblqh)(ctx);
  theList[9]  = NEW_BLOCK(Dbtc)(ctx);
  theList[10] = NEW_BLOCK(Dbtup)(ctx, pg);
  theList[11] = NEW_BLOCK(Ndbcntr)(ctx);
  theList[12] = NEW_BLOCK(Qmgr)(ctx);
  theList[13] = NEW_BLOCK(Trix)(ctx);
  theList[14] = NEW_BLOCK(Backup)(ctx);
  theList[15] = NEW_BLOCK(DbUtil)(ctx);
  theList[16] = NEW_BLOCK(Suma)(ctx);
  theList[17] = NEW_BLOCK(Dbtux)(ctx);
  theList[18] = NEW_BLOCK(Restore)(ctx);
  assert(NO_OF_BLOCKS == 19);
}

+2 −2
Original line number Diff line number Diff line
@@ -27,12 +27,12 @@
#include <SimpleProperties.hpp>

#include <SLList.hpp>
#include <ArrayList.hpp>
#include <DLFifoList.hpp>
#include <SignalCounter.hpp>
#include <blocks/mutexes.hpp>

#include <NdbTCP.h>
#include <Array.hpp>

/**
 * Backup - This block manages database backup and restore
@@ -40,7 +40,7 @@
class Backup : public SimulatedBlock
{
public:
  Backup(const Configuration & conf);
  Backup(Block_context& ctx);
  virtual ~Backup();
  BLOCK_DEFINES(Backup);
  
+6 −6
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@

//extern const unsigned Ndbcntr::g_sysTableCount;

Backup::Backup(const Configuration & conf) :
  SimulatedBlock(BACKUP, conf),
Backup::Backup(Block_context& ctx) :
  SimulatedBlock(BACKUP, ctx),
  c_nodes(c_nodePool),
  c_backups(c_backupPool)
{
@@ -140,7 +140,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
  ndbrequire(req->noOfParameters == 0);

  const ndb_mgm_configuration_iterator * p = 
    theConfiguration.getOwnConfigIterator();
    m_ctx.m_config.getOwnConfigIterator();
  ndbrequire(p != 0);

  Uint32 noBackups = 0, noTables = 0, noAttribs = 0;
@@ -185,7 +185,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
  c_pagePool.setSize(noPages + NO_OF_PAGES_META_FILE + 2); 
  
  { // Init all tables
    ArrayList<Table> tables(c_tablePool);
    SLList<Table> tables(c_tablePool);
    TablePtr ptr;
    while(tables.seize(ptr)){
      new (ptr.p) Table(c_attributePool, c_fragmentPool);
@@ -194,7 +194,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
  }

  {
    ArrayList<BackupFile> ops(c_backupFilePool);
    SLList<BackupFile> ops(c_backupFilePool);
    BackupFilePtr ptr;
    while(ops.seize(ptr)){
      new (ptr.p) BackupFile(* this, c_pagePool);
@@ -203,7 +203,7 @@ Backup::execREAD_CONFIG_REQ(Signal* signal)
  }
  
  {
    ArrayList<BackupRecord> recs(c_backupPool);
    SLList<BackupRecord> recs(c_backupPool);
    BackupRecordPtr ptr;
    while(recs.seize(ptr)){
      new (ptr.p) BackupRecord(* this, c_tablePool, 
+13 −13
Original line number Diff line number Diff line
@@ -47,15 +47,15 @@
EventLogger g_eventLogger;
extern int simulate_error_during_shutdown;

Cmvmi::Cmvmi(const Configuration & conf) :
  SimulatedBlock(CMVMI, conf)
  ,theConfig((Configuration&)conf)
Cmvmi::Cmvmi(Block_context& ctx) :
  SimulatedBlock(CMVMI, ctx)
  ,subscribers(subscriberPool)
{
  BLOCK_CONSTRUCTOR(Cmvmi);

  Uint32 long_sig_buffer_size;
  const ndb_mgm_configuration_iterator * p = conf.getOwnConfigIterator();
  const ndb_mgm_configuration_iterator * p = 
    m_ctx.m_config.getOwnConfigIterator();
  ndbrequire(p != 0);

  ndb_mgm_get_int_parameter(p, CFG_DB_LONG_SIGNAL_BUFFER,  
@@ -94,7 +94,7 @@ Cmvmi::Cmvmi(const Configuration & conf) :
  
  subscriberPool.setSize(5);
  
  const ndb_mgm_configuration_iterator * db = theConfig.getOwnConfigIterator();
  const ndb_mgm_configuration_iterator * db = m_ctx.m_config.getOwnConfigIterator();
  for(unsigned j = 0; j<LogLevel::LOGLEVEL_CATEGORIES; j++){
    Uint32 logLevel;
    if(!ndb_mgm_get_int_parameter(db, CFG_MIN_LOGLEVEL+j, &logLevel)){
@@ -103,7 +103,7 @@ Cmvmi::Cmvmi(const Configuration & conf) :
    }
  }
  
  ndb_mgm_configuration_iterator * iter = theConfig.getClusterConfigIterator();
  ndb_mgm_configuration_iterator * iter = m_ctx.m_config.getClusterConfigIterator();
  for(ndb_mgm_first(iter); ndb_mgm_valid(iter); ndb_mgm_next(iter)){
    jam();
    Uint32 nodeId;
@@ -318,7 +318,7 @@ Cmvmi::execREAD_CONFIG_REQ(Signal* signal)
  Uint32 senderData = req->senderData;

  const ndb_mgm_configuration_iterator * p = 
    theConfiguration.getOwnConfigIterator();
    m_ctx.m_config.getOwnConfigIterator();
  ndbrequire(p != 0);

  Uint64 page_buffer = 64*1024*1024;
@@ -365,7 +365,7 @@ void Cmvmi::execSTTOR(Signal* signal)
  } else {
    jam();

    if(theConfig.lockPagesInMainMemory()){
    if(m_ctx.m_config.lockPagesInMainMemory()){
      int res = NdbMem_MemLockAll();
      if(res != 0){
	g_eventLogger.warning("Failed to memlock pages");
@@ -938,7 +938,7 @@ void Cmvmi::handleSET_VAR_REQ(Signal* signal) {

  switch (var) {
  case MaxNoOfSavedMessages:
    theConfig.maxNoOfErrorLogs(val);
    m_ctx.m_config.maxNoOfErrorLogs(val);
    sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
    break;
    
@@ -959,12 +959,12 @@ void Cmvmi::handleSET_VAR_REQ(Signal* signal) {
    break;

  case TimeBetweenWatchDogCheck:
    theConfig.timeBetweenWatchDogCheck(val);
    m_ctx.m_config.timeBetweenWatchDogCheck(val);
    sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
    break;

  case StopOnError:
    theConfig.stopOnError(val);
    m_ctx.m_config.stopOnError(val);
    sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
    break;
    
@@ -1086,9 +1086,9 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
  
  if (dumpState->args[0] == DumpStateOrd::CmvmiSetRestartOnErrorInsert){
    if(signal->getLength() == 1)
      theConfig.setRestartOnErrorInsert((int)NRT_NoStart_Restart);
      m_ctx.m_config.setRestartOnErrorInsert((int)NRT_NoStart_Restart);
    else
      theConfig.setRestartOnErrorInsert(signal->theData[1]);
      m_ctx.m_config.setRestartOnErrorInsert(signal->theData[1]);
  }

  if (dumpState->args[0] == DumpStateOrd::CmvmiTestLongSigWithDelay) {
Loading