List:Commits« Previous MessageNext Message »
From:jonas Date:January 17 2007 8:24pm
Subject:bk commit into 5.1 tree (jonas:1.2368)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-01-17 21:23:59+01:00, jonas@stripped +6 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/50-work
  into  perch.ndb.mysql.com:/home/jonas/src/51-work
  MERGE: 1.1810.2124.39

  storage/ndb/include/portlib/NdbMem.h@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.3.1.2

  storage/ndb/include/portlib/NdbMem.h@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/include/portlib/NdbMem.h -> storage/ndb/include/portlib/NdbMem.h

  storage/ndb/src/common/portlib/NdbMem.c@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.12.1.2

  storage/ndb/src/common/portlib/NdbMem.c@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/src/common/portlib/NdbMem.c -> storage/ndb/src/common/portlib/NdbMem.c

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2007-01-17 21:23:57+01:00, jonas@stripped +2 -3
    merge
    MERGE: 1.18.12.2

  storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp -> storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp

  storage/ndb/src/kernel/vm/Configuration.cpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.39.11.2

  storage/ndb/src/kernel/vm/Configuration.cpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/src/kernel/vm/Configuration.cpp -> storage/ndb/src/kernel/vm/Configuration.cpp

  storage/ndb/src/kernel/vm/Configuration.hpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.15.4.2

  storage/ndb/src/kernel/vm/Configuration.hpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/src/kernel/vm/Configuration.hpp -> storage/ndb/src/kernel/vm/Configuration.hpp

  storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Auto merged
    MERGE: 1.60.22.2

  storage/ndb/src/mgmsrv/ConfigInfo.cpp@stripped, 2007-01-17 21:21:57+01:00, jonas@stripped +0 -0
    Merge rename: ndb/src/mgmsrv/ConfigInfo.cpp -> storage/ndb/src/mgmsrv/ConfigInfo.cpp

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-work/RESYNC

--- 1.60.22.1/ndb/src/mgmsrv/ConfigInfo.cpp	2007-01-17 21:24:03 +01:00
+++ 1.94/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2007-01-17 21:24:03 +01:00
@@ -66,8 +66,7 @@
 
   "TCP",
   "SCI",
-  "SHM",
-  "OSE"
+  "SHM"
 };
 const int ConfigInfo::m_noOfSectionNames = 
 sizeof(m_sectionNames)/sizeof(char*);
@@ -112,12 +111,10 @@
   { "TCP",  checkConnectionSupport, 0 },
   { "SHM",  checkConnectionSupport, 0 },
   { "SCI",  checkConnectionSupport, 0 },
-  { "OSE",  checkConnectionSupport, 0 },
 
   { "TCP",  transformConnection, 0 },
   { "SHM",  transformConnection, 0 },
   { "SCI",  transformConnection, 0 },
-  { "OSE",  transformConnection, 0 },
 
   { DB_TOKEN,   fixNodeHostname, 0 },
   { API_TOKEN,  fixNodeHostname, 0 },
@@ -129,9 +126,7 @@
   { "SHM",  fixNodeId, "NodeId2" },
   { "SCI",  fixNodeId, "NodeId1" },
   { "SCI",  fixNodeId, "NodeId2" },
-  { "OSE",  fixNodeId, "NodeId1" },
-  { "OSE",  fixNodeId, "NodeId2" },
-  
+
   { "TCP",  fixHostname, "HostName1" },
   { "TCP",  fixHostname, "HostName2" },
   { "SHM",  fixHostname, "HostName1" },
@@ -140,8 +135,6 @@
   { "SCI",  fixHostname, "HostName2" },
   { "SHM",  fixHostname, "HostName1" },
   { "SHM",  fixHostname, "HostName2" },
-  { "OSE",  fixHostname, "HostName1" },
-  { "OSE",  fixHostname, "HostName2" },
 
   { "TCP",  fixPortNumber, 0 }, // has to come after fixHostName
   { "SHM",  fixPortNumber, 0 }, // has to come after fixHostName
@@ -165,7 +158,6 @@
   { "TCP",  checkConnectionConstraints, 0 },
   { "SHM",  checkConnectionConstraints, 0 },
   { "SCI",  checkConnectionConstraints, 0 },
-  { "OSE",  checkConnectionConstraints, 0 },
 
   { "TCP",  checkTCPConstraints, "HostName1" },
   { "TCP",  checkTCPConstraints, "HostName2" },
