List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:February 18 2011 10:35pm
Subject:bzr push into mysql-trunk-wl5379 branch (chris.powers:3231 to 3232) WL#4896
View as plain text  
 3232 cpowers	2011-02-18
      WL#4896 "Performance Schema Net IO"
      
      - New table: SOCKET_SUMMARY_BY_EVENT_NAME 
      - Removed CONNECT operation columns from socket summary tables
      - New class: PFS_instance_socket_io_stat_visitor
      - Simplified data structures for combined timer and byte count stats
      - Fixed bug in ::make_row() for socket summary tables

    added:
      storage/perfschema/table_socket_summary_by_event_name.cc
      storage/perfschema/table_socket_summary_by_event_name.h
    modified:
      scripts/mysql_system_tables.sql
      storage/perfschema/CMakeLists.txt
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_stat.h
      storage/perfschema/pfs_visitor.cc
      storage/perfschema/pfs_visitor.h
      storage/perfschema/table_helper.h
      storage/perfschema/table_socket_summary_by_instance.cc
 3231 cpowers	2011-02-16
      WL#4896 "Performance Schema Net IO"
      
      - Renamed performance_schema_max_sockets to ..max_socket_instances
      - Fixed events_waits aggregation for timer waits
      - close_socket instrument now destroys PFS socket instance
      - Renamed PFS_single_stat.aggregate_timed() to aggregate_value()
      - Added status variable performance_schema_socket_classes_lost
      - Enabled socket_shutdown() and socket_close() instruments
      - Instrumented vio::fastsend()

    modified:
      include/mysql/psi/mysql_socket.h
      sql/sys_vars.cc
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_stat.h
      vio/vio.c
      vio/viosocket.c
=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2011-02-11 21:01:56 +0000
+++ b/scripts/mysql_system_tables.sql	2011-02-18 22:33:11 +0000
@@ -479,11 +479,101 @@ SET @cmd="CREATE TABLE performance_schem
   "MIN_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
   "AVG_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
   "MAX_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
-  "COUNT_CONNECT BIGINT unsigned not null,"
-  "SUM_TIMER_CONNECT BIGINT unsigned not null,"
-  "MIN_TIMER_CONNECT BIGINT unsigned not null,"
-  "AVG_TIMER_CONNECT BIGINT unsigned not null,"
-  "MAX_TIMER_CONNECT BIGINT unsigned not null,"
+  "COUNT_MISC BIGINT unsigned not null,"
+  "SUM_TIMER_MISC BIGINT unsigned not null,"
+  "MIN_TIMER_MISC BIGINT unsigned not null,"
+  "AVG_TIMER_MISC BIGINT unsigned not null,"
+  "MAX_TIMER_MISC BIGINT unsigned not null"
+  ")ENGINE=PERFORMANCE_SCHEMA;";
+
+SET @str = IF(@have_pfs = 1, @cmd, 'SET @dummy = 0');
+PREPARE stmt FROM @str;
+EXECUTE stmt;
+DROP PREPARE stmt;
+
+--
+-- TABLE SOCKET_SUMMARY_BY_INSTANCE
+--
+
+SET @cmd="CREATE TABLE performance_schema.socket_summary_by_event_name("
+  "EVENT_NAME VARCHAR(128) not null,"
+  "COUNT_STAR BIGINT unsigned not null,"
+  "SUM_TIMER_WAIT BIGINT unsigned not null,"
+  "MIN_TIMER_WAIT BIGINT unsigned not null,"
+  "AVG_TIMER_WAIT BIGINT unsigned not null,"
+  "MAX_TIMER_WAIT BIGINT unsigned not null,"
+  "COUNT_READ BIGINT unsigned not null,"
+  "SUM_TIMER_READ BIGINT unsigned not null,"
+  "MIN_TIMER_READ BIGINT unsigned not null,"
+  "AVG_TIMER_READ BIGINT unsigned not null,"
+  "MAX_TIMER_READ BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
+  "COUNT_WRITE BIGINT unsigned not null,"
+  "SUM_TIMER_WRITE BIGINT unsigned not null,"
+  "MIN_TIMER_WRITE BIGINT unsigned not null,"
+  "AVG_TIMER_WRITE BIGINT unsigned not null,"
+  "MAX_TIMER_WRITE BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
+  "COUNT_RECV BIGINT unsigned not null,"
+  "SUM_TIMER_RECV BIGINT unsigned not null,"
+  "MIN_TIMER_RECV BIGINT unsigned not null,"
+  "AVG_TIMER_RECV BIGINT unsigned not null,"
+  "MAX_TIMER_RECV BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_RECV BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_RECV BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_RECV BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_RECV BIGINT unsigned not null,"
+  "COUNT_SEND BIGINT unsigned not null,"
+  "SUM_TIMER_SEND BIGINT unsigned not null,"
+  "MIN_TIMER_SEND BIGINT unsigned not null,"
+  "AVG_TIMER_SEND BIGINT unsigned not null,"
+  "MAX_TIMER_SEND BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_SEND BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_SEND BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_SEND BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_SEND BIGINT unsigned not null,"
+  "COUNT_RECVFROM BIGINT unsigned not null,"
+  "SUM_TIMER_RECVFROM BIGINT unsigned not null,"
+  "MIN_TIMER_RECVFROM BIGINT unsigned not null,"
+  "AVG_TIMER_RECVFROM BIGINT unsigned not null,"
+  "MAX_TIMER_RECVFROM BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_RECVFROM BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_RECVFROM BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_RECVFROM BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_RECVFROM BIGINT unsigned not null,"
+  "COUNT_SENDTO BIGINT unsigned not null,"
+  "SUM_TIMER_SENDTO BIGINT unsigned not null,"
+  "MIN_TIMER_SENDTO BIGINT unsigned not null,"
+  "AVG_TIMER_SENDTO BIGINT unsigned not null,"
+  "MAX_TIMER_SENDTO BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_SENDTO BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_SENDTO BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_SENDTO BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_SENDTO BIGINT unsigned not null,"
+  "COUNT_RECVMSG BIGINT unsigned not null,"
+  "SUM_TIMER_RECVMSG BIGINT unsigned not null,"
+  "MIN_TIMER_RECVMSG BIGINT unsigned not null,"
+  "AVG_TIMER_RECVMSG BIGINT unsigned not null,"
+  "MAX_TIMER_RECVMSG BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_RECVMSG BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_RECVMSG BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_RECVMSG BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_RECVMSG BIGINT unsigned not null,"
+  "COUNT_SENDMSG BIGINT unsigned not null,"
+  "SUM_TIMER_SENDMSG BIGINT unsigned not null,"
+  "MIN_TIMER_SENDMSG BIGINT unsigned not null,"
+  "AVG_TIMER_SENDMSG BIGINT unsigned not null,"
+  "MAX_TIMER_SENDMSG BIGINT unsigned not null,"
+  "SUM_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
+  "MIN_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
+  "AVG_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
+  "MAX_NUMBER_OF_BYTES_SENDMSG BIGINT unsigned not null,"
   "COUNT_MISC BIGINT unsigned not null,"
   "SUM_TIMER_MISC BIGINT unsigned not null,"
   "MIN_TIMER_MISC BIGINT unsigned not null,"

