List:Commits« Previous MessageNext Message »
From:Mayank Prasad Date:December 19 2011 7:09pm
Subject:bzr push into mysql-trunk-wl5767 branch (mayank.prasad:3403 to 3404) WL#5767
View as plain text  
 3404 Mayank Prasad	2011-12-20
      WL#5767 : Performance Schema, Statement Digest
      
      Details
       - Added server startup option 
         --performance_schema_consumer_statements_digest to enable/disable
         statements_digest consumer. Default value is set to FALSE.

    modified:
      sql/sys_vars.cc
      storage/perfschema/pfs_digest.cc
      storage/perfschema/pfs_server.cc
      storage/perfschema/pfs_server.h
      storage/perfschema/table_events_statements.cc
      storage/perfschema/table_setup_consumers.cc
 3403 Mayank Prasad	2011-12-19 [merge]
      WL#5767 : Statement Digest, Performance Schema
      
      Details:
       - Merge from mysql-trunk

    modified:
      storage/innobase/buf/buf0buddy.cc
      storage/innobase/buf/buf0buf.cc
      storage/innobase/buf/buf0flu.cc
      storage/innobase/buf/buf0lru.cc
      storage/innobase/dict/dict0dict.cc
      storage/innobase/dict/dict0mem.cc
      storage/innobase/dyn/dyn0dyn.cc
      storage/innobase/fil/fil0fil.cc
      storage/innobase/include/dict0mem.h
      storage/innobase/include/lock0lock.h
      storage/innobase/include/lock0priv.h
      storage/innobase/include/lock0types.h
      storage/innobase/include/mem0mem.ic
      storage/innobase/include/sync0sync.h
      storage/innobase/include/trx0roll.h
      storage/innobase/include/trx0trx.h
      storage/innobase/include/usr0sess.h
      storage/innobase/include/ut0lst.h
      storage/innobase/lock/lock0iter.cc
      storage/innobase/lock/lock0lock.cc
      storage/innobase/log/log0log.cc
      storage/innobase/log/log0recv.cc
      storage/innobase/mem/mem0mem.cc
      storage/innobase/mem/mem0pool.cc
      storage/innobase/os/os0sync.cc
      storage/innobase/pars/pars0opt.cc
      storage/innobase/pars/pars0pars.cc
      storage/innobase/pars/pars0sym.cc
      storage/innobase/que/que0que.cc
      storage/innobase/read/read0read.cc
      storage/innobase/row/row0ftsort.cc
      storage/innobase/row/row0ins.cc
      storage/innobase/row/row0merge.cc
      storage/innobase/row/row0mysql.cc
      storage/innobase/srv/srv0mon.cc
      storage/innobase/srv/srv0srv.cc
      storage/innobase/sync/sync0rw.cc
      storage/innobase/sync/sync0sync.cc
      storage/innobase/trx/trx0roll.cc
      storage/innobase/trx/trx0rseg.cc
      storage/innobase/trx/trx0sys.cc
      storage/innobase/trx/trx0trx.cc
      storage/innobase/trx/trx0undo.cc
      storage/innobase/usr/usr0sess.cc
      storage/innobase/ut/ut0mem.cc
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2011-12-05 13:12:47 +0000
+++ b/sql/sys_vars.cc	2011-12-19 19:08:09 +0000
@@ -244,6 +244,13 @@ static Sys_var_mybool Sys_pfs_consumer_t
        CMD_LINE(OPT_ARG), DEFAULT(TRUE),
        PFS_TRAILING_PROPERTIES);
 
+static Sys_var_mybool Sys_pfs_consumer_statement_digest(
+       "performance_schema_consumer_statements_digest",
+       "Default startup value for the statements_digest consumer.",
+       READ_ONLY NOT_VISIBLE GLOBAL_VAR(pfs_param.m_consumer_statement_digest_enabled),
+       CMD_LINE(OPT_ARG), DEFAULT(FALSE),
+       PFS_TRAILING_PROPERTIES);
+
 static Sys_var_ulong Sys_pfs_events_waits_history_long_size(
        "performance_schema_events_waits_history_long_size",
        "Number of rows in EVENTS_WAITS_HISTORY_LONG.",

=== modified file 'storage/perfschema/pfs_digest.cc'
--- a/storage/perfschema/pfs_digest.cc	2011-12-08 14:30:18 +0000
+++ b/storage/perfschema/pfs_digest.cc	2011-12-19 19:08:09 +0000
@@ -348,8 +348,10 @@ struct PSI_digest_locker* pfs_digest_sta
 
   /*
     If current statement is not instrumented
+    or if statement_digest consumer is not enabled.
   */
-  if(!locker || !(flag_thread_instrumentation && flag_events_statements_current))
+  if(!locker || !(flag_thread_instrumentation && flag_events_statements_current)
+             || (!flag_statements_digest))
   {
     return NULL;
   }

=== modified file 'storage/perfschema/pfs_server.cc'
--- a/storage/perfschema/pfs_server.cc	2011-11-23 12:56:12 +0000
+++ b/storage/perfschema/pfs_server.cc	2011-12-19 19:08:09 +0000
@@ -122,6 +122,7 @@ initialize_performance_schema(const PFS_
   flag_events_waits_history_long=      param->m_consumer_events_waits_history_long_enabled;
   flag_global_instrumentation=         param->m_consumer_global_instrumentation_enabled;
   flag_thread_instrumentation=         param->m_consumer_thread_instrumentation_enabled;
+  flag_statements_digest=              param->m_consumer_statement_digest_enabled;
 
   install_default_setup(&PFS_bootstrap);
   return &PFS_bootstrap;

=== modified file 'storage/perfschema/pfs_server.h'
--- a/storage/perfschema/pfs_server.h	2011-11-23 12:56:12 +0000
+++ b/storage/perfschema/pfs_server.h	2011-12-19 19:08:09 +0000
@@ -126,6 +126,7 @@ struct PFS_global_param
   bool m_consumer_events_waits_history_long_enabled;
   bool m_consumer_global_instrumentation_enabled;
   bool m_consumer_thread_instrumentation_enabled;
+  bool m_consumer_statement_digest_enabled;
 
   /** Default instrument configuration option. */
   char *m_pfs_instrument;

=== modified file 'storage/perfschema/table_events_statements.cc'
--- a/storage/perfschema/table_events_statements.cc	2011-12-02 13:37:06 +0000
+++ b/storage/perfschema/table_events_statements.cc	2011-12-19 19:08:09 +0000
@@ -387,6 +387,12 @@ void table_events_statements_common::mak
     m_row.m_digest.m_digest_text_length=
            statement->statement_digest_stat_ptr->m_digest_text_length;
   }
+  else
+  {
+    m_row.m_digest.m_digest_length= 0;
+    m_row.m_digest.m_digest_text_length= 0;
+  }
+
 
   m_row_exists= true;
   return;

=== modified file 'storage/perfschema/table_setup_consumers.cc'
--- a/storage/perfschema/table_setup_consumers.cc	2011-08-02 07:53:14 +0000
+++ b/storage/perfschema/table_setup_consumers.cc	2011-12-19 19:08:09 +0000
@@ -84,7 +84,7 @@ static row_setup_consumers all_setup_con
     false
   },
   {
-    { C_STRING_WITH_LEN("statement_digest") },
+    { C_STRING_WITH_LEN("statements_digest") },
     &flag_statements_digest,
     false
   }

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5767 branch (mayank.prasad:3403 to 3404) WL#5767Mayank Prasad20 Dec