@@ -182,8 +174,7 @@
 
   { "TCP",  saveInConfigValues, 0 },
   { "SHM",  saveInConfigValues, 0 },
-  { "SCI",  saveInConfigValues, 0 },
-  { "OSE",  saveInConfigValues, 0 }
+  { "SCI",  saveInConfigValues, 0 }
 };
 const int ConfigInfo::m_NoOfRules = sizeof(m_SectionRules)/sizeof(SectionRule);
 
@@ -762,6 +753,30 @@
     STR_VALUE(MAX_INT_RNIL)},
 
   {
+    CFG_DB_DISK_PAGE_BUFFER_MEMORY,
+    "DiskPageBufferMemory",
+    DB_TOKEN,
+    "Number bytes on each "DB_TOKEN_PRINT" node allocated for disk page buffer cache",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT64,
+    "64M",
+    "4M",
+    "1024G" },
+
+  {
+    CFG_DB_SGA,
+    "SharedGlobalMemory",
+    DB_TOKEN,
+    "Total number bytes on each "DB_TOKEN_PRINT" node allocated for any use",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT64,
+    "20M",
+    "0",
+    "65536G" }, // 32k pages * 32-bit i value
+  
+  {
     CFG_DB_START_PARTIAL_TIMEOUT,
     "StartPartialTimeout",
     DB_TOKEN,
@@ -853,7 +868,7 @@
     ConfigInfo::CI_USED,
     false,
     ConfigInfo::CI_INT,
-    "8",
+    "16",
     "3",
     STR_VALUE(MAX_INT_RNIL) },
 
@@ -870,6 +885,18 @@
     STR_VALUE(MAX_INT_RNIL) },
   
   {
+    CFG_DB_INITIAL_OPEN_FILES,
+    "InitialNoOfOpenFiles",
+    DB_TOKEN,
+    "Initial number of files open per "DB_TOKEN_PRINT" node.(One thread is created per file)",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "27",
+    "20",
+    STR_VALUE(MAX_INT_RNIL) },
+  
+  {
     CFG_DB_TRANSACTION_CHECK_INTERVAL,
     "TimeBetweenInactiveTransactionAbortCheck",
     DB_TOKEN,
@@ -916,8 +943,8 @@
     CFG_DB_LCP_DISC_PAGES_TUP_SR,
     "NoOfDiskPagesToDiskDuringRestartTUP",
     DB_TOKEN,
-    "?",
-    ConfigInfo::CI_USED,
+    "DiskCheckpointSpeedSr",
+    ConfigInfo::CI_DEPRICATED,
     true,
     ConfigInfo::CI_INT,
     "40",
@@ -928,8 +955,8 @@
     CFG_DB_LCP_DISC_PAGES_TUP,
     "NoOfDiskPagesToDiskAfterRestartTUP",
     DB_TOKEN,
-    "?",
-    ConfigInfo::CI_USED,
+    "DiskCheckpointSpeed",
+    ConfigInfo::CI_DEPRICATED,
     true,
     ConfigInfo::CI_INT,
     "40",
@@ -940,8 +967,8 @@
     CFG_DB_LCP_DISC_PAGES_ACC_SR,
     "NoOfDiskPagesToDiskDuringRestartACC",
     DB_TOKEN,
-    "?",
-    ConfigInfo::CI_USED,
+    "DiskCheckpointSpeedSr",
+    ConfigInfo::CI_DEPRICATED,
     true,
     ConfigInfo::CI_INT,
     "20",
@@ -952,8 +979,8 @@
     CFG_DB_LCP_DISC_PAGES_ACC,
     "NoOfDiskPagesToDiskAfterRestartACC",
     DB_TOKEN,
-    "?",
-    ConfigInfo::CI_USED,
+    "DiskCheckpointSpeed",
+    ConfigInfo::CI_DEPRICATED,
     true,
     ConfigInfo::CI_INT,
     "20",
@@ -1156,6 +1183,42 @@
     0, 0 },
   
   { 
+    CFG_DB_DISK_SYNCH_SIZE,
+    "DiskSyncSize",
+    DB_TOKEN,
+    "Data written to a file before a synch is forced",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "4M",
+    "32k",
+    STR_VALUE(MAX_INT_RNIL) },
+  
+  { 
+    CFG_DB_CHECKPOINT_SPEED,
+    "DiskCheckpointSpeed",
+    DB_TOKEN,
+    "Bytes per second allowed to be written by checkpoint",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "10M",
+    "1M",
+    STR_VALUE(MAX_INT_RNIL) },
+  
+  { 
+    CFG_DB_CHECKPOINT_SPEED_SR,
+    "DiskCheckpointSpeedInRestart",
+    DB_TOKEN,
+    "Bytes per second allowed to be written by checkpoint during restart",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "100M",
+    "1M",
+    STR_VALUE(MAX_INT_RNIL) },
+  
+  { 
     CFG_DB_BACKUP_MEM,
     "BackupMemory",
     DB_TOKEN,
@@ -1215,6 +1278,30 @@
     "2K",
     STR_VALUE(MAX_INT_RNIL) },
 
