List:Commits« Previous MessageNext Message »
From:Marc Alff Date:October 11 2010 5:19pm
Subject:bzr commit into mysql-next-mr-wl4816 branch (marc.alff:3203)
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-next-mr-wl4816/ based on revid:marc.alff@stripped

 3203 Marc Alff	2010-10-11
      Reordered the code to discard incomplete records first,
      instead of using un initialized memory and then discard records.

    modified:
      storage/perfschema/table_events_waits.cc
=== modified file 'storage/perfschema/table_events_waits.cc'
--- a/storage/perfschema/table_events_waits.cc	2010-10-04 18:27:08 +0000
+++ b/storage/perfschema/table_events_waits.cc	2010-10-11 17:19:54 +0000
@@ -225,18 +225,6 @@ void table_events_waits_common::make_row
     and sanitizes all the data before returning a row.
   */
 
-  m_row.m_thread_internal_id= safe_thread->m_thread_internal_id;
-  m_row.m_event_id= wait->m_event_id;
-#ifdef HAVE_NESTED_EVENTS
-  m_row.m_nesting_event_id= wait->m_nesting_event_id;
-#endif
-
-  time_normalizer *normalizer= time_normalizer::get(wait_timer);
-  normalizer->to_pico(wait->m_timer_start, wait->m_timer_end,
-                      & m_row.m_timer_start, & m_row.m_timer_end, & m_row.m_timer_wait);
-
-  m_row.m_object_instance_addr= (intptr) wait->m_object_instance_addr;
-
   /*
     PFS_events_waits::m_class needs to be sanitized,
     for race conditions when this code:
@@ -295,8 +283,22 @@ void table_events_waits_common::make_row
   default:
     return;
   }
+
   if (unlikely(safe_class == NULL))
     return;
+
+  m_row.m_thread_internal_id= safe_thread->m_thread_internal_id;
+  m_row.m_event_id= wait->m_event_id;
+#ifdef HAVE_NESTED_EVENTS
+  m_row.m_nesting_event_id= wait->m_nesting_event_id;
+#endif
+
+  time_normalizer *normalizer= time_normalizer::get(wait_timer);
+  normalizer->to_pico(wait->m_timer_start, wait->m_timer_end,
+                      & m_row.m_timer_start, & m_row.m_timer_end, & m_row.m_timer_wait);
+
+  m_row.m_object_instance_addr= (intptr) wait->m_object_instance_addr;
+
   m_row.m_name= safe_class->m_name;
   m_row.m_name_length= safe_class->m_name_length;
 


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20101011171954-ux3j0smzpwi1dltr.bundle
Thread
bzr commit into mysql-next-mr-wl4816 branch (marc.alff:3203) Marc Alff11 Oct