List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:September 29 2012 12:05am
Subject:bzr push into mysql-5.5-cluster-7.2 branch (frazer.clement:4014 to 4016)
View as plain text  
 4016 Frazer Clement	2012-09-29 [merge]
      Merge 7.1->7.2

    modified:
      scripts/mysql_system_tables.sql
      storage/ndb/include/transporter/TransporterRegistry.hpp
      storage/ndb/src/common/transporter/TCP_Transporter.cpp
      storage/ndb/src/common/transporter/Transporter.cpp
      storage/ndb/src/common/transporter/Transporter.hpp
      storage/ndb/src/common/transporter/TransporterRegistry.cpp
      storage/ndb/src/kernel/blocks/trpman.cpp
      storage/ndb/src/kernel/vm/NdbinfoTables.cpp
      storage/ndb/tools/ndbinfo_sql.cpp
 4015 Frazer Clement	2012-09-29 [merge]
      Merge 7.1->7.2

 4014 Mauritz Sundell	2012-09-28 [merge]
      merge 7.1 -> 7.2

    added:
      mysql-test/suite/ndb_big/bug14000373.cnf
      mysql-test/suite/ndb_big/bug14000373.result
      mysql-test/suite/ndb_big/bug14000373.test
      storage/ndb/src/kernel/vm/LHLevel.cpp
      storage/ndb/src/kernel/vm/LHLevel.hpp
    modified:
      storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
      storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/vm/CMakeLists.txt
      storage/ndb/src/ndbjtie/jtie/jtie_tconv_array_impl.hpp
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2012-03-28 15:55:23 +0000
+++ b/scripts/mysql_system_tables.sql	2012-09-29 00:02:40 +0000
@@ -673,7 +673,7 @@ PREPARE stmt FROM @str;
 EXECUTE stmt;
 DROP PREPARE stmt;
 
-SET @str=IF(@have_ndbinfo,'CREATE TABLE `ndbinfo`.`ndb$transporters` (`node_id` INT UNSIGNED,`remote_node_id` INT UNSIGNED,`connection_status` INT UNSIGNED) COMMENT="transporter status" ENGINE=NDBINFO','SET @dummy = 0');
+SET @str=IF(@have_ndbinfo,'CREATE TABLE `ndbinfo`.`ndb$transporters` (`node_id` INT UNSIGNED,`remote_node_id` INT UNSIGNED,`connection_status` INT UNSIGNED,`remote_address` VARCHAR(512),`bytes_sent` BIGINT UNSIGNED,`bytes_received` BIGINT UNSIGNED) COMMENT="transporter status" ENGINE=NDBINFO','SET @dummy = 0');
 PREPARE stmt FROM @str;
 EXECUTE stmt;
 DROP PREPARE stmt;
@@ -833,7 +833,7 @@ EXECUTE stmt;
 DROP PREPARE stmt;
 
 # ndbinfo.transporters
-SET @str=IF(@have_ndbinfo,'CREATE OR REPLACE DEFINER=`root@localhost` SQL SECURITY INVOKER VIEW `ndbinfo`.`transporters` AS SELECT node_id, remote_node_id,  CASE connection_status  WHEN 0 THEN "CONNECTED"  WHEN 1 THEN "CONNECTING"  WHEN 2 THEN "DISCONNECTED"  WHEN 3 THEN "DISCONNECTING"  ELSE NULL  END AS status FROM `ndbinfo`.`ndb$transporters`','SET @dummy = 0');
+SET @str=IF(@have_ndbinfo,'CREATE OR REPLACE DEFINER=`root@localhost` SQL SECURITY INVOKER VIEW `ndbinfo`.`transporters` AS SELECT node_id, remote_node_id,  CASE connection_status  WHEN 0 THEN "CONNECTED"  WHEN 1 THEN "CONNECTING"  WHEN 2 THEN "DISCONNECTED"  WHEN 3 THEN "DISCONNECTING"  ELSE NULL  END AS status,  remote_address, bytes_sent, bytes_received FROM `ndbinfo`.`ndb$transporters`','SET @dummy = 0');
 PREPARE stmt FROM @str;
 EXECUTE stmt;
 DROP PREPARE stmt;

