List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 28 2011 6:41pm
Subject:bzr commit into mysql-trunk branch (marc.alff:3569) Bug#59799
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-trunk-bug59799/ based on revid:marc.alff@stripped

 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
=== 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);


Attachment: [text/bzr-bundle] bzr/marc.alff@oracle.com-20110128184059-k2jlz36la1hkis5a.bundle
Thread
bzr commit into mysql-trunk branch (marc.alff:3569) Bug#59799Marc Alff28 Jan