List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:March 18 2011 7:06pm
Subject:bzr push into mysql-trunk branch (chris.powers:3259 to 3260) WL#4896
View as plain text  
 3260 cpowers	2011-03-18
      WL#4896 "Performance Schema Net IO"
      
      - Fix valgrind warnings associated with SOCKET_INSTANCES.THREAD_ID

    modified:
      storage/perfschema/table_socket_instances.cc
      storage/perfschema/table_socket_instances.h
 3259 Marc Alff	2011-03-16
      WL#4896 PERFORMANCE SCHEMA NET IO
      
      Added instrumentation for IDLE events.

    added:
      include/mysql/psi/mysql_idle.h
    modified:
      include/mysql/psi/mysql_socket.h
      include/mysql/psi/psi.h
      include/mysql/psi/psi_abi_v1.h.pp
      include/mysql/psi/psi_abi_v2.h.pp
      mysql-test/suite/perfschema/include/start_server_common.inc
      mysql-test/suite/perfschema/r/dml_setup_timers.result
      mysql-test/suite/perfschema/r/information_schema.result
      mysql-test/suite/perfschema/r/ortho_iter.result
      mysql-test/suite/perfschema/r/query_cache.result
      mysql-test/suite/perfschema/r/start_server_no_cond_class.result
      mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
      mysql-test/suite/perfschema/r/start_server_no_file_class.result
      mysql-test/suite/perfschema/r/start_server_no_file_inst.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
      mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
      mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
      mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
      mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
      mysql-test/suite/perfschema/r/start_server_no_socket_class.result
      mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
      mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
      mysql-test/suite/perfschema/r/start_server_no_table_inst.result
      mysql-test/suite/perfschema/r/start_server_no_thread_class.result
      mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
      mysql-test/suite/perfschema/r/start_server_nothing.result
      mysql-test/suite/perfschema/r/start_server_off.result
      mysql-test/suite/perfschema/r/start_server_on.result
      mysql-test/suite/perfschema/t/dml_setup_timers.test
      mysql-test/suite/perfschema/t/ortho_iter.test
      sql/sql_parse.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_column_types.h
      storage/perfschema/pfs_events_waits.h
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      storage/perfschema/pfs_instr_class.cc
      storage/perfschema/pfs_instr_class.h
      storage/perfschema/pfs_timer.cc
      storage/perfschema/pfs_timer.h
      storage/perfschema/pfs_visitor.cc
      storage/perfschema/table_events_waits.cc
      storage/perfschema/table_ews_by_thread_by_event_name.cc
      storage/perfschema/table_ews_global_by_event_name.cc
      storage/perfschema/table_ews_global_by_event_name.h
      storage/perfschema/table_helper.h
      storage/perfschema/table_setup_instruments.cc
      storage/perfschema/table_setup_instruments.h
      storage/perfschema/table_setup_timers.cc
=== modified file 'storage/perfschema/table_socket_instances.cc'
--- a/storage/perfschema/table_socket_instances.cc	2011-03-14 16:11:25 +0000
+++ b/storage/perfschema/table_socket_instances.cc	2011-03-18 19:05:00 +0000
@@ -159,7 +159,10 @@ void table_socket_instances::make_row(PF
   PFS_thread *safe_thread= sanitize_thread(pfs->m_thread_owner);
 
   if (safe_thread != NULL)
+  {
     m_row.m_thread_id= safe_thread->m_thread_id;
+    m_row.m_thread_id_set= true;
+  }
 
   if (pfs->m_lock.end_optimistic_lock(&lock))
     m_row_exists= true;
@@ -191,7 +194,7 @@ int table_socket_instances::read_row_val
         set_field_ulonglong(f, (intptr)m_row.m_identity);
         break;
       case 2: /* THREAD_ID */
-        if (m_row.m_thread_id != 0) // TBD: use flag to indicate valid thread id?
+        if (m_row.m_thread_id_set)
           set_field_ulong(f, m_row.m_thread_id);
         else
           f->set_null();

=== modified file 'storage/perfschema/table_socket_instances.h'
--- a/storage/perfschema/table_socket_instances.h	2011-03-09 21:28:05 +0000
+++ b/storage/perfschema/table_socket_instances.h	2011-03-18 19:05:00 +0000
@@ -40,6 +40,8 @@ struct row_socket_instances
   const void *m_identity;
   /** Column THREAD_ID */
   uint m_thread_id;
+  /** True if thread_is is set */
+  bool m_thread_id_set;
   /** Column SOCKET_ID */
   uint m_fd;
   /** Socket ip address, IPV4 or IPV6 */
@@ -48,6 +50,8 @@ struct row_socket_instances
   uint m_ip_length;
   /** Column PORT */
   uint m_port;
+
+  row_socket_instances() {m_thread_id= false;}
 };
 
 /** Table PERFORMANCE_SCHEMA.SOCKET_INSTANCES. */


Attachment: [text/bzr-bundle] bzr/cpowers@tma-1-20110318190500-w69xcqsu3cs4ff2w.bundle
Thread
bzr push into mysql-trunk branch (chris.powers:3259 to 3260) WL#4896Christopher Powers18 Mar