+  { 
+    CFG_DB_STRING_MEMORY,
+    "StringMemory",
+    DB_TOKEN,
+    "Default size of string memory (0 -> 5% of max 1-100 -> %of max, >100 -> actual bytes)",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "0",
+    "0",
+    STR_VALUE(MAX_INT_RNIL) },
+
+  { 
+    CFG_DB_MEMREPORT_FREQUENCY,
+    "MemReportFrequency",
+    DB_TOKEN,
+    "Frequency of mem reports in seconds, 0 = only when passing %-limits",
+    ConfigInfo::CI_USED,
+    false,
+    ConfigInfo::CI_INT,
+    "0",
+    "0",
+    STR_VALUE(MAX_INT_RNIL) },
+  
   /***************************************************************************
    * API
    ***************************************************************************/
@@ -2063,150 +2150,7 @@
     false,
     ConfigInfo::CI_STRING,
     UNDEFINED,
-    0, 0 },
-
-  /****************************************************************************
-   * OSE
-   ***************************************************************************/
-  {
-    CFG_SECTION_CONNECTION,
-    "OSE",
-    "OSE",
-    "Connection section",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_SECTION,
-    (const char *)CONNECTION_TYPE_OSE, 
-    0, 0 
-  },
-
-  {
-    CFG_CONNECTION_HOSTNAME_1,
-    "HostName1",
-    "OSE",
-    "Name of computer on one side of the connection",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_STRING,
-    UNDEFINED,
-    0, 0 },
-
-  {
-    CFG_CONNECTION_HOSTNAME_2,
-    "HostName2",
-    "OSE",
-    "Name of computer on one side of the connection",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_STRING,
-    UNDEFINED,
-    0, 0 },
-
-  {
-    CFG_CONNECTION_NODE_1,
-    "NodeId1",
-    "OSE",
-    "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_INT,
-    MANDATORY,
-    "0",
-    STR_VALUE(MAX_INT_RNIL) },
-
-  {
-    CFG_CONNECTION_NODE_2,
-    "NodeId2",
-    "OSE",
-    "Id of node ("DB_TOKEN_PRINT", "API_TOKEN_PRINT" or "MGM_TOKEN_PRINT") on one side of the connection",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_INT,
-    UNDEFINED,
-    "0",
-    STR_VALUE(MAX_INT_RNIL) },
-
-  {
-    CFG_CONNECTION_SEND_SIGNAL_ID,
-    "SendSignalId",
-    "OSE",
-    "Sends id in each signal.  Used in trace files.",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_BOOL,
-    "true",
-    "false",
-    "true" },
-
-  {
-    CFG_CONNECTION_CHECKSUM,
-    "Checksum",
-    "OSE",
-    "If checksum is enabled, all signals between nodes are checked for errors",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_BOOL,
-    "false",
-    "false",
-    "true" },
-
-  {
-    CFG_OSE_PRIO_A_SIZE,
-    "PrioASignalSize",
-    "OSE",
-    "Size of priority A signals (in bytes)",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_INT,
-    "1000",
-    "0",
-    STR_VALUE(MAX_INT_RNIL) },
-
-  {
-    CFG_OSE_PRIO_B_SIZE,
-    "PrioBSignalSize",
-    "OSE",
-    "Size of priority B signals (in bytes)",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_INT,
-    "1000",
-    "0",
-    STR_VALUE(MAX_INT_RNIL) },
-  
-  {
-    CFG_OSE_RECEIVE_ARRAY_SIZE,
-    "ReceiveArraySize",
-    "OSE",
-    "Number of OSE signals checked for correct ordering (in no of OSE signals)",
-    ConfigInfo::CI_USED,
-    false,
-    ConfigInfo::CI_INT,
-    "10",
-    "0",
-    STR_VALUE(MAX_INT_RNIL) },
-
-  {
-    CFG_CONNECTION_NODE_1_SYSTEM,
-    "NodeId1_System",
-    "OSE",
-    "System for node 1 in connection",
-    ConfigInfo::CI_INTERNAL,
-    false,
-    ConfigInfo::CI_STRING,
-    UNDEFINED,
-    0, 0 },
-
-  {
-    CFG_CONNECTION_NODE_2_SYSTEM,
-    "NodeId2_System",
-    "OSE",
-    "System for node 2 in connection",
-    ConfigInfo::CI_INTERNAL,
-    false,
-    ConfigInfo::CI_STRING,
-    UNDEFINED,
-    0, 0 },
+    0, 0 }
 };
 
 const int ConfigInfo::m_NoOfParams = sizeof(m_ParamInfo) / sizeof(ParamInfo);
