From: Marc Alff Date: May 18 2011 11:29pm Subject: bzr push into mysql-trunk-wl5378 branch (marc.alff:3353 to 3354) List-Archive: http://lists.mysql.com/commits/137527 Message-Id: <20110518232959.94F522FED01@linux-8edv.site> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3354 Marc Alff 2011-05-19 Implemented code review comments modified: mysql-test/suite/perfschema/include/event_aggregate_load.inc mysql-test/suite/perfschema/include/table_aggregate_load.inc mysql-test/suite/perfschema/r/event_aggregate.result mysql-test/suite/perfschema/r/event_aggregate_no_h.result mysql-test/suite/perfschema/r/event_aggregate_no_u.result mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result mysql-test/suite/perfschema/r/event_aggregate_no_uh.result mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_h.result mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u.result mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u_no_h.result mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result mysql-test/suite/perfschema/r/table_aggregate_off.result mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result storage/perfschema/pfs.cc storage/perfschema/pfs_account.cc storage/perfschema/pfs_account.h storage/perfschema/pfs_events_stages.cc storage/perfschema/pfs_events_statements.cc storage/perfschema/pfs_host.cc storage/perfschema/pfs_host.h storage/perfschema/pfs_instr.cc storage/perfschema/pfs_instr.h storage/perfschema/pfs_user.cc storage/perfschema/pfs_user.h 3353 Marc Alff 2011-05-18 [merge] Merge mysql-trunk --> mysql-trunk-wl5378 removed: mysql-test/suite/perfschema/t/pfs_upgrade_lc0.test mysql-test/suite/perfschema/t/pfs_upgrade_lc1.test mysql-test/suite/perfschema/t/pfs_upgrade_lc2.test mysql-test/suite/perfschema/t/schema_lc0.test mysql-test/suite/perfschema/t/schema_lc1.test mysql-test/suite/perfschema/t/schema_lc2.test added: mysql-test/extra/rpl_tests/rpl_temp_error.test mysql-test/lib/mtr_results.pm mysql-test/r/implicit_char_to_num_conversion.result mysql-test/suite/perfschema/r/pfs_upgrade.result mysql-test/suite/perfschema/r/schema.result mysql-test/suite/perfschema/t/pfs_upgrade.test mysql-test/suite/perfschema/t/schema.test mysql-test/suite/rpl/r/rpl_DML_error.result mysql-test/suite/rpl/t/rpl_DML_error.test mysql-test/t/implicit_char_to_num_conversion.test unittest/gunit/opt_range-t.cc unittest/gunit/test_utils.cc unittest/gunit/test_utils.h renamed: mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result => mysql-test/suite/perfschema/r/pfs_upgrade_lc0.result.THIS mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result => mysql-test/suite/perfschema/r/pfs_upgrade_lc1.result.THIS mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result => mysql-test/suite/perfschema/r/pfs_upgrade_lc2.result.THIS mysql-test/suite/perfschema/r/schema_lc0.result => mysql-test/suite/perfschema/r/schema_lc0.result.THIS mysql-test/suite/perfschema/r/schema_lc1.result => mysql-test/suite/perfschema/r/schema_lc1.result.THIS mysql-test/suite/perfschema/r/schema_lc2.result => mysql-test/suite/perfschema/r/schema_lc2.result.THIS modified: .bzrignore CMakeLists.txt mysql-test/collections/default.experimental mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test mysql-test/extra/rpl_tests/check_type.inc mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.inc mysql-test/extra/rpl_tests/rpl_drop_create_temp_table.test mysql-test/extra/rpl_tests/rpl_innodb.test mysql-test/extra/rpl_tests/rpl_mixing_engines.inc mysql-test/include/wait_show_condition.inc mysql-test/lib/My/CoreDump.pm mysql-test/lib/My/Test.pm mysql-test/lib/mtr_report.pm mysql-test/mysql-test-run.pl mysql-test/r/ctype_binary.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result mysql-test/r/ctype_utf8.result mysql-test/r/distinct.result mysql-test/r/explain.result mysql-test/r/having.result mysql-test/r/innodb_mysql_lock.result mysql-test/r/metadata.result mysql-test/r/read_only_innodb.result mysql-test/r/type_newdecimal.result mysql-test/r/type_ranges.result mysql-test/r/variables-big.result mysql-test/suite/binlog/r/binlog_innodb_row.result mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/binlog/t/binlog_bug23533.test mysql-test/suite/binlog/t/binlog_innodb_row.test mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result mysql-test/suite/rpl/r/rpl_loaddatalocal.result mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result mysql-test/suite/rpl/r/rpl_row_drop_create_temp_table.result mysql-test/suite/rpl/r/rpl_row_ignorable_event.result mysql-test/suite/rpl/r/rpl_row_mixing_engines.result mysql-test/suite/rpl/r/rpl_show_slave_hosts.result mysql-test/suite/rpl/r/rpl_stm_drop_create_temp_table.result mysql-test/suite/rpl/r/rpl_stm_innodb.result mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result mysql-test/suite/rpl/r/rpl_typeconv.result mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test mysql-test/suite/rpl/t/rpl_loaddatalocal.test mysql-test/suite/rpl/t/rpl_row_ignorable_event.test mysql-test/suite/rpl/t/rpl_show_slave_hosts.test mysql-test/suite/rpl/t/rpl_typeconv.test mysql-test/t/distinct.test mysql-test/t/explain.test mysql-test/t/having.test mysql-test/t/innodb_mysql_lock.test mysql-test/t/type_newdecimal.test mysql-test/t/variables-big.test mysys/lf_alloc-pin.c mysys/thr_alarm.c packaging/WiX/ca/CMakeLists.txt packaging/WiX/create_msi.cmake.in packaging/WiX/custom_ui.wxs sql/binlog.cc sql/binlog.h sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_partition.cc sql/ha_partition.h sql/handler.cc sql/handler.h sql/item.cc sql/item_xmlfunc.cc sql/item_xmlfunc.h sql/log_event.cc sql/mysqld.cc sql/mysqld.h sql/rpl_info_file.cc sql/rpl_injector.cc sql/rpl_injector.h sql/rpl_master.cc sql/rpl_reporting.cc sql/rpl_rli.cc sql/rpl_rli.h sql/rpl_slave.cc sql/share/errmsg-utf8.txt sql/sp_head.cc sql/sql_acl.cc sql/sql_class.cc sql/sql_class.h sql/sql_delete.cc sql/sql_insert.cc sql/sql_lex.h sql/sql_load.cc sql/sql_parse.cc sql/sql_partition.h sql/sql_priv.h sql/sql_select.cc sql/sql_table.cc sql/sql_truncate.cc sql/sql_update.cc sql/sql_yacc.yy sql/sys_vars.cc sql/transaction.cc storage/innobase/handler/i_s.cc storage/perfschema/pfs.cc storage/perfschema/pfs_instr_class.cc storage/perfschema/pfs_instr_class.h storage/perfschema/pfs_setup_object.h storage/perfschema/table_setup_instruments.cc storage/perfschema/table_setup_instruments.h strings/decimal.c unittest/gunit/CMakeLists.txt unittest/gunit/item-t.cc unittest/mysys/lf-t.c === modified file 'mysql-test/suite/perfschema/include/event_aggregate_load.inc' --- a/mysql-test/suite/perfschema/include/event_aggregate_load.inc 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/include/event_aggregate_load.inc 2011-05-18 23:29:02 +0000 @@ -35,8 +35,8 @@ execute dump_hosts; # Each connect causes 2 wait/synch/mutex/sql/LOCK_connection_count events: # - 1 in mysqld.cc, create_new_thread(), for the main thread # - 1 in sql_connect.cc, check_user(), for the connected thread -# The main thread does not count for BY_USER_HOST / BY_HOST. -# The user thread does count for BY_USER_HOST, BY_HOST +# The main thread does not count for BY_ACCOUNT / BY_HOST. +# The user thread does count for BY_ACCOUNT, BY_HOST # # Each get_lock() causes 1 wait/synch/mutex/sql/LOCK_user_locks # @@ -301,7 +301,7 @@ execute dump_hosts; truncate performance_schema.events_waits_summary_by_account_by_event_name; -echo "================== BY_USER_HOST truncated =================="; +echo "================== BY_ACCOUNT truncated =================="; echo "================== Step 15 =================="; execute dump_thread; === modified file 'mysql-test/suite/perfschema/include/table_aggregate_load.inc' --- a/mysql-test/suite/perfschema/include/table_aggregate_load.inc 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/include/table_aggregate_load.inc 2011-05-18 23:29:02 +0000 @@ -496,7 +496,7 @@ execute dump_objects_summary; truncate performance_schema.events_waits_summary_by_account_by_event_name; -echo "================== BY_USER_HOST truncated =================="; +echo "================== BY_ACCOUNT truncated =================="; echo "================== Step 18 =================="; execute dump_thread; === modified file 'mysql-test/suite/perfschema/r/event_aggregate.result' --- a/mysql-test/suite/perfschema/r/event_aggregate.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate.result 2011-05-18 23:29:02 +0000 @@ -1007,7 +1007,7 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 5 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_h.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result 2011-05-18 23:29:02 +0000 @@ -937,7 +937,7 @@ user4 0 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_u.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result 2011-05-18 23:29:02 +0000 @@ -793,7 +793,7 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 5 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result 2011-05-18 23:29:02 +0000 @@ -723,28 +723,28 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIO execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star execute dump_account; user host event_name count_star -user1 localhost wait/io/file/sql/query_log 5 -user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user1 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user2 localhost wait/io/file/sql/query_log 5 -user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user2 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user3 localhost wait/io/file/sql/query_log 5 -user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user3 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user4 localhost wait/io/file/sql/query_log 5 -user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user4 localhost wait/synch/rwlock/sql/LOCK_grant 2 +user1 localhost wait/io/file/sql/query_log 0 +user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user1 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user2 localhost wait/io/file/sql/query_log 0 +user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user2 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user3 localhost wait/io/file/sql/query_log 0 +user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user3 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user4 localhost wait/io/file/sql/query_log 0 +user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user4 localhost wait/synch/rwlock/sql/LOCK_grant 0 execute dump_user; user event_name count_star execute dump_host; @@ -779,22 +779,22 @@ execute dump_thread; event_name count_star execute dump_account; user host event_name count_star -user1 localhost wait/io/file/sql/query_log 5 -user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user1 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user2 localhost wait/io/file/sql/query_log 5 -user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user2 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user3 localhost wait/io/file/sql/query_log 5 -user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user3 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user4 localhost wait/io/file/sql/query_log 5 -user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user4 localhost wait/synch/rwlock/sql/LOCK_grant 2 +user1 localhost wait/io/file/sql/query_log 0 +user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user1 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user2 localhost wait/io/file/sql/query_log 0 +user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user2 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user3 localhost wait/io/file/sql/query_log 0 +user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user3 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user4 localhost wait/io/file/sql/query_log 0 +user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user4 localhost wait/synch/rwlock/sql/LOCK_grant 0 execute dump_user; user event_name count_star execute dump_host; @@ -829,22 +829,22 @@ execute dump_thread; event_name count_star execute dump_account; user host event_name count_star -user1 localhost wait/io/file/sql/query_log 5 -user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user1 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user2 localhost wait/io/file/sql/query_log 5 -user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user2 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user3 localhost wait/io/file/sql/query_log 5 -user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user3 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user4 localhost wait/io/file/sql/query_log 5 -user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user4 localhost wait/synch/rwlock/sql/LOCK_grant 2 +user1 localhost wait/io/file/sql/query_log 0 +user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user1 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user2 localhost wait/io/file/sql/query_log 0 +user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user2 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user3 localhost wait/io/file/sql/query_log 0 +user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user3 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user4 localhost wait/io/file/sql/query_log 0 +user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user4 localhost wait/synch/rwlock/sql/LOCK_grant 0 execute dump_user; user event_name count_star execute dump_host; @@ -879,22 +879,22 @@ execute dump_thread; event_name count_star execute dump_account; user host event_name count_star -user1 localhost wait/io/file/sql/query_log 5 -user1 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user1 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user2 localhost wait/io/file/sql/query_log 5 -user2 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user2 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user3 localhost wait/io/file/sql/query_log 5 -user3 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user3 localhost wait/synch/rwlock/sql/LOCK_grant 2 -user4 localhost wait/io/file/sql/query_log 5 -user4 localhost wait/synch/mutex/sql/LOCK_connection_count 1 -user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2 -user4 localhost wait/synch/rwlock/sql/LOCK_grant 2 +user1 localhost wait/io/file/sql/query_log 0 +user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user1 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user1 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user2 localhost wait/io/file/sql/query_log 0 +user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user2 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user2 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user3 localhost wait/io/file/sql/query_log 0 +user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user3 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user3 localhost wait/synch/rwlock/sql/LOCK_grant 0 +user4 localhost wait/io/file/sql/query_log 0 +user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0 +user4 localhost wait/synch/mutex/sql/LOCK_user_locks 0 +user4 localhost wait/synch/rwlock/sql/LOCK_grant 0 execute dump_user; user event_name count_star execute dump_host; === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_uh.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_uh.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_uh.result 2011-05-18 23:29:02 +0000 @@ -793,7 +793,7 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 5 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_h.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_h.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_h.result 2011-05-18 23:29:02 +0000 @@ -723,7 +723,7 @@ user4 0 1 execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u.result 2011-05-18 23:29:02 +0000 @@ -579,7 +579,7 @@ execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS localhost 1 5 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u_no_h.result' --- a/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u_no_h.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/event_aggregate_no_uh_no_u_no_h.result 2011-05-18 23:29:02 +0000 @@ -509,7 +509,7 @@ USER CURRENT_CONNECTIONS TOTAL_CONNECTIO execute dump_hosts; HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 15 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1345,7 +1345,7 @@ TABLE test t1 97 TABLE test t2 0 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1344,7 +1344,7 @@ TABLE test t1 97 TABLE test t2 136 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1345,7 +1345,7 @@ TABLE test t1 97 TABLE test t2 0 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1344,7 +1344,7 @@ TABLE test t1 97 TABLE test t2 136 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1403,7 +1403,7 @@ TABLE test t1 47 TABLE test t2 0 TABLE test t3 86 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1432,7 +1432,7 @@ TABLE test t1 47 TABLE test t2 64 TABLE test t3 86 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1403,7 +1403,7 @@ TABLE test t1 97 TABLE test t2 0 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1432,7 +1432,7 @@ TABLE test t1 97 TABLE test t2 136 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_off.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_off.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result 2011-05-18 23:29:02 +0000 @@ -1344,7 +1344,7 @@ TABLE test t1 0 TABLE test t2 0 TABLE test t3 0 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1345,7 +1345,7 @@ TABLE test t1 47 TABLE test t2 0 TABLE test t3 86 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1344,7 +1344,7 @@ TABLE test t1 47 TABLE test t2 64 TABLE test t3 86 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1345,7 +1345,7 @@ TABLE test t1 97 TABLE test t2 0 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1344,7 +1344,7 @@ TABLE test t1 97 TABLE test t2 136 TABLE test t3 188 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 53 TABLE test t2 0 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 53 TABLE test t2 84 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 53 TABLE test t2 0 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 53 TABLE test t2 84 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1375,7 +1375,7 @@ TABLE test t1 23 TABLE test t2 0 TABLE test t3 54 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1389,7 +1389,7 @@ TABLE test t1 23 TABLE test t2 36 TABLE test t3 54 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1375,7 +1375,7 @@ TABLE test t1 53 TABLE test t2 0 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1389,7 +1389,7 @@ TABLE test t1 53 TABLE test t2 84 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 23 TABLE test t2 0 TABLE test t3 54 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 23 TABLE test t2 36 TABLE test t3 54 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 53 TABLE test t2 0 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 53 TABLE test t2 84 TABLE test t3 128 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 44 TABLE test t2 0 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 44 TABLE test t2 52 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 44 TABLE test t2 0 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 44 TABLE test t2 52 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1375,7 +1375,7 @@ TABLE test t1 24 TABLE test t2 0 TABLE test t3 32 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1389,7 +1389,7 @@ TABLE test t1 24 TABLE test t2 28 TABLE test t3 32 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1375,7 +1375,7 @@ TABLE test t1 44 TABLE test t2 0 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1389,7 +1389,7 @@ TABLE test t1 44 TABLE test t2 52 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 24 TABLE test t2 0 TABLE test t3 32 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 24 TABLE test t2 28 TABLE test t3 32 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result 2011-05-18 23:29:02 +0000 @@ -1347,7 +1347,7 @@ TABLE test t1 44 TABLE test t2 0 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result' --- a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result 2011-05-07 04:28:13 +0000 +++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result 2011-05-18 23:29:02 +0000 @@ -1346,7 +1346,7 @@ TABLE test t1 44 TABLE test t2 52 TABLE test t3 60 truncate performance_schema.events_waits_summary_by_account_by_event_name; -"================== BY_USER_HOST truncated ==================" +"================== BY_ACCOUNT truncated ==================" "================== Step 18 ==================" execute dump_thread; event_name count_star === modified file 'storage/perfschema/pfs.cc' --- a/storage/perfschema/pfs.cc 2011-05-18 18:42:30 +0000 +++ b/storage/perfschema/pfs.cc 2011-05-18 23:29:02 +0000 @@ -687,8 +687,11 @@ static inline int mysql_mutex_lock(...) @section IMPL_WAIT Implementation for waits aggregates For waits, the tables that contains aggregated wait data are: + - EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME + - EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME - EVENTS_WAITS_SUMMARY_BY_INSTANCE - EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME + - EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME - FILE_SUMMARY_BY_EVENT_NAME - FILE_SUMMARY_BY_INSTANCE @@ -700,6 +703,7 @@ static inline int mysql_mutex_lock(...) - conditions (mysql_cond_t) - file io (MYSQL_FILE) - table io + - table lock The flow of data between aggregates tables varies for each instrumentation. @@ -720,45 +724,50 @@ static inline int mysql_mutex_lock(...) | | [3] | - 3a |-> pfs_account(U, H).event_name(M) =====>> [D], [E], [F] - | | - | | [4] - | | - 3b |----+-> pfs_user(U).event_name(M) =====>> [E] - | | - 3c |----+-> pfs_host(H).event_name(M) =====>> [F] + 3a |-> pfs_account(U, H).event_name(M) =====>> [D], [E], [F] + . | + . | [4-RESET] + . | + 3b .....+-> pfs_user(U).event_name(M) =====>> [E] + . | + 3c .....+-> pfs_host(H).event_name(M) =====>> [F] @endverbatim How to read this diagram: - events that occur during the instrumented code execution are noted with numbers, as in [1]. Code executed by these events has an impact on overhead. + - events that occur during TRUNCATE TABLE operations are noted with numbers, + followed by "-RESET", as in [4-RESET]. + Code executed by these events has no impact on overhead, + since they are executed by independent monitoring sessions. - events that occur when a reader extracts data from a performance schema table are noted with letters, as in [A]. The name of the table involved, and the method that builds a row are documented. Code executed by these events has no impact on the instrumentation overhead. Note that the table implementation may pull data from different buffers. - - placeholders for aggregates tables that are not implemented yet are - documented, to illustrate the overall architecture principles. + - nominal code paths are in plain lines. A "nominal" code path corresponds to + cases where the performance schema buffers are sized so that no records are lost. + - degenerated code paths are in dotted lines. A "degenerated" code path corresponds + to edge cases where parent buffers are full, which forces the code to aggregate to + grand parents directly. Implemented as: - [1] @c get_thread_mutex_locker_v1(), @c start_mutex_wait_v1(), @c end_mutex_wait_v1() - [2] @c destroy_mutex_v1() + - [3] @c aggregate_thread_waits() + - [4] @c PFS_account::aggregate_waits() - [A] EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME, @c table_ews_by_thread_by_event_name::make_row() - [B] EVENTS_WAITS_SUMMARY_BY_INSTANCE, @c table_events_waits_summary_by_instance::make_mutex_row() - [C] EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME, @c table_ews_global_by_event_name::make_mutex_row() - - Not implemented: - - [3] thread disconnect - - [4] user host disconnect - [D] EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME, - table_ews_by_account_by_event_name::make_row() + @c table_ews_by_account_by_event_name::make_row() - [E] EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME, - table_ews_by_user_by_event_name::make_row() + @c table_ews_by_user_by_event_name::make_row() - [F] EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME, - table_ews_by_host_by_event_name::make_row() + @c table_ews_by_host_by_event_name::make_row() Table EVENTS_WAITS_SUMMARY_BY_INSTANCE is a 'on the fly' aggregate, because the data is collected on the fly by (1) and stored into a buffer, @@ -888,97 +897,106 @@ static inline int mysql_mutex_lock(...) - [B] EVENTS_WAITS_SUMMARY_BY_INSTANCE, @c table_events_waits_summary_by_instance::make_table_row() - [C] EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME, - @c table_ews_global_by_event_name::make_table_io_row() + @c table_ews_global_by_event_name::make_table_io_row(), + @c table_ews_global_by_event_name::make_table_lock_row() - [D] OBJECTS_SUMMARY_GLOBAL_BY_TYPE, @c table_os_global_by_type::make_row() @section IMPL_STAGE Implementation for stages aggregates + For stages, the tables that contains aggregated data are: + - EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME + @verbatim start_stage(T, S) | | [1] | - a |-> pfs_thread(T).event_name(S) =====>> [A], [B], [C], [D], [E] +1a |-> pfs_thread(T).event_name(S) =====>> [A], [B], [C], [D], [E] | | | | [2] | | - | a |-> pfs_account(U, H).event_name(S) =====>> [B], [C], [D], [E] - | | | - | | | [3] - | | | - | b |----+-> pfs_user(U).event_name(S) =====>> [C] - | | | - | c |----+-> pfs_host(H).event_name(S) =====>> [D], [E] - | | | | - | | | | [4] - | d | | | - b |----+----+----+-> pfs_stage_class(S) =====>> [E] + | 2a |-> pfs_account(U, H).event_name(S) =====>> [B], [C], [D], [E] + | . | + | . | [3-RESET] + | . | + | 2b .....+-> pfs_user(U).event_name(S) =====>> [C] + | . | + | 2c .....+-> pfs_host(H).event_name(S) =====>> [D], [E] + | . . | + | . . | [4-RESET] + | 2d . . | +1b |----+----+----+-> pfs_stage_class(S) =====>> [E] @endverbatim Implemented as: - [1] @c start_stage_v1() - - [2d] @c delete_thread_v1() + - [2] @c delete_thread_v1(), @c aggregate_thread_stages() + - [3] @c PFS_account::aggregate_stages() + - [4] @c PFS_host::aggregate_stages() - [A] EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME, @c table_esgs_by_thread_by_event_name::make_row() - - [E] EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME, - @c table_esgs_global_by_event_name::make_row() - - Not implemented: - - [2a, 2b, 2c] @c delete_thread_v1() to aggregate to user/host buffers - - [3] user disconnect - - [4] host disconnect - [B] EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME, @c table_esgs_by_account_by_event_name::make_row() - [C] EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME, @c table_esgs_by_user_by_event_name::make_row() - [D] EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME, @c table_esgs_by_host_by_event_name::make_row() + - [E] EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME, + @c table_esgs_global_by_event_name::make_row() @section IMPL_STATEMENT Implementation for statements aggregates + For statements, the tables that contains aggregated data are: + - EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME + @verbatim statement_locker(T, S) | | [1] | - a |-> pfs_thread(T).event_name(S) =====>> [A], [B], [C], [D], [E] +1a |-> pfs_thread(T).event_name(S) =====>> [A], [B], [C], [D], [E] | | | | [2] | | - | a |-> pfs_account(U, H).event_name(S) =====>> [B], [C], [D], [E] - | | | - | | | [3] - | | | - | b |----+-> pfs_user(U).event_name(S) =====>> [C] - | | | - | c |----+-> pfs_host(H).event_name(S) =====>> [D], [E] - | | | | - | | | | [4] - | d | | | - b |----+----+----+-> pfs_stage_class(S) =====>> [E] + | 2a |-> pfs_account(U, H).event_name(S) =====>> [B], [C], [D], [E] + | . | + | . | [3-RESET] + | . | + | 2b .....+-> pfs_user(U).event_name(S) =====>> [C] + | . | + | 2c .....+-> pfs_host(H).event_name(S) =====>> [D], [E] + | . . | + | . . | [4-RESET] + | 2d . . | +1b |----+----+----+-> pfs_stage_class(S) =====>> [E] @endverbatim Implemented as: - [1] @c start_statement_v1(), end_statement_v1() - - [2d] @c delete_thread_v1() + - [2] @c delete_thread_v1(), @c aggregate_thread_statements() + - [3] @c PFS_account::aggregate_statements() + - [4] @c PFS_host::aggregate_statements() - [A] EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME, @c table_esms_by_thread_by_event_name::make_row() - - [E] EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME, - @c table_esms_global_by_event_name::make_row() - - Not implemented: - - [2a, 2b, 2c] @c delete_thread_v1() to aggregate to user/host buffers - - [3] user disconnect - - [4] host disconnect - [B] EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME, @c table_esms_by_account_by_event_name::make_row() - [C] EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME, @c table_esms_by_user_by_event_name::make_row() - [D] EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME, @c table_esms_by_host_by_event_name::make_row() + - [E] EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME, + @c table_esms_global_by_event_name::make_row() */ /** === modified file 'storage/perfschema/pfs_account.cc' --- a/storage/perfschema/pfs_account.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_account.cc 2011-05-18 23:29:02 +0000 @@ -317,26 +317,9 @@ search: void PFS_account::aggregate() { aggregate_waits(); - - if (likely(m_user != NULL && m_host != NULL)) - { - m_user->m_disconnected_count+= m_disconnected_count; - m_host->m_disconnected_count+= m_disconnected_count; - m_disconnected_count= 0; - } - else - { - if (m_user != NULL) - { - m_user->m_disconnected_count+= m_disconnected_count; - m_disconnected_count= 0; - } - else if (m_host != NULL) - { - m_host->m_disconnected_count+= m_disconnected_count; - m_disconnected_count= 0; - } - } + aggregate_stages(); + aggregate_statements(); + aggregate_stats(); } void PFS_account::aggregate_waits() @@ -352,28 +335,162 @@ void PFS_account::aggregate_waits() aggregate_all_event_names(m_instr_class_waits_stats, m_user->m_instr_class_waits_stats, m_host->m_instr_class_waits_stats); + return; + } + + if (m_user != NULL) + { + /* + Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME + */ + aggregate_all_event_names(m_instr_class_waits_stats, + m_user->m_instr_class_waits_stats); + return; + } + + if (m_host != NULL) + { + /* + Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME + */ + aggregate_all_event_names(m_instr_class_waits_stats, + m_host->m_instr_class_waits_stats); + return; + } + + /* Orphan account, no parent to aggregate to. */ + reset_waits_stats(); + return; +} + +void PFS_account::aggregate_stages() +{ + if (likely(m_user != NULL && m_host != NULL)) + { + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME + in parallel. + */ + aggregate_all_stages(m_instr_class_stages_stats, + m_user->m_instr_class_stages_stats, + m_host->m_instr_class_stages_stats); + return; } - else + + if (m_user != NULL) { - if (m_user != NULL) - { - /* - Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: - - EVENTS_WAITS_SUMMARY_BY_USER_BY_EVENT_NAME - */ - aggregate_all_event_names(m_instr_class_waits_stats, - m_user->m_instr_class_waits_stats); - } - else if (m_host != NULL) - { - /* - Aggregate EVENTS_WAITS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: - - EVENTS_WAITS_SUMMARY_BY_HOST_BY_EVENT_NAME - */ - aggregate_all_event_names(m_instr_class_waits_stats, - m_host->m_instr_class_waits_stats); - } + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME + in parallel. + */ + aggregate_all_stages(m_instr_class_stages_stats, + m_user->m_instr_class_stages_stats, + global_instr_class_stages_array); + return; } + + if (m_host != NULL) + { + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME + */ + aggregate_all_stages(m_instr_class_stages_stats, + m_host->m_instr_class_stages_stats); + return; + } + + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME + */ + aggregate_all_stages(m_instr_class_stages_stats, + global_instr_class_stages_array); + return; +} + +void PFS_account::aggregate_statements() +{ + if (likely(m_user != NULL && m_host != NULL)) + { + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME + in parallel. + */ + aggregate_all_statements(m_instr_class_statements_stats, + m_user->m_instr_class_statements_stats, + m_host->m_instr_class_statements_stats); + return; + } + + if (m_user != NULL) + { + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME + in parallel. + */ + aggregate_all_statements(m_instr_class_statements_stats, + m_user->m_instr_class_statements_stats, + global_instr_class_statements_array); + return; + } + + if (m_host != NULL) + { + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME + */ + aggregate_all_statements(m_instr_class_statements_stats, + m_host->m_instr_class_statements_stats); + return; + } + + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME + */ + aggregate_all_statements(m_instr_class_statements_stats, + global_instr_class_statements_array); + return; +} + +void PFS_account::aggregate_stats() +{ + if (likely(m_user != NULL && m_host != NULL)) + { + m_user->m_disconnected_count+= m_disconnected_count; + m_host->m_disconnected_count+= m_disconnected_count; + m_disconnected_count= 0; + return; + } + + if (m_user != NULL) + { + m_user->m_disconnected_count+= m_disconnected_count; + m_disconnected_count= 0; + return; + } + + if (m_host != NULL) + { + m_host->m_disconnected_count+= m_disconnected_count; + m_disconnected_count= 0; + return; + } + + m_disconnected_count= 0; + return; } void PFS_account::release() === modified file 'storage/perfschema/pfs_account.h' --- a/storage/perfschema/pfs_account.h 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_account.h 2011-05-18 23:29:02 +0000 @@ -71,6 +71,9 @@ public: void aggregate(void); void aggregate_waits(void); + void aggregate_stages(void); + void aggregate_statements(void); + void aggregate_stats(void); void release(void); /** Internal lock. */ === modified file 'storage/perfschema/pfs_events_stages.cc' --- a/storage/perfschema/pfs_events_stages.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_events_stages.cc 2011-05-18 23:29:02 +0000 @@ -23,6 +23,9 @@ #include "pfs_global.h" #include "pfs_instr_class.h" #include "pfs_instr.h" +#include "pfs_account.h" +#include "pfs_host.h" +#include "pfs_user.h" #include "pfs_events_stages.h" #include "pfs_atomic.h" #include "m_string.h" @@ -187,46 +190,40 @@ void reset_events_stages_by_thread() /** Reset table EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data. */ void reset_events_stages_by_account() { -#ifdef LATER PFS_account *pfs= account_array; PFS_account *pfs_last= account_array + account_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_stages(); } -#endif } /** Reset table EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME data. */ void reset_events_stages_by_user() { -#ifdef LATER PFS_user *pfs= user_array; PFS_user *pfs_last= user_array + user_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_stages(); } -#endif } /** Reset table EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME data. */ void reset_events_stages_by_host() { -#ifdef LATER PFS_host *pfs= host_array; PFS_host *pfs_last= host_array + host_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_stages(); } -#endif } /** Reset table EVENTS_STAGES_GLOBAL_BY_EVENT_NAME data. */ === modified file 'storage/perfschema/pfs_events_statements.cc' --- a/storage/perfschema/pfs_events_statements.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_events_statements.cc 2011-05-18 23:29:02 +0000 @@ -23,6 +23,9 @@ #include "pfs_global.h" #include "pfs_instr_class.h" #include "pfs_instr.h" +#include "pfs_account.h" +#include "pfs_host.h" +#include "pfs_user.h" #include "pfs_events_statements.h" #include "pfs_atomic.h" #include "m_string.h" @@ -191,46 +194,40 @@ void reset_events_statements_by_thread() /** Reset table EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data. */ void reset_events_statements_by_account() { -#ifdef LATER PFS_account *pfs= account_array; PFS_account *pfs_last= account_array + account_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_statements(); } -#endif } /** Reset table EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME data. */ void reset_events_statements_by_user() { -#ifdef LATER PFS_user *pfs= user_array; PFS_user *pfs_last= user_array + user_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_statements(); } -#endif } /** Reset table EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME data. */ void reset_events_statements_by_host() { -#ifdef LATER PFS_host *pfs= host_array; PFS_host *pfs_last= host_array + host_max; for ( ; pfs < pfs_last; pfs++) { if (pfs->m_lock.is_populated()) - pfs->aggregate_waits(); + pfs->aggregate_statements(); } -#endif } /** Reset table EVENTS_STATEMENTS_GLOBAL_BY_EVENT_NAME data. */ === modified file 'storage/perfschema/pfs_host.cc' --- a/storage/perfschema/pfs_host.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_host.cc 2011-05-18 23:29:02 +0000 @@ -286,16 +286,41 @@ search: void PFS_host::aggregate() { aggregate_waits(); + aggregate_stages(); + aggregate_statements(); + aggregate_stats(); } void PFS_host::aggregate_waits() { - /* No parent to aggregate to (for waits only), clean the stats */ + /* No parent to aggregate to, clean the stats */ + reset_waits_stats(); +} - PFS_single_stat *stat= m_instr_class_waits_stats; - PFS_single_stat *stat_last= stat + wait_class_max; - for ( ; stat < stat_last; stat++) - stat->reset(); +void PFS_host::aggregate_stages() +{ + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME + */ + aggregate_all_stages(m_instr_class_stages_stats, + global_instr_class_stages_array); +} + +void PFS_host::aggregate_statements() +{ + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME + */ + aggregate_all_statements(m_instr_class_statements_stats, + global_instr_class_statements_array); +} + +void PFS_host::aggregate_stats() +{ + /* No parent to aggregate to, clean the stats */ + m_disconnected_count= 0; } void PFS_host::release() @@ -305,8 +330,6 @@ void PFS_host::release() void purge_host(PFS_thread *thread, PFS_host *host) { - host->aggregate(); - LF_PINS *pins= get_host_hash_pins(thread); if (unlikely(pins == NULL)) return; @@ -344,7 +367,7 @@ void purge_all_host(void) { if (pfs->m_lock.is_populated()) { - pfs->m_disconnected_count= 0; + pfs->aggregate(); if (pfs->get_refcount() == 0) purge_host(thread, pfs); } === modified file 'storage/perfschema/pfs_host.h' --- a/storage/perfschema/pfs_host.h 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_host.h 2011-05-18 23:29:02 +0000 @@ -69,6 +69,9 @@ public: void aggregate(void); void aggregate_waits(void); + void aggregate_stages(void); + void aggregate_statements(void); + void aggregate_stats(void); void release(void); /* Internal lock. */ === modified file 'storage/perfschema/pfs_instr.cc' --- a/storage/perfschema/pfs_instr.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_instr.cc 2011-05-18 23:29:02 +0000 @@ -1523,6 +1523,35 @@ void aggregate_all_stages(PFS_stage_stat } } +void aggregate_all_stages(PFS_stage_stat *from_array, + PFS_stage_stat *to_array_1, + PFS_stage_stat *to_array_2) +{ + PFS_stage_stat *from; + PFS_stage_stat *from_last; + PFS_stage_stat *to_1; + PFS_stage_stat *to_1_last; + PFS_stage_stat *to_2; + PFS_stage_stat *to_2_last; + + from= from_array; + from_last= from_array + stage_class_max; + to_1= to_array_1; + to_1_last= to_array_1 + stage_class_max; + to_2= to_array_2; + to_2_last= to_array_2 + stage_class_max; + + for ( ; from < from_last ; from++, to_1++, to_2++) + { + if (from->m_timer1_stat.m_count > 0) + { + to_1->aggregate(from); + to_2->aggregate(from); + from->reset(); + } + } +} + void aggregate_all_statements(PFS_statement_stat *from_array, PFS_statement_stat *to_array) { @@ -1546,20 +1575,51 @@ void aggregate_all_statements(PFS_statem } } +void aggregate_all_statements(PFS_statement_stat *from_array, + PFS_statement_stat *to_array_1, + PFS_statement_stat *to_array_2) +{ + PFS_statement_stat *from; + PFS_statement_stat *from_last; + PFS_statement_stat *to_1; + PFS_statement_stat *to_1_last; + PFS_statement_stat *to_2; + PFS_statement_stat *to_2_last; + + from= from_array; + from_last= from_array + statement_class_max; + to_1= to_array_1; + to_1_last= to_array_1 + statement_class_max; + to_2= to_array_2; + to_2_last= to_array_2 + statement_class_max; + + for ( ; from < from_last ; from++, to_1++, to_2++) + { + if (from->m_timer1_stat.m_count > 0) + { + to_1->aggregate(from); + to_2->aggregate(from); + from->reset(); + } + } +} + void aggregate_thread_stats(PFS_thread *thread) { if (likely(thread->m_account != NULL)) { thread->m_account->m_disconnected_count++; + return; } - else - { - if (thread->m_user != NULL) - thread->m_user->m_disconnected_count++; - if (thread->m_host != NULL) - thread->m_host->m_disconnected_count++; - } + if (thread->m_user != NULL) + thread->m_user->m_disconnected_count++; + + if (thread->m_host != NULL) + thread->m_host->m_disconnected_count++; + + /* There is no global table for connections statistics. */ + return; } void aggregate_thread(PFS_thread *thread) @@ -1631,15 +1691,74 @@ void aggregate_thread_waits(PFS_thread * return; } - /* Orphan thread, clean the stats */ - PFS_single_stat *stat= thread->m_instr_class_waits_stats; - PFS_single_stat *stat_last= stat + wait_class_max; - for ( ; stat < stat_last; stat++) - stat->reset(); + /* Orphan thread, clean the waits stats. */ + thread->reset_waits_stats(); } void aggregate_thread_stages(PFS_thread *thread) { + if (likely(thread->m_account != NULL)) + { + DBUG_ASSERT(thread->m_user == NULL); + DBUG_ASSERT(thread->m_host == NULL); + DBUG_ASSERT(thread->m_account->get_refcount() > 0); + + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME + to EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME. + */ + aggregate_all_stages(thread->m_instr_class_stages_stats, + thread->m_account->m_instr_class_stages_stats); + + return; + } + + if ((thread->m_user != NULL) && (thread->m_host != NULL)) + { + DBUG_ASSERT(thread->m_user->get_refcount() > 0); + DBUG_ASSERT(thread->m_host->get_refcount() > 0); + + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME + in parallel. + */ + aggregate_all_stages(thread->m_instr_class_stages_stats, + thread->m_user->m_instr_class_stages_stats, + thread->m_host->m_instr_class_stages_stats); + return; + } + + if (thread->m_user != NULL) + { + DBUG_ASSERT(thread->m_user->get_refcount() > 0); + + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to: + - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME + in parallel. + */ + aggregate_all_stages(thread->m_instr_class_stages_stats, + thread->m_user->m_instr_class_stages_stats, + global_instr_class_stages_array); + return; + } + + if (thread->m_host != NULL) + { + DBUG_ASSERT(thread->m_host->get_refcount() > 0); + + /* + Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME + to EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME, directly. + */ + aggregate_all_stages(thread->m_instr_class_stages_stats, + thread->m_host->m_instr_class_stages_stats); + return; + } + /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME. @@ -1650,6 +1769,68 @@ void aggregate_thread_stages(PFS_thread void aggregate_thread_statements(PFS_thread *thread) { + if (likely(thread->m_account != NULL)) + { + DBUG_ASSERT(thread->m_user == NULL); + DBUG_ASSERT(thread->m_host == NULL); + DBUG_ASSERT(thread->m_account->get_refcount() > 0); + + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME + to EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME. + */ + aggregate_all_statements(thread->m_instr_class_statements_stats, + thread->m_account->m_instr_class_statements_stats); + + return; + } + + if ((thread->m_user != NULL) && (thread->m_host != NULL)) + { + DBUG_ASSERT(thread->m_user->get_refcount() > 0); + DBUG_ASSERT(thread->m_host->get_refcount() > 0); + + /* + Aggregate EVENTS_STATEMENT_SUMMARY_BY_THREAD_BY_EVENT_NAME to: + - EVENTS_STATEMENT_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STATEMENT_SUMMARY_BY_HOST_BY_EVENT_NAME + in parallel. + */ + aggregate_all_statements(thread->m_instr_class_statements_stats, + thread->m_user->m_instr_class_statements_stats, + thread->m_host->m_instr_class_statements_stats); + return; + } + + if (thread->m_user != NULL) + { + DBUG_ASSERT(thread->m_user->get_refcount() > 0); + + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME to: + - EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME + - EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME + in parallel. + */ + aggregate_all_statements(thread->m_instr_class_statements_stats, + thread->m_user->m_instr_class_statements_stats, + global_instr_class_statements_array); + return; + } + + if (thread->m_host != NULL) + { + DBUG_ASSERT(thread->m_host->get_refcount() > 0); + + /* + Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME + to EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME, directly. + */ + aggregate_all_statements(thread->m_instr_class_statements_stats, + thread->m_host->m_instr_class_statements_stats); + return; + } + /* Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME. === modified file 'storage/perfschema/pfs_instr.h' --- a/storage/perfschema/pfs_instr.h 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_instr.h 2011-05-18 23:29:02 +0000 @@ -489,9 +489,15 @@ void aggregate_all_event_names(PFS_singl void aggregate_all_stages(PFS_stage_stat *from_array, PFS_stage_stat *to_array); +void aggregate_all_stages(PFS_stage_stat *from_array, + PFS_stage_stat *to_array_1, + PFS_stage_stat *to_array_2); void aggregate_all_statements(PFS_statement_stat *from_array, PFS_statement_stat *to_array); +void aggregate_all_statements(PFS_statement_stat *from_array, + PFS_statement_stat *to_array_1, + PFS_statement_stat *to_array_2); void aggregate_thread(PFS_thread *thread); void aggregate_thread_waits(PFS_thread *thread); === modified file 'storage/perfschema/pfs_user.cc' --- a/storage/perfschema/pfs_user.cc 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_user.cc 2011-05-18 23:29:02 +0000 @@ -287,16 +287,33 @@ search: void PFS_user::aggregate() { aggregate_waits(); + aggregate_stages(); + aggregate_statements(); + aggregate_stats(); } void PFS_user::aggregate_waits() { /* No parent to aggregate to, clean the stats */ + reset_waits_stats(); +} + +void PFS_user::aggregate_stages() +{ + /* No parent to aggregate to, clean the stats */ + reset_stages_stats(); +} + +void PFS_user::aggregate_statements() +{ + /* No parent to aggregate to, clean the stats */ + reset_statements_stats(); +} - PFS_single_stat *stat= m_instr_class_waits_stats; - PFS_single_stat *stat_last= stat + wait_class_max; - for ( ; stat < stat_last; stat++) - stat->reset(); +void PFS_user::aggregate_stats() +{ + /* No parent to aggregate to, clean the stats */ + m_disconnected_count= 0; } void PFS_user::release() @@ -314,8 +331,6 @@ PFS_user *sanitize_user(PFS_user *unsafe void purge_user(PFS_thread *thread, PFS_user *user) { - user->aggregate(); - LF_PINS *pins= get_user_hash_pins(thread); if (unlikely(pins == NULL)) return; @@ -353,7 +368,7 @@ void purge_all_user(void) { if (pfs->m_lock.is_populated()) { - pfs->m_disconnected_count= 0; + pfs->aggregate(); if (pfs->get_refcount() == 0) purge_user(thread, pfs); } === modified file 'storage/perfschema/pfs_user.h' --- a/storage/perfschema/pfs_user.h 2011-05-07 00:40:25 +0000 +++ b/storage/perfschema/pfs_user.h 2011-05-18 23:29:02 +0000 @@ -69,6 +69,9 @@ public: void aggregate(void); void aggregate_waits(void); + void aggregate_stages(void); + void aggregate_statements(void); + void aggregate_stats(void); void release(void); /** Internal lock. */ No bundle (reason: useless for push emails).