=== modified file 'storage/perfschema/CMakeLists.txt'
--- a/storage/perfschema/CMakeLists.txt	2011-02-08 19:39:54 +0000
+++ b/storage/perfschema/CMakeLists.txt	2011-02-18 22:33:11 +0000
@@ -52,6 +52,7 @@ table_file_instances.h
 table_file_summary.h
 table_socket_instances.h
 table_socket_summary_by_instance.h
+table_socket_summary_by_event_name.h
 table_helper.h
 table_os_global_by_type.h
 table_performance_timers.h
@@ -90,6 +91,7 @@ table_file_instances.cc
 table_file_summary.cc
 table_socket_instances.cc
 table_socket_summary_by_instance.cc
+table_socket_summary_by_event_name.cc
 table_helper.cc
 table_os_global_by_type.cc
 table_performance_timers.cc

=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2011-02-16 22:53:35 +0000
+++ b/storage/perfschema/pfs.cc	2011-02-18 22:33:11 +0000
@@ -3551,10 +3551,6 @@ static void end_socket_wait_v1(PSI_socke
 
   switch (state->m_operation)
   {
-  case PSI_SOCKET_CONNECT:
-    time_stat= &socket->m_socket_stat.m_io_stat.m_connect.m_waits;
-    io_stat= &socket->m_socket_stat.m_io_stat.m_connect.m_bytes;
-    break;
   case PSI_SOCKET_RECV:
     time_stat= &socket->m_socket_stat.m_io_stat.m_recv.m_waits;
     io_stat= &socket->m_socket_stat.m_io_stat.m_recv.m_bytes;
@@ -3581,6 +3577,7 @@ static void end_socket_wait_v1(PSI_socke
     break;
 
   /** These operations are grouped as 'miscellaneous' */
+  case PSI_SOCKET_CONNECT:
   case PSI_SOCKET_CREATE:
   case PSI_SOCKET_BIND:
   case PSI_SOCKET_CLOSE:

=== modified file 'storage/perfschema/pfs_engine_table.cc'
--- a/storage/perfschema/pfs_engine_table.cc	2011-02-08 23:01:39 +0000
+++ b/storage/perfschema/pfs_engine_table.cc	2011-02-18 22:33:11 +0000
@@ -40,6 +40,7 @@
 #include "table_tlws_by_table.h"
 #include "table_socket_instances.h"
 #include "table_socket_summary_by_instance.h"
+#include "table_socket_summary_by_event_name.h"
 
 /* For show status */
 #include "pfs_column_values.h"
@@ -83,6 +84,7 @@ static PFS_engine_table_share *all_share
   &table_tlws_by_table::m_share,
   &table_socket_instances::m_share,
   &table_socket_summary_by_instance::m_share,
+  &table_socket_summary_by_event_name::m_share,
   NULL
 };
 

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2011-02-12 00:22:15 +0000
+++ b/storage/perfschema/pfs_instr.cc	2011-02-18 22:33:11 +0000
@@ -1242,7 +1242,7 @@ void destroy_socket(PFS_socket *pfs)
   global_instr_class_waits_array[index].aggregate(&pfs->m_wait_stat);
   pfs->m_wait_stat.reset();
 
-  /* Aggregate to SOCKET_SUMMARY_BY_INSTANCE */
+  /* Aggregate to SOCKET_SUMMARY_BY_INSTANCE and BY_EVENT_NAME */
   klass->m_socket_stat.m_io_stat.aggregate(&pfs->m_socket_stat.m_io_stat);
   pfs->m_socket_stat.m_io_stat.reset();
 

=== modified file 'storage/perfschema/pfs_stat.h'
--- a/storage/perfschema/pfs_stat.h	2011-02-16 22:53:35 +0000
+++ b/storage/perfschema/pfs_stat.h	2011-02-18 22:33:11 +0000
@@ -346,8 +346,6 @@ struct PFS_socket_io_stat
   PFS_multi_stat m_recvmsg;
   /** SENDMSG statistics */
   PFS_multi_stat m_sendmsg;
-  /** CONNECT statistics */
-  PFS_multi_stat m_connect;
   /** Miscelleanous statistics */
   PFS_multi_stat m_misc;
 
@@ -361,7 +359,6 @@ struct PFS_socket_io_stat
     m_sendto.reset();
     m_recvmsg.reset();
     m_sendmsg.reset();
-    m_connect.reset();
     m_misc.reset();
   }
 
@@ -373,7 +370,6 @@ struct PFS_socket_io_stat
     m_sendto.aggregate(&stat->m_sendto);
     m_recvmsg.aggregate(&stat->m_recvmsg);
     m_sendmsg.aggregate(&stat->m_sendmsg);
-    m_connect.aggregate(&stat->m_connect);
     m_misc.aggregate(&stat->m_misc);
   }
 
@@ -385,7 +381,6 @@ struct PFS_socket_io_stat
     result->aggregate(&m_sendto.m_waits);
     result->aggregate(&m_recvmsg.m_waits);
     result->aggregate(&m_sendmsg.m_waits);
-    result->aggregate(&m_connect.m_waits);
     result->aggregate(&m_misc.m_waits);
   }
 