@@ -2604,6 +2548,13 @@
     return false;
   }
 
+  if(id >= MAX_NODES)
+  {
+    ctx.reportError("too many nodes configured, only up to %d nodes supported.",
+            MAX_NODES);
+    return false;
+  } 
+
   // next node id _always_ next numbers after last used id
   ctx.m_userProperties.put("NextNodeId", id+1, true);
 
@@ -2744,12 +2695,7 @@
     error= 1;
 #endif
   }
-  else if (strcasecmp("OSE",ctx.fname) == 0)
-  {
-#ifndef NDB_OSE_TRANSPORTER
-    error= 1;
-#endif
-  }
+
   if (error)
   {
     ctx.reportError("Binary not compiled with this connection support, "
@@ -3216,7 +3162,31 @@
   } else {
     ctx.m_userProperties.put("NoOfReplicas", replicas);
   }
-  
+
+  /**
+   * In kernel, will calculate the MaxNoOfMeataTables use the following sum:
+   * Uint32 noOfMetaTables = noOfTables + noOfOrderedIndexes + 
+   *                         noOfUniqueHashIndexes + 2
+   * 2 is the number of the SysTables.
+   * So must check that the sum does't exceed the max value of Uint32.
+   */
+  Uint32 noOfTables = 0,
+         noOfOrderedIndexes = 0,
+         noOfUniqueHashIndexes = 0;
+  ctx.m_currentSection->get("MaxNoOfTables", &noOfTables);
+  ctx.m_currentSection->get("MaxNoOfOrderedIndexes", &noOfOrderedIndexes);
+  ctx.m_currentSection->get("MaxNoOfUniqueHashIndexes", &noOfUniqueHashIndexes);
+
+  Uint64 sum= (Uint64)noOfTables + noOfOrderedIndexes + noOfUniqueHashIndexes;
+  
+  if (sum > ((Uint32)~0 - 2)) {
+    ctx.reportError("The sum of MaxNoOfTables, MaxNoOfOrderedIndexes and"
+		    " MaxNoOfUniqueHashIndexes must not exceed %u - [%s]"
+                    " starting at line: %d",
+		    ((Uint32)~0 - 2), ctx.fname, ctx.m_sectionLineno);
+    return false;
+  } 
+
   return true;
 }
 
@@ -3495,11 +3465,11 @@
   Uint32 mgm_nodes = 0;
   Uint32 api_nodes = 0;
   if (!ctx.m_userProperties.get("DB", &db_nodes)) {
-    ctx.reportError("At least one database node should be defined in config file");
+    ctx.reportError("At least one database node (ndbd) should be defined in config file");
     return false;
   }
   if (!ctx.m_userProperties.get("MGM", &mgm_nodes)) {
-    ctx.reportError("At least one management server node should be defined in config file");
+    ctx.reportError("At least one management server node (ndb_mgmd) should be defined in config file");
     return false;
   }
   if (!ctx.m_userProperties.get("API", &api_nodes)) {

--- 1.18.12.1/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2007-01-17 21:24:03 +01:00
+++ 1.37/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2007-01-17 21:24:03 +01:00
@@ -47,22 +47,23 @@
 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,  
 			    &long_sig_buffer_size);
 
   long_sig_buffer_size= long_sig_buffer_size / 256;
