From: Marc Alff Date: March 16 2012 12:20pm Subject: bzr push into mysql-trunk-pfs-tuning branch (marc.alff:3475 to 3476) List-Archive: http://lists.mysql.com/commits/143231 Message-Id: <201203161220.q2GCKi0E017360@acsmt357.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3476 Marc Alff 2012-03-16 Fixed valgrind warnings modified: storage/perfschema/pfs_instr_class.cc storage/perfschema/pfs_instr_class.h storage/perfschema/pfs_stat.h 3475 Marc Alff 2012-03-16 Code cleanup modified: storage/perfschema/pfs_instr.cc storage/perfschema/pfs_instr_class.h storage/perfschema/pfs_visitor.cc storage/perfschema/table_events_waits.cc storage/perfschema/table_os_global_by_type.cc storage/perfschema/table_tiws_by_index_usage.cc === modified file 'storage/perfschema/pfs_instr_class.cc' --- a/storage/perfschema/pfs_instr_class.cc 2012-03-09 17:07:43 +0000 +++ b/storage/perfschema/pfs_instr_class.cc 2012-03-16 12:19:57 +0000 @@ -1353,9 +1353,10 @@ search: void PFS_table_share::aggregate_io(void) { + iunt safe_key_count= sanitize_index_count(m_key_count); uint index= global_table_io_class.m_event_name_index; PFS_single_stat *table_io_total= & global_instr_class_waits_array[index]; - m_table_stat.sum_io(table_io_total, m_key_count); + m_table_stat.sum_io(table_io_total, safe_key_count); m_table_stat.fast_reset_io(); } === modified file 'storage/perfschema/pfs_instr_class.h' --- a/storage/perfschema/pfs_instr_class.h 2012-03-16 10:54:30 +0000 +++ b/storage/perfschema/pfs_instr_class.h 2012-03-16 12:19:57 +0000 @@ -325,7 +325,7 @@ private: inline uint sanitize_index_count(uint count) { - if (likely(count < MAX_INDEXES)) + if (likely(count <= MAX_INDEXES)) return count; return 0; } === modified file 'storage/perfschema/pfs_stat.h' --- a/storage/perfschema/pfs_stat.h 2012-03-09 17:07:43 +0000 +++ b/storage/perfschema/pfs_stat.h 2012-03-16 12:19:57 +0000 @@ -339,16 +339,18 @@ struct PFS_table_io_stat /** DELETE statistics */ PFS_single_stat m_delete; + PFS_table_io_stat() + { + m_has_data= false; + } + inline void reset(void) { - if (m_has_data) - { - m_has_data= false; - m_fetch.reset(); - m_insert.reset(); - m_update.reset(); - m_delete.reset(); - } + m_has_data= false; + m_fetch.reset(); + m_insert.reset(); + m_update.reset(); + m_delete.reset(); } inline void aggregate(const PFS_table_io_stat *stat) No bundle (reason: useless for push emails).