List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 28 2011 6:56pm
Subject:bzr push into mysql-trunk branch (marc.alff:3568 to 3570)
View as plain text  
 3570 Marc Alff	2011-01-28
      Adding instrumentation

    modified:
      mysql-test/suite/perfschema/t/debug_env.test
 3569 Marc Alff	2011-01-28
      Bug#59799 handler statistics for the performance schema engine
      
      Before this fix, the performance schema storage engine did not
      update the handler_* statistics, so that:
        show status like "%handler%";
      returned under evaluated values.
      
      With this fix, calls to rnd_next(), rnd_pos(), etc
      methods in the performance schema engine now also properly
      update the corresponding handler_* statistics.
      
      Tested manually.
      No automated scripts provided, as the value reported for
      a session in these counters is hard to predict exactly,
      as it depends too much on the environment.

    modified:
      storage/perfschema/ha_perfschema.cc
 3568 Marc Alff	2011-01-28 [merge]
      Local merge

    modified:
      mysql-test/include/icp_tests.inc
      mysql-test/r/innodb_icp.result
      mysql-test/r/innodb_icp_none.result
      mysql-test/r/myisam_icp.result
      mysql-test/r/myisam_icp_none.result
      mysql-test/suite/parts/inc/partition_layout_check1.inc
      mysql-test/suite/parts/inc/partition_layout_check2.inc
      mysql-test/suite/parts/r/partition_recover_myisam.result
      mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test
      mysql-test/suite/parts/t/partition_alter1_1_myisam.test
      mysql-test/suite/parts/t/partition_alter1_2_myisam.test
      mysql-test/suite/parts/t/partition_basic_myisam.test
      mysql-test/suite/parts/t/partition_engine_myisam.test
      mysql-test/suite/parts/t/partition_recover_myisam.test
      mysql-test/suite/parts/t/partition_syntax_myisam.test
      sql/item.h
      sql/item_func.h
      sql/item_timefunc.h
      sql/sql_partition.cc
      sql/sql_select.cc
      sql/table.cc
=== modified file 'mysql-test/suite/perfschema/t/debug_env.test'
--- a/mysql-test/suite/perfschema/t/debug_env.test	2011-01-26 14:41:43 +0000
+++ b/mysql-test/suite/perfschema/t/debug_env.test	2011-01-28 18:55:45 +0000
@@ -36,7 +36,10 @@ select * from setup_timers;
 
 # Investigating bug#59740
 select * from threads;
+select count(*) from threads;
 select count(*) from setup_instruments;
-select count(*) from events_waits_summary_by_thread_by_event_name;
 
+show status like "%handler%";
+select count(*) from events_waits_summary_by_thread_by_event_name;
+show status like "%handler%";
 

=== modified file 'storage/perfschema/ha_perfschema.cc'
--- a/storage/perfschema/ha_perfschema.cc	2010-12-01 18:46:51 +0000
+++ b/storage/perfschema/ha_perfschema.cc	2011-01-28 18:40:59 +0000
@@ -242,6 +242,7 @@ int ha_perfschema::update_row(const ucha
   DBUG_ENTER("ha_perfschema::update_row");
 
   DBUG_ASSERT(m_table);
+  ha_statistic_increment(&SSV::ha_update_count);
   int result= m_table->update_row(table, old_data, new_data, table->field);
   DBUG_RETURN(result);
 }
@@ -251,6 +252,7 @@ int ha_perfschema::delete_row(const ucha
   DBUG_ENTER("ha_perfschema::delete_row");
 
   DBUG_ASSERT(m_table);
+  ha_statistic_increment(&SSV::ha_delete_count);
   int result= m_table->delete_row(table, buf, table->field);
   DBUG_RETURN(result);
 }
@@ -287,6 +289,8 @@ int ha_perfschema::rnd_next(uchar *buf)
   DBUG_ENTER("ha_perfschema::rnd_next");
 
   DBUG_ASSERT(m_table);
+  ha_statistic_increment(&SSV::ha_read_rnd_next_count);
+
   int result= m_table->rnd_next();
   if (result == 0)
   {
@@ -311,6 +315,7 @@ int ha_perfschema::rnd_pos(uchar *buf, u
   DBUG_ENTER("ha_perfschema::rnd_pos");
 
   DBUG_ASSERT(m_table);
+  ha_statistic_increment(&SSV::ha_read_rnd_count);
   int result= m_table->rnd_pos(pos);
   if (result == 0)
     result= m_table->read_row(table, buf, table->field);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:3568 to 3570) Marc Alff28 Jan