@@ -397,7 +392,6 @@ struct PFS_socket_io_stat
     result->aggregate(&m_sendto.m_bytes);
     result->aggregate(&m_recvmsg.m_bytes);
     result->aggregate(&m_sendmsg.m_bytes);
-    result->aggregate(&m_connect.m_bytes);
     result->aggregate(&m_misc.m_bytes);
   }
 

=== modified file 'storage/perfschema/pfs_visitor.cc'
--- a/storage/perfschema/pfs_visitor.cc	2011-02-07 21:34:45 +0000
+++ b/storage/perfschema/pfs_visitor.cc	2011-02-18 22:33:11 +0000
@@ -28,6 +28,8 @@
   @{
 */
 
+/** Connection iterator */
+
 void PFS_connection_iterator::visit_global(bool with_threads,
                                            PFS_connection_visitor *visitor)
 {
@@ -47,6 +49,8 @@ void PFS_connection_iterator::visit_glob
   }
 }
 
+/** Instance iterator */
+
 void PFS_instance_iterator::visit_mutex_instances(PFS_mutex_class *klass,
                                                   PFS_instance_visitor *visitor)
 {
@@ -207,6 +211,8 @@ void PFS_instance_iterator::visit_socket
   }
 }
 
+/** Object iterator */
+
 void PFS_object_iterator::visit_all_tables(PFS_object_visitor *visitor)
 {
   DBUG_ASSERT(visitor != NULL);
@@ -275,6 +281,8 @@ void PFS_object_iterator::visit_table_in
   }
 }
 
+/** Connection wait visitor */
+
 PFS_connection_wait_visitor
 ::PFS_connection_wait_visitor(PFS_instr_class *klass)
 {
@@ -295,6 +303,8 @@ void PFS_connection_wait_visitor::visit_
   m_stat.aggregate(& pfs->m_instr_class_wait_stats[m_index]);
 }
 
+/** Instance wait visitor */
+
 PFS_instance_wait_visitor::PFS_instance_wait_visitor()
 {
 }
@@ -357,6 +367,8 @@ void PFS_instance_wait_visitor::visit_so
   m_stat.aggregate(& pfs->m_wait_stat);
 }
 
+/** Table IO wait visitor */
+
 PFS_table_io_wait_visitor::PFS_table_io_wait_visitor()
 {}
 
@@ -404,6 +416,8 @@ void PFS_table_io_wait_visitor::visit_ta
   }
 }
 
+/** Table IO stat visitor */
+
 PFS_table_io_stat_visitor::PFS_table_io_stat_visitor()
 {}
 
@@ -439,6 +453,8 @@ void PFS_table_io_stat_visitor::visit_ta
   }
 }
 
+/** Index IO stat visitor */
+
 PFS_index_io_stat_visitor::PFS_index_io_stat_visitor()
 {}
 
@@ -455,6 +471,8 @@ void PFS_index_io_stat_visitor::visit_ta
   m_stat.aggregate(& pfs->m_table_stat.m_index_stat[index]);
 }
 
+/** Table lock wait visitor */
+
 PFS_table_lock_wait_visitor::PFS_table_lock_wait_visitor()
 {}
 
@@ -477,6 +495,8 @@ void PFS_table_lock_wait_visitor::visit_
   pfs->m_table_stat.sum_lock(& m_stat);
 }
 
+/** Table lock stat visitor */
+
 PFS_table_lock_stat_visitor::PFS_table_lock_stat_visitor()
 {}
 
@@ -493,5 +513,24 @@ void PFS_table_lock_stat_visitor::visit_
   m_stat.aggregate(& pfs->m_table_stat.m_lock_stat);
 }
 
-/** @} */
+/** Socket IO stat visitor */
+
+PFS_instance_socket_io_stat_visitor::PFS_instance_socket_io_stat_visitor()
+{
+}
+
+PFS_instance_socket_io_stat_visitor::~PFS_instance_socket_io_stat_visitor()
+{}
+
+void PFS_instance_socket_io_stat_visitor::visit_socket_class(PFS_socket_class *pfs) 
+{
+  uint index= pfs->m_event_name_index;
+  m_socket_io_stat.aggregate(&pfs->m_socket_stat.m_io_stat);
+}
+
+void PFS_instance_socket_io_stat_visitor::visit_socket(PFS_socket *pfs) 
+{
+  m_socket_io_stat.aggregate(&pfs->m_socket_stat.m_io_stat);
+}
 
+/** @} */

=== modified file 'storage/perfschema/pfs_visitor.h'
--- a/storage/perfschema/pfs_visitor.h	2011-02-07 21:34:45 +0000
+++ b/storage/perfschema/pfs_visitor.h	2011-02-18 22:33:11 +0000
@@ -323,6 +323,21 @@ public:
   PFS_table_lock_stat m_stat;
 };
 
+/**
+  A concrete instance visitor that aggregates
+  socket wait and byte count statistics.
+*/
+class PFS_instance_socket_io_stat_visitor : public PFS_instance_visitor
+{
+public:
+  PFS_instance_socket_io_stat_visitor();
+  virtual ~PFS_instance_socket_io_stat_visitor();
+  virtual void visit_socket_class(PFS_socket_class *pfs);
+  virtual void visit_socket(PFS_socket *pfs);
+
+  /** Wait and byte count statistics collected. */
+  PFS_socket_io_stat m_socket_io_stat;
+};
 /** @} */
 #endif
 

=== modified file 'storage/perfschema/table_helper.h'
--- a/storage/perfschema/table_helper.h	2011-02-07 19:17:08 +0000
+++ b/storage/perfschema/table_helper.h	2011-02-18 22:33:11 +0000
@@ -195,6 +195,20 @@ struct PFS_stat_row
   }
 };
 
