List:Commits« Previous MessageNext Message »
From:Marc Alff Date:October 25 2010 2:44pm
Subject:bzr push into mysql-next-mr-wl4816 branch (marc.alff:3205 to 3206)
View as plain text  
 3206 Marc Alff	2010-10-25
      Fixed a valgrind warning when SETUP_INSTRUMENT.TIMED=NO.
      
      The value of state->m_timer_start was un initialized in this case,
      and should not be used to set wait->m_timer_start.

    modified:
      storage/perfschema/pfs.cc
 3205 Marc Alff	2010-10-25 [merge]
      Merge mysql-next-mr --> mysql-next-mr-wl4816

    added:
      mysql-test/suite/sys_vars/r/master_info_repository_basic.result
      mysql-test/suite/sys_vars/r/relay_log_info_repository_basic.result
      mysql-test/suite/sys_vars/t/master_info_repository_basic.test
      mysql-test/suite/sys_vars/t/relay_log_info_repository_basic.test
      sql/rpl_info.cc
      sql/rpl_info.h
      sql/rpl_info_factory.cc
      sql/rpl_info_factory.h
      sql/rpl_info_file.cc
      sql/rpl_info_file.h
      sql/rpl_info_handler.cc
      sql/rpl_info_handler.h
      sql/server_ids.h
    modified:
      client/mysql.cc
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      include/mysql.h
      include/mysql.h.pp
      mysql-test/collections/default.experimental
      mysql-test/include/show_binlog_using_logname.inc
      mysql-test/r/mysql.result
      mysql-test/r/mysqladmin.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqldump.result
      mysql-test/r/mysqlshow.result
      mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_statistics_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_table_constraints_mysql_embedded.result
      mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result
      mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result
      mysql-test/suite/rpl/r/rpl_flushlog_loop.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test
      mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
      mysql-test/t/mysql.test
      mysql-test/t/mysqladmin.test
      mysql-test/t/mysqlbinlog.test
      mysql-test/t/mysqlcheck.test
      mysql-test/t/mysqldump.test
      mysql-test/t/mysqlshow.test
      mysys/mf_iocache2.c
      sql-common/client.c
      sql/CMakeLists.txt
      sql/Makefile.am
      sql/binlog.cc
      sql/binlog.h
      sql/ha_ndbcluster.cc
      sql/item_func.cc
      sql/lock.cc
      sql/log.cc
      sql/log_event.cc
      sql/log_event_old.cc
      sql/mysqld.cc
      sql/rpl_handler.cc
      sql/rpl_mi.cc
      sql/rpl_mi.h
      sql/rpl_reporting.h
      sql/rpl_rli.cc
      sql/rpl_rli.h
      sql/rpl_slave.cc
      sql/rpl_slave.h
      sql/sql_binlog.cc
      sql/sql_insert.cc
      sql/sql_load.cc
      sql/sys_vars.cc
=== modified file 'storage/perfschema/pfs.cc'
--- a/storage/perfschema/pfs.cc	2010-10-25 13:02:25 +0000
+++ b/storage/perfschema/pfs.cc	2010-10-25 14:43:00 +0000
@@ -2463,16 +2463,20 @@ static void start_mutex_wait_v1(PSI_mute
   DBUG_ASSERT(state != NULL);
 
   register uint flags= state->m_flags;
+  ulonglong timer_start= 0;
 
   if (flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
   }
@@ -2553,18 +2557,22 @@ static void end_mutex_wait_v1(PSI_mutex_
 static void start_rwlock_rdwait_v1(PSI_rwlock_locker* locker,
                                    const char *src_file, uint src_line)
 {
+  ulonglong timer_start= 0;
   PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker);
   DBUG_ASSERT(state != NULL);
 
   if (state->m_flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (state->m_flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
   }
@@ -2653,18 +2661,22 @@ static void end_rwlock_rdwait_v1(PSI_rwl
 static void start_rwlock_wrwait_v1(PSI_rwlock_locker* locker,
                                    const char *src_file, uint src_line)
 {
+  ulonglong timer_start= 0;
   PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker);
   DBUG_ASSERT(state != NULL);
 
   if (state->m_flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (state->m_flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
   }
@@ -2746,18 +2758,22 @@ static void end_rwlock_wrwait_v1(PSI_rwl
 static void start_cond_wait_v1(PSI_cond_locker* locker,
                                const char *src_file, uint src_line)
 {
+  ulonglong timer_start= 0;
   PSI_cond_locker_state *state= reinterpret_cast<PSI_cond_locker_state*> (locker);
   DBUG_ASSERT(state != NULL);
 
   if (state->m_flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (state->m_flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
   }
@@ -2832,20 +2848,24 @@ static void end_cond_wait_v1(PSI_cond_lo
 static void start_table_wait_v1(PSI_table_locker* locker, uint index,
                                 const char *src_file, uint src_line)
 {
+  ulonglong timer_start= 0;
   PSI_table_locker_state *state= reinterpret_cast<PSI_table_locker_state*> (locker);
   DBUG_ASSERT(state != NULL);
 
   register uint flags= state->m_flags;
 
   if (flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
   }
@@ -3020,20 +3040,24 @@ static void start_file_wait_v1(PSI_file_
                                const char *src_file,
                                uint src_line)
 {
+  ulonglong timer_start= 0;
   PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
   DBUG_ASSERT(state != NULL);
 
   register uint flags= state->m_flags;
 
   if (flags & STATE_FLAG_TIMED)
-    state->m_timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+  {
+    timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer);
+    state->m_timer_start= timer_start;
+  }
 
   if (flags & STATE_FLAG_WAIT)
   {
     PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait);
     DBUG_ASSERT(wait != NULL);
 
-    wait->m_timer_start= state->m_timer_start;
+    wait->m_timer_start= timer_start;
     wait->m_source_file= src_file;
     wait->m_source_line= src_line;
     wait->m_number_of_bytes= count;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-next-mr-wl4816 branch (marc.alff:3205 to 3206) Marc Alff25 Oct