=== modified file 'storage/ndb/include/transporter/TransporterRegistry.hpp'
--- a/storage/ndb/include/transporter/TransporterRegistry.hpp	2012-09-13 10:32:17 +0000
+++ b/storage/ndb/include/transporter/TransporterRegistry.hpp	2012-09-29 00:02:40 +0000
@@ -394,6 +394,9 @@ public:
 		  		 int s_port);	// signed port. <0 is dynamic
   Transporter* get_transporter(NodeId nodeId);
   struct in_addr get_connect_address(NodeId node_id) const;
+
+  Uint64 get_bytes_sent(NodeId nodeId) const;
+  Uint64 get_bytes_received(NodeId nodeId) const;
 protected:
   
 private:

=== modified file 'storage/ndb/src/common/transporter/TCP_Transporter.cpp'
--- a/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2012-06-11 14:57:25 +0000
+++ b/storage/ndb/src/common/transporter/TCP_Transporter.cpp	2012-09-29 00:02:40 +0000
@@ -379,6 +379,7 @@ ok:
   iovec_data_sent(sum_sent);
   sendCount += send_cnt;
   sendSize  += sum_sent;
+  m_bytes_sent += sum_sent;
   if(sendCount >= reportFreq)
   {
     get_callback_obj()->reportSendLen(remoteNodeId, sendCount, sendSize);
@@ -420,6 +421,7 @@ TCP_Transporter::doReceive(TransporterRe
       
       receiveCount ++;
       receiveSize  += nBytesRead;
+      m_bytes_received += nBytesRead;
       
       if(receiveCount == reportFreq){
         recvdata.reportReceiveLen(remoteNodeId,

=== modified file 'storage/ndb/src/common/transporter/Transporter.cpp'
--- a/storage/ndb/src/common/transporter/Transporter.cpp	2012-06-11 14:57:25 +0000
+++ b/storage/ndb/src/common/transporter/Transporter.cpp	2012-09-29 00:02:40 +0000
@@ -44,6 +44,7 @@ Transporter::Transporter(TransporterRegi
     isServer(lNodeId==serverNodeId),
     m_packer(_signalId, _checksum), m_max_send_buffer(max_send_buffer),
     m_overload_limit(0xFFFFFFFF), m_slowdown_limit(0xFFFFFFFF),
+    m_bytes_sent(0), m_bytes_received(0),
     isMgmConnection(_isMgmConnection),
     m_connected(false),
     m_type(_type),
@@ -286,6 +287,8 @@ Transporter::doDisconnect() {
     return;
 
   m_connected = false;
+  m_bytes_sent = 0;
+  m_bytes_received = 0;
 
   disconnectImpl();
 }

=== modified file 'storage/ndb/src/common/transporter/Transporter.hpp'
--- a/storage/ndb/src/common/transporter/Transporter.hpp	2012-06-11 14:57:25 +0000
+++ b/storage/ndb/src/common/transporter/Transporter.hpp	2012-09-29 00:02:40 +0000
@@ -158,6 +158,8 @@ protected:
   /* Overload limit, as configured with the OverloadLimit config parameter. */
   Uint32 m_overload_limit;
   Uint32 m_slowdown_limit;
+  Uint64 m_bytes_sent;
+  Uint64 m_bytes_received;
 
 private:
 

=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2012-09-13 10:32:17 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp	2012-09-29 00:02:40 +0000
@@ -56,6 +56,18 @@ TransporterRegistry::get_connect_address
   return theTransporters[node_id]->m_connect_address;
 }
 
+Uint64
+TransporterRegistry::get_bytes_sent(NodeId node_id) const
+{
+  return theTransporters[node_id]->m_bytes_sent;
+}
+
+Uint64
+TransporterRegistry::get_bytes_received(NodeId node_id) const
+{
+  return theTransporters[node_id]->m_bytes_received;
+}
+
 SocketServer::Session * TransporterService::newSession(NDB_SOCKET_TYPE sockfd)
 {
   DBUG_ENTER("SocketServer::Session * TransporterService::newSession");

=== modified file 'storage/ndb/src/kernel/blocks/trpman.cpp'
--- a/storage/ndb/src/kernel/blocks/trpman.cpp	2012-01-23 20:23:08 +0000
+++ b/storage/ndb/src/kernel/blocks/trpman.cpp	2012-09-28 23:36:17 +0000
@@ -403,8 +403,32 @@ Trpman::execDBINFO_SCANREQ(Signal *signa
         row.write_uint32(getOwnNodeId()); // Node id
         row.write_uint32(rnode); // Remote node id
         row.write_uint32(globalTransporterRegistry.getPerformState(rnode)); // State
+
+        /* Connect address */
+        if (globalTransporterRegistry.get_transporter(rnode) != NULL &&
+            globalTransporterRegistry.get_connect_address(rnode).s_addr != 0)
+        {
+          row.write_string(inet_ntoa(globalTransporterRegistry.get_connect_address(rnode)));
+        }
+        else
+        {
+          row.write_string("-");
+        }
+
+        /* Bytes sent/received */
+        if (globalTransporterRegistry.get_transporter(rnode) != NULL)
+        {
+          row.write_uint64(globalTransporterRegistry.get_bytes_sent(rnode));
+          row.write_uint64(globalTransporterRegistry.get_bytes_received(rnode));
+        }
+        else
+        {
+          row.write_uint64(0);
+          row.write_uint64(0);
+        }
+
         ndbinfo_send_row(signal, req, row, rl);
-       break;
+        break;
       }
 
       case NodeInfo::INVALID:

=== modified file 'storage/ndb/src/kernel/vm/NdbinfoTables.cpp'
--- a/storage/ndb/src/kernel/vm/NdbinfoTables.cpp	2011-10-17 18:13:57 +0000
+++ b/storage/ndb/src/kernel/vm/NdbinfoTables.cpp	2012-09-29 00:02:40 +0000
@@ -78,13 +78,17 @@ DECLARE_NDBINFO_TABLE(POOLS,12) =
   }
 };
 
-DECLARE_NDBINFO_TABLE(TRANSPORTERS, 3) =
-{ { "transporters", 3, 0, "transporter status" },
+DECLARE_NDBINFO_TABLE(TRANSPORTERS, 6) =
+{ { "transporters", 6, 0, "transporter status" },
   {
     {"node_id",            Ndbinfo::Number, ""},
     {"remote_node_id",     Ndbinfo::Number, ""},
 
-    {"connection_status",  Ndbinfo::Number, ""}
+    {"connection_status",  Ndbinfo::Number, ""},
+    
+    {"remote_address",     Ndbinfo::String, ""},
+    {"bytes_sent",         Ndbinfo::Number64, ""},
+    {"bytes_received",     Ndbinfo::Number64, ""}
   }
 };
 

=== modified file 'storage/ndb/tools/ndbinfo_sql.cpp'
--- a/storage/ndb/tools/ndbinfo_sql.cpp	2012-02-23 15:41:31 +0000
+++ b/storage/ndb/tools/ndbinfo_sql.cpp	2012-09-29 00:02:40 +0000
@@ -66,7 +66,8 @@ struct view {
     "  WHEN 2 THEN \"DISCONNECTED\""
     "  WHEN 3 THEN \"DISCONNECTING\""
     "  ELSE NULL "
-    " END AS status "
+    " END AS status, "
+    " remote_address, bytes_sent, bytes_received "
     "FROM `<NDBINFO_DB>`.`<TABLE_PREFIX>transporters`"
   },
   { "logspaces",

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-cluster-7.2 branch (frazer.clement:4014 to 4016) Frazer Clement3 Oct