From: Marc Alff Date: January 28 2011 6:41pm Subject: bzr commit into mysql-trunk branch (marc.alff:3569) Bug#59799 List-Archive: http://lists.mysql.com/commits/129904 X-Bug: 59799 Message-Id: <201101281841.p0SHprVJ027844@acsinet15.oracle.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7202694434564291410==" --===============7202694434564291410== MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline #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); --===============7202694434564291410== MIME-Version: 1.0 Content-Type: text/bzr-bundle; charset="us-ascii"; name="bzr/marc.alff@stripped" Content-Transfer-Encoding: 7bit Content-Disposition: inline # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: marc.alff@stripped # target_branch: file:///Users/malff/BZR_TREE/mysql-trunk-bug59799/ # testament_sha1: 38a1e4a07692902dd6f4e14db0649310b5bd37dd # timestamp: 2011-01-28 19:41:05 +0100 # base_revision_id: marc.alff@stripped\ # fxqguwen7b57p8ps # # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWY+1y80AAdjfgAAQW3f//3ID DYC////wUASsndpTjG67qNuxrhJJMpPE0wTTCZFP1R5Mp6nlDQDRkZBJIJiTyCMhDITEAAAAASmi TImKemkxqngpmoMgD1D1D1GTQGSFPRGTQ0ZA0AyBoAAADmATACYAATAAEwAL+uouyeQZ34t6Gi20 ZsmNuu+bUx43OSIn7tQz4x7u1W/++FTGrDKuxJMdObFcp6pWyME6wTz4iI+tvlp2rOdS2pKMpR4n NdMuwNE/xOiyTPf5nn+b5Q1RN4I6oamFz4+RVCQkkmbudHpdNCZ4zmuvsuun0VdV3vciymvmGAUt JueRB+Tbq9OJI6uhjyEa3G/Ys1tn9gsaPKcdDbo0pCAyEiNTzrJIA0gVUQqmzkF8owkIdkuhwFts Bq00lMi7S9Lkzevh1yCSCvEt5Ygr2fB1ylUegm2isro+patC85qL560T2TdmHihwYmzV8hKWugKa 25CoEezR61wlcDKaYzdfJBAbXXPbJEQlUhYWHMlIjsLF9H4tl/hQtlZ7hzlsGzE5Z/qUSIwY3J7E xIZRmhbLHQCpte5QwDGeOgZ1tGoi206YQWlLw58BQpYlszaw8bkNntTYjt8N5q6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