-  g_sectionSegmentPool.setSize(long_sig_buffer_size);
+  g_sectionSegmentPool.setSize(long_sig_buffer_size,
+                               false,true,true,CFG_DB_LONG_SIGNAL_BUFFER);
 
   // Add received signals
   addRecSignal(GSN_CONNECT_REP, &Cmvmi::execCONNECT_REP);
@@ -94,8 +95,8 @@
   addRecSignal(GSN_NODE_START_REP, &Cmvmi::execNODE_START_REP, true);
   
   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)){
@@ -104,7 +105,7 @@
     }
   }
   
-  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;
@@ -119,7 +120,6 @@
       break;
     case NodeInfo::API:
     case NodeInfo::MGM:
-    case NodeInfo::REP:
       break;
     default:
       ndbrequire(false);
@@ -133,6 +133,7 @@
 
 Cmvmi::~Cmvmi()
 {
+  m_shared_page_pool.clear();
 }
 
 #ifdef ERROR_INSERT
@@ -324,9 +325,35 @@
   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;
+  ndb_mgm_get_int64_parameter(p, CFG_DB_DISK_PAGE_BUFFER_MEMORY, &page_buffer);
+  
+  Uint32 pages = 0;
+  pages += page_buffer / GLOBAL_PAGE_SIZE; // in pages
+  pages += LCP_RESTORE_BUFFER;
+  m_global_page_pool.setSize(pages + 64, true);
+  
+  Uint64 shared_mem = 8*1024*1024;
+  ndb_mgm_get_int64_parameter(p, CFG_DB_SGA, &shared_mem);
+  shared_mem /= GLOBAL_PAGE_SIZE;
+  if (shared_mem)
+  {
+    Resource_limit rl;
+    rl.m_min = 0;
+    rl.m_max = shared_mem;
+    rl.m_resource_id = 0;
+    m_ctx.m_mm.set_resource_limit(rl);
+  }
+  
+  ndbrequire(m_ctx.m_mm.init());
+  {
+    void* ptr = m_ctx.m_mm.get_memroot();
+    m_shared_page_pool.set((GlobalPage*)ptr, ~0);
+  }
+  
   ReadConfigConf * conf = (ReadConfigConf*)signal->getDataPtrSend();
   conf->senderRef = reference();
   conf->senderData = senderData;
@@ -342,7 +369,7 @@
   if (theStartPhase == 1){
     jam();
 
-    if(theConfig.lockPagesInMainMemory() == 1)
+    if(m_ctx.m_config.lockPagesInMainMemory() == 1)
     {
       int res = NdbMem_MemLockAll(0);
       if(res != 0){
@@ -365,10 +392,6 @@
     signal->theData[1] = 0; // no id
     signal->theData[2] = NodeInfo::API;
     execOPEN_COMREQ(signal);
-    signal->theData[0] = 0; // no answer
-    signal->theData[1] = 0; // no id
-    signal->theData[2] = NodeInfo::REP;
-    execOPEN_COMREQ(signal);    
     globalData.theStartLevel = NodeState::SL_STARTED;
     sendSTTORRY(signal);
   }
@@ -556,6 +579,7 @@
       /**
        * Dont allow api nodes to connect
        */
+      ndbout_c("%d %d %d", hostId, type, globalData.theStartLevel);
       abort();
       globalTransporterRegistry.do_disconnect(hostId);
     }
@@ -698,6 +722,7 @@
       // Do nothing
       break;
     }
+    globalSignalLoggers.flushSignalLog();
   }
 
 #endif
