List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:April 12 2011 2:06pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (maitrayi.sabaratnam:4304 to 4305)
Bug#12330248
View as plain text  
 4305 Maitrayi Sabaratnam	2011-04-12
      Bug#12330248 - EXTEND NDBINFO.NODES TO SHOW THE CONFIG GENERATION NUMBER OF THE DATA NODES

    modified:
      storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
      storage/ndb/src/kernel/vm/Configuration.cpp
      storage/ndb/src/kernel/vm/Configuration.hpp
      storage/ndb/src/kernel/vm/NdbinfoTables.cpp
      storage/ndb/tools/ndbinfo_sql.cpp
 4304 jonas oreland	2011-04-11
      ndb - increase row-size

    modified:
      mysql-test/suite/ndb/r/ndb_alter_table_online.result
      mysql-test/suite/ndb/r/ndb_basic.result
      mysql-test/suite/ndb/r/ndb_create_table.result
      mysql-test/suite/ndb/r/ndb_restore_misc.result
      mysql-test/suite/ndb/t/ndb_alter_table_online.test
      mysql-test/suite/ndb/t/ndb_basic.test
      mysql-test/suite/ndb/t/ndb_create_table.test
      mysql-test/suite/ndb/t/ndb_restore_misc.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_basic.result
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test
      sql/ha_ndbcluster.cc
      storage/ndb/include/kernel/ndb_limits.h
      storage/ndb/include/ndbapi/ndbapi_limits.h
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
=== modified file 'storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp'
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-04-09 15:48:21 +0000
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2011-04-12 11:59:36 +0000
@@ -2108,7 +2108,8 @@ void Cmvmi::execDBINFO_SCANREQ(Signal *s
     const NodeState& nodeState = getNodeState();
     const Uint32 start_level = nodeState.startLevel;
     const NDB_TICKS uptime = (NdbTick_CurrentMillisecond()/1000) - m_start_time;
-
+    Uint32 generation = m_ctx.m_config.get_config_generation(); 
+ 
     Ndbinfo::Row row(signal, req);
     row.write_uint32(getOwnNodeId()); // Node id
 
@@ -2116,6 +2117,7 @@ void Cmvmi::execDBINFO_SCANREQ(Signal *s
     row.write_uint32(start_level);
     row.write_uint32(start_level == NodeState::SL_STARTING ?
                      nodeState.starting.startPhase : 0);
+    row.write_uint32(generation);
     ndbinfo_send_row(signal, req, row, rl);
     break;
   }

=== modified file 'storage/ndb/src/kernel/vm/Configuration.cpp'
--- a/storage/ndb/src/kernel/vm/Configuration.cpp	2011-03-29 12:32:02 +0000
+++ b/storage/ndb/src/kernel/vm/Configuration.cpp	2011-04-12 11:59:36 +0000
@@ -545,6 +545,16 @@ Configuration::getClusterConfigIterator(
   return m_clusterConfigIter;
 }
 
+Uint32 
+Configuration::get_config_generation() const {
+  Uint32 generation = ~0;
+  ndb_mgm_configuration_iterator sys_iter(*m_clusterConfig,
+                                          CFG_SECTION_SYSTEM);
+  sys_iter.get(CFG_SYS_CONFIG_GENERATION, &generation);
+  return generation;
+}
+ 
+
 void
 Configuration::calcSizeAlt(ConfigValues * ownConfig){
   const char * msg = "Invalid configuration fetched";

=== modified file 'storage/ndb/src/kernel/vm/Configuration.hpp'
--- a/storage/ndb/src/kernel/vm/Configuration.hpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/kernel/vm/Configuration.hpp	2011-04-12 11:59:36 +0000
@@ -124,6 +124,7 @@ public:
   ndb_mgm_configuration_iterator * getClusterConfigIterator() const;
 
   ndb_mgm_configuration* getClusterConfig() const { return m_clusterConfig; }
+  Uint32 get_config_generation() const; 
 
 private:
   friend class Cmvmi;

=== modified file 'storage/ndb/src/kernel/vm/NdbinfoTables.cpp'
--- a/storage/ndb/src/kernel/vm/NdbinfoTables.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/src/kernel/vm/NdbinfoTables.cpp	2011-04-12 11:59:36 +0000
@@ -141,14 +141,15 @@ DECLARE_NDBINFO_TABLE(COUNTERS,5) =
   }
 };
 
-DECLARE_NDBINFO_TABLE(NODES,4) =
-{ { "nodes", 4, 0, "node status" },
+DECLARE_NDBINFO_TABLE(NODES,5) =
+{ { "nodes", 5, 0, "node status" },
   {
     {"node_id",            Ndbinfo::Number, ""},
 
     {"uptime",             Ndbinfo::Number64, "time in seconds that node has been running"},
     {"status",             Ndbinfo::Number, "starting/started/stopped etc."},
-    {"start_phase",        Ndbinfo::Number, "start phase if node is starting"}
+    {"start_phase",        Ndbinfo::Number, "start phase if node is starting"},
+    {"config_generation",  Ndbinfo::Number, "configuration generation number"}
   }
 };
 

=== modified file 'storage/ndb/tools/ndbinfo_sql.cpp'
--- a/storage/ndb/tools/ndbinfo_sql.cpp	2011-04-06 14:16:13 +0000
+++ b/storage/ndb/tools/ndbinfo_sql.cpp	2011-04-12 11:59:36 +0000
@@ -153,7 +153,8 @@ struct view {
     "  WHEN 8 THEN \"STOPPING_4\""
     "  ELSE \"<unknown>\" "
     " END AS status, "
-    "start_phase "
+    "start_phase, "
+    "config_generation "
     "FROM <NDBINFO_DB>.<TABLE_PREFIX>nodes"
    },
   { "memoryusage",

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (maitrayi.sabaratnam:4304 to 4305)Bug#12330248Maitrayi Sabaratnam12 Apr