+/** Row fragment for timer and byte count stats. Corresponds to PFS_multi_stat */
+struct PFS_multi_stat_row
+{
+  PFS_stat_row m_waits;
+  PFS_stat_row m_bytes;
+
+  /** Build a row with timer and byte count fields from a memory buffer. */
+  inline void set(time_normalizer *normalizer, const PFS_multi_stat *stat)
+  {
+    m_waits.set(normalizer, &stat->m_waits);
+    m_bytes.set(&stat->m_bytes);
+  }
+};
+
 /** Row fragment for table io statistics columns. */
 struct PFS_table_io_stat_row
 {
@@ -297,105 +311,53 @@ struct PFS_table_lock_stat_row
 /** Row fragment for socket io statistics columns. */
 struct PFS_socket_io_stat_row
 {
-  PFS_stat_row m_all;
-  PFS_stat_row m_all_read;
-  PFS_stat_row m_all_write;
-  PFS_stat_row m_recv;
-  PFS_stat_row m_send;
-  PFS_stat_row m_recvfrom;
-  PFS_stat_row m_sendto;
-  PFS_stat_row m_recvmsg;
-  PFS_stat_row m_sendmsg;
-  PFS_stat_row m_connect;
-  PFS_stat_row m_misc;
+  PFS_multi_stat_row m_recv;
+  PFS_multi_stat_row m_send;
+  PFS_multi_stat_row m_recvfrom;
+  PFS_multi_stat_row m_sendto;
+  PFS_multi_stat_row m_recvmsg;
+  PFS_multi_stat_row m_sendmsg;
+  PFS_multi_stat_row m_misc;
+  PFS_multi_stat_row m_all_read;
+  PFS_multi_stat_row m_all_write;
+  PFS_multi_stat_row m_all;
 
-  /** Build a row of timer fields from a memory buffer. */
-  inline void set_waits(time_normalizer *normalizer, const PFS_socket_io_stat *stat)
+  inline void set(time_normalizer *normalizer, const PFS_socket_io_stat *stat)
   {
-    PFS_single_stat all_read;
-    PFS_single_stat all_write;
-    PFS_single_stat all;
+    PFS_multi_stat all_read;
+    PFS_multi_stat all_write;
+    PFS_multi_stat all;
 
     /* Combine receive operations */
-    m_recv.set(normalizer, &stat->m_recv.m_waits);
-    m_recvfrom.set(normalizer, &stat->m_recvfrom.m_waits);
-    m_recvmsg.set(normalizer, &stat->m_recvmsg.m_waits);
-
-    all_read.aggregate(&stat->m_recv.m_waits);
-    all_read.aggregate(&stat->m_recvfrom.m_waits);
-    all_read.aggregate(&stat->m_recvmsg.m_waits);
+    m_recv.set(normalizer, &stat->m_recv);
+    m_recvfrom.set(normalizer, &stat->m_recvfrom);
+    m_recvmsg.set(normalizer, &stat->m_recvmsg);
+
+    all_read.aggregate(&stat->m_recv);
+    all_read.aggregate(&stat->m_recvfrom);
+    all_read.aggregate(&stat->m_recvmsg);
 
     /* Combine send operations */
-    m_send.set(normalizer, &stat->m_send.m_waits);
-    m_sendto.set(normalizer, &stat->m_sendto.m_waits);
-    m_sendmsg.set(normalizer, &stat->m_sendmsg.m_waits);
-
-    all_write.aggregate(&stat->m_send.m_waits);
-    all_write.aggregate(&stat->m_sendto.m_waits);
-    all_write.aggregate(&stat->m_sendmsg.m_waits);
-
-    /* Set row values for miscellaneous socket operations */
-    m_connect.set(normalizer, &stat->m_connect.m_waits);
-    m_misc.set(normalizer, &stat->m_misc.m_waits);
+    m_send.set(normalizer, &stat->m_send);
+    m_sendto.set(normalizer, &stat->m_sendto);
+    m_sendmsg.set(normalizer, &stat->m_sendmsg);
+
+    all_write.aggregate(&stat->m_send);
+    all_write.aggregate(&stat->m_sendto);
+    all_write.aggregate(&stat->m_sendmsg);
+
+    /* Combine row values for miscellaneous socket operations */
+    m_misc.set(normalizer, &stat->m_misc);
     
     /* Combine timer stats for all operations */
     all.aggregate(&all_read);
     all.aggregate(&all_write);
-    all.aggregate(&stat->m_misc.m_waits);
-    all.aggregate(&stat->m_connect.m_waits);
+    all.aggregate(&stat->m_misc);
 
     m_all_read.set(normalizer, &all_read);
     m_all_write.set(normalizer, &all_write);
     m_all.set(normalizer, &all);
   }
-
-  /** Build a row of byte count fields from a memory buffer. */
-  inline void set_bytes(const PFS_socket_io_stat *stat)
-  {
-    PFS_single_stat all_read;
-    PFS_single_stat all_write;
-    PFS_single_stat all;
-    PFS_single_stat misc;
-
-    /* Combine receive operations */
-    m_recv.set(&stat->m_recv.m_bytes);
-    m_recvfrom.set(&stat->m_recvfrom.m_bytes);
-    m_recvmsg.set(&stat->m_recvmsg.m_bytes);
-
-    all_read.aggregate(&stat->m_recv.m_bytes);
-    all_read.aggregate(&stat->m_recvfrom.m_bytes);
-    all_read.aggregate(&stat->m_recvmsg.m_bytes);
-
-    /* Combine send operations */
-    m_send.set(&stat->m_send.m_bytes);
-    m_sendto.set(&stat->m_sendto.m_bytes);
-    m_sendmsg.set(&stat->m_sendmsg.m_bytes);
-
-    all_write.aggregate(&stat->m_send.m_bytes);
-    all_write.aggregate(&stat->m_sendto.m_bytes);
-    all_write.aggregate(&stat->m_sendmsg.m_bytes);
-
-    /* Miscellaneous socket operations */
-    m_connect.set(&stat->m_connect.m_bytes);
-    m_misc.set(&stat->m_misc.m_bytes);
-    
-    /* Combine byte counts for all operations */
-    all.aggregate(&all_read);
-    all.aggregate(&all_write);
-    all.aggregate(&stat->m_connect.m_bytes);
-    all.aggregate(&stat->m_misc.m_bytes);
-
-    m_all_read.set(&all_read);
-    m_all_write.set(&all_write);
-    m_all.set(&all);
-  }
-
-  /** Build a row of timer and byte count fields from a memory buffer. */
-  inline void set(time_normalizer *normalizer, const PFS_socket_io_stat *stat)
-  {
-    set_waits(normalizer, stat);
-    set_bytes(stat);
-  }
 };
 
 void set_field_object_type(Field *f, enum_object_type object_type);

=== added file 'storage/perfschema/table_socket_summary_by_event_name.cc'
--- a/storage/perfschema/table_socket_summary_by_event_name.cc	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/table_socket_summary_by_event_name.cc	2011-02-18 22:33:11 +0000
@@ -0,0 +1,839 @@
+/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software Foundation,
+  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+/**
+  @file storage/perfschema/table_socket_summary_by_event_name.cc
+  Table SOCKET_EVENT_NAMES (implementation).
+*/
+
+#include "my_global.h"
+#include "my_pthread.h"
+#include "pfs_instr.h"
+#include "pfs_column_types.h"
+#include "pfs_column_values.h"
+#include "table_socket_summary_by_event_name.h"
+#include "pfs_global.h"
+#include "pfs_visitor.h"
+
+THR_LOCK table_socket_summary_by_event_name::m_table_lock;
+
+static const TABLE_FIELD_TYPE field_types[]=
+{
+  {
+    { C_STRING_WITH_LEN("EVENT_NAME") },
+    { C_STRING_WITH_LEN("varchar(128)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("COUNT_STAR") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Read */
+  {
+    { C_STRING_WITH_LEN("COUNT_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_READ") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Write */
+  {
+    { C_STRING_WITH_LEN("COUNT_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_WRITE") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Recv */
+  {
+    { C_STRING_WITH_LEN("COUNT_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_RECV") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Send */
+  {
+    { C_STRING_WITH_LEN("COUNT_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_SEND") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Recvfrom */
+  {
+    { C_STRING_WITH_LEN("COUNT_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_RECVFROM") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Sendto */
+  {
+    { C_STRING_WITH_LEN("COUNT_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_SENDTO") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Recvmsg */
+  {
+    { C_STRING_WITH_LEN("COUNT_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_RECVMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Sendmsg */
+  {
+    { C_STRING_WITH_LEN("COUNT_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_NUMBER_OF_BYTES_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_NUMBER_OF_BYTES_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_NUMBER_OF_BYTES_SENDMSG") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+
+  /** Misc */
+  {
+    { C_STRING_WITH_LEN("COUNT_MISC") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("SUM_TIMER_MISC") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MIN_TIMER_MISC") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("AVG_TIMER_MISC") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  },
+  {
+    { C_STRING_WITH_LEN("MAX_TIMER_MISC") },
+    { C_STRING_WITH_LEN("bigint(20)") },
+    { NULL, 0}
+  }
+};
+
+TABLE_FIELD_DEF
+table_socket_summary_by_event_name::m_field_def=
+{ 83, field_types };
+
+PFS_engine_table_share
+table_socket_summary_by_event_name::m_share=
+{
+  { C_STRING_WITH_LEN("socket_summary_by_event_name") },
+  &pfs_readonly_acl,
+  &table_socket_summary_by_event_name::create,
+  NULL, /* write_row */
+  NULL, /* delete_all_rows */
+  NULL, /* get_row_count */
+  1000, /* records */ // TBD: Check this
+  sizeof(PFS_simple_index),
+  &m_table_lock,
+  &m_field_def,
+  false /* checked */
+};
+
+PFS_engine_table* table_socket_summary_by_event_name::create(void)
+{
+  return new table_socket_summary_by_event_name();
+}
+
+table_socket_summary_by_event_name::table_socket_summary_by_event_name()
+  : PFS_engine_table(&m_share, &m_pos),
+  m_row_exists(false), m_pos(1), m_next_pos(1)
+{}
+
+void table_socket_summary_by_event_name::reset_position(void)
+{
+  m_pos.m_index= 1;
+  m_next_pos.m_index= 1;
+}
+
+int table_socket_summary_by_event_name::rnd_next(void)
+{
+  PFS_socket_class *socket_class;
+
+  m_pos.set_at(&m_next_pos);
+
+  socket_class= find_socket_class(m_pos.m_index);
+  if (socket_class)
+  {
+    make_row(socket_class);
+    m_next_pos.set_after(&m_pos);
+    return 0;
+  }
+
+  return HA_ERR_END_OF_FILE;
+}
+
+int table_socket_summary_by_event_name::rnd_pos(const void *pos)
+{
+  PFS_socket_class *socket_class;
+
+  set_position(pos);
+
+  socket_class= find_socket_class(m_pos.m_index);
+  if (socket_class)
+  {
+    make_row(socket_class);
+    return 0;
+  }
+
+  return HA_ERR_RECORD_DELETED;
+}
+
+void table_socket_summary_by_event_name::make_row(PFS_socket_class *socket_class)
+{
+  m_row.m_event_name.make_row(socket_class);
+
+  PFS_instance_socket_io_stat_visitor visitor;
+  PFS_instance_iterator::visit_socket_instances(socket_class, &visitor);
+
+  time_normalizer *normalizer= time_normalizer::get(wait_timer);
+  
+  /* Collect timer and byte count stats */
+  m_row.m_io_stat.set(normalizer, &visitor.m_socket_io_stat);
+  m_row_exists= true;
+}
+
+int table_socket_summary_by_event_name::read_row_values(TABLE *table,
+                                          unsigned char *,
+                                          Field **fields,
+                                          bool read_all)
+{
+  Field *f;
+
+  if (unlikely(!m_row_exists))
+    return HA_ERR_RECORD_DELETED;
+
+  /* Set the null bits */
+  DBUG_ASSERT(table->s->null_bytes == 0);
+
+  for (; (f= *fields) ; fields++)
+  {
+    if (read_all || bitmap_is_set(table->read_set, f->field_index))
+    {
+      switch(f->field_index)
+      {
+      case  0: /* EVENT_NAME */
+        m_row.m_event_name.set_field(f);
+        break;
+      case  1: /* COUNT_STAR */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_count);
+        break;
+      case  2: /* SUM_TIMER_WAIT */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_sum);
+        break;
+      case  3: /* MIN_TIMER_WAIT */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_min);
+        break;
+      case  4: /* AVG_TIMER_WAIT */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_avg);
+        break;
+      case  5: /* MAX_TIMER_WAIT */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_max);
+        break;
+
+      case  6: /* COUNT_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_count);
+        break;
+      case  7: /* SUM_TIMER_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_sum);
+        break;
+      case  8: /* MIN_TIMER_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_min);
+        break;
+      case  9: /* AVG_TIMER_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_avg);
+        break;
+      case 10: /* MAX_TIMER_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_max);
+        break;
+      case 11: /* SUM_NUMBER_OF_BYTES_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_sum);
+        break;
+      case 12: /* MIN_NUMBER_OF_BYTES_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_min);
+        break;
+      case 13: /* AVG_NUMBER_OF_BYTES_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_avg);
+        break;
+      case 14: /* MAX_NUMBER_OF_BYTES_READ */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_max);
+        break;
+
+      case 15: /* COUNT_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_count);
+        break;
+      case 16: /* SUM_TIMER_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_sum);
+        break;
+      case 17: /* MIN_TIMER_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_min);
+        break;
+      case 18: /* AVG_TIMER_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_avg);
+        break;
+      case 19: /* MAX_TIMER_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_max);
+        break;
+      case 20: /* SUM_NUMBER_OF_BYTES_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_sum);
+        break;
+      case 21: /* MIN_NUMBER_OF_BYTES_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_min);
+        break;
+      case 22: /* AVG_NUMBER_OF_BYTES_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_avg);
+        break;
+      case 23: /* MAX_NUMBER_OF_BYTES_WRITE */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_max);
+        break;
+
+      case 24: /* COUNT_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_count);
+        break;
+      case 25: /* SUM_TIMER_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_sum);
+        break;
+      case 26: /* MIN_TIMER_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_min);
+        break;
+      case 27: /* AVG_TIMER_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_avg);
+        break;
+      case 28: /* MAX_TIMER_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_max);
+        break;
+      case 29: /* SUM_NUMBER_OF_BYTES_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_sum);
+        break;
+      case 30: /* MIN_NUMBER_OF_BYTES_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_min);
+        break;
+      case 31: /* AVG_NUMBER_OF_BYTES_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_avg);
+        break;
+      case 32: /* MAX_NUMBER_OF_BYTES_RECV */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_max);
+        break;
+
+      case 33: /* COUNT_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_count);
+        break;
+      case 34: /* SUM_TIMER_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_sum);
+        break;
+      case 35: /* MIN_TIMER_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_min);
+        break;
+      case 36: /* AVG_TIMER_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_avg);
+        break;
+      case 37: /* MAX_TIMER_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_max);
+        break;
+      case 38: /* SUM_NUMBER_OF_BYTES_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_sum);
+        break;
+      case 39: /* MIN_NUMBER_OF_BYTES_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_min);
+        break;
+      case 40: /* AVG_NUMBER_OF_BYTES_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_avg);
+        break;
+      case 41: /* MAX_NUMBER_OF_BYTES_SEND */
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_max);
+        break;
+
+      case 42: /* COUNT_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_count);
+        break;
+      case 43: /* SUM_TIMER_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_sum);
+        break;
+      case 44: /* MIN_TIMER_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_min);
+        break;
+      case 45: /* AVG_TIMER_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_avg);
+        break;
+      case 46: /* MAX_TIMER_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_max);
+        break;
+      case 47: /* SUM_NUMBER_OF_BYTES_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_sum);
+        break;
+      case 48: /* MIN_NUMBER_OF_BYTES_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_min);
+        break;
+      case 49: /* AVG_NUMBER_OF_BYTES_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_avg);
+        break;
+      case 50: /* MAX_NUMBER_OF_BYTES_RECVFROM */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_max);
+        break;
+
+      case 51: /* COUNT_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_count);
+        break;
+      case 52: /* SUM_TIMER_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_sum);
+        break;
+      case 53: /* MIN_TIMER_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_min);
+        break;
+      case 54: /* AVG_TIMER_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_avg);
+        break;
+      case 55: /* MAX_TIMER_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_max);
+        break;
+      case 56: /* SUM_NUMBER_OF_BYTES_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_sum);
+        break;
+      case 57: /* MIN_NUMBER_OF_BYTES_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_min);
+        break;
+      case 58: /* AVG_NUMBER_OF_BYTES_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_avg);
+        break;
+      case 59: /* MAX_NUMBER_OF_BYTES_SENDTO */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_max);
+        break;
+
+      case 60: /* COUNT_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_count);
+        break;
+      case 61: /* SUM_TIMER_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_sum);
+        break;
+      case 62: /* MIN_TIMER_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_min);
+        break;
+      case 63: /* AVG_TIMER_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_avg);
+        break;
+      case 64: /* MAX_TIMER_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_max);
+        break;
+      case 65: /* SUM_NUMBER_OF_BYTES_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_sum);
+        break;
+      case 66: /* MIN_NUMBER_OF_BYTES_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_min);
+        break;
+      case 67: /* AVG_NUMBER_OF_BYTES_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_avg);
+        break;
+      case 68: /* MAX_NUMBER_OF_BYTES_RECVMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_max);
+        break;
+
+      case 69: /* COUNT_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_count);
+        break;
+      case 70: /* SUM_TIMER_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_sum);
+        break;
+      case 71: /* MIN_TIMER_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_min);
+        break;
+      case 72: /* AVG_TIMER_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_avg);
+        break;
+      case 73: /* MAX_TIMER_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_max);
+        break;
+      case 74: /* SUM_NUMBER_OF_BYTES_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_sum);
+        break;
+      case 75: /* MIN_NUMBER_OF_BYTES_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_min);
+        break;
+      case 76: /* AVG_NUMBER_OF_BYTES_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_avg);
+        break;
+      case 77: /* MAX_NUMBER_OF_BYTES_SENDMSG */
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_max);
+        break;
+
+      case 78: /* COUNT_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_count);
+        break;
+      case 79: /* SUM_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_sum);
+        break;
+      case 80: /* MIN_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_min);
+        break;
+      case 81: /* AVG_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_avg);
+        break;
+      case 82: /* MAX_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_max);
+        break;
+
+      default:
+        DBUG_ASSERT(false);
+        break;
+      }
+    } // if
+  } // for
+
+  return 0;
+}
+

=== added file 'storage/perfschema/table_socket_summary_by_event_name.h'
--- a/storage/perfschema/table_socket_summary_by_event_name.h	1970-01-01 00:00:00 +0000
+++ b/storage/perfschema/table_socket_summary_by_event_name.h	2011-02-18 22:33:11 +0000
@@ -0,0 +1,91 @@
+/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; version 2 of the License.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software Foundation,
+  51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
+
+#ifndef TABLE_SOCKET_SUMMARY_BY_EVENT_NAME_H
+#define TABLE_SOCKET_SUMMARY_BY_EVENT_NAME_H
+
+/**
+  @file storage/perfschema/table_socket_summary_by_event_name.h
+  Table SOCKET_SUMMARY_BY_EVENT_NAME (declarations).
+*/
+
+#include "pfs_column_types.h"
+#include "pfs_engine_table.h"
+#include "pfs_instr_class.h"
+#include "pfs_instr.h"
+#include "table_helper.h"
+
+/**
+  @addtogroup Performance_schema_tables
+  @{
+*/
+
+/**
+  A row of table
+  PERFORMANCE_SCHEMA.SOCKET_SUMMARY_BY_EVENT_NAME.
+*/
+struct row_socket_summary_by_event_name
+{
+  /** Column EVENT_NAME. */
+  PFS_event_name_row m_event_name;
+
+  /** Columns COUNT_STAR, SUM/MIN/AVG/MAX TIMER and NUMBER_OF_BYTES for each operation. */
+  PFS_socket_io_stat_row m_io_stat;
+};
+
+/** Table PERFORMANCE_SCHEMA.SOCKET_SUMMARY_BY_EVENT_NAME. */
+class table_socket_summary_by_event_name : public PFS_engine_table
+{
+public:
+  /** Table share */
+  static PFS_engine_table_share m_share;
+  static PFS_engine_table* create();
+
+  virtual int rnd_next();
+  virtual int rnd_pos(const void *pos);
+  virtual void reset_position(void);
+
+private:
+  virtual int read_row_values(TABLE *table,
+                              unsigned char *buf,
+                              Field **fields,
+                              bool read_all);
+
+  table_socket_summary_by_event_name();
+
+public:
+  ~table_socket_summary_by_event_name()
+  {}
+
+private:
+  void make_row(PFS_socket_class *socket_class);
+
+  /** Table share lock. */
+  static THR_LOCK m_table_lock;
+  /** Fields definition. */
+  static TABLE_FIELD_DEF m_field_def;
+
+  /** Current row. */
+  row_socket_summary_by_event_name m_row;
+  /** True if the current row exists. */
+  bool m_row_exists;
+  /** Current position. */
+  PFS_simple_index m_pos;
+  /** Next position. */
+  PFS_simple_index m_next_pos;
+};
+
+/** @} */
+#endif

=== modified file 'storage/perfschema/table_socket_summary_by_instance.cc'
--- a/storage/perfschema/table_socket_summary_by_instance.cc	2011-02-08 23:01:39 +0000
+++ b/storage/perfschema/table_socket_summary_by_instance.cc	2011-02-18 22:33:11 +0000
@@ -447,33 +447,6 @@ static const TABLE_FIELD_TYPE field_type
     { NULL, 0}
   },
 
-  /** Connect */
-  {
-    { C_STRING_WITH_LEN("COUNT_CONNECT") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-  {
-    { C_STRING_WITH_LEN("SUM_TIMER_CONNECT") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-  {
-    { C_STRING_WITH_LEN("MIN_TIMER_CONNECT") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-  {
-    { C_STRING_WITH_LEN("AVG_TIMER_CONNECT") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-  {
-    { C_STRING_WITH_LEN("MAX_TIMER_CONNECT") },
-    { C_STRING_WITH_LEN("bigint(20)") },
-    { NULL, 0}
-  },
-
   /** Misc */
   {
     { C_STRING_WITH_LEN("COUNT_MISC") },
@@ -504,7 +477,7 @@ static const TABLE_FIELD_TYPE field_type
 
 TABLE_FIELD_DEF
 table_socket_summary_by_instance::m_field_def=
-{ 90, field_types };
+{ 85, field_types };
 
 PFS_engine_table_share
 table_socket_summary_by_instance::m_share=
@@ -630,277 +603,262 @@ int table_socket_summary_by_instance::re
       case  2: /* OBJECT_NAME */
         // TBD: Fix
         break;
-      case  3: /* COUNT_STAR */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_count);
+
+      case  3:/* COUNT_STAR */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_count);
         break;
-      case  4: /* SUM_TIMER_WAIT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_sum);
+      case  4:/* SUM_TIMER_WAIT */
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_sum);
         break;
       case  5: /* MIN_TIMER_WAIT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_min);
         break;
       case  6: /* AVG_TIMER_WAIT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_avg);
         break;
       case  7: /* MAX_TIMER_WAIT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all.m_waits.m_max);
         break;
 
       case  8: /* COUNT_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_count);
         break;
       case  9: /* SUM_TIMER_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_sum);
         break;
       case 10: /* MIN_TIMER_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_min);
         break;
       case 11: /* AVG_TIMER_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_avg);
         break;
       case 12: /* MAX_TIMER_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_waits.m_max);
         break;
       case 13: /* SUM_NUMBER_OF_BYTES_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_sum);
         break;
       case 14: /* MIN_NUMBER_OF_BYTES_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_min);
         break;
       case 15: /* AVG_NUMBER_OF_BYTES_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_avg);
         break;
       case 16: /* MAX_NUMBER_OF_BYTES_READ */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_read.m_bytes.m_max);
         break;
 
       case 17: /* COUNT_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_count);
         break;
       case 18: /* SUM_TIMER_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_sum);
         break;
       case 19: /* MIN_TIMER_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_min);
         break;
       case 20: /* AVG_TIMER_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_avg);
         break;
       case 21: /* MAX_TIMER_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_waits.m_max);
         break;
       case 22: /* SUM_NUMBER_OF_BYTES_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_sum);
         break;
       case 23: /* MIN_NUMBER_OF_BYTES_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_min);
         break;
       case 24: /* AVG_NUMBER_OF_BYTES_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_avg);
         break;
       case 25: /* MAX_NUMBER_OF_BYTES_WRITE */
-        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_all_write.m_bytes.m_max);
         break;
 
       case 26: /* COUNT_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_count);
         break;
       case 27: /* SUM_TIMER_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_sum);
         break;
       case 28: /* MIN_TIMER_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_min);
         break;
       case 29: /* AVG_TIMER_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_avg);
         break;
       case 30: /* MAX_TIMER_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_waits.m_max);
         break;
       case 31: /* SUM_NUMBER_OF_BYTES_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_sum);
         break;
       case 32: /* MIN_NUMBER_OF_BYTES_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_min);
         break;
       case 33: /* AVG_NUMBER_OF_BYTES_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_avg);
         break;
       case 34: /* MAX_NUMBER_OF_BYTES_RECV */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recv.m_bytes.m_max);
         break;
 
       case 35: /* COUNT_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_count);
         break;
       case 36: /* SUM_TIMER_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_sum);
         break;
       case 37: /* MIN_TIMER_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_min);
         break;
       case 38: /* AVG_TIMER_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_avg);
         break;
       case 39: /* MAX_TIMER_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_waits.m_max);
         break;
       case 40: /* SUM_NUMBER_OF_BYTES_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_sum);
         break;
       case 41: /* MIN_NUMBER_OF_BYTES_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_min);
         break;
       case 42: /* AVG_NUMBER_OF_BYTES_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_avg);
         break;
       case 43: /* MAX_NUMBER_OF_BYTES_SEND */
-        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_send.m_bytes.m_max);
         break;
 
       case 44: /* COUNT_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_count);
         break;
       case 45: /* SUM_TIMER_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_sum);
         break;
       case 46: /* MIN_TIMER_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_min);
         break;
       case 47: /* AVG_TIMER_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_avg);
         break;
       case 48: /* MAX_TIMER_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_waits.m_max);
         break;
       case 49: /* SUM_NUMBER_OF_BYTES_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_sum);
         break;
       case 50: /* MIN_NUMBER_OF_BYTES_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_min);
         break;
       case 51: /* AVG_NUMBER_OF_BYTES_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_avg);
         break;
       case 52: /* MAX_NUMBER_OF_BYTES_RECVFROM */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvfrom.m_bytes.m_max);
         break;
 
       case 53: /* COUNT_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_count);
         break;
       case 54: /* SUM_TIMER_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_sum);
         break;
       case 55: /* MIN_TIMER_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_min);
         break;
       case 56: /* AVG_TIMER_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_avg);
         break;
       case 57: /* MAX_TIMER_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_waits.m_max);
         break;
       case 58: /* SUM_NUMBER_OF_BYTES_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_sum);
         break;
       case 59: /* MIN_NUMBER_OF_BYTES_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_min);
         break;
       case 60: /* AVG_NUMBER_OF_BYTES_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_avg);
         break;
       case 61: /* MAX_NUMBER_OF_BYTES_SENDTO */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendto.m_bytes.m_max);
         break;
 
       case 62: /* COUNT_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_count);
         break;
       case 63: /* SUM_TIMER_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_sum);
         break;
       case 64: /* MIN_TIMER_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_min);
         break;
       case 65: /* AVG_TIMER_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_avg);
         break;
       case 66: /* MAX_TIMER_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_waits.m_max);
         break;
       case 67: /* SUM_NUMBER_OF_BYTES_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_sum);
         break;
       case 68: /* MIN_NUMBER_OF_BYTES_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_min);
         break;
       case 69: /* AVG_NUMBER_OF_BYTES_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_avg);
         break;
       case 70: /* MAX_NUMBER_OF_BYTES_RECVMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_recvmsg.m_bytes.m_max);
         break;
 
       case 71: /* COUNT_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_count);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_count);
         break;
       case 72: /* SUM_TIMER_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_sum);
         break;
       case 73: /* MIN_TIMER_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_min);
         break;
       case 74: /* AVG_TIMER_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_avg);
         break;
       case 75: /* MAX_TIMER_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_waits.m_max);
         break;
       case 76: /* SUM_NUMBER_OF_BYTES_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_sum);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_sum);
         break;
       case 77: /* MIN_NUMBER_OF_BYTES_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_min);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_min);
         break;
       case 78: /* AVG_NUMBER_OF_BYTES_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_avg);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_avg);
         break;
       case 79: /* MAX_NUMBER_OF_BYTES_SENDMSG */
-        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_max);
+        set_field_ulonglong(f, m_row.m_io_stat.m_sendmsg.m_bytes.m_max);
         break;
 
-      case 80: /* COUNT_CONNECT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_connect.m_count);
-        break;
-      case 81: /* SUM_TIMER_CONNECT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_connect.m_sum);
+      case 80: /* COUNT_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_count);
         break;
-      case 82: /* MIN_TIMER_CONNECT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_connect.m_min);
+      case 81: /* SUM_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_sum);
         break;
-      case 83: /* AVG_TIMER_CONNECT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_connect.m_avg);
+      case 82: /* MIN_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_min);
         break;
-      case 84: /* MAX_TIMER_CONNECT */
-        set_field_ulonglong(f, m_row.m_io_stat.m_connect.m_max);
-        break;
-
-      case 85: /* COUNT_MISC */
-        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_count);
+      case 83: /* AVG_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_avg);
         break;
-      case 86: /* SUM_TIMER_MISC */
-        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_sum);
+      case 84: /* MAX_TIMER_MISC */
+        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_waits.m_max);
         break;
-      case 87: /* MIN_TIMER_MISC */
-        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_min);
-        break;
-      case 88: /* AVG_TIMER_MISC */
-        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_avg);
-        break;
-      case 89: /* MAX_TIMER_MISC */
-        set_field_ulonglong(f, m_row.m_io_stat.m_misc.m_max);
-        break;
       default:
         DBUG_ASSERT(false);
         break;


Attachment: [text/bzr-bundle] bzr/cpowers@tma-1-20110218223311-anucsv1id1kees10.bundle
Thread
bzr push into mysql-trunk-wl5379 branch (chris.powers:3231 to 3232) WL#4896Christopher Powers18 Feb