@@ -789,7 +814,7 @@
   if(globalData.theStartLevel == NodeState::SL_CMVMI){
     jam();
 
-    if(theConfig.lockPagesInMainMemory() == 2)
+    if(m_ctx.m_config.lockPagesInMainMemory() == 2)
     {
       int res = NdbMem_MemLockAll(1);
       if(res != 0)
@@ -964,7 +989,7 @@
 
   switch (var) {
   case MaxNoOfSavedMessages:
-    theConfig.maxNoOfErrorLogs(val);
+    m_ctx.m_config.maxNoOfErrorLogs(val);
     sendSignal(CMVMI_REF, GSN_SET_VAR_CONF, signal, 1, JBB);
     break;
     
@@ -985,12 +1010,12 @@
     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;
     
@@ -1050,6 +1075,9 @@
   sendSignal(SUMA_REF, GSN_DUMP_STATE_ORD,    signal, signal->length(), JBB);
   sendSignal(TRIX_REF, GSN_DUMP_STATE_ORD,    signal, signal->length(), JBB);
   sendSignal(DBTUX_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(LGMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(TSMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
+  sendSignal(PGMAN_REF, GSN_DUMP_STATE_ORD,   signal, signal->length(), JBB);
   
   /**
    *
@@ -1085,9 +1113,6 @@
       case NodeInfo::MGM:
 	nodeTypeStr = "MGM";
 	break;
-      case NodeInfo::REP:
-	nodeTypeStr = "REP";
-	break;
       case NodeInfo::INVALID:
 	nodeTypeStr = 0;
 	break;
@@ -1110,6 +1135,37 @@
 	      g_sectionSegmentPool.getSize(),
 	      g_sectionSegmentPool.getNoOfFree());
   }
+
+  if (dumpState->args[0] == 1000)
+  {
+    Uint32 len = signal->getLength();
+    if (signal->getLength() == 1)
+    {
+      signal->theData[1] = 0;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+      return;
+    }
+    Uint32 id = signal->theData[1];
+    Resource_limit rl;
+    if (!m_ctx.m_mm.get_resource_limit(id, rl))
+      len = 2;
+    else
+    {
+      if (rl.m_min || rl.m_curr || rl.m_max)
+	infoEvent("Resource %d min: %d max: %d curr: %d",
+		  id, rl.m_min, rl.m_max, rl.m_curr);
+    }
+
+    if (len == 3)
+    {
+      signal->theData[0] = 1000;
+      signal->theData[1] = id+1;
+      signal->theData[2] = ~0;
+      sendSignal(reference(), GSN_DUMP_STATE_ORD, signal, 3, JBB);
+    }
+    return;
+  }
   
   if (arg == DumpStateOrd::CmvmiSetRestartOnErrorInsert)
   {
@@ -1117,17 +1173,17 @@
     {
       Uint32 val = (Uint32)NRT_NoStart_Restart;
       const ndb_mgm_configuration_iterator * p = 
-	theConfig.getOwnConfigIterator();
+	m_ctx.m_config.getOwnConfigIterator();
       ndbrequire(p != 0);
       
       if(!ndb_mgm_get_int_parameter(p, CFG_DB_STOP_ON_ERROR_INSERT, &val))
       {
-	theConfig.setRestartOnErrorInsert(val);
+        m_ctx.m_config.setRestartOnErrorInsert(val);
       }
     }
     else
     {
-      theConfig.setRestartOnErrorInsert(signal->theData[1]);
+      m_ctx.m_config.setRestartOnErrorInsert(signal->theData[1]);
     }
   }
 
@@ -1170,13 +1226,16 @@
   if (arg == 9001)
   {
     CLEAR_ERROR_INSERT_VALUE;
-    for (Uint32 i = 0; i<MAX_NODES; i++)
+    if (signal->getLength() == 1 || signal->theData[1])
     {
-      if (c_error_9000_nodes_mask.get(i))
+      for (Uint32 i = 0; i<MAX_NODES; i++)
       {
-	signal->theData[0] = 0;
-	signal->theData[1] = i;
-	EXECUTE_DIRECT(CMVMI, GSN_OPEN_COMREQ, signal, 2);
+	if (c_error_9000_nodes_mask.get(i))
+	{
+	  signal->theData[0] = 0;
+	  signal->theData[1] = i;
+	  EXECUTE_DIRECT(CMVMI, GSN_OPEN_COMREQ, signal, 2);
+	}
       }
     }
     c_error_9000_nodes_mask.clear();

--- 1.39.11.1/ndb/src/kernel/vm/Configuration.cpp	2007-01-17 21:24:03 +01:00
+++ 1.54/storage/ndb/src/kernel/vm/Configuration.cpp	2007-01-17 21:24:03 +01:00
@@ -64,6 +64,8 @@
 extern Uint32 g_start_type;
 extern NdbNodeBitmask g_nowait_nodes;
 
+const char *load_default_groups[]= { "mysql_cluster","ndbd",0 };
+
 /**
  * Arguments to NDB process
  */ 
@@ -113,6 +115,8 @@
 {
   short_usage_sub();
   ndb_std_print_version();
+  print_defaults(MYSQL_CONFIG_NAME,load_default_groups);
+  puts("");
   my_print_help(my_long_options);
   my_print_variables(my_long_options);
 }
@@ -120,7 +124,6 @@
 bool
 Configuration::init(int argc, char** argv)
 {  
-  const char *load_default_groups[]= { "mysql_cluster","ndbd",0 };
   load_defaults("my",load_default_groups,&argc,&argv);
 
   int ho_error;
@@ -188,7 +191,7 @@
       }
       if (! (val > 0 && val < MAX_NDB_NODES))
       {
-	ndbout_c("Invalid nodeid specified in nowait-nodes: %d : %s", 
+	ndbout_c("Invalid nodeid specified in nowait-nodes: %ld : %s", 
 		 val, _nowait_nodes);
 	exit(-1);
       }
@@ -666,13 +669,9 @@
     case NODE_TYPE_API:
       noOfAPINodes++; // No of API processes
       break;
-    case NODE_TYPE_REP:
-      break;
     case NODE_TYPE_MGM:
       noOfMGMNodes++; // No of MGM processes
       break;
-    case NODE_TYPE_EXT_REP:
-      break;
     default:
       BaseString::snprintf(buf, sizeof(buf), "Unknown node type: %d", nodeType);
       ERROR_SET(fatal, NDBD_EXIT_INVALID_CONFIG, msg, buf);
@@ -737,14 +736,14 @@
      */
     // Can keep 65536 pages (= 0.5 GByte)
     cfg.put(CFG_ACC_DIR_RANGE, 
-	    4 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas); 
+	    2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas); 
     
     cfg.put(CFG_ACC_DIR_ARRAY,
 	    (noOfIndexPages >> 8) + 
-	    4 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+	    2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
     
     cfg.put(CFG_ACC_FRAGMENT,
-	    2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+	    NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
     
     /*-----------------------------------------------------------------------*/
     // The extra operation records added are used by the scan and node 
@@ -760,14 +759,11 @@
     
     cfg.put(CFG_ACC_OVERFLOW_RECS,
 	    noOfIndexPages + 
-	    2 * NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
+	    NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
     
     cfg.put(CFG_ACC_PAGE8, 
 	    noOfIndexPages + 32);
     
-    cfg.put(CFG_ACC_ROOT_FRAG, 
-	    NO_OF_FRAG_PER_NODE * noOfAccTables* noOfReplicas);
-    
     cfg.put(CFG_ACC_TABLE, noOfAccTables);
     
     cfg.put(CFG_ACC_SCAN, noOfLocalScanRecords);
@@ -850,7 +846,7 @@
      * Tup Size Alt values
      */
     cfg.put(CFG_TUP_FRAG, 
-	    2 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
+	    NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
     
     cfg.put(CFG_TUP_OP_RECS, 
 	    noOfLocalOperations + 50);
@@ -859,14 +855,14 @@
 	    noOfDataPages);
     
     cfg.put(CFG_TUP_PAGE_RANGE, 
-	    4 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
+	    2 * NO_OF_FRAG_PER_NODE * noOfMetaTables* noOfReplicas);
     
     cfg.put(CFG_TUP_TABLE, 
 	    noOfMetaTables);
     
     cfg.put(CFG_TUP_TABLE_DESC, 
-	    2 * 6 * NO_OF_FRAG_PER_NODE * noOfAttributes * noOfReplicas +
-	    2 * 10 * NO_OF_FRAG_PER_NODE * noOfMetaTables * noOfReplicas );
+	    6 * NO_OF_FRAG_PER_NODE * noOfAttributes * noOfReplicas +
+	    10 * NO_OF_FRAG_PER_NODE * noOfMetaTables * noOfReplicas );
     
     cfg.put(CFG_TUP_STORED_PROC,
 	    noOfLocalScanRecords);
@@ -880,7 +876,7 @@
 	    noOfMetaTables /*noOfOrderedIndexes*/);
     
     cfg.put(CFG_TUX_FRAGMENT,
-	    2 * NO_OF_FRAG_PER_NODE * noOfOrderedIndexes * noOfReplicas);
+	    NO_OF_FRAG_PER_NODE * noOfOrderedIndexes * noOfReplicas);
     
     cfg.put(CFG_TUX_ATTRIBUTE, 
 	    noOfOrderedIndexes * 4);
Thread
bk commit into 5.1 tree (jonas:1.2368)jonas17 Jan