summaryrefslogtreecommitdiff
path: root/mysql-test/suite/perfschema/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/perfschema/r')
-rw-r--r--mysql-test/suite/perfschema/r/aggregate.result16
-rw-r--r--mysql-test/suite/perfschema/r/all_instances.result161
-rw-r--r--mysql-test/suite/perfschema/r/all_tests.result21
-rw-r--r--mysql-test/suite/perfschema/r/binlog_mix.result10
-rw-r--r--mysql-test/suite/perfschema/r/binlog_row.result10
-rw-r--r--mysql-test/suite/perfschema/r/binlog_stmt.result4
-rw-r--r--mysql-test/suite/perfschema/r/checksum.result56
-rw-r--r--mysql-test/suite/perfschema/r/column_privilege.result2
-rw-r--r--mysql-test/suite/perfschema/r/connection.result875
-rw-r--r--mysql-test/suite/perfschema/r/connection_3a.result820
-rw-r--r--mysql-test/suite/perfschema/r/connection_3a_3u.result762
-rw-r--r--mysql-test/suite/perfschema/r/connection_3u.result817
-rw-r--r--mysql-test/suite/perfschema/r/csv_table_io.result145
-rw-r--r--mysql-test/suite/perfschema/r/ddl_accounts.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esgs_by_account_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esgs_by_host_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esgs_by_user_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_account_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_digest.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_host_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result9
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_by_user_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_current.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_history.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_statements_current.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_statements_history.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ews_by_account_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ews_by_host_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_ews_by_user_by_event_name.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_host_cache.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_hosts.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_os_global_by_type.result10
-rw-r--r--mysql-test/suite/perfschema/r/ddl_setup_actors.result16
-rw-r--r--mysql-test/suite/perfschema/r/ddl_setup_objects.result16
-rw-r--r--mysql-test/suite/perfschema/r/ddl_socket_instances.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_socket_summary_by_event_name.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_socket_summary_by_instance.result7
-rw-r--r--mysql-test/suite/perfschema/r/ddl_threads.result4
-rw-r--r--mysql-test/suite/perfschema/r/ddl_tiws_by_index_usage.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_tiws_by_table.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_tlws_by_table.result8
-rw-r--r--mysql-test/suite/perfschema/r/ddl_users.result8
-rw-r--r--mysql-test/suite/perfschema/r/digest_table_full.result94
-rw-r--r--mysql-test/suite/perfschema/r/dml_accounts.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_cond_instances.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_digest.result27
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_current.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_stages_history_long.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_current.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_statements_history_long.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_current.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_history.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_events_waits_history_long.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_instance.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result29
-rw-r--r--mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_file_instances.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_fs_by_event_name.result (renamed from mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result)4
-rw-r--r--mysql-test/suite/perfschema/r/dml_fs_by_instance.result (renamed from mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result)4
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result162
-rw-r--r--mysql-test/suite/perfschema/r/dml_host_cache.result27
-rw-r--r--mysql-test/suite/perfschema/r/dml_hosts.result25
-rw-r--r--mysql-test/suite/perfschema/r/dml_mutex_instances.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_os_global_by_type.result45
-rw-r--r--mysql-test/suite/perfschema/r/dml_performance_timers.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_rwlock_instances.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_actors.result60
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_consumers.result28
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_instruments.result4
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_objects.result67
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_timers.result28
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_instances.result20
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_threads.result20
-rw-r--r--mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_tiws_by_table.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_tlws_by_table.result26
-rw-r--r--mysql-test/suite/perfschema/r/dml_users.result25
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate.result5271
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a.result3992
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result3589
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result2661
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result2258
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_h.result4868
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u.result3940
-rw-r--r--mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result3537
-rw-r--r--mysql-test/suite/perfschema/r/func_file_io.result23
-rw-r--r--mysql-test/suite/perfschema/r/func_mutex.result1
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result88
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result180
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result198
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_format.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result645
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result157
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result131
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result195
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result141
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result71
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result88
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result180
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result198
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result645
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result157
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result131
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result85
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result72
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result195
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result141
-rw-r--r--mysql-test/suite/perfschema/r/hostcache_peer_addr.result50
-rw-r--r--mysql-test/suite/perfschema/r/indexed_table_io.result158
-rw-r--r--mysql-test/suite/perfschema/r/information_schema.result301
-rw-r--r--mysql-test/suite/perfschema/r/innodb_table_io.result149
-rw-r--r--mysql-test/suite/perfschema/r/memory_table_io.result147
-rw-r--r--mysql-test/suite/perfschema/r/merge_table_io.result177
-rw-r--r--mysql-test/suite/perfschema/r/misc.result69
-rw-r--r--mysql-test/suite/perfschema/r/multi_table_io.result108
-rw-r--r--mysql-test/suite/perfschema/r/myisam_file_io.result8
-rw-r--r--mysql-test/suite/perfschema/r/myisam_table_io.result145
-rw-r--r--mysql-test/suite/perfschema/r/nesting.result233
-rw-r--r--mysql-test/suite/perfschema/r/no_threads.result1
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result745
-rw-r--r--mysql-test/suite/perfschema/r/part_table_io.result177
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade.result355
-rw-r--r--mysql-test/suite/perfschema/r/privilege.result85
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result138
-rw-r--r--mysql-test/suite/perfschema/r/query_cache.result4
-rw-r--r--mysql-test/suite/perfschema/r/relaylog.result39
-rw-r--r--mysql-test/suite/perfschema/r/rollback_table_io.result88
-rw-r--r--mysql-test/suite/perfschema/r/schema.result861
-rw-r--r--mysql-test/suite/perfschema/r/selects.result3
-rw-r--r--mysql-test/suite/perfschema/r/server_init.result22
-rw-r--r--mysql-test/suite/perfschema/r/setup_actors.result135
-rw-r--r--mysql-test/suite/perfschema/r/setup_consumers_defaults.result20
-rw-r--r--mysql-test/suite/perfschema/r/setup_instruments_defaults.result36
-rw-r--r--mysql-test/suite/perfschema/r/setup_objects.result207
-rw-r--r--mysql-test/suite/perfschema/r/short_option_1.result2
-rw-r--r--mysql-test/suite/perfschema/r/socket_connect.result177
-rw-r--r--mysql-test/suite/perfschema/r/socket_instances_func.result208
-rw-r--r--mysql-test/suite/perfschema/r/socket_instances_func_win.result144
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result121
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result205
-rw-r--r--mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result208
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_function.result34
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_global.result24
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_procedure.result42
-rw-r--r--mysql-test/suite/perfschema/r/stage_mdl_table.result37
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result120
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result120
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result120
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result120
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result126
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result112
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_digests.result92
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result112
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result58
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result58
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result108
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result108
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result119
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result122
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result128
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statement_class.result128
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result124
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result124
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result60
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result58
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result112
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result109
-rw-r--r--mysql-test/suite/perfschema/r/start_server_nothing.result251
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result94
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result68
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result108
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result123
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers2.result102
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_long_query.result12
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result1742
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result1741
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result1742
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result1741
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result1816
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result1853
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result1816
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result1853
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result1741
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result1742
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result1741
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result1742
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result1741
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result1780
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result1798
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result1780
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result1798
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result1780
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result1798
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result1780
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result1798
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result1744
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result1743
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result815
-rw-r--r--mysql-test/suite/perfschema/r/tampered_perfschema_table1.result2
-rw-r--r--mysql-test/suite/perfschema/r/temp_table_io.result118
-rw-r--r--mysql-test/suite/perfschema/r/threads_innodb.result14
-rw-r--r--mysql-test/suite/perfschema/r/threads_insert_delayed.result19
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql.result108
-rw-r--r--mysql-test/suite/perfschema/r/trigger_table_io.result205
-rw-r--r--mysql-test/suite/perfschema/r/view_table_io.result154
267 files changed, 116253 insertions, 497 deletions
diff --git a/mysql-test/suite/perfschema/r/aggregate.result b/mysql-test/suite/perfschema/r/aggregate.result
index edc7ce0bcca..ab927f544cf 100644
--- a/mysql-test/suite/perfschema/r/aggregate.result
+++ b/mysql-test/suite/perfschema/r/aggregate.result
@@ -4,6 +4,8 @@ update performance_schema.setup_instruments set enabled = 'NO';
update performance_schema.setup_consumers set enabled = 'NO';
truncate table performance_schema.file_summary_by_event_name;
truncate table performance_schema.file_summary_by_instance;
+truncate table performance_schema.socket_summary_by_event_name;
+truncate table performance_schema.socket_summary_by_instance;
truncate table performance_schema.events_waits_summary_global_by_event_name;
truncate table performance_schema.events_waits_summary_by_instance;
truncate table performance_schema.events_waits_summary_by_thread_by_event_name;
@@ -33,6 +35,20 @@ GROUP BY EVENT_NAME
HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
OR @dump_all;
EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
+SELECT EVENT_NAME, e.COUNT_READ, SUM(i.COUNT_READ)
+FROM performance_schema.socket_summary_by_event_name AS e
+JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.COUNT_READ <> SUM(i.COUNT_READ))
+OR @dump_all;
+EVENT_NAME COUNT_READ SUM(i.COUNT_READ)
+SELECT EVENT_NAME, e.COUNT_WRITE, SUM(i.COUNT_WRITE)
+FROM performance_schema.socket_summary_by_event_name AS e
+JOIN performance_schema.socket_summary_by_instance AS i USING (EVENT_NAME)
+GROUP BY EVENT_NAME
+HAVING (e.COUNT_WRITE <> SUM(i.COUNT_WRITE))
+OR @dump_all;
+EVENT_NAME COUNT_WRITE SUM(i.COUNT_WRITE)
SELECT EVENT_NAME, e.SUM_NUMBER_OF_BYTES_READ, SUM(i.SUM_NUMBER_OF_BYTES_READ)
FROM performance_schema.file_summary_by_event_name AS e
JOIN performance_schema.file_summary_by_instance AS i USING (EVENT_NAME)
diff --git a/mysql-test/suite/perfschema/r/all_instances.result b/mysql-test/suite/perfschema/r/all_instances.result
deleted file mode 100644
index caf4f49034f..00000000000
--- a/mysql-test/suite/perfschema/r/all_instances.result
+++ /dev/null
@@ -1,161 +0,0 @@
-use performance_schema;
-select name from mutex_instances
-where name not rlike '/(DEBUG_SYNC::mutex)$'
- and name != 'wait/synch/mutex/mysys/BITMAP::mutex'
- group by name;
-name
-wait/synch/mutex/archive/archive_mutex
-wait/synch/mutex/aria/LOCK_trn_list
-wait/synch/mutex/aria/PAGECACHE::cache_lock
-wait/synch/mutex/aria/SERVICE_THREAD_CONTROL::LOCK_control
-wait/synch/mutex/aria/THR_LOCK_maria
-wait/synch/mutex/aria/TRANSLOG_BUFFER::mutex
-wait/synch/mutex/aria/TRANSLOG_DESCRIPTOR::dirty_buffer_mask_lock
-wait/synch/mutex/aria/TRANSLOG_DESCRIPTOR::file_header_lock
-wait/synch/mutex/aria/TRANSLOG_DESCRIPTOR::log_flush_lock
-wait/synch/mutex/aria/TRANSLOG_DESCRIPTOR::purger_lock
-wait/synch/mutex/aria/TRANSLOG_DESCRIPTOR::unfinished_files_lock
-wait/synch/mutex/blackhole/blackhole
-wait/synch/mutex/csv/tina
-wait/synch/mutex/memory/HP_SHARE::intern_lock
-wait/synch/mutex/myisam/MYISAM_SHARE::intern_lock
-wait/synch/mutex/mysys/KEY_CACHE::cache_lock
-wait/synch/mutex/mysys/LOCK_alarm
-wait/synch/mutex/mysys/LOCK_uuid_generator
-wait/synch/mutex/mysys/my_thread_var::mutex
-wait/synch/mutex/mysys/THR_LOCK::mutex
-wait/synch/mutex/mysys/THR_LOCK_charset
-wait/synch/mutex/mysys/THR_LOCK_heap
-wait/synch/mutex/mysys/THR_LOCK_isam
-wait/synch/mutex/mysys/THR_LOCK_lock
-wait/synch/mutex/mysys/THR_LOCK_malloc
-wait/synch/mutex/mysys/THR_LOCK_myisam
-wait/synch/mutex/mysys/THR_LOCK_myisam_mmap
-wait/synch/mutex/mysys/THR_LOCK_net
-wait/synch/mutex/mysys/THR_LOCK_open
-wait/synch/mutex/mysys/THR_LOCK_threads
-wait/synch/mutex/mysys/TMPDIR_mutex
-wait/synch/mutex/sql/Cversion_lock
-wait/synch/mutex/sql/Event_scheduler::LOCK_scheduler_state
-wait/synch/mutex/sql/hash_filo::lock
-wait/synch/mutex/sql/LOCK_active_mi
-wait/synch/mutex/sql/LOCK_audit_mask
-wait/synch/mutex/sql/LOCK_commit_ordered
-wait/synch/mutex/sql/LOCK_connection_count
-wait/synch/mutex/sql/LOCK_crypt
-wait/synch/mutex/sql/LOCK_delayed_create
-wait/synch/mutex/sql/LOCK_delayed_insert
-wait/synch/mutex/sql/LOCK_delayed_status
-wait/synch/mutex/sql/LOCK_des_key_file
-wait/synch/mutex/sql/LOCK_error_log
-wait/synch/mutex/sql/LOCK_error_messages
-wait/synch/mutex/sql/LOCK_event_queue
-wait/synch/mutex/sql/LOCK_gdl
-wait/synch/mutex/sql/LOCK_global_index_stats
-wait/synch/mutex/sql/LOCK_global_system_variables
-wait/synch/mutex/sql/LOCK_global_table_stats
-wait/synch/mutex/sql/LOCK_global_user_client_stats
-wait/synch/mutex/sql/LOCK_open
-wait/synch/mutex/sql/LOCK_plugin
-wait/synch/mutex/sql/LOCK_prepared_stmt_count
-wait/synch/mutex/sql/LOCK_prepare_ordered
-wait/synch/mutex/sql/LOCK_rpl_status
-wait/synch/mutex/sql/LOCK_server_started
-wait/synch/mutex/sql/LOCK_slave_list
-wait/synch/mutex/sql/LOCK_stats
-wait/synch/mutex/sql/LOCK_status
-wait/synch/mutex/sql/LOCK_thread_count
-wait/synch/mutex/sql/LOCK_user_conn
-wait/synch/mutex/sql/LOCK_user_locks
-wait/synch/mutex/sql/LOCK_uuid_short_generator
-wait/synch/mutex/sql/LOCK_xid_cache
-wait/synch/mutex/sql/LOG::LOCK_log
-wait/synch/mutex/sql/LOG_INFO::lock
-wait/synch/mutex/sql/Master_info::data_lock
-wait/synch/mutex/sql/Master_info::run_lock
-wait/synch/mutex/sql/Master_info::sleep_lock
-wait/synch/mutex/sql/MDL_map::mutex
-wait/synch/mutex/sql/MDL_wait::LOCK_wait_status
-wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index
-wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index
-wait/synch/mutex/sql/Query_cache::structure_guard_mutex
-wait/synch/mutex/sql/Relay_log_info::data_lock
-wait/synch/mutex/sql/Relay_log_info::log_space_lock
-wait/synch/mutex/sql/Relay_log_info::run_lock
-wait/synch/mutex/sql/Relay_log_info::sleep_lock
-wait/synch/mutex/sql/Slave_reporting_capability::err_lock
-wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data
-wait/synch/mutex/sql/THD::LOCK_thd_data
-wait/synch/mutex/sql/THD::LOCK_wakeup_ready
-wait/synch/mutex/sql/tz_LOCK
-select name from rwlock_instances
-where name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock")
-group by name;
-name
-wait/synch/rwlock/aria/TRANSLOG_DESCRIPTOR::open_files_lock
-wait/synch/rwlock/myisam/MYISAM_SHARE::key_root_lock
-wait/synch/rwlock/myisam/MYISAM_SHARE::mmap_lock
-wait/synch/rwlock/mysys/SAFE_HASH::mutex
-wait/synch/rwlock/sql/LOCK_dboptions
-wait/synch/rwlock/sql/LOCK_grant
-wait/synch/rwlock/sql/LOCK_system_variables_hash
-wait/synch/rwlock/sql/LOCK_sys_init_connect
-wait/synch/rwlock/sql/LOCK_sys_init_slave
-wait/synch/rwlock/sql/LOGGER::LOCK_logger
-wait/synch/rwlock/sql/MDL_context::LOCK_waiting_for
-wait/synch/rwlock/sql/MDL_lock::rwlock
-wait/synch/rwlock/sql/THR_LOCK_servers
-wait/synch/rwlock/sql/THR_LOCK_udf
-select name from cond_instances where name not rlike '/(DEBUG_SYNC::cond)$' group by name;
-name
-wait/synch/cond/aria/SERVICE_THREAD_CONTROL::COND_control
-wait/synch/cond/aria/TRANSLOG_BUFFER::prev_sent_to_disk_cond
-wait/synch/cond/aria/TRANSLOG_BUFFER::waiting_filling_buffer
-wait/synch/cond/aria/TRANSLOG_DESCRIPTOR::log_flush_cond
-wait/synch/cond/aria/TRANSLOG_DESCRIPTOR::new_goal_cond
-wait/synch/cond/mysys/COND_alarm
-wait/synch/cond/mysys/my_thread_var::suspend
-wait/synch/cond/mysys/THR_COND_threads
-wait/synch/cond/sql/COND_flush_thread_cache
-wait/synch/cond/sql/COND_queue_state
-wait/synch/cond/sql/COND_rpl_status
-wait/synch/cond/sql/COND_server_started
-wait/synch/cond/sql/COND_thread_cache
-wait/synch/cond/sql/COND_thread_count
-wait/synch/cond/sql/Event_scheduler::COND_state
-wait/synch/cond/sql/Master_info::data_cond
-wait/synch/cond/sql/Master_info::sleep_cond
-wait/synch/cond/sql/Master_info::start_cond
-wait/synch/cond/sql/Master_info::stop_cond
-wait/synch/cond/sql/MDL_context::COND_wait_status
-wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy
-wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond
-wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy
-wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
-wait/synch/cond/sql/Query_cache::COND_cache_status_changed
-wait/synch/cond/sql/Relay_log_info::data_cond
-wait/synch/cond/sql/Relay_log_info::log_space_cond
-wait/synch/cond/sql/Relay_log_info::sleep_cond
-wait/synch/cond/sql/Relay_log_info::start_cond
-wait/synch/cond/sql/Relay_log_info::stop_cond
-wait/synch/cond/sql/THD::COND_wakeup_ready
-select event_name from file_instances group by event_name;
-event_name
-wait/io/file/aria/control
-wait/io/file/aria/translog
-wait/io/file/myisam/dfile
-wait/io/file/myisam/kfile
-wait/io/file/mysys/charset
-wait/io/file/sql/casetest
-wait/io/file/sql/dbopt
-wait/io/file/sql/ERRMSG
-wait/io/file/sql/FRM
-wait/io/file/sql/pid
-wait/io/file/sql/query_log
-wait/io/file/sql/slow_log
-select name from threads group by name;
-name
-thread/aria/checkpoint_background
-thread/sql/main
-thread/sql/one_connection
-thread/sql/signal_handler
diff --git a/mysql-test/suite/perfschema/r/all_tests.result b/mysql-test/suite/perfschema/r/all_tests.result
new file mode 100644
index 00000000000..3f413ca9a1e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/all_tests.result
@@ -0,0 +1,21 @@
+drop table if exists t1;
+drop table if exists t2;
+create table t1 (test_name text);
+create table t2 (test_name text);
+load data infile "<MYSQLTEST_VARDIR>/tmp/perfschema-all_tests.txt" into table t1;
+insert into t2 select concat('ddl_', table_name, '.test') from information_schema.tables
+where table_schema='performance_schema';
+insert into t2 select concat('dml_', table_name, '.test') from information_schema.tables
+where table_schema='performance_schema';
+update t2 set test_name= replace(test_name, "events_waits_summary_", "ews_");
+update t2 set test_name= replace(test_name, "events_stages_summary_", "esgs_");
+update t2 set test_name= replace(test_name, "events_statements_summary_", "esms_");
+update t2 set test_name= replace(test_name, "file_summary_", "fs_");
+update t2 set test_name= replace(test_name, "objects_summary_", "os_");
+update t2 set test_name= replace(test_name, "table_io_waits_summary_", "tiws_");
+update t2 set test_name= replace(test_name, "table_lock_waits_summary_", "tlws_");
+delete from t2 where t2.test_name in (select t1.test_name from t1);
+select test_name as `MISSING DDL/DML TESTS` from t2;
+MISSING DDL/DML TESTS
+drop table t1;
+drop table t2;
diff --git a/mysql-test/suite/perfschema/r/binlog_mix.result b/mysql-test/suite/perfschema/r/binlog_mix.result
index 97f76619619..1c639340b3b 100644
--- a/mysql-test/suite/perfschema/r/binlog_mix.result
+++ b/mysql-test/suite/perfschema/r/binlog_mix.result
@@ -24,8 +24,12 @@ drop table test.t2;
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
-show binlog events from <binlog_start>;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
@@ -40,3 +44,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/perfschema/r/binlog_row.result b/mysql-test/suite/perfschema/r/binlog_row.result
index 1bcdb4a6c58..6ef080663c7 100644
--- a/mysql-test/suite/perfschema/r/binlog_row.result
+++ b/mysql-test/suite/perfschema/r/binlog_row.result
@@ -24,8 +24,12 @@ drop table test.t2;
update performance_schema.setup_instruments set enabled='YES'
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
-show binlog events from <binlog_start>;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `t2` /* generated by server */
master-bin.000001 # Query # # use `test`; create table test.t1 (thread_id integer)
@@ -40,3 +44,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
+master-bin.000001 # Query # # BEGIN
+master-bin.000001 # Table_map # # table_id: # (performance_schema.setup_instruments)
+master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/perfschema/r/binlog_stmt.result b/mysql-test/suite/perfschema/r/binlog_stmt.result
index 1d18bd984b8..80c646abe46 100644
--- a/mysql-test/suite/perfschema/r/binlog_stmt.result
+++ b/mysql-test/suite/perfschema/r/binlog_stmt.result
@@ -20,14 +20,12 @@ insert into test.t1
select thread_id from performance_schema.events_waits_current;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
insert into test.t2
select name from performance_schema.setup_instruments
where name like "wait/synch/rwlock/sql/%"
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
-Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Mixing self-logging and non-self-logging engines in a statement is unsafe.
drop table test.t1;
drop table test.t2;
update performance_schema.setup_instruments set enabled='YES'
@@ -35,7 +33,7 @@ update performance_schema.setup_instruments set enabled='YES'
and name not in ("wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock");
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves.
-show binlog events from <binlog_start>;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; update performance_schema.setup_instruments set enabled='NO'
diff --git a/mysql-test/suite/perfschema/r/checksum.result b/mysql-test/suite/perfschema/r/checksum.result
index 587dead845a..f2a0f5a7713 100644
--- a/mysql-test/suite/perfschema/r/checksum.result
+++ b/mysql-test/suite/perfschema/r/checksum.result
@@ -1,34 +1,90 @@
+checksum table performance_schema.accounts;
checksum table performance_schema.cond_instances;
+checksum table performance_schema.events_stages_current;
+checksum table performance_schema.events_stages_history;
+checksum table performance_schema.events_stages_history_long;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name;
+checksum table performance_schema.events_stages_summary_by_thread_by_event_name;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name;
+checksum table performance_schema.events_stages_summary_global_by_event_name;
+checksum table performance_schema.events_statements_current;
+checksum table performance_schema.events_statements_history;
+checksum table performance_schema.events_statements_history_long;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name;
+checksum table performance_schema.events_statements_summary_by_thread_by_event_name;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name;
+checksum table performance_schema.events_statements_summary_global_by_event_name;
checksum table performance_schema.events_waits_current;
checksum table performance_schema.events_waits_history;
checksum table performance_schema.events_waits_history_long;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name;
checksum table performance_schema.events_waits_summary_by_instance;
checksum table performance_schema.events_waits_summary_by_thread_by_event_name;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name;
checksum table performance_schema.events_waits_summary_global_by_event_name;
checksum table performance_schema.file_instances;
checksum table performance_schema.file_summary_by_event_name;
checksum table performance_schema.file_summary_by_instance;
+checksum table performance_schema.hosts;
checksum table performance_schema.mutex_instances;
+checksum table performance_schema.objects_summary_global_by_type;
checksum table performance_schema.performance_timers;
checksum table performance_schema.rwlock_instances;
+checksum table performance_schema.setup_actors;
checksum table performance_schema.setup_consumers;
checksum table performance_schema.setup_instruments;
+checksum table performance_schema.setup_objects;
checksum table performance_schema.setup_timers;
+checksum table performance_schema.table_io_waits_summary_by_index_usage;
+checksum table performance_schema.table_io_waits_summary_by_table;
+checksum table performance_schema.table_lock_waits_summary_by_table;
checksum table performance_schema.threads;
+checksum table performance_schema.users;
+checksum table performance_schema.accounts extended;
checksum table performance_schema.cond_instances extended;
+checksum table performance_schema.events_stages_current extended;
+checksum table performance_schema.events_stages_history extended;
+checksum table performance_schema.events_stages_history_long extended;
+checksum table performance_schema.events_stages_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_host_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_stages_summary_by_user_by_event_name extended;
+checksum table performance_schema.events_stages_summary_global_by_event_name extended;
+checksum table performance_schema.events_statements_current extended;
+checksum table performance_schema.events_statements_history extended;
+checksum table performance_schema.events_statements_history_long extended;
+checksum table performance_schema.events_statements_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_host_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_statements_summary_by_user_by_event_name extended;
+checksum table performance_schema.events_statements_summary_global_by_event_name extended;
checksum table performance_schema.events_waits_current extended;
checksum table performance_schema.events_waits_history extended;
checksum table performance_schema.events_waits_history_long extended;
+checksum table performance_schema.events_waits_summary_by_account_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_host_by_event_name extended;
checksum table performance_schema.events_waits_summary_by_instance extended;
checksum table performance_schema.events_waits_summary_by_thread_by_event_name extended;
+checksum table performance_schema.events_waits_summary_by_user_by_event_name extended;
checksum table performance_schema.events_waits_summary_global_by_event_name extended;
checksum table performance_schema.file_instances extended;
checksum table performance_schema.file_summary_by_event_name extended;
checksum table performance_schema.file_summary_by_instance extended;
+checksum table performance_schema.hosts extended;
checksum table performance_schema.mutex_instances extended;
+checksum table performance_schema.objects_summary_global_by_type extended;
checksum table performance_schema.performance_timers extended;
checksum table performance_schema.rwlock_instances extended;
+checksum table performance_schema.setup_actors extended;
checksum table performance_schema.setup_consumers extended;
checksum table performance_schema.setup_instruments extended;
+checksum table performance_schema.setup_objects extended;
checksum table performance_schema.setup_timers extended;
+checksum table performance_schema.table_io_waits_summary_by_index_usage extended;
+checksum table performance_schema.table_io_waits_summary_by_table extended;
+checksum table performance_schema.table_lock_waits_summary_by_table extended;
checksum table performance_schema.threads extended;
+checksum table performance_schema.users extended;
diff --git a/mysql-test/suite/perfschema/r/column_privilege.result b/mysql-test/suite/perfschema/r/column_privilege.result
index aff5f3e6eee..b013ea3fcad 100644
--- a/mysql-test/suite/perfschema/r/column_privilege.result
+++ b/mysql-test/suite/perfschema/r/column_privilege.result
@@ -24,5 +24,3 @@ REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'pfs_user_5'@localhost;
DROP USER 'pfs_user_5'@localhost;
flush privileges;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
-UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE';
diff --git a/mysql-test/suite/perfschema/r/connection.result b/mysql-test/suite/perfschema/r/connection.result
new file mode 100644
index 00000000000..fe312f6fa04
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection.result
@@ -0,0 +1,875 @@
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1a" as status;
+status
+user1 in con1a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1b" as status;
+status
+user1 in con1b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1c" as status;
+status
+user1 in con1c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2a" as status;
+status
+user2 in con2a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2b" as status;
+status
+user2 in con2b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2c" as status;
+status
+user2 in con2c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3a" as status;
+status
+user3 in con3a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3b" as status;
+status
+user3 in con3b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3c" as status;
+status
+user3 in con3c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1a disconnected" as status;
+status
+con1a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 3 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 3 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2a disconnected" as status;
+status
+con2a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 2 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3a disconnected" as status;
+status
+con3a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 2 3
+user3 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4a" as status;
+status
+user4 in con4a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4b" as status;
+status
+user4 in con4b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4c" as status;
+status
+user4 in con4c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1b disconnected" as status;
+status
+con1b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 2 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2b disconnected" as status;
+status
+con2b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 1 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 1 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3b disconnected" as status;
+status
+con3b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 1 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 1 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1c disconnected" as status;
+status
+con1c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 1 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 1 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2c disconnected" as status;
+status
+con2c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 0 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3c disconnected" as status;
+status
+con3c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 0 2
+user3 localhost 0 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 0 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 0 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5a" as status;
+status
+user5 in con5a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5b" as status;
+status
+user5 in con5b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5c" as status;
+status
+user5 in con5c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
+status
+con 5a, 5b, 5c, 6a, 6b, 6c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 0 3
+user5 localhost 0 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 0 3
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 0 3
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
diff --git a/mysql-test/suite/perfschema/r/connection_3a.result b/mysql-test/suite/perfschema/r/connection_3a.result
new file mode 100644
index 00000000000..1f92d67137d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection_3a.result
@@ -0,0 +1,820 @@
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1a" as status;
+status
+user1 in con1a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1b" as status;
+status
+user1 in con1b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1c" as status;
+status
+user1 in con1c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2a" as status;
+status
+user2 in con2a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2b" as status;
+status
+user2 in con2b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2c" as status;
+status
+user2 in con2c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3a" as status;
+status
+user3 in con3a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3b" as status;
+status
+user3 in con3b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user3 in con3c" as status;
+status
+user3 in con3c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+user2 3 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1a disconnected" as status;
+status
+con1a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 3 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2a disconnected" as status;
+status
+con2a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3a disconnected" as status;
+status
+con3a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+user2 2 3
+user3 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4a" as status;
+status
+user4 in con4a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4b" as status;
+status
+user4 in con4b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user4 in con4c" as status;
+status
+user4 in con4c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+user2 2 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1b disconnected" as status;
+status
+con1b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 2 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2b disconnected" as status;
+status
+con2b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 1 2
+user3 2 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3b disconnected" as status;
+status
+con3b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+user2 1 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con1c disconnected" as status;
+status
+con1c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 1 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con2c disconnected" as status;
+status
+con2c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 1 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con3c disconnected" as status;
+status
+con3c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 0 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+user2 0 2
+user3 0 2
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5a" as status;
+status
+user5 in con5a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5b" as status;
+status
+user5 in con5b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user5 in con5c" as status;
+status
+user5 in con5c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 3 3
+user5 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
+status
+con 5a, 5b, 5c, 6a, 6b, 6c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 0 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 0 3
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user4 0 3
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
diff --git a/mysql-test/suite/perfschema/r/connection_3a_3u.result b/mysql-test/suite/perfschema/r/connection_3a_3u.result
new file mode 100644
index 00000000000..0a6229d9f93
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection_3a_3u.result
@@ -0,0 +1,762 @@
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1a" as status;
+status
+user1 in con1a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1b" as status;
+status
+user1 in con1b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1c" as status;
+status
+user1 in con1c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2a" as status;
+status
+user2 in con2a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 1
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 1
+select "user2 in con2b" as status;
+status
+user2 in con2b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 2
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "user2 in con2c" as status;
+status
+user2 in con2c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 3
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user3 in con3a" as status;
+status
+user3 in con3a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 4
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 4
+select "user3 in con3b" as status;
+status
+user3 in con3b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 5
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 5
+select "user3 in con3c" as status;
+status
+user3 in con3c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+select "con1a disconnected" as status;
+status
+con1a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+select "con2a disconnected" as status;
+status
+con2a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+select "con3a disconnected" as status;
+status
+con3a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 6
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 6
+select "user4 in con4a" as status;
+status
+user4 in con4a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 7
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 7
+select "user4 in con4b" as status;
+status
+user4 in con4b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 8
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 8
+select "user4 in con4c" as status;
+status
+user4 in con4c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con1b disconnected" as status;
+status
+con1b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con2b disconnected" as status;
+status
+con2b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con3b disconnected" as status;
+status
+con3b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con1c disconnected" as status;
+status
+con1c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con2c disconnected" as status;
+status
+con2c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con3c disconnected" as status;
+status
+con3c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "user5 in con5a" as status;
+status
+user5 in con5a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "user5 in con5b" as status;
+status
+user5 in con5b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "user5 in con5c" as status;
+status
+user5 in con5c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
+status
+con 5a, 5b, 5c, 6a, 6b, 6c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user5 localhost 0 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 9
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 9
diff --git a/mysql-test/suite/perfschema/r/connection_3u.result b/mysql-test/suite/perfschema/r/connection_3u.result
new file mode 100644
index 00000000000..f0606301532
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/connection_3u.result
@@ -0,0 +1,817 @@
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1a" as status;
+status
+user1 in con1a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1b" as status;
+status
+user1 in con1b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user1 in con1c" as status;
+status
+user1 in con1c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 0
+select "user2 in con2a" as status;
+status
+user2 in con2a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 1
+select "user2 in con2b" as status;
+status
+user2 in con2b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 1
+select "user2 in con2c" as status;
+status
+user2 in con2c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 1
+select "user3 in con3a" as status;
+status
+user3 in con3a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "user3 in con3b" as status;
+status
+user3 in con3b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "user3 in con3c" as status;
+status
+user3 in con3c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 3 3
+user2 localhost 3 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "con1a disconnected" as status;
+status
+con1a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 3 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "con2a disconnected" as status;
+status
+con2a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 2 3
+user3 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "con3a disconnected" as status;
+status
+con3a disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 3
+user2 localhost 2 3
+user3 localhost 2 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 2
+select "user4 in con4a" as status;
+status
+user4 in con4a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 8
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user4 in con4b" as status;
+status
+user4 in con4b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 9
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user4 in con4c" as status;
+status
+user4 in con4c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 2 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 10 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con1b disconnected" as status;
+status
+con1b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 2 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 9 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con2b disconnected" as status;
+status
+con2b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 1 2
+user3 localhost 2 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 8 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con3b disconnected" as status;
+status
+con3b disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user1 localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 2
+user2 localhost 1 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con1c disconnected" as status;
+status
+con1c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user2 localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 1 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con2c disconnected" as status;
+status
+con2c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user3 localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 0 2
+user3 localhost 1 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con3c disconnected" as status;
+status
+con3c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 2
+user2 localhost 0 2
+user3 localhost 0 2
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 10
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user5 in con5a" as status;
+status
+user5 in con5a
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user5 in con5b" as status;
+status
+user5 in con5b
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 2 2
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 2 2
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 6 6
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "user5 in con5c" as status;
+status
+user5 in con5c
+call dump_all();
+processlist_user processlist_host
+root localhost
+user4 localhost
+user4 localhost
+user4 localhost
+user5 localhost
+user5 localhost
+user5 localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 3 3
+user5 localhost 3 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 3 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 7 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+select "con 5a, 5b, 5c, 6a, 6b, 6c disconnected" as status;
+status
+con 5a, 5b, 5c, 6a, 6b, 6c disconnected
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user4 localhost 0 3
+user5 localhost 0 3
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 7
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.hosts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user5 0 3
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.users;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
+truncate table performance_schema.accounts;
+call dump_all();
+processlist_user processlist_host
+root localhost
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+variable_name variable_value
+PERFORMANCE_SCHEMA_ACCOUNTS_LOST 0
+PERFORMANCE_SCHEMA_HOSTS_LOST 0
+PERFORMANCE_SCHEMA_USERS_LOST 3
diff --git a/mysql-test/suite/perfschema/r/csv_table_io.result b/mysql-test/suite/perfschema/r/csv_table_io.result
new file mode 100644
index 00000000000..d5b39a2d90c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/csv_table_io.result
@@ -0,0 +1,145 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = CSV;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=CSV DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note The storage engine for the table doesn't support optimize
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/ddl_accounts.result b/mysql-test/suite/perfschema/r/ddl_accounts.result
new file mode 100644
index 00000000000..4884f053df1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_accounts.result
@@ -0,0 +1,8 @@
+alter table performance_schema.accounts
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.accounts;
+ALTER TABLE performance_schema.accounts ADD INDEX test_index(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.accounts(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esgs_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esgs_by_account_by_event_name.result
new file mode 100644
index 00000000000..449a19e5310
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_by_account_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_stages_summary_by_account_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_by_account_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_by_account_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_by_account_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esgs_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esgs_by_host_by_event_name.result
new file mode 100644
index 00000000000..4760dbda8d3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_by_host_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_stages_summary_by_host_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_by_host_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_by_host_by_event_name
+ADD INDEX test_index(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_by_host_by_event_name(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result
new file mode 100644
index 00000000000..0e070125daa
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_by_thread_by_event_name.result
@@ -0,0 +1,9 @@
+alter table performance_schema.events_stages_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_by_thread_by_event_name(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esgs_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esgs_by_user_by_event_name.result
new file mode 100644
index 00000000000..1d797234bcb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_by_user_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_stages_summary_by_user_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_by_user_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_by_user_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_by_user_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result
new file mode 100644
index 00000000000..0959af39d77
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esgs_global_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_stages_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_summary_global_by_event_name;
+ALTER TABLE performance_schema.events_stages_summary_global_by_event_name
+ADD INDEX test_index(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_stages_summary_global_by_event_name(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esms_by_account_by_event_name.result
new file mode 100644
index 00000000000..732f52d3fb7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_account_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_statements_summary_by_account_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_account_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_by_account_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_account_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_digest.result b/mysql-test/suite/perfschema/r/ddl_esms_by_digest.result
new file mode 100644
index 00000000000..2a2d0b12285
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_digest.result
@@ -0,0 +1,9 @@
+alter table performance_schema.events_statements_summary_by_digest
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_digest;
+ALTER TABLE performance_schema.events_statements_summary_by_digest ADD INDEX test_index(DIGEST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_digest(DIGEST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esms_by_host_by_event_name.result
new file mode 100644
index 00000000000..efedfe2e1e0
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_host_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_statements_summary_by_host_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_host_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_by_host_by_event_name
+ADD INDEX test_index(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_host_by_event_name(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result
new file mode 100644
index 00000000000..edd03d38c67
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_thread_by_event_name.result
@@ -0,0 +1,9 @@
+alter table performance_schema.events_statements_summary_by_thread_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_thread_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_by_thread_by_event_name ADD INDEX test_index(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_thread_by_event_name(THREAD_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esms_by_user_by_event_name.result
new file mode 100644
index 00000000000..0334e578019
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_by_user_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_statements_summary_by_user_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_by_user_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_by_user_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_by_user_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result
new file mode 100644
index 00000000000..d2491c67783
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_esms_global_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_statements_summary_global_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_summary_global_by_event_name;
+ALTER TABLE performance_schema.events_statements_summary_global_by_event_name
+ADD INDEX test_index(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_statements_summary_global_by_event_name(EVENT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_current.result b/mysql-test/suite/perfschema/r/ddl_events_stages_current.result
new file mode 100644
index 00000000000..d9094ffb366
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_current.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_current add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_current;
+ALTER TABLE performance_schema.events_stages_current ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_current(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_history.result b/mysql-test/suite/perfschema/r/ddl_events_stages_history.result
new file mode 100644
index 00000000000..0b6d6df06d2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_history add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_history;
+ALTER TABLE performance_schema.events_stages_history ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result b/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
new file mode 100644
index 00000000000..7843f61aa0d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_stages_history_long.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_stages_history_long add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_stages_history_long;
+ALTER TABLE performance_schema.events_stages_history_long ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_stages_history_long(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_statements_current.result b/mysql-test/suite/perfschema/r/ddl_events_statements_current.result
new file mode 100644
index 00000000000..bf458ab5fca
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_current.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_current add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_current;
+ALTER TABLE performance_schema.events_statements_current ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_current(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_statements_history.result b/mysql-test/suite/perfschema/r/ddl_events_statements_history.result
new file mode 100644
index 00000000000..1ef7f6c8463
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_history.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_history add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_history;
+ALTER TABLE performance_schema.events_statements_history ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result b/mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result
new file mode 100644
index 00000000000..e3f75681c62
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_events_statements_history_long.result
@@ -0,0 +1,7 @@
+alter table performance_schema.events_statements_history_long add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_statements_history_long;
+ALTER TABLE performance_schema.events_statements_history_long ADD INDEX test_index(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.events_statements_history_long(EVENT_ID);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ews_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ews_by_account_by_event_name.result
new file mode 100644
index 00000000000..2b50cd10868
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ews_by_account_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_waits_summary_by_account_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_waits_summary_by_account_by_event_name;
+ALTER TABLE performance_schema.events_waits_summary_by_account_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_waits_summary_by_account_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ews_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ews_by_host_by_event_name.result
new file mode 100644
index 00000000000..5f1886b5bb8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ews_by_host_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_waits_summary_by_host_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_waits_summary_by_host_by_event_name;
+ALTER TABLE performance_schema.events_waits_summary_by_host_by_event_name
+ADD INDEX test_index(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_waits_summary_by_host_by_event_name(HOSTNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_ews_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_ews_by_user_by_event_name.result
new file mode 100644
index 00000000000..1ed4a8ef36d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_ews_by_user_by_event_name.result
@@ -0,0 +1,10 @@
+alter table performance_schema.events_waits_summary_by_user_by_event_name
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.events_waits_summary_by_user_by_event_name;
+ALTER TABLE performance_schema.events_waits_summary_by_user_by_event_name
+ADD INDEX test_index(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.events_waits_summary_by_user_by_event_name(USERNAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_host_cache.result b/mysql-test/suite/perfschema/r/ddl_host_cache.result
new file mode 100644
index 00000000000..0f938b5fc88
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_host_cache.result
@@ -0,0 +1,7 @@
+alter table performance_schema.host_cache add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.host_cache;
+ALTER TABLE performance_schema.host_cache ADD INDEX test_index(IP);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.host_cache(IP);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_hosts.result b/mysql-test/suite/perfschema/r/ddl_hosts.result
new file mode 100644
index 00000000000..3a84c9d0fd2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_hosts.result
@@ -0,0 +1,8 @@
+alter table performance_schema.hosts
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.hosts;
+ALTER TABLE performance_schema.hosts ADD INDEX test_index(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.hosts(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_os_global_by_type.result b/mysql-test/suite/perfschema/r/ddl_os_global_by_type.result
new file mode 100644
index 00000000000..66e3379191d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_os_global_by_type.result
@@ -0,0 +1,10 @@
+alter table performance_schema.objects_summary_global_by_type
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.objects_summary_global_by_type;
+ALTER TABLE performance_schema.objects_summary_global_by_type
+ADD INDEX test_index(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index
+ON performance_schema.objects_summary_global_by_type(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_setup_actors.result b/mysql-test/suite/perfschema/r/ddl_setup_actors.result
new file mode 100644
index 00000000000..753632eb62d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_setup_actors.result
@@ -0,0 +1,16 @@
+alter table performance_schema.setup_actors add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+drop table if exists test.setup_actors;
+create table test.setup_actors as
+select * from performance_schema.setup_actors;
+truncate table performance_schema.setup_actors;
+select count(*) from performance_schema.setup_actors;
+count(*)
+0
+insert into performance_schema.setup_actors
+select * from test.setup_actors;
+drop table test.setup_actors;
+ALTER TABLE performance_schema.setup_actors ADD INDEX test_index(HOST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.setup_actors(HOST);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_setup_objects.result b/mysql-test/suite/perfschema/r/ddl_setup_objects.result
new file mode 100644
index 00000000000..60eeecdeccf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_setup_objects.result
@@ -0,0 +1,16 @@
+alter table performance_schema.setup_objects add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+drop table if exists test.setup_objects;
+create table test.setup_objects as
+select * from performance_schema.setup_objects;
+truncate table performance_schema.setup_objects;
+select count(*) from performance_schema.setup_objects;
+count(*)
+0
+insert into performance_schema.setup_objects
+select * from test.setup_objects;
+drop table test.setup_objects;
+ALTER TABLE performance_schema.setup_objects ADD INDEX test_index(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.setup_objects(OBJECT_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_socket_instances.result b/mysql-test/suite/perfschema/r/ddl_socket_instances.result
new file mode 100644
index 00000000000..b9dfd63bad1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_socket_instances.result
@@ -0,0 +1,8 @@
+alter table performance_schema.socket_instances add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.socket_instances;
+ERROR HY000: Invalid performance_schema usage.
+ALTER TABLE performance_schema.socket_instances ADD INDEX test_index(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.socket_instances(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_socket_summary_by_event_name.result b/mysql-test/suite/perfschema/r/ddl_socket_summary_by_event_name.result
new file mode 100644
index 00000000000..64e1f280675
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_socket_summary_by_event_name.result
@@ -0,0 +1,7 @@
+alter table performance_schema.socket_summary_by_instance add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.socket_summary_by_instance;
+ALTER TABLE performance_schema.socket_summary_by_instance ADD INDEX test_index(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.socket_summary_by_instance(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_socket_summary_by_instance.result b/mysql-test/suite/perfschema/r/ddl_socket_summary_by_instance.result
new file mode 100644
index 00000000000..64e1f280675
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_socket_summary_by_instance.result
@@ -0,0 +1,7 @@
+alter table performance_schema.socket_summary_by_instance add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.socket_summary_by_instance;
+ALTER TABLE performance_schema.socket_summary_by_instance ADD INDEX test_index(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.socket_summary_by_instance(FILE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_threads.result b/mysql-test/suite/perfschema/r/ddl_threads.result
index 9d949e0920f..0856dedbaee 100644
--- a/mysql-test/suite/perfschema/r/ddl_threads.result
+++ b/mysql-test/suite/perfschema/r/ddl_threads.result
@@ -2,7 +2,7 @@ alter table performance_schema.threads add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.threads;
ERROR HY000: Invalid performance_schema usage.
-ALTER TABLE performance_schema.threads ADD INDEX test_index(ID);
+ALTER TABLE performance_schema.threads ADD INDEX test_index(PROCESSLIST_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
-CREATE UNIQUE INDEX test_index ON performance_schema.threads(ID);
+CREATE UNIQUE INDEX test_index ON performance_schema.threads(PROCESSLIST_ID);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_tiws_by_index_usage.result b/mysql-test/suite/perfschema/r/ddl_tiws_by_index_usage.result
new file mode 100644
index 00000000000..bc002515f42
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_tiws_by_index_usage.result
@@ -0,0 +1,8 @@
+alter table performance_schema.table_io_waits_summary_by_index_usage
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.table_io_waits_summary_by_index_usage;
+ALTER TABLE performance_schema.table_io_waits_summary_by_index_usage ADD INDEX test_index(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.table_io_waits_summary_by_index_usage(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_tiws_by_table.result b/mysql-test/suite/perfschema/r/ddl_tiws_by_table.result
new file mode 100644
index 00000000000..6f2d3329a96
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_tiws_by_table.result
@@ -0,0 +1,8 @@
+alter table performance_schema.table_io_waits_summary_by_table
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.table_io_waits_summary_by_table;
+ALTER TABLE performance_schema.table_io_waits_summary_by_table ADD INDEX test_index(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.table_io_waits_summary_by_table(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_tlws_by_table.result b/mysql-test/suite/perfschema/r/ddl_tlws_by_table.result
new file mode 100644
index 00000000000..b7312191c86
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_tlws_by_table.result
@@ -0,0 +1,8 @@
+alter table performance_schema.table_lock_waits_summary_by_table
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.table_lock_waits_summary_by_table;
+ALTER TABLE performance_schema.table_lock_waits_summary_by_table ADD INDEX test_index(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.table_lock_waits_summary_by_table(TABLE_NAME);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/ddl_users.result b/mysql-test/suite/perfschema/r/ddl_users.result
new file mode 100644
index 00000000000..907710bb3b2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_users.result
@@ -0,0 +1,8 @@
+alter table performance_schema.users
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.users;
+ALTER TABLE performance_schema.users ADD INDEX test_index(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE UNIQUE INDEX test_index ON performance_schema.users(CURRENT_CONNECTIONS);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result
new file mode 100644
index 00000000000..2ae455f3d3a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result
@@ -0,0 +1,94 @@
+####################################
+# SETUP
+####################################
+CREATE DATABASE statements_digest;
+USE statements_digest;
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int, b int);
+CREATE TABLE t4(a int, b int);
+CREATE TABLE t5(a int, b int, c int);
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+####################################
+# EXECUTION
+####################################
+SELECT 1 FROM t1;
+1
+SELECT 1 FROM `t1`;
+1
+SELECT 1,2 FROM t1;
+1 2
+SELECT 1, 2, 3, 4 FROM t1;
+1 2 3 4
+SELECT 1 FROM t2;
+1
+SELECT 1,2 FROM t2;
+1 2
+SELECT 1, 2, 3, 4 FROM t2;
+1 2 3 4
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t4 VALUES (1, 2);
+INSERT INTO t5 VALUES (1, 2, 3);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
+INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+SELECT 1 + 1;
+1 + 1
+2
+SELECT 1;
+1
+1
+SELECT 1 /* This is an inline comment */ + 1;
+1 /* This is an inline comment */ + 1
+2
+SELECT 1+
+/*
+this is a
+multiple-line comment
+*/
+1;
+1+
+/*
+this is a
+multiple-line comment
+*/
+1
+2
+CREATE SCHEMA statements_digest_temp;
+DROP SCHEMA statements_digest_temp;
+CREATE DATABASE statements_digest_temp;
+DROP DATABASE statements_digest_temp;
+SELECT 1 from t11;
+ERROR 42S02: Table 'statements_digest.t11' doesn't exist
+create table t11 (c char(4));
+create table t11 (c char(4));
+ERROR 42S01: Table 't11' already exists
+insert into t11 values("MySQL");
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
+DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+NULL NULL 29 21 1 2
+dee8f4f04e57a5e456c31892855e6835 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+SHOW VARIABLES LIKE "performance_schema_digests_size";
+Variable_name Value
+performance_schema_digests_size 2
+SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
+COUNT(*)
+2
+####################################
+# CLEANUP
+####################################
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP TABLE IF EXISTS t5;
+DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/dml_accounts.result b/mysql-test/suite/perfschema/r/dml_accounts.result
new file mode 100644
index 00000000000..cbf9491f806
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_accounts.result
@@ -0,0 +1,25 @@
+select * from performance_schema.accounts
+limit 1;
+select * from performance_schema.accounts
+where user='FOO' or host='BAR';
+insert into performance_schema.accounts
+set user='FOO', host='BAR',
+current_connections=1, total_connections=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'accounts'
+update performance_schema.accounts
+set current_connections=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'accounts'
+update performance_schema.accounts
+set current_connections=12 where host like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'accounts'
+delete from performance_schema.accounts
+where total_connections=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'accounts'
+delete from performance_schema.accounts;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'accounts'
+LOCK TABLES performance_schema.accounts READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.accounts WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'accounts'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_cond_instances.result b/mysql-test/suite/perfschema/r/dml_cond_instances.result
index 5cd04127700..0b7d4e7188e 100644
--- a/mysql-test/suite/perfschema/r/dml_cond_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_cond_instances.result
@@ -13,8 +13,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'cond_in
delete from performance_schema.cond_instances;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'cond_instances'
LOCK TABLES performance_schema.cond_instances READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
UNLOCK TABLES;
LOCK TABLES performance_schema.cond_instances WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'cond_instances'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result
new file mode 100644
index 00000000000..7157e18bdfd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_account_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_stages_summary_by_account_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_by_account_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_by_account_by_event_name
+set event_name='FOO', user='BAR', host='BAZ',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+update performance_schema.events_stages_summary_by_account_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+update performance_schema.events_stages_summary_by_account_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+delete from performance_schema.events_stages_summary_by_account_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+delete from performance_schema.events_stages_summary_by_account_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_by_account_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_by_account_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_account_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result
new file mode 100644
index 00000000000..7a157ead3c9
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_host_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_stages_summary_by_host_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_by_host_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_by_host_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+update performance_schema.events_stages_summary_by_host_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+update performance_schema.events_stages_summary_by_host_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+delete from performance_schema.events_stages_summary_by_host_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+delete from performance_schema.events_stages_summary_by_host_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_by_host_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_by_host_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_host_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
new file mode 100644
index 00000000000..18b6214213a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_thread_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+update performance_schema.events_stages_summary_by_thread_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+update performance_schema.events_stages_summary_by_thread_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+delete from performance_schema.events_stages_summary_by_thread_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+delete from performance_schema.events_stages_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_thread_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result
new file mode 100644
index 00000000000..0ff678ca5a4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esgs_by_user_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_stages_summary_by_user_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_by_user_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_by_user_by_event_name
+set event_name='FOO', user='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+update performance_schema.events_stages_summary_by_user_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+update performance_schema.events_stages_summary_by_user_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+delete from performance_schema.events_stages_summary_by_user_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+delete from performance_schema.events_stages_summary_by_user_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_by_user_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_by_user_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_by_user_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
new file mode 100644
index 00000000000..07e127679b9
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esgs_global_by_event_name.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_stages_summary_global_by_event_name
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_stages_summary_global_by_event_name
+set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+update performance_schema.events_stages_summary_global_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+update performance_schema.events_stages_summary_global_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+delete from performance_schema.events_stages_summary_global_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+delete from performance_schema.events_stages_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_summary_global_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result
new file mode 100644
index 00000000000..57a9cd695dd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_account_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_statements_summary_by_account_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_by_account_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_by_account_by_event_name
+set event_name='FOO', user='BAR', host='BAZ',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+update performance_schema.events_statements_summary_by_account_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+update performance_schema.events_statements_summary_by_account_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+delete from performance_schema.events_statements_summary_by_account_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+delete from performance_schema.events_statements_summary_by_account_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_by_account_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_account_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_account_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_digest.result b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
new file mode 100644
index 00000000000..032c19112e1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_digest.result
@@ -0,0 +1,27 @@
+select * from performance_schema.events_statements_summary_by_digest
+where digest like 'XXYYZZ%' limit 1;
+DIGEST DIGEST_TEXT COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED FIRST_SEEN LAST_SEEN
+select * from performance_schema.events_statements_summary_by_digest
+where digest='XXYYZZ';
+DIGEST DIGEST_TEXT COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED FIRST_SEEN LAST_SEEN
+insert into performance_schema.events_statements_summary_by_digest
+set digest='XXYYZZ', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+update performance_schema.events_statements_summary_by_digest
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+update performance_schema.events_statements_summary_by_digest
+set count_star=12 where digest like "XXYYZZ";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+delete from performance_schema.events_statements_summary_by_digest
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+delete from performance_schema.events_statements_summary_by_digest;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+LOCK TABLES performance_schema.events_statements_summary_by_digest READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_digest WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_digest'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result
new file mode 100644
index 00000000000..d98f6a7e0d6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_host_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_statements_summary_by_host_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_by_host_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_by_host_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+update performance_schema.events_statements_summary_by_host_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+update performance_schema.events_statements_summary_by_host_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+delete from performance_schema.events_statements_summary_by_host_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+delete from performance_schema.events_statements_summary_by_host_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_by_host_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_host_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_host_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
new file mode 100644
index 00000000000..9573798349c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_thread_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_by_thread_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+update performance_schema.events_statements_summary_by_thread_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+update performance_schema.events_statements_summary_by_thread_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+delete from performance_schema.events_statements_summary_by_thread_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+delete from performance_schema.events_statements_summary_by_thread_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_thread_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_thread_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result
new file mode 100644
index 00000000000..950af5ca8b7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_by_user_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.events_statements_summary_by_user_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_by_user_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_by_user_by_event_name
+set event_name='FOO', user='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+update performance_schema.events_statements_summary_by_user_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+update performance_schema.events_statements_summary_by_user_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+delete from performance_schema.events_statements_summary_by_user_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+delete from performance_schema.events_statements_summary_by_user_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_by_user_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_by_user_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
new file mode 100644
index 00000000000..e5623ed131d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_esms_global_by_event_name.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_statements_summary_global_by_event_name
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_summary_global_by_event_name
+where event_name='FOO';
+insert into performance_schema.events_statements_summary_global_by_event_name
+set event_name='FOO', count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+update performance_schema.events_statements_summary_global_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+update performance_schema.events_statements_summary_global_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+delete from performance_schema.events_statements_summary_global_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+delete from performance_schema.events_statements_summary_global_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_summary_global_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_summary_global_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_current.result b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
new file mode 100644
index 00000000000..7d0c3bed19c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_current.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_stages_current
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_current
+where event_name='FOO';
+insert into performance_schema.events_stages_current
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_current'
+update performance_schema.events_stages_current
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+update performance_schema.events_stages_current
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_current'
+delete from performance_schema.events_stages_current
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+delete from performance_schema.events_stages_current;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_current'
+LOCK TABLES performance_schema.events_stages_current READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_current WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_current'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history.result b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
new file mode 100644
index 00000000000..66047e9615b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_history
+where event_name='FOO';
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' order by timer_wait limit 1;
+select * from performance_schema.events_stages_history
+where event_name like 'stage/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_stages_history
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history'
+update performance_schema.events_stages_history
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+update performance_schema.events_stages_history
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history'
+delete from performance_schema.events_stages_history
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+delete from performance_schema.events_stages_history;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history'
+LOCK TABLES performance_schema.events_stages_history READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_history WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
new file mode 100644
index 00000000000..da1fae71aa5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_stages_history_long.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' limit 1;
+select * from performance_schema.events_stages_history_long
+where event_name='FOO';
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' order by timer_wait limit 1;
+select * from performance_schema.events_stages_history_long
+where event_name like 'stage/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_stages_history_long
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+update performance_schema.events_stages_history_long
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+update performance_schema.events_stages_history_long
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+delete from performance_schema.events_stages_history_long
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+delete from performance_schema.events_stages_history_long;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+LOCK TABLES performance_schema.events_stages_history_long READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_stages_history_long WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_stages_history_long'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_current.result b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
new file mode 100644
index 00000000000..af18f0bba79
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_current.result
@@ -0,0 +1,25 @@
+select * from performance_schema.events_statements_current
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_current
+where event_name='FOO';
+insert into performance_schema.events_statements_current
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_current'
+update performance_schema.events_statements_current
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+update performance_schema.events_statements_current
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_current'
+delete from performance_schema.events_statements_current
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+delete from performance_schema.events_statements_current;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_current'
+LOCK TABLES performance_schema.events_statements_current READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_current WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_current'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history.result b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
new file mode 100644
index 00000000000..3f24f94196e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_history
+where event_name='FOO';
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' order by timer_wait limit 1;
+select * from performance_schema.events_statements_history
+where event_name like 'statement/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_statements_history
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history'
+update performance_schema.events_statements_history
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+update performance_schema.events_statements_history
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history'
+delete from performance_schema.events_statements_history
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+delete from performance_schema.events_statements_history;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history'
+LOCK TABLES performance_schema.events_statements_history READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_history WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
new file mode 100644
index 00000000000..88634e93bb5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_events_statements_history_long.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' limit 1;
+select * from performance_schema.events_statements_history_long
+where event_name='FOO';
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' order by timer_wait limit 1;
+select * from performance_schema.events_statements_history_long
+where event_name like 'statement/%' order by timer_wait desc limit 1;
+insert into performance_schema.events_statements_history_long
+set thread_id='1', event_id=1,
+event_name='FOO', timer_start=1, timer_end=2, timer_wait=3;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+update performance_schema.events_statements_history_long
+set timer_start=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+update performance_schema.events_statements_history_long
+set timer_start=12 where thread_id=0;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+delete from performance_schema.events_statements_history_long
+where thread_id=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+delete from performance_schema.events_statements_history_long;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+LOCK TABLES performance_schema.events_statements_history_long READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_statements_history_long WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_statements_history_long'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_current.result b/mysql-test/suite/perfschema/r/dml_events_waits_current.result
index 66ff929e79b..53e2bc02bbb 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_current.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_current.result
@@ -18,8 +18,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_current;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_current'
LOCK TABLES performance_schema.events_waits_current READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_current WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_history.result b/mysql-test/suite/perfschema/r/dml_events_waits_history.result
index ba883c9552a..4beb51aeaf5 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_history.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_history.result
@@ -22,8 +22,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_history;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history'
LOCK TABLES performance_schema.events_waits_history READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_history WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result b/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
index 408368ca77c..13571fbf513 100644
--- a/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
+++ b/mysql-test/suite/perfschema/r/dml_events_waits_history_long.result
@@ -22,8 +22,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_history_long;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_history_long'
LOCK TABLES performance_schema.events_waits_history_long READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_history_long WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_history_long'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result
new file mode 100644
index 00000000000..a4808251228
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_account_by_event_name.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_waits_summary_by_account_by_event_name
+where event_name like 'Wait/Synch/%' limit 1;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+select * from performance_schema.events_waits_summary_by_account_by_event_name
+where event_name='FOO';
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+insert into performance_schema.events_waits_summary_by_account_by_event_name
+set event_name='FOO', user='BAR', host='BAZ',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+update performance_schema.events_waits_summary_by_account_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+update performance_schema.events_waits_summary_by_account_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+delete from performance_schema.events_waits_summary_by_account_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+delete from performance_schema.events_waits_summary_by_account_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+LOCK TABLES performance_schema.events_waits_summary_by_account_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_waits_summary_by_account_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_account_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result
new file mode 100644
index 00000000000..2a250eee5a5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_host_by_event_name.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_waits_summary_by_host_by_event_name
+where event_name like 'Wait/Synch/%' limit 1;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # #
+select * from performance_schema.events_waits_summary_by_host_by_event_name
+where event_name='FOO';
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+insert into performance_schema.events_waits_summary_by_host_by_event_name
+set event_name='FOO', thread_id=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+update performance_schema.events_waits_summary_by_host_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+update performance_schema.events_waits_summary_by_host_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+delete from performance_schema.events_waits_summary_by_host_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+delete from performance_schema.events_waits_summary_by_host_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+LOCK TABLES performance_schema.events_waits_summary_by_host_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_waits_summary_by_host_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_host_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_instance.result b/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
index 0c95c61fd08..17619918b01 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_instance.result
@@ -27,8 +27,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_summary_by_instance;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
LOCK TABLES performance_schema.events_waits_summary_by_instance READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_instance WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_instance'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
index 27f8b5644fd..879abf90f4b 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_thread_by_event_name.result
@@ -19,8 +19,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_summary_by_thread_by_event_name;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_by_thread_by_event_name WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_thread_by_event_name'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result
new file mode 100644
index 00000000000..3fa3deedaef
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_ews_by_user_by_event_name.result
@@ -0,0 +1,29 @@
+select * from performance_schema.events_waits_summary_by_user_by_event_name
+where event_name like 'Wait/Synch/%' limit 1;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # #
+select * from performance_schema.events_waits_summary_by_user_by_event_name
+where event_name='FOO';
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+insert into performance_schema.events_waits_summary_by_user_by_event_name
+set event_name='FOO', user='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+update performance_schema.events_waits_summary_by_user_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+update performance_schema.events_waits_summary_by_user_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+delete from performance_schema.events_waits_summary_by_user_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+delete from performance_schema.events_waits_summary_by_user_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+LOCK TABLES performance_schema.events_waits_summary_by_user_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.events_waits_summary_by_user_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_by_user_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result b/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
index 6ddf1841a4e..ccf88c282b8 100644
--- a/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_ews_global_by_event_name.result
@@ -18,8 +18,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_
delete from performance_schema.events_waits_summary_global_by_event_name;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
UNLOCK TABLES;
LOCK TABLES performance_schema.events_waits_summary_global_by_event_name WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_summary_global_by_event_name'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_file_instances.result b/mysql-test/suite/perfschema/r/dml_file_instances.result
index 52204160a4b..d2564cb58dd 100644
--- a/mysql-test/suite/perfschema/r/dml_file_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_file_instances.result
@@ -13,8 +13,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_in
delete from performance_schema.file_instances;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_instances'
LOCK TABLES performance_schema.file_instances READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
UNLOCK TABLES;
LOCK TABLES performance_schema.file_instances WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result b/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result
index be1b744f786..ffd63232631 100644
--- a/mysql-test/suite/perfschema/r/dml_file_summary_by_event_name.result
+++ b/mysql-test/suite/perfschema/r/dml_fs_by_event_name.result
@@ -18,8 +18,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_su
delete from performance_schema.file_summary_by_event_name;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
LOCK TABLES performance_schema.file_summary_by_event_name READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
UNLOCK TABLES;
LOCK TABLES performance_schema.file_summary_by_event_name WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_event_name'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result b/mysql-test/suite/perfschema/r/dml_fs_by_instance.result
index eabd9170cbc..cde57dd19ce 100644
--- a/mysql-test/suite/perfschema/r/dml_file_summary_by_instance.result
+++ b/mysql-test/suite/perfschema/r/dml_fs_by_instance.result
@@ -18,8 +18,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_su
delete from performance_schema.file_summary_by_instance;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
LOCK TABLES performance_schema.file_summary_by_instance READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
UNLOCK TABLES;
LOCK TABLES performance_schema.file_summary_by_instance WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_summary_by_instance'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
new file mode 100644
index 00000000000..de3071c7535
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -0,0 +1,162 @@
+
+# Create a temporary table of performance schema table names
+
+CREATE TEMPORARY TABLE table_list (id INT AUTO_INCREMENT, PRIMARY KEY (id)) AS
+SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_SCHEMA='performance_schema';
+SELECT COUNT(*) FROM table_list INTO @table_count;
+
+# For each table in the performance schema, attempt HANDLER...OPEN,
+# which should fail with an error 1031, ER_ILLEGAL_HA.
+
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=50;
+HANDLER performance_schema.users OPEN;
+ERROR HY000: Table storage engine for 'users' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=49;
+HANDLER performance_schema.threads OPEN;
+ERROR HY000: Table storage engine for 'threads' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=48;
+HANDLER performance_schema.table_lock_waits_summary_by_table OPEN;
+ERROR HY000: Table storage engine for 'table_lock_waits_summary_by_table' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=47;
+HANDLER performance_schema.table_io_waits_summary_by_table OPEN;
+ERROR HY000: Table storage engine for 'table_io_waits_summary_by_table' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=46;
+HANDLER performance_schema.table_io_waits_summary_by_index_usage OPEN;
+ERROR HY000: Table storage engine for 'table_io_waits_summary_by_index_usage' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=45;
+HANDLER performance_schema.socket_summary_by_instance OPEN;
+ERROR HY000: Table storage engine for 'socket_summary_by_instance' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=44;
+HANDLER performance_schema.socket_summary_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'socket_summary_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=43;
+HANDLER performance_schema.socket_instances OPEN;
+ERROR HY000: Table storage engine for 'socket_instances' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=42;
+HANDLER performance_schema.setup_timers OPEN;
+ERROR HY000: Table storage engine for 'setup_timers' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=41;
+HANDLER performance_schema.setup_objects OPEN;
+ERROR HY000: Table storage engine for 'setup_objects' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=40;
+HANDLER performance_schema.setup_instruments OPEN;
+ERROR HY000: Table storage engine for 'setup_instruments' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=39;
+HANDLER performance_schema.setup_consumers OPEN;
+ERROR HY000: Table storage engine for 'setup_consumers' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=38;
+HANDLER performance_schema.setup_actors OPEN;
+ERROR HY000: Table storage engine for 'setup_actors' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=37;
+HANDLER performance_schema.rwlock_instances OPEN;
+ERROR HY000: Table storage engine for 'rwlock_instances' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=36;
+HANDLER performance_schema.performance_timers OPEN;
+ERROR HY000: Table storage engine for 'performance_timers' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=35;
+HANDLER performance_schema.objects_summary_global_by_type OPEN;
+ERROR HY000: Table storage engine for 'objects_summary_global_by_type' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=34;
+HANDLER performance_schema.mutex_instances OPEN;
+ERROR HY000: Table storage engine for 'mutex_instances' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=33;
+HANDLER performance_schema.hosts OPEN;
+ERROR HY000: Table storage engine for 'hosts' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=32;
+HANDLER performance_schema.host_cache OPEN;
+ERROR HY000: Table storage engine for 'host_cache' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=31;
+HANDLER performance_schema.file_summary_by_instance OPEN;
+ERROR HY000: Table storage engine for 'file_summary_by_instance' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=30;
+HANDLER performance_schema.file_summary_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'file_summary_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=29;
+HANDLER performance_schema.file_instances OPEN;
+ERROR HY000: Table storage engine for 'file_instances' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=28;
+HANDLER performance_schema.events_waits_summary_global_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_global_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=27;
+HANDLER performance_schema.events_waits_summary_by_user_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_by_user_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=26;
+HANDLER performance_schema.events_waits_summary_by_thread_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_by_thread_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=25;
+HANDLER performance_schema.events_waits_summary_by_instance OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_by_instance' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=24;
+HANDLER performance_schema.events_waits_summary_by_host_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_by_host_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=23;
+HANDLER performance_schema.events_waits_summary_by_account_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_waits_summary_by_account_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=22;
+HANDLER performance_schema.events_waits_history_long OPEN;
+ERROR HY000: Table storage engine for 'events_waits_history_long' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=21;
+HANDLER performance_schema.events_waits_history OPEN;
+ERROR HY000: Table storage engine for 'events_waits_history' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=20;
+HANDLER performance_schema.events_waits_current OPEN;
+ERROR HY000: Table storage engine for 'events_waits_current' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=19;
+HANDLER performance_schema.events_statements_summary_global_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_global_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=18;
+HANDLER performance_schema.events_statements_summary_by_user_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_by_user_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=17;
+HANDLER performance_schema.events_statements_summary_by_thread_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_by_thread_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=16;
+HANDLER performance_schema.events_statements_summary_by_host_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_by_host_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=15;
+HANDLER performance_schema.events_statements_summary_by_digest OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_by_digest' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=14;
+HANDLER performance_schema.events_statements_summary_by_account_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_statements_summary_by_account_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=13;
+HANDLER performance_schema.events_statements_history_long OPEN;
+ERROR HY000: Table storage engine for 'events_statements_history_long' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=12;
+HANDLER performance_schema.events_statements_history OPEN;
+ERROR HY000: Table storage engine for 'events_statements_history' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=11;
+HANDLER performance_schema.events_statements_current OPEN;
+ERROR HY000: Table storage engine for 'events_statements_current' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=10;
+HANDLER performance_schema.events_stages_summary_global_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_stages_summary_global_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=9;
+HANDLER performance_schema.events_stages_summary_by_user_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_stages_summary_by_user_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=8;
+HANDLER performance_schema.events_stages_summary_by_thread_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_stages_summary_by_thread_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=7;
+HANDLER performance_schema.events_stages_summary_by_host_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_stages_summary_by_host_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=6;
+HANDLER performance_schema.events_stages_summary_by_account_by_event_name OPEN;
+ERROR HY000: Table storage engine for 'events_stages_summary_by_account_by_event_name' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=5;
+HANDLER performance_schema.events_stages_history_long OPEN;
+ERROR HY000: Table storage engine for 'events_stages_history_long' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=4;
+HANDLER performance_schema.events_stages_history OPEN;
+ERROR HY000: Table storage engine for 'events_stages_history' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=3;
+HANDLER performance_schema.events_stages_current OPEN;
+ERROR HY000: Table storage engine for 'events_stages_current' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=2;
+HANDLER performance_schema.cond_instances OPEN;
+ERROR HY000: Table storage engine for 'cond_instances' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=1;
+HANDLER performance_schema.accounts OPEN;
+ERROR HY000: Table storage engine for 'accounts' doesn't have this option
+DROP TEMPORARY TABLE table_list;
diff --git a/mysql-test/suite/perfschema/r/dml_host_cache.result b/mysql-test/suite/perfschema/r/dml_host_cache.result
new file mode 100644
index 00000000000..a0ed1a3f3b1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_host_cache.result
@@ -0,0 +1,27 @@
+select * from performance_schema.host_cache
+where IP like '%' limit 1;
+select * from performance_schema.host_cache
+where IP='localhost';
+insert into performance_schema.host_cache
+set IP='FOO', SUM_BLOCKING_ERRORS=1, COUNT_FCRDNS_ERRORS=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'host_cache'
+update performance_schema.host_cache
+set COUNT_UNKNOWN_ERRORS=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'host_cache'
+update performance_schema.host_cache
+set SUM_BLOCKING_ERRORS=12 where IP='127.0.0.1';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'host_cache'
+select HOST from performance_schema.host_cache
+where IP='::1';
+HOST
+delete from performance_schema.host_cache
+where IP='::1';
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'host_cache'
+delete from performance_schema.host_cache;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'host_cache'
+LOCK TABLES performance_schema.host_cache READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'host_cache'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.host_cache WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'host_cache'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_hosts.result b/mysql-test/suite/perfschema/r/dml_hosts.result
new file mode 100644
index 00000000000..8ae4e3b0984
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_hosts.result
@@ -0,0 +1,25 @@
+select * from performance_schema.hosts
+limit 1;
+select * from performance_schema.hosts
+where host='FOO';
+insert into performance_schema.hosts
+set host='FOO',
+current_connections=1, total_connections=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'hosts'
+update performance_schema.hosts
+set current_connections=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'hosts'
+update performance_schema.hosts
+set current_connections=12 where host like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'hosts'
+delete from performance_schema.hosts
+where total_connections=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'hosts'
+delete from performance_schema.hosts;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'hosts'
+LOCK TABLES performance_schema.hosts READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'hosts'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.hosts WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'hosts'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_mutex_instances.result b/mysql-test/suite/perfschema/r/dml_mutex_instances.result
index 0089e20b3b6..03d2cfb1260 100644
--- a/mysql-test/suite/perfschema/r/dml_mutex_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_mutex_instances.result
@@ -13,8 +13,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'mutex_i
delete from performance_schema.mutex_instances;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'mutex_instances'
LOCK TABLES performance_schema.mutex_instances READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
UNLOCK TABLES;
LOCK TABLES performance_schema.mutex_instances WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'mutex_instances'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_os_global_by_type.result b/mysql-test/suite/perfschema/r/dml_os_global_by_type.result
new file mode 100644
index 00000000000..681ec364973
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_os_global_by_type.result
@@ -0,0 +1,45 @@
+select * from performance_schema.objects_summary_global_by_type
+where object_schema = 'performance_schema' limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+select * from performance_schema.objects_summary_global_by_type
+where object_schema='FOO';
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.objects_summary_global_by_type
+order by count_star limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+select * from performance_schema.objects_summary_global_by_type
+order by count_star desc limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+select * from performance_schema.objects_summary_global_by_type
+where object_type = 'TABLE' order by object_schema, object_name limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+select * from performance_schema.objects_summary_global_by_type
+where object_type = 'TABLE' order by object_schema desc, object_name desc limit 1;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+# # # # # # # #
+insert into performance_schema.objects_summary_global_by_type
+set object_type='TABLE', schema_name='FOO', object_name='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+update performance_schema.objects_summary_global_by_type
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+update performance_schema.objects_summary_global_by_type
+set count_star=12 where object_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+delete from performance_schema.objects_summary_global_by_type
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+delete from performance_schema.objects_summary_global_by_type;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+LOCK TABLES performance_schema.objects_summary_global_by_type READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.objects_summary_global_by_type WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'objects_summary_global_by_type'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_performance_timers.result b/mysql-test/suite/perfschema/r/dml_performance_timers.result
index 99d0b9fdf60..7e1d3005fb0 100644
--- a/mysql-test/suite/perfschema/r/dml_performance_timers.result
+++ b/mysql-test/suite/perfschema/r/dml_performance_timers.result
@@ -22,8 +22,8 @@ delete from performance_schema.performance_timers
where timer_name='CYCLE';
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'performance_timers'
LOCK TABLES performance_schema.performance_timers READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
UNLOCK TABLES;
LOCK TABLES performance_schema.performance_timers WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'performance_timers'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_rwlock_instances.result b/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
index 117c4e47508..e127ace2dfe 100644
--- a/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
+++ b/mysql-test/suite/perfschema/r/dml_rwlock_instances.result
@@ -13,8 +13,8 @@ ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'rwlock_
delete from performance_schema.rwlock_instances;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'rwlock_instances'
LOCK TABLES performance_schema.rwlock_instances READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
UNLOCK TABLES;
LOCK TABLES performance_schema.rwlock_instances WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'rwlock_instances'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_actors.result b/mysql-test/suite/perfschema/r/dml_setup_actors.result
new file mode 100644
index 00000000000..9ff49d8b7e2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_setup_actors.result
@@ -0,0 +1,60 @@
+drop table if exists test.setup_actors;
+create table test.setup_actors as
+select * from performance_schema.setup_actors;
+truncate table performance_schema.setup_actors;
+select * from performance_schema.setup_actors;
+HOST USER ROLE
+select * from performance_schema.setup_actors
+where user = '%';
+HOST USER ROLE
+insert into performance_schema.setup_actors
+set user='Joe', host='localhost';
+insert into performance_schema.setup_actors
+set user='Joe', host='%';
+insert into performance_schema.setup_actors
+set user='%', host='server1';
+insert into performance_schema.setup_actors
+set user='%', host='%';
+select * from performance_schema.setup_actors
+order by USER, HOST;
+HOST USER ROLE
+% % %
+server1 % %
+% Joe %
+localhost Joe %
+update performance_schema.setup_actors
+set user='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_actors
+set host='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_actors
+set role='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+select * from performance_schema.setup_actors
+order by USER, HOST;
+HOST USER ROLE
+% % %
+server1 % %
+% Joe %
+localhost Joe %
+delete from performance_schema.setup_actors
+where user = 'Joe' and host = 'localhost';
+select * from performance_schema.setup_actors
+order by USER, HOST;
+HOST USER ROLE
+% % %
+server1 % %
+% Joe %
+delete from performance_schema.setup_actors;
+select * from performance_schema.setup_actors
+order by USER, HOST;
+HOST USER ROLE
+LOCK TABLES performance_schema.setup_actors READ;
+UNLOCK TABLES;
+LOCK TABLES performance_schema.setup_actors WRITE;
+UNLOCK TABLES;
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+select * from test.setup_actors;
+drop table test.setup_actors;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_consumers.result b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
index db0a6820de9..81fa27a3fdf 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_consumers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_consumers.result
@@ -1,13 +1,17 @@
select * from performance_schema.setup_consumers;
NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
-events_waits_summary_by_thread_by_event_name YES
-events_waits_summary_by_event_name YES
-events_waits_summary_by_instance YES
-file_summary_by_event_name YES
-file_summary_by_instance YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
select * from performance_schema.setup_consumers
where name='events_waits_current';
NAME ENABLED
@@ -15,14 +19,18 @@ events_waits_current YES
select * from performance_schema.setup_consumers
where enabled='YES';
NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
events_waits_current YES
events_waits_history YES
events_waits_history_long YES
-events_waits_summary_by_thread_by_event_name YES
-events_waits_summary_by_event_name YES
-events_waits_summary_by_instance YES
-file_summary_by_event_name YES
-file_summary_by_instance YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
select * from performance_schema.setup_consumers
where enabled='NO';
NAME ENABLED
diff --git a/mysql-test/suite/perfschema/r/dml_setup_instruments.result b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
index 9f48a085eca..30c7ff5125b 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_instruments.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_instruments.result
@@ -11,9 +11,9 @@ wait/synch/mutex/sql/hash_filo::lock YES YES
wait/synch/mutex/sql/HA_DATA_PARTITION::LOCK_auto_inc YES YES
wait/synch/mutex/sql/LOCK_active_mi YES YES
wait/synch/mutex/sql/LOCK_audit_mask YES YES
-wait/synch/mutex/sql/LOCK_commit_ordered YES YES
wait/synch/mutex/sql/LOCK_connection_count YES YES
wait/synch/mutex/sql/LOCK_crypt YES YES
+wait/synch/mutex/sql/LOCK_delayed_create YES YES
select * from performance_schema.setup_instruments
where name like 'Wait/Synch/Rwlock/sql/%'
and name not in ('wait/synch/rwlock/sql/CRYPTO_dynlock_value::lock')
@@ -39,13 +39,13 @@ NAME ENABLED TIMED
wait/synch/cond/sql/COND_flush_thread_cache YES YES
wait/synch/cond/sql/COND_manager YES YES
wait/synch/cond/sql/COND_queue_state YES YES
-wait/synch/cond/sql/COND_rpl_status YES YES
wait/synch/cond/sql/COND_server_started YES YES
wait/synch/cond/sql/COND_thread_cache YES YES
wait/synch/cond/sql/COND_thread_count YES YES
wait/synch/cond/sql/Delayed_insert::cond YES YES
wait/synch/cond/sql/Delayed_insert::cond_client YES YES
wait/synch/cond/sql/Event_scheduler::COND_state YES YES
+wait/synch/cond/sql/Item_func_sleep::cond YES YES
select * from performance_schema.setup_instruments
where name='Wait';
select * from performance_schema.setup_instruments
diff --git a/mysql-test/suite/perfschema/r/dml_setup_objects.result b/mysql-test/suite/perfschema/r/dml_setup_objects.result
new file mode 100644
index 00000000000..075114a9b5a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_setup_objects.result
@@ -0,0 +1,67 @@
+drop table if exists test.setup_objects;
+create table test.setup_objects as
+select * from performance_schema.setup_objects;
+truncate table performance_schema.setup_objects;
+select * from performance_schema.setup_objects;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.setup_objects
+where object_type = 'TABLE'
+ order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+insert into performance_schema.setup_objects
+set object_type='ILLEGAL', object_schema='FOO', object_name='BAR',
+enabled='YES', timed='YES';
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+insert into performance_schema.setup_objects
+set object_type='TABLE', object_schema='FOO', object_name='BAR',
+enabled='YES', timed='YES';
+insert into performance_schema.setup_objects
+set object_type='TABLE', object_schema='FOO', object_name='BAR',
+enabled='YES', timed='NO';
+ERROR 23000: Can't write; duplicate key in table 'setup_objects'
+delete from performance_schema.setup_objects
+where object_type='TABLE' and object_schema='FOO';
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+insert into performance_schema.setup_objects
+set object_type='TABLE', object_schema='FOO', object_name='BAR',
+enabled='NO', timed='YES';
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE FOO BAR NO YES
+update performance_schema.setup_objects
+set object_type='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_objects
+set object_schema='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_objects
+set object_name='ILLEGAL';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_objects
+set enabled='NO', timed='NO';
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE FOO BAR NO NO
+update performance_schema.setup_objects
+set enabled='YES', timed='YES';
+delete from performance_schema.setup_objects
+where object_type = 'TABLE';
+delete from performance_schema.setup_objects;
+LOCK TABLES performance_schema.setup_objects READ;
+UNLOCK TABLES;
+LOCK TABLES performance_schema.setup_objects WRITE;
+UNLOCK TABLES;
+truncate table performance_schema.setup_objects;
+insert into performance_schema.setup_objects
+select * from test.setup_objects;
+drop table test.setup_objects;
diff --git a/mysql-test/suite/perfschema/r/dml_setup_timers.result b/mysql-test/suite/perfschema/r/dml_setup_timers.result
index ad1f6df3e81..1667e58f7ed 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_timers.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_timers.result
@@ -1,6 +1,17 @@
+update performance_schema.setup_timers
+set timer_name='CYCLE' where name="wait";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="stage";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="statement";
+update performance_schema.setup_timers
+set timer_name='MICROSECOND' where name="idle";
select * from performance_schema.setup_timers;
NAME TIMER_NAME
+idle MICROSECOND
wait CYCLE
+stage NANOSECOND
+statement NANOSECOND
select * from performance_schema.setup_timers
where name='Wait';
NAME TIMER_NAME
@@ -19,7 +30,10 @@ update performance_schema.setup_timers
set timer_name='MILLISECOND';
select * from performance_schema.setup_timers;
NAME TIMER_NAME
+idle MILLISECOND
wait MILLISECOND
+stage MILLISECOND
+statement MILLISECOND
update performance_schema.setup_timers
set timer_name='CYCLE';
delete from performance_schema.setup_timers;
@@ -31,3 +45,17 @@ LOCK TABLES performance_schema.setup_timers READ;
UNLOCK TABLES;
LOCK TABLES performance_schema.setup_timers WRITE;
UNLOCK TABLES;
+update performance_schema.setup_timers
+set timer_name='CYCLE' where name="wait";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="stage";
+update performance_schema.setup_timers
+set timer_name='NANOSECOND' where name="statement";
+update performance_schema.setup_timers
+set timer_name='MICROSECOND' where name="idle";
+select * from performance_schema.setup_timers;
+NAME TIMER_NAME
+idle MICROSECOND
+wait CYCLE
+stage NANOSECOND
+statement NANOSECOND
diff --git a/mysql-test/suite/perfschema/r/dml_socket_instances.result b/mysql-test/suite/perfschema/r/dml_socket_instances.result
new file mode 100644
index 00000000000..957f9bf9080
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_socket_instances.result
@@ -0,0 +1,20 @@
+select * from performance_schema.socket_instances limit 1;
+select * from performance_schema.socket_instances
+where ip='FOO';
+insert into performance_schema.socket_instances
+set ip='FOO', event_name='BAR', port=12;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_instances'
+update performance_schema.socket_instances
+set ip='FOO';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_instances'
+delete from performance_schema.socket_instances
+where event_name like "wait/%";
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_instances'
+delete from performance_schema.socket_instances;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_instances'
+LOCK TABLES performance_schema.socket_instances READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_instances'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.socket_instances WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_instances'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result b/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result
new file mode 100644
index 00000000000..39d14f413db
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_socket_summary_by_event_name.result
@@ -0,0 +1,26 @@
+select * from performance_schema.socket_summary_by_event_name
+limit 1;
+select * from performance_schema.socket_summary_by_event_name
+where event_name='FOO';
+insert into performance_schema.socket_summary_by_event_name
+set event_name='FOO',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+update performance_schema.socket_summary_by_event_name
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+update performance_schema.socket_summary_by_event_name
+set count_star=12 where event_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+delete from performance_schema.socket_summary_by_event_name
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+delete from performance_schema.socket_summary_by_event_name;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+LOCK TABLES performance_schema.socket_summary_by_event_name READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.socket_summary_by_event_name WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_event_name'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result b/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result
new file mode 100644
index 00000000000..35ad763d9a7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_socket_summary_by_instance.result
@@ -0,0 +1,26 @@
+select * from performance_schema.socket_summary_by_instance
+limit 1;
+select * from performance_schema.socket_summary_by_instance
+where object_instance_begin='FOO';
+insert into performance_schema.socket_summary_by_instance
+set object_instance_begin=1,
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+update performance_schema.socket_summary_by_instance
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+update performance_schema.socket_summary_by_instance
+set count_star=12 where object_instance_begin like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+delete from performance_schema.socket_summary_by_instance
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+delete from performance_schema.socket_summary_by_instance;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+LOCK TABLES performance_schema.socket_summary_by_instance READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.socket_summary_by_instance WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'socket_summary_by_instance'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_threads.result b/mysql-test/suite/perfschema/r/dml_threads.result
index c5a753e7f14..96fb1541df0 100644
--- a/mysql-test/suite/perfschema/r/dml_threads.result
+++ b/mysql-test/suite/perfschema/r/dml_threads.result
@@ -7,18 +7,28 @@ set name='FOO', thread_id=1, processlist_id=2;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'threads'
update performance_schema.threads
set thread_id=12;
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'threads'
+ERROR HY000: Invalid performance_schema usage.
update performance_schema.threads
-set thread_id=12 where name like "FOO";
-ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'threads'
+set thread_id=12 where PROCESSLIST_ID=connection_id();
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.threads
+set instrumented= 'NO' where PROCESSLIST_ID=connection_id();
+select instrumented from performance_schema.threads
+where PROCESSLIST_ID=connection_id();
+instrumented
+NO
+update performance_schema.threads
+set instrumented= 'YES' where PROCESSLIST_ID=connection_id();
+select instrumented from performance_schema.threads
+where PROCESSLIST_ID=connection_id();
+instrumented
+YES
delete from performance_schema.threads
where id=1;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
delete from performance_schema.threads;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'threads'
LOCK TABLES performance_schema.threads READ;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'threads'
UNLOCK TABLES;
LOCK TABLES performance_schema.threads WRITE;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'threads'
UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result b/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
new file mode 100644
index 00000000000..cf1ed766731
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_tiws_by_index_usage.result
@@ -0,0 +1,26 @@
+select * from performance_schema.table_io_waits_summary_by_index_usage
+limit 1;
+select * from performance_schema.table_io_waits_summary_by_index_usage
+where object_name='FOO';
+insert into performance_schema.table_io_waits_summary_by_index_usage
+set object_type='TABLE', object_name='FOO', object_schema='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+update performance_schema.table_io_waits_summary_by_index_usage
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+update performance_schema.table_io_waits_summary_by_index_usage
+set count_star=12 where object_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+delete from performance_schema.table_io_waits_summary_by_index_usage
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+delete from performance_schema.table_io_waits_summary_by_index_usage;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.table_io_waits_summary_by_index_usage WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_index_usage'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_tiws_by_table.result b/mysql-test/suite/perfschema/r/dml_tiws_by_table.result
new file mode 100644
index 00000000000..1ec1940194a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_tiws_by_table.result
@@ -0,0 +1,26 @@
+select * from performance_schema.table_io_waits_summary_by_table
+limit 1;
+select * from performance_schema.table_io_waits_summary_by_table
+where object_name='FOO';
+insert into performance_schema.table_io_waits_summary_by_table
+set object_type='TABLE', object_name='FOO', object_schema='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+update performance_schema.table_io_waits_summary_by_table
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+update performance_schema.table_io_waits_summary_by_table
+set count_star=12 where object_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+delete from performance_schema.table_io_waits_summary_by_table
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+delete from performance_schema.table_io_waits_summary_by_table;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+LOCK TABLES performance_schema.table_io_waits_summary_by_table READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.table_io_waits_summary_by_table WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_io_waits_summary_by_table'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_tlws_by_table.result b/mysql-test/suite/perfschema/r/dml_tlws_by_table.result
new file mode 100644
index 00000000000..1d39794d6c8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_tlws_by_table.result
@@ -0,0 +1,26 @@
+select * from performance_schema.table_lock_waits_summary_by_table
+limit 1;
+select * from performance_schema.table_lock_waits_summary_by_table
+where object_name='FOO';
+insert into performance_schema.table_lock_waits_summary_by_table
+set object_type='TABLE', object_name='FOO', object_schema='BAR',
+count_star=1, sum_timer_wait=2, min_timer_wait=3,
+avg_timer_wait=4, max_timer_wait=5;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+update performance_schema.table_lock_waits_summary_by_table
+set count_star=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+update performance_schema.table_lock_waits_summary_by_table
+set count_star=12 where object_name like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+delete from performance_schema.table_lock_waits_summary_by_table
+where count_star=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+delete from performance_schema.table_lock_waits_summary_by_table;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+LOCK TABLES performance_schema.table_lock_waits_summary_by_table READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.table_lock_waits_summary_by_table WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'table_lock_waits_summary_by_table'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/dml_users.result b/mysql-test/suite/perfschema/r/dml_users.result
new file mode 100644
index 00000000000..fa2d29731da
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_users.result
@@ -0,0 +1,25 @@
+select * from performance_schema.users
+limit 1;
+select * from performance_schema.users
+where user='FOO';
+insert into performance_schema.users
+set user='FOO',
+current_connections=1, total_connections=2;
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'users'
+update performance_schema.users
+set current_connections=12;
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'users'
+update performance_schema.users
+set current_connections=12 where user like "FOO";
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'users'
+delete from performance_schema.users
+where total_connections=1;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'users'
+delete from performance_schema.users;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'users'
+LOCK TABLES performance_schema.users READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'users'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.users WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'users'
+UNLOCK TABLES;
diff --git a/mysql-test/suite/perfschema/r/event_aggregate.result b/mysql-test/suite/perfschema/r/event_aggregate.result
new file mode 100644
index 00000000000..6863ac6e2ce
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate.result
@@ -0,0 +1,5271 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 1
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 4
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 5
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 8
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 9
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 12
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 13
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 16
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 24
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 17
+localhost wait/synch/mutex/sql/LOCK_connection_count 1
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 25
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 1
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 5
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 18
+localhost wait/synch/mutex/sql/LOCK_connection_count 2
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 26
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 2
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 5
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 19
+localhost wait/synch/mutex/sql/LOCK_connection_count 3
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 27
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 3
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 5
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
new file mode 100644
index 00000000000..ad2440bd2d1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a.result
@@ -0,0 +1,3992 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 1
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 4
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 5
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 8
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 9
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 12
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 13
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 16
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 24
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 17
+localhost wait/synch/mutex/sql/LOCK_connection_count 1
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 25
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 1
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 5
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 18
+localhost wait/synch/mutex/sql/LOCK_connection_count 2
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 26
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 2
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 5
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 19
+localhost wait/synch/mutex/sql/LOCK_connection_count 3
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 27
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 3
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 5
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
new file mode 100644
index 00000000000..6faff1992c7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_h.result
@@ -0,0 +1,3589 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
new file mode 100644
index 00000000000..87b81a54b6b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u.result
@@ -0,0 +1,2661 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 1
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 4
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 5
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 8
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 9
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 12
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 13
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 16
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 24
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 17
+localhost wait/synch/mutex/sql/LOCK_connection_count 1
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 25
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 1
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 5
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 18
+localhost wait/synch/mutex/sql/LOCK_connection_count 2
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 26
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 2
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 5
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 19
+localhost wait/synch/mutex/sql/LOCK_connection_count 3
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 27
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 3
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 5
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
new file mode 100644
index 00000000000..09144e3641b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_a_no_u_no_h.result
@@ -0,0 +1,2258 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
new file mode 100644
index 00000000000..e50d2b1f837
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_h.result
@@ -0,0 +1,4868 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 6
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 1 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 6
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 1 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 6
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 1 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 6
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 5
+user1 wait/synch/mutex/sql/LOCK_connection_count 1
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+user2 wait/io/file/sql/query_log 5
+user2 wait/synch/mutex/sql/LOCK_connection_count 1
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+user3 wait/io/file/sql/query_log 5
+user3 wait/synch/mutex/sql/LOCK_connection_count 1
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+user4 wait/io/file/sql/query_log 5
+user4 wait/synch/mutex/sql/LOCK_connection_count 1
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 3
+user1 stage/sql/closing tables 3
+user1 stage/sql/init 7
+user1 stage/sql/Opening tables 3
+user2 stage/sql/checking permissions 3
+user2 stage/sql/closing tables 3
+user2 stage/sql/init 7
+user2 stage/sql/Opening tables 3
+user3 stage/sql/checking permissions 3
+user3 stage/sql/closing tables 3
+user3 stage/sql/init 7
+user3 stage/sql/Opening tables 3
+user4 stage/sql/checking permissions 3
+user4 stage/sql/closing tables 3
+user4 stage/sql/init 7
+user4 stage/sql/Opening tables 3
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 1
+user1 statement/sql/insert 1
+user1 statement/sql/select 2
+user2 statement/com/Error 0
+user2 statement/com/Quit 1
+user2 statement/sql/insert 1
+user2 statement/sql/select 2
+user3 statement/com/Error 0
+user3 statement/com/Quit 1
+user3 statement/sql/insert 1
+user3 statement/sql/select 2
+user4 statement/com/Error 0
+user4 statement/com/Quit 1
+user4 statement/sql/insert 1
+user4 statement/sql/select 2
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/file/sql/query_log 0
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+user2 wait/io/file/sql/query_log 0
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+user3 wait/io/file/sql/query_log 0
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+user4 wait/io/file/sql/query_log 0
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+user1 stage/sql/checking permissions 0
+user1 stage/sql/closing tables 0
+user1 stage/sql/init 0
+user1 stage/sql/Opening tables 0
+user2 stage/sql/checking permissions 0
+user2 stage/sql/closing tables 0
+user2 stage/sql/init 0
+user2 stage/sql/Opening tables 0
+user3 stage/sql/checking permissions 0
+user3 stage/sql/closing tables 0
+user3 stage/sql/init 0
+user3 stage/sql/Opening tables 0
+user4 stage/sql/checking permissions 0
+user4 stage/sql/closing tables 0
+user4 stage/sql/init 0
+user4 stage/sql/Opening tables 0
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+user1 statement/com/Error 0
+user1 statement/com/Quit 0
+user1 statement/sql/insert 0
+user1 statement/sql/select 0
+user2 statement/com/Error 0
+user2 statement/com/Quit 0
+user2 statement/sql/insert 0
+user2 statement/sql/select 0
+user3 statement/com/Error 0
+user3 statement/com/Quit 0
+user3 statement/sql/insert 0
+user3 statement/sql/select 0
+user4 statement/com/Error 0
+user4 statement/com/Quit 0
+user4 statement/sql/insert 0
+user4 statement/sql/select 0
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+user1 0 1
+user2 0 1
+user3 0 1
+user4 0 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root 1 1
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
new file mode 100644
index 00000000000..4f1dddb3f16
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u.result
@@ -0,0 +1,3940 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 1
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 4
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 2
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 5
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 2
+localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 3
+localhost stage/sql/closing tables 3
+localhost stage/sql/init 6
+localhost stage/sql/Opening tables 3
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 1
+localhost statement/sql/select 2
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 8
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 3
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 9
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 4
+localhost wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 6
+localhost stage/sql/closing tables 6
+localhost stage/sql/init 12
+localhost stage/sql/Opening tables 6
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 2
+localhost statement/sql/select 4
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 12
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 4
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 13
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 6
+localhost wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 9
+localhost stage/sql/closing tables 9
+localhost stage/sql/init 18
+localhost stage/sql/Opening tables 9
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 3
+localhost statement/sql/select 6
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 16
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 24
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 5 5
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 17
+localhost wait/synch/mutex/sql/LOCK_connection_count 1
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 25
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 1
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 4 5
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 18
+localhost wait/synch/mutex/sql/LOCK_connection_count 2
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 26
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 2
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 3 5
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 19
+localhost wait/synch/mutex/sql/LOCK_connection_count 3
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 27
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 3
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 2 5
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 20
+localhost wait/synch/mutex/sql/LOCK_connection_count 4
+localhost wait/synch/mutex/sql/LOCK_user_locks 8
+localhost wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 12
+localhost stage/sql/closing tables 12
+localhost stage/sql/init 28
+localhost stage/sql/Opening tables 12
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 4
+localhost statement/sql/insert 4
+localhost statement/sql/select 8
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 5
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/file/sql/query_log 0
+localhost wait/synch/mutex/sql/LOCK_connection_count 0
+localhost wait/synch/mutex/sql/LOCK_user_locks 0
+localhost wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+localhost stage/sql/checking permissions 0
+localhost stage/sql/closing tables 0
+localhost stage/sql/init 0
+localhost stage/sql/Opening tables 0
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+localhost statement/com/Error 0
+localhost statement/com/Quit 0
+localhost statement/sql/insert 0
+localhost statement/sql/select 0
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+localhost 1 1
diff --git a/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
new file mode 100644
index 00000000000..6de38e218ab
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/event_aggregate_no_u_no_h.result
@@ -0,0 +1,3537 @@
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 1
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 0
+user1 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 1
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 1
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user1 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user1 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 4
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 1
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 0
+user2 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 5
+wait/synch/mutex/sql/LOCK_user_locks 2
+wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 3
+stage/sql/closing tables 3
+stage/sql/init 6
+stage/sql/Opening tables 3
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 1
+statement/sql/select 2
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user2 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user2 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 8
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 1
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 0
+user3 wait/synch/rwlock/sql/LOCK_grant 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 9
+wait/synch/mutex/sql/LOCK_user_locks 4
+wait/synch/rwlock/sql/LOCK_grant 4
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 6
+stage/sql/closing tables 6
+stage/sql/init 12
+stage/sql/Opening tables 6
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 2
+statement/sql/select 4
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user3 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user3 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 12
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 1
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 0
+user4 wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 1
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 13
+wait/synch/mutex/sql/LOCK_user_locks 6
+wait/synch/rwlock/sql/LOCK_grant 6
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 9
+stage/sql/closing tables 9
+stage/sql/init 18
+stage/sql/Opening tables 9
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 3
+statement/sql/select 6
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select get_lock("marker", 10);
+get_lock("marker", 10)
+1
+select release_lock("marker");
+release_lock("marker")
+1
+insert into test.t1 values ("marker");
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/file/sql/query_log 4
+user1 wait/synch/mutex/sql/LOCK_connection_count 0
+user1 wait/synch/mutex/sql/LOCK_user_locks 2
+user1 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/file/sql/query_log 4
+user1 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 16
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 6
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 24
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 1 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con1 disconnected =================="
+"================== Step 10 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/file/sql/query_log 4
+user2 wait/synch/mutex/sql/LOCK_connection_count 0
+user2 wait/synch/mutex/sql/LOCK_user_locks 2
+user2 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user2 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 17
+wait/synch/mutex/sql/LOCK_connection_count 1
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 6
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 25
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 1
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 1 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con2 disconnected =================="
+"================== Step 11 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/file/sql/query_log 4
+user3 wait/synch/mutex/sql/LOCK_connection_count 0
+user3 wait/synch/mutex/sql/LOCK_user_locks 2
+user3 wait/synch/rwlock/sql/LOCK_grant 2
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user3 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 18
+wait/synch/mutex/sql/LOCK_connection_count 2
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 6
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 26
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 2
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 1 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con3 disconnected =================="
+"================== Step 12 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/file/sql/query_log 4
+user4 wait/synch/mutex/sql/LOCK_connection_count 0
+user4 wait/synch/mutex/sql/LOCK_user_locks 2
+user4 wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_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 4
+user4 localhost wait/synch/mutex/sql/LOCK_connection_count 0
+user4 localhost wait/synch/mutex/sql/LOCK_user_locks 2
+user4 localhost wait/synch/rwlock/sql/LOCK_grant 2
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 19
+wait/synch/mutex/sql/LOCK_connection_count 3
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 6
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 27
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 3
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+"================== con4 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== WAITS_BY_THREAD truncated =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_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
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== WAITS_BY_ACCOUNT truncated =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== WAITS_BY_USER truncated =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== WAITS_BY_HOST truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== WAITS_GLOBAL truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_thread_by_event_name;
+"================== STAGES_BY_THREAD truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 3
+user1 localhost stage/sql/closing tables 3
+user1 localhost stage/sql/init 7
+user1 localhost stage/sql/Opening tables 3
+user2 localhost stage/sql/checking permissions 3
+user2 localhost stage/sql/closing tables 3
+user2 localhost stage/sql/init 7
+user2 localhost stage/sql/Opening tables 3
+user3 localhost stage/sql/checking permissions 3
+user3 localhost stage/sql/closing tables 3
+user3 localhost stage/sql/init 7
+user3 localhost stage/sql/Opening tables 3
+user4 localhost stage/sql/checking permissions 3
+user4 localhost stage/sql/closing tables 3
+user4 localhost stage/sql/init 7
+user4 localhost stage/sql/Opening tables 3
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_account_by_event_name;
+"================== STAGES_BY_ACCOUNT truncated =================="
+"================== Step 20 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_user_by_event_name;
+"================== STAGES_BY_USER truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_by_host_by_event_name;
+"================== STAGES_BY_HOST truncated =================="
+"================== Step 22 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_stages_summary_global_by_event_name;
+"================== STAGES_GLOBAL truncated =================="
+"================== Step 23 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_thread_by_event_name;
+"================== STATEMENTS_BY_THREAD truncated =================="
+"================== Step 24 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 1
+user1 localhost statement/sql/insert 1
+user1 localhost statement/sql/select 2
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 1
+user2 localhost statement/sql/insert 1
+user2 localhost statement/sql/select 2
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 1
+user3 localhost statement/sql/insert 1
+user3 localhost statement/sql/select 2
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 1
+user4 localhost statement/sql/insert 1
+user4 localhost statement/sql/select 2
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_account_by_event_name;
+"================== STATEMENTS_BY_ACCOUNT truncated =================="
+"================== Step 25 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_user_by_event_name;
+"================== STATEMENTS_BY_USER truncated =================="
+"================== Step 26 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_by_host_by_event_name;
+"================== STATEMENTS_BY_HOST truncated =================="
+"================== Step 27 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.events_statements_summary_global_by_event_name;
+"================== STATEMENTS_GLOBAL truncated =================="
+"================== Step 28 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+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_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+user1 localhost stage/sql/checking permissions 0
+user1 localhost stage/sql/closing tables 0
+user1 localhost stage/sql/init 0
+user1 localhost stage/sql/Opening tables 0
+user2 localhost stage/sql/checking permissions 0
+user2 localhost stage/sql/closing tables 0
+user2 localhost stage/sql/init 0
+user2 localhost stage/sql/Opening tables 0
+user3 localhost stage/sql/checking permissions 0
+user3 localhost stage/sql/closing tables 0
+user3 localhost stage/sql/init 0
+user3 localhost stage/sql/Opening tables 0
+user4 localhost stage/sql/checking permissions 0
+user4 localhost stage/sql/closing tables 0
+user4 localhost stage/sql/init 0
+user4 localhost stage/sql/Opening tables 0
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+user1 localhost statement/com/Error 0
+user1 localhost statement/com/Quit 0
+user1 localhost statement/sql/insert 0
+user1 localhost statement/sql/select 0
+user2 localhost statement/com/Error 0
+user2 localhost statement/com/Quit 0
+user2 localhost statement/sql/insert 0
+user2 localhost statement/sql/select 0
+user3 localhost statement/com/Error 0
+user3 localhost statement/com/Quit 0
+user3 localhost statement/sql/insert 0
+user3 localhost statement/sql/select 0
+user4 localhost statement/com/Error 0
+user4 localhost statement/com/Quit 0
+user4 localhost statement/sql/insert 0
+user4 localhost statement/sql/select 0
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+user1 localhost 0 1
+user2 localhost 0 1
+user3 localhost 0 1
+user4 localhost 0 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.accounts;
+"================== ACCOUNTS truncated =================="
+"================== Step 29 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.users;
+"================== USERS truncated =================="
+"================== Step 30 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+truncate performance_schema.hosts;
+"================== HOSTS truncated =================="
+"================== Step 31 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+execute dump_waits_global;
+event_name count_star
+wait/io/file/sql/query_log 0
+wait/synch/mutex/sql/LOCK_connection_count 0
+wait/synch/mutex/sql/LOCK_user_locks 0
+wait/synch/rwlock/sql/LOCK_grant 0
+execute dump_waits_history;
+event_name count(event_name)
+wait/io/file/sql/query_log 20
+wait/synch/mutex/sql/LOCK_connection_count 4
+wait/synch/mutex/sql/LOCK_user_locks 8
+wait/synch/rwlock/sql/LOCK_grant 8
+execute dump_stages_account;
+user host event_name count_star
+execute dump_stages_user;
+user event_name count_star
+execute dump_stages_host;
+host event_name count_star
+execute dump_stages_global;
+event_name count_star
+stage/sql/checking permissions 0
+stage/sql/closing tables 0
+stage/sql/init 0
+stage/sql/Opening tables 0
+execute dump_stages_history;
+event_name count(event_name)
+stage/sql/checking permissions 12
+stage/sql/closing tables 12
+stage/sql/init 28
+stage/sql/Opening tables 12
+execute dump_statements_account;
+user host event_name count_star
+execute dump_statements_user;
+user event_name count_star
+execute dump_statements_host;
+host event_name count_star
+execute dump_statements_global;
+event_name count_star
+statement/com/Error 0
+statement/com/Quit 0
+statement/sql/insert 0
+statement/sql/select 0
+execute dump_statements_history;
+event_name count(event_name)
+statement/com/Quit 4
+statement/sql/insert 4
+statement/sql/select 8
+execute dump_accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+root localhost 1 1
+execute dump_users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+execute dump_hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/func_file_io.result b/mysql-test/suite/perfschema/r/func_file_io.result
index d99e77dcd8c..b66ab0b4eaa 100644
--- a/mysql-test/suite/perfschema/r/func_file_io.result
+++ b/mysql-test/suite/perfschema/r/func_file_io.result
@@ -1,6 +1,8 @@
UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'YES';
UPDATE performance_schema.setup_instruments SET enabled = 'YES'
WHERE name LIKE 'wait/io/file/%';
+update performance_schema.threads SET instrumented = 'YES'
+ WHERE PROCESSLIST_ID=connection_id();
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
@@ -65,17 +67,17 @@ SELECT * FROM performance_schema.events_waits_history_long
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
SELECT * FROM performance_schema.events_waits_history
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
SELECT * FROM performance_schema.events_waits_current
WHERE TIMER_WAIT != NULL
OR TIMER_START != NULL
OR TIMER_END != NULL;
-THREAD_ID EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID OPERATION NUMBER_OF_BYTES FLAGS
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
UPDATE performance_schema.setup_instruments SET timed = 'YES';
SELECT * FROM t1 WHERE id < 4;
id b
@@ -94,10 +96,23 @@ FROM performance_schema.events_waits_summary_global_by_event_name
WHERE COUNT_STAR > 0
ORDER BY SUM_TIMER_WAIT DESC
LIMIT 10;
+SELECT p.processlist_user, SUM(TIMER_WAIT) SUM_WAIT
+# ((TIME_TO_SEC(TIMEDIFF(NOW(), i.startup_time)) * 1000) / SUM(TIMER_WAIT)) * 100 WAIT_PERCENTAGE
+FROM performance_schema.events_waits_history_long h
+INNER JOIN performance_schema.threads p USING (THREAD_ID)
+GROUP BY p.processlist_user
+ORDER BY SUM_WAIT DESC
+LIMIT 20;
SELECT h.EVENT_NAME, SUM(h.TIMER_WAIT) TOTAL_WAIT
FROM performance_schema.events_waits_history_long h
INNER JOIN performance_schema.threads p USING (THREAD_ID)
WHERE p.PROCESSLIST_ID = 1
GROUP BY h.EVENT_NAME
HAVING TOTAL_WAIT > 0;
-UPDATE performance_schema.setup_instruments SET enabled = 'YES';
+SELECT p.processlist_user, h.operation, SUM(NUMBER_OF_BYTES) bytes
+FROM performance_schema.events_waits_history_long h
+INNER JOIN performance_schema.threads p USING (THREAD_ID)
+GROUP BY p.processlist_user, h.operation
+HAVING BYTES > 0
+ORDER BY p.processlist_user, h.operation;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
diff --git a/mysql-test/suite/perfschema/r/func_mutex.result b/mysql-test/suite/perfschema/r/func_mutex.result
index 93a8ae5d218..462e9c046c3 100644
--- a/mysql-test/suite/perfschema/r/func_mutex.result
+++ b/mysql-test/suite/perfschema/r/func_mutex.result
@@ -112,3 +112,4 @@ test_fm2_rw_timed
Success
UPDATE performance_schema.setup_instruments SET enabled = 'YES';
DROP TABLE t1;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
new file mode 100644
index 00000000000..d2e99912200
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'192.0.2.4';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 1
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 2
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'192.0.2.4';
+drop user 'root'@'192.0.2.4';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
new file mode 100644
index 00000000000..39057797b76
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_again";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 1
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 2
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
new file mode 100644
index 00000000000..7bddddb44a2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'192.0.2.4';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'192.0.2.4';
+drop user 'root'@'192.0.2.4';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
new file mode 100644
index 00000000000..4bb67d51eb7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_bad_ipv4";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
new file mode 100644
index 00000000000..dd69ff95ccd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
new file mode 100644
index 00000000000..1443c9708a6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
new file mode 100644
index 00000000000..a67937e32b2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
@@ -0,0 +1,88 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'root'@'192.0.2.4';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
+revoke select on test.* from 'root'@'192.0.2.4';
+drop user 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'192.0.2.4';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
new file mode 100644
index 00000000000..0ec0b833d0e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv4.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_error_noname";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
new file mode 100644
index 00000000000..4e1cbacf228
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_auth_plugin.result
@@ -0,0 +1,180 @@
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+CREATE USER 'plug'@'santa.claus.ipv4.example.com'
+ IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
+CREATE USER 'plug_dest'@'santa.claus.ipv4.example.com'
+ IDENTIFIED BY 'plug_test_passwd';
+GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+uninstall plugin test_plugin_server;
+ERROR HY000: Plugin 'test_plugin_server' is not loaded
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 1
+COUNT_AUTH_PLUGIN_ERRORS 1
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Plugin 'test_plugin_server' is not loaded
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+install plugin test_plugin_server soname 'PLUGIN_AUTH';
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 1
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 2
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+GRANT PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+ TO 'plug'@'santa.claus.ipv4.example.com';
+select "Con4 is alive";
+Con4 is alive
+Con4 is alive
+select user();
+user()
+plug@santa.claus.ipv4.example.com
+select current_user();
+current_user()
+plug_dest@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 2
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv4.example.com';
+REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv4.example.com'
+ FROM 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug'@'santa.claus.ipv4.example.com';
+DROP USER 'plug_dest'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
new file mode 100644
index 00000000000..8e378e52bf5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_blocked.result
@@ -0,0 +1,198 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+10
+select @@global.max_connect_errors into @saved_max_connect_errors;
+set global max_connect_errors = 2;
+grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4,native_password_bad_reply";
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 1
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 2
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+flush hosts;
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'santa.claus.ipv4.example.com';
+set global max_connect_errors = @saved_max_connect_errors;
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
new file mode 100644
index 00000000000..5389dd43d11
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_format_ipv4";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 1
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 2
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
new file mode 100644
index 00000000000..069fac2ddb8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result
@@ -0,0 +1,645 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select @@global.max_connections into @saved_max_connections;
+create user 'quota'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv4.example.com';
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+ with max_connections_per_hour 3;
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+select "Con2a is alive";
+Con2a is alive
+Con2a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con2b is alive";
+Con2b is alive
+Con2b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con2c is alive";
+Con2c is alive
+Con2c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 1
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+ with max_connections_per_hour 0;
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+ with max_user_connections 3;
+flush user_resources;
+select "Con7 is alive";
+Con7 is alive
+Con7 is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3b is alive";
+Con3b is alive
+Con3b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3c is alive";
+Con3c is alive
+Con3c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 1
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+grant usage on *.* to 'quota'@'santa.claus.ipv4.example.com'
+ with max_user_connections 0;
+flush user_resources;
+set global max_user_connections = 3;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con4b is alive";
+Con4b is alive
+Con4b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con4c is alive";
+Con4c is alive
+Con4c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 3
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global max_user_connections = 0;
+set global max_connections = 3;
+flush user_resources;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con5b is alive";
+Con5b is alive
+Con5b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv4.example.com
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+Got one of the listed errors
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+Got one of the listed errors
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global max_connections = @saved_max_connections;
+drop user 'quota'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
new file mode 100644
index 00000000000..c2163a2d5b1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
@@ -0,0 +1,157 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'192.0.2.4';
+grant select on test.* to 'root'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 1
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+select "Con4 is alive";
+Con4 is alive
+Con4 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con5 is alive";
+Con5 is alive
+Con5 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'192.0.2.4';
+revoke select on test.* from 'root'@'santa.claus.ipv4.example.com';
+drop user 'root'@'192.0.2.4';
+drop user 'root'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
new file mode 100644
index 00000000000..048081756bb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
@@ -0,0 +1,131 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_again";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 1
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 3
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host 'santa.claus.ipv4.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 4
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
new file mode 100644
index 00000000000..85a825f3907
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'192.0.2.4';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@192.0.2.4
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'192.0.2.4';
+drop user 'root'@'192.0.2.4';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
new file mode 100644
index 00000000000..6bb381888f9
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_error_noname";
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '192.0.2.4' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
new file mode 100644
index 00000000000..a7d34ede333
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_passwd.result
@@ -0,0 +1,195 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+create user 'user_without'@'santa.claus.ipv4.example.com';
+create user 'user_with'@'santa.claus.ipv4.example.com'
+ identified by 'good_password';
+grant select on test.* to 'user_without'@'santa.claus.ipv4.example.com';
+grant select on test.* to 'user_with'@'santa.claus.ipv4.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 1
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 2
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 3
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 4
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 5
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 6
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+drop user 'user_with'@'santa.claus.ipv4.example.com';
+drop user 'user_without'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
new file mode 100644
index 00000000000..e6e5b99392f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv4_ssl.result
@@ -0,0 +1,141 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+create user 'user_ssl'@'santa.claus.ipv4.example.com';
+create user 'user_ssl_x509'@'santa.claus.ipv4.example.com'
+ identified by 'good_password';
+grant select on test.* to 'user_ssl'@'santa.claus.ipv4.example.com'
+ REQUIRE SSL;
+grant select on test.* to 'user_ssl_x509'@'santa.claus.ipv4.example.com'
+ REQUIRE SUBJECT '/C=??/ST=??/L=??/
+ O=No such thing/
+ CN=Santa Claus/emailAddress=santa.claus@example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv4,getnameinfo_fake_ipv4,getaddrinfo_fake_good_ipv4";
+ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 1
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv4.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 3
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv4.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 192.0.2.4
+HOST santa.claus.ipv4.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+drop user 'user_ssl'@'santa.claus.ipv4.example.com';
+drop user 'user_ssl_x509'@'santa.claus.ipv4.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
new file mode 100644
index 00000000000..599fcfe9130
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'2001:db8::6:6';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 1
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 2
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'2001:db8::6:6';
+drop user 'root'@'2001:db8::6:6';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
new file mode 100644
index 00000000000..d6b579fcb57
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_again";
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 1
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 2
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
new file mode 100644
index 00000000000..2a41f269159
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'2001:db8::6:6';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'2001:db8::6:6';
+drop user 'root'@'2001:db8::6:6';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
new file mode 100644
index 00000000000..786936acc20
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_bad_ipv6";
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 1
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
new file mode 100644
index 00000000000..b0269234e11
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("192.0.2.4");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
+drop user 'root'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
new file mode 100644
index 00000000000..9bef9efb93c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
@@ -0,0 +1,71 @@
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
new file mode 100644
index 00000000000..432a0b4eaaf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_allow.result
@@ -0,0 +1,88 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+grant select on test.* to 'root'@'2001:db8::6:6';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
+revoke select on test.* from 'root'@'2001:db8::6:6';
+drop user 'root'@'santa.claus.ipv6.example.com';
+drop user 'root'@'2001:db8::6:6';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
new file mode 100644
index 00000000000..ea5c6e357ef
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("santa.claus.ipv6.example.com");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_error_noname";
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 1
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
new file mode 100644
index 00000000000..61fd1573067
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_auth_plugin.result
@@ -0,0 +1,180 @@
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+CREATE USER 'plug'@'santa.claus.ipv6.example.com'
+ IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
+CREATE USER 'plug_dest'@'santa.claus.ipv6.example.com'
+ IDENTIFIED BY 'plug_test_passwd';
+GRANT SELECT ON test.* TO 'plug_dest'@'santa.claus.ipv6.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+uninstall plugin test_plugin_server;
+ERROR HY000: Plugin 'test_plugin_server' is not loaded
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 1
+COUNT_AUTH_PLUGIN_ERRORS 1
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Plugin 'test_plugin_server' is not loaded
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+install plugin test_plugin_server soname 'PLUGIN_AUTH';
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 1
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'plug'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 2
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+GRANT PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
+ TO 'plug'@'santa.claus.ipv6.example.com';
+select "Con4 is alive";
+Con4 is alive
+Con4 is alive
+select user();
+user()
+plug@santa.claus.ipv6.example.com
+select current_user();
+current_user()
+plug_dest@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 2
+COUNT_AUTH_PLUGIN_ERRORS 2
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 2
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+REVOKE ALL PRIVILEGES ON *.* FROM 'plug_dest'@'santa.claus.ipv6.example.com';
+REVOKE PROXY ON 'plug_dest'@'santa.claus.ipv6.example.com'
+ FROM 'plug'@'santa.claus.ipv6.example.com';
+DROP USER 'plug'@'santa.claus.ipv6.example.com';
+DROP USER 'plug_dest'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
new file mode 100644
index 00000000000..07121b6031f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_blocked.result
@@ -0,0 +1,198 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+select @@global.max_connect_errors;
+@@global.max_connect_errors
+10
+select @@global.max_connect_errors into @saved_max_connect_errors;
+set global max_connect_errors = 2;
+grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6,native_password_bad_reply";
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 2
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 2
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 1
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 3
+COUNT_HOST_BLOCKED_ERRORS 2
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 3
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+flush hosts;
+ERROR 28000: Access denied for user 'quota'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 1
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 1
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
+drop user 'root'@'santa.claus.ipv6.example.com';
+set global max_connect_errors = @saved_max_connect_errors;
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
new file mode 100644
index 00000000000..3bf09f19843
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result
@@ -0,0 +1,645 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+select @@global.max_user_connections;
+@@global.max_user_connections
+0
+select @@global.max_connections;
+@@global.max_connections
+151
+select @@global.max_connections into @saved_max_connections;
+create user 'quota'@'santa.claus.ipv6.example.com';
+grant select on test.* to 'quota'@'santa.claus.ipv6.example.com';
+grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
+ with max_connections_per_hour 3;
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+select "Con2a is alive";
+Con2a is alive
+Con2a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con2b is alive";
+Con2b is alive
+Con2b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+select "Con2c is alive";
+Con2c is alive
+Con2c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN null
+LAST_ERROR_SEEN null
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 1
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_connections_per_hour' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
+ with max_connections_per_hour 0;
+grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
+ with max_user_connections 3;
+flush user_resources;
+select "Con7 is alive";
+Con7 is alive
+Con7 is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3b is alive";
+Con3b is alive
+Con3b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3c is alive";
+Con3c is alive
+Con3c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 1
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User 'quota' has exceeded the 'max_user_connections' resource (current value: 3)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+grant usage on *.* to 'quota'@'santa.claus.ipv6.example.com'
+ with max_user_connections 0;
+flush user_resources;
+set global max_user_connections = 3;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con4b is alive";
+Con4b is alive
+Con4b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con4c is alive";
+Con4c is alive
+Con4c is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 3
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 42000: User quota already has more than 'max_user_connections' active connections
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global max_user_connections = 0;
+set global max_connections = 3;
+flush user_resources;
+select "Con4a is alive";
+Con4a is alive
+Con4a is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con5b is alive";
+Con5b is alive
+Con5b is alive
+select current_user();
+current_user()
+quota@santa.claus.ipv6.example.com
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+Got one of the listed errors
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+Got one of the listed errors
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 2
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global max_connections = @saved_max_connections;
+drop user 'quota'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
new file mode 100644
index 00000000000..755f5b2037d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_allow.result
@@ -0,0 +1,157 @@
+call mtr.add_suppression("2001:db8::6:6");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'2001:db8::6:6';
+grant select on test.* to 'root'@'santa.claus.ipv6.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 1
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+select "Con4 is alive";
+Con4 is alive
+Con4 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con5 is alive";
+Con5 is alive
+Con5 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'2001:db8::6:6';
+revoke select on test.* from 'root'@'santa.claus.ipv6.example.com';
+drop user 'root'@'2001:db8::6:6';
+drop user 'root'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
new file mode 100644
index 00000000000..da240b24ca6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
@@ -0,0 +1,131 @@
+call mtr.add_suppression("2001:db8::6:6");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_again";
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 1
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED NO
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 3
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host 'santa.claus.ipv6.example.com' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 2
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 4
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
new file mode 100644
index 00000000000..8a4dee22aa2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_allow.result
@@ -0,0 +1,85 @@
+call mtr.add_suppression("2001:db8::6:6");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+grant select on test.* to 'root'@'2001:db8::6:6';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+select "Con2 is alive";
+Con2 is alive
+Con2 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+select "Con3 is alive";
+Con3 is alive
+Con3 is alive
+select current_user();
+current_user()
+root@2001:db8::6:6
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+revoke select on test.* from 'root'@'2001:db8::6:6';
+drop user 'root'@'2001:db8::6:6';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
new file mode 100644
index 00000000000..63b8a33b8bf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
@@ -0,0 +1,72 @@
+call mtr.add_suppression("2001:db8::6:6");
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_error_noname";
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 1
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR HY000: Host '2001:db8::6:6' is not allowed to connect to this MySQL server
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST NULL
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 1
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 2
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
new file mode 100644
index 00000000000..5d67dc8d943
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_passwd.result
@@ -0,0 +1,195 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+create user 'user_without'@'santa.claus.ipv6.example.com';
+create user 'user_with'@'santa.claus.ipv6.example.com'
+ identified by 'good_password';
+grant select on test.* to 'user_without'@'santa.claus.ipv6.example.com';
+grant select on test.* to 'user_with'@'santa.claus.ipv6.example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 1
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_without'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 2
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 3
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 4
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 5
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_with'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 6
+COUNT_SSL_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+drop user 'user_with'@'santa.claus.ipv6.example.com';
+drop user 'user_without'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
new file mode 100644
index 00000000000..29c151d24c1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_ipv6_ssl.result
@@ -0,0 +1,141 @@
+flush status;
+flush hosts;
+flush user_resources;
+select @@global.debug;
+@@global.debug
+
+create user 'user_ssl'@'santa.claus.ipv6.example.com';
+create user 'user_ssl_x509'@'santa.claus.ipv6.example.com'
+ identified by 'good_password';
+grant select on test.* to 'user_ssl'@'santa.claus.ipv6.example.com'
+ REQUIRE SSL;
+grant select on test.* to 'user_ssl_x509'@'santa.claus.ipv6.example.com'
+ REQUIRE SUBJECT '/C=??/ST=??/L=??/
+ O=No such thing/
+ CN=Santa Claus/emailAddress=santa.claus@example.com';
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_fake_ipv6,getnameinfo_fake_ipv6,getaddrinfo_fake_good_ipv6";
+ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 1
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl'@'santa.claus.ipv6.example.com' (using password: NO)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 2
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 3
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+ERROR 28000: Access denied for user 'user_ssl_x509'@'santa.claus.ipv6.example.com' (using password: YES)
+"Dumping performance_schema.host_cache"
+IP 2001:db8::6:6
+HOST santa.claus.ipv6.example.com
+HOST_VALIDATED YES
+SUM_CONNECT_ERRORS 0
+COUNT_HOST_BLOCKED_ERRORS 0
+COUNT_NAMEINFO_TRANSIENT_ERRORS 0
+COUNT_NAMEINFO_PERMANENT_ERRORS 0
+COUNT_FORMAT_ERRORS 0
+COUNT_ADDRINFO_TRANSIENT_ERRORS 0
+COUNT_ADDRINFO_PERMANENT_ERRORS 0
+COUNT_FCRDNS_ERRORS 0
+COUNT_HOST_ACL_ERRORS 0
+COUNT_NO_AUTH_PLUGIN_ERRORS 0
+COUNT_AUTH_PLUGIN_ERRORS 0
+COUNT_HANDSHAKE_ERRORS 0
+COUNT_PROXY_USER_ERRORS 0
+COUNT_PROXY_USER_ACL_ERRORS 0
+COUNT_AUTHENTICATION_ERRORS 0
+COUNT_SSL_ERRORS 4
+COUNT_MAX_USER_CONNECTIONS_ERRORS 0
+COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 0
+COUNT_DEFAULT_DATABASE_ERRORS 0
+COUNT_INIT_CONNECT_ERRORS 0
+COUNT_LOCAL_ERRORS 0
+COUNT_UNKNOWN_ERRORS 0
+FIRST_ERROR_SEEN set
+LAST_ERROR_SEEN set
+drop user 'user_ssl'@'santa.claus.ipv6.example.com';
+drop user 'user_ssl_x509'@'santa.claus.ipv6.example.com';
+set global debug= default;
diff --git a/mysql-test/suite/perfschema/r/hostcache_peer_addr.result b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
new file mode 100644
index 00000000000..0eff14b50f0
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/hostcache_peer_addr.result
@@ -0,0 +1,50 @@
+flush status;
+flush hosts;
+select @@global.debug;
+@@global.debug
+
+show global status like "connection_errors_%";
+Variable_name Value
+Connection_errors_accept 0
+Connection_errors_internal 0
+Connection_errors_max_connections 0
+Connection_errors_peer_address 0
+Connection_errors_select 0
+Connection_errors_tcpwrap 0
+select "Con1 is alive";
+Con1 is alive
+Con1 is alive
+select current_user();
+current_user()
+root@localhost
+set global debug= "+d,vio_peer_addr_error";
+ERROR HY000: Can't get hostname for your address
+show global status like "connection_errors_%";
+Variable_name Value
+Connection_errors_accept 0
+Connection_errors_internal 0
+Connection_errors_max_connections 0
+Connection_errors_peer_address 1
+Connection_errors_select 0
+Connection_errors_tcpwrap 0
+"Dumping performance_schema.host_cache"
+ERROR HY000: Can't get hostname for your address
+show global status like "connection_errors_%";
+Variable_name Value
+Connection_errors_accept 0
+Connection_errors_internal 0
+Connection_errors_max_connections 0
+Connection_errors_peer_address 2
+Connection_errors_select 0
+Connection_errors_tcpwrap 0
+"Dumping performance_schema.host_cache"
+set global debug= default;
+flush status;
+show global status like "connection_errors_%";
+Variable_name Value
+Connection_errors_accept 0
+Connection_errors_internal 0
+Connection_errors_max_connections 0
+Connection_errors_peer_address 0
+Connection_errors_select 0
+Connection_errors_tcpwrap 0
diff --git a/mysql-test/suite/perfschema/r/indexed_table_io.result b/mysql-test/suite/perfschema/r/indexed_table_io.result
new file mode 100644
index 00000000000..6b420323b74
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/indexed_table_io.result
@@ -0,0 +1,158 @@
+drop table if exists test.no_index_tab;
+drop table if exists test.index_tab;
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+create table test.no_index_tab
+( a int, b char(30) default 'Default') engine = MyISAM;
+create table test.index_tab
+( a int, b char(30) default 'Default', unique key uidx(a)) engine = MyISAM;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` int(11) DEFAULT NULL,
+ `b` char(30) DEFAULT 'Default'
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table test.index_tab;
+Table Create Table
+index_tab CREATE TABLE `index_tab` (
+ `a` int(11) DEFAULT NULL,
+ `b` char(30) DEFAULT 'Default',
+ UNIQUE KEY `uidx` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+# Printing of 100 inserts per table is suppressed
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'no_index_tab';
+COUNT(*)
+100
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'index_tab';
+COUNT(*)
+100
+select count(*) from test.no_index_tab;
+count(*)
+100
+select count(*) from test.index_tab;
+count(*)
+100
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+select avg(a) from test.no_index_tab;
+avg(a)
+50.5000
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'no_index_tab';
+COUNT(*)
+101
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+select avg(a) from test.index_tab;
+avg(a)
+50.5000
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'index_tab';
+COUNT(*)
+101
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+select 1 as my_column from test.no_index_tab where a = 50;
+my_column
+1
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'no_index_tab';
+COUNT(*)
+101
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+select 1 as my_column from test.index_tab where a = 50;
+my_column
+1
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'index_tab';
+COUNT(*)
+1
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+delete from test.no_index_tab where a = 51;
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'no_index_tab';
+COUNT(*)
+102
+truncate table performance_schema.events_waits_history_long;
+update performance_schema.setup_consumers set enabled='YES';
+delete from test.index_tab where a = 51;
+update performance_schema.setup_consumers set enabled='NO';
+select COUNT(*)
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+and object_schema = 'test'
+and object_name = 'index_tab';
+COUNT(*)
+2
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+drop table test.no_index_tab;
+drop table test.index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/information_schema.result b/mysql-test/suite/perfschema/r/information_schema.result
index ab464cce687..e38c13213b7 100644
--- a/mysql-test/suite/perfschema/r/information_schema.result
+++ b/mysql-test/suite/perfschema/r/information_schema.result
@@ -2,188 +2,485 @@ select TABLE_SCHEMA, lower(TABLE_NAME), TABLE_CATALOG
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
TABLE_SCHEMA lower(TABLE_NAME) TABLE_CATALOG
+performance_schema accounts def
performance_schema cond_instances def
+performance_schema events_stages_current def
+performance_schema events_stages_history def
+performance_schema events_stages_history_long def
+performance_schema events_stages_summary_by_account_by_event_name def
+performance_schema events_stages_summary_by_host_by_event_name def
+performance_schema events_stages_summary_by_thread_by_event_name def
+performance_schema events_stages_summary_by_user_by_event_name def
+performance_schema events_stages_summary_global_by_event_name def
+performance_schema events_statements_current def
+performance_schema events_statements_history def
+performance_schema events_statements_history_long def
+performance_schema events_statements_summary_by_account_by_event_name def
+performance_schema events_statements_summary_by_digest def
+performance_schema events_statements_summary_by_host_by_event_name def
+performance_schema events_statements_summary_by_thread_by_event_name def
+performance_schema events_statements_summary_by_user_by_event_name def
+performance_schema events_statements_summary_global_by_event_name def
performance_schema events_waits_current def
performance_schema events_waits_history def
performance_schema events_waits_history_long def
+performance_schema events_waits_summary_by_account_by_event_name def
+performance_schema events_waits_summary_by_host_by_event_name def
performance_schema events_waits_summary_by_instance def
performance_schema events_waits_summary_by_thread_by_event_name def
+performance_schema events_waits_summary_by_user_by_event_name def
performance_schema events_waits_summary_global_by_event_name def
performance_schema file_instances def
performance_schema file_summary_by_event_name def
performance_schema file_summary_by_instance def
+performance_schema host_cache def
+performance_schema hosts def
performance_schema mutex_instances def
+performance_schema objects_summary_global_by_type def
performance_schema performance_timers def
performance_schema rwlock_instances def
+performance_schema setup_actors def
performance_schema setup_consumers def
performance_schema setup_instruments def
+performance_schema setup_objects def
performance_schema setup_timers def
+performance_schema socket_instances def
+performance_schema socket_summary_by_event_name def
+performance_schema socket_summary_by_instance def
+performance_schema table_io_waits_summary_by_index_usage def
+performance_schema table_io_waits_summary_by_table def
+performance_schema table_lock_waits_summary_by_table def
performance_schema threads def
+performance_schema users def
select lower(TABLE_NAME), TABLE_TYPE, ENGINE
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) TABLE_TYPE ENGINE
+accounts BASE TABLE PERFORMANCE_SCHEMA
cond_instances BASE TABLE PERFORMANCE_SCHEMA
+events_stages_current BASE TABLE PERFORMANCE_SCHEMA
+events_stages_history BASE TABLE PERFORMANCE_SCHEMA
+events_stages_history_long BASE TABLE PERFORMANCE_SCHEMA
+events_stages_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_stages_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_stages_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_stages_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_stages_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_current BASE TABLE PERFORMANCE_SCHEMA
+events_statements_history BASE TABLE PERFORMANCE_SCHEMA
+events_statements_history_long BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_digest BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_statements_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_waits_current BASE TABLE PERFORMANCE_SCHEMA
events_waits_history BASE TABLE PERFORMANCE_SCHEMA
events_waits_history_long BASE TABLE PERFORMANCE_SCHEMA
+events_waits_summary_by_account_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_waits_summary_by_host_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_waits_summary_by_instance BASE TABLE PERFORMANCE_SCHEMA
events_waits_summary_by_thread_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+events_waits_summary_by_user_by_event_name BASE TABLE PERFORMANCE_SCHEMA
events_waits_summary_global_by_event_name BASE TABLE PERFORMANCE_SCHEMA
file_instances BASE TABLE PERFORMANCE_SCHEMA
file_summary_by_event_name BASE TABLE PERFORMANCE_SCHEMA
file_summary_by_instance BASE TABLE PERFORMANCE_SCHEMA
+host_cache BASE TABLE PERFORMANCE_SCHEMA
+hosts BASE TABLE PERFORMANCE_SCHEMA
mutex_instances BASE TABLE PERFORMANCE_SCHEMA
+objects_summary_global_by_type BASE TABLE PERFORMANCE_SCHEMA
performance_timers BASE TABLE PERFORMANCE_SCHEMA
rwlock_instances BASE TABLE PERFORMANCE_SCHEMA
+setup_actors BASE TABLE PERFORMANCE_SCHEMA
setup_consumers BASE TABLE PERFORMANCE_SCHEMA
setup_instruments BASE TABLE PERFORMANCE_SCHEMA
+setup_objects BASE TABLE PERFORMANCE_SCHEMA
setup_timers BASE TABLE PERFORMANCE_SCHEMA
+socket_instances BASE TABLE PERFORMANCE_SCHEMA
+socket_summary_by_event_name BASE TABLE PERFORMANCE_SCHEMA
+socket_summary_by_instance BASE TABLE PERFORMANCE_SCHEMA
+table_io_waits_summary_by_index_usage BASE TABLE PERFORMANCE_SCHEMA
+table_io_waits_summary_by_table BASE TABLE PERFORMANCE_SCHEMA
+table_lock_waits_summary_by_table BASE TABLE PERFORMANCE_SCHEMA
threads BASE TABLE PERFORMANCE_SCHEMA
+users BASE TABLE PERFORMANCE_SCHEMA
select lower(TABLE_NAME), VERSION, ROW_FORMAT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) VERSION ROW_FORMAT
+accounts 10 Fixed
cond_instances 10 Dynamic
+events_stages_current 10 Dynamic
+events_stages_history 10 Dynamic
+events_stages_history_long 10 Dynamic
+events_stages_summary_by_account_by_event_name 10 Dynamic
+events_stages_summary_by_host_by_event_name 10 Dynamic
+events_stages_summary_by_thread_by_event_name 10 Dynamic
+events_stages_summary_by_user_by_event_name 10 Dynamic
+events_stages_summary_global_by_event_name 10 Dynamic
+events_statements_current 10 Dynamic
+events_statements_history 10 Dynamic
+events_statements_history_long 10 Dynamic
+events_statements_summary_by_account_by_event_name 10 Dynamic
+events_statements_summary_by_digest 10 Dynamic
+events_statements_summary_by_host_by_event_name 10 Dynamic
+events_statements_summary_by_thread_by_event_name 10 Dynamic
+events_statements_summary_by_user_by_event_name 10 Dynamic
+events_statements_summary_global_by_event_name 10 Dynamic
events_waits_current 10 Dynamic
events_waits_history 10 Dynamic
events_waits_history_long 10 Dynamic
+events_waits_summary_by_account_by_event_name 10 Dynamic
+events_waits_summary_by_host_by_event_name 10 Dynamic
events_waits_summary_by_instance 10 Dynamic
events_waits_summary_by_thread_by_event_name 10 Dynamic
+events_waits_summary_by_user_by_event_name 10 Dynamic
events_waits_summary_global_by_event_name 10 Dynamic
file_instances 10 Dynamic
file_summary_by_event_name 10 Dynamic
file_summary_by_instance 10 Dynamic
+host_cache 10 Dynamic
+hosts 10 Fixed
mutex_instances 10 Dynamic
+objects_summary_global_by_type 10 Dynamic
performance_timers 10 Fixed
rwlock_instances 10 Dynamic
+setup_actors 10 Fixed
setup_consumers 10 Dynamic
setup_instruments 10 Dynamic
+setup_objects 10 Dynamic
setup_timers 10 Dynamic
+socket_instances 10 Dynamic
+socket_summary_by_event_name 10 Dynamic
+socket_summary_by_instance 10 Dynamic
+table_io_waits_summary_by_index_usage 10 Dynamic
+table_io_waits_summary_by_table 10 Dynamic
+table_lock_waits_summary_by_table 10 Dynamic
threads 10 Dynamic
+users 10 Fixed
select lower(TABLE_NAME), TABLE_ROWS, AVG_ROW_LENGTH
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) TABLE_ROWS AVG_ROW_LENGTH
+accounts 1000 0
cond_instances 1000 0
+events_stages_current 1000 0
+events_stages_history 1000 0
+events_stages_history_long 10000 0
+events_stages_summary_by_account_by_event_name 1000 0
+events_stages_summary_by_host_by_event_name 1000 0
+events_stages_summary_by_thread_by_event_name 1000 0
+events_stages_summary_by_user_by_event_name 1000 0
+events_stages_summary_global_by_event_name 1000 0
+events_statements_current 1000 0
+events_statements_history 1000 0
+events_statements_history_long 10000 0
+events_statements_summary_by_account_by_event_name 1000 0
+events_statements_summary_by_digest 1000 0
+events_statements_summary_by_host_by_event_name 1000 0
+events_statements_summary_by_thread_by_event_name 1000 0
+events_statements_summary_by_user_by_event_name 1000 0
+events_statements_summary_global_by_event_name 1000 0
events_waits_current 1000 0
events_waits_history 1000 0
events_waits_history_long 10000 0
+events_waits_summary_by_account_by_event_name 1000 0
+events_waits_summary_by_host_by_event_name 1000 0
events_waits_summary_by_instance 1000 0
events_waits_summary_by_thread_by_event_name 1000 0
+events_waits_summary_by_user_by_event_name 1000 0
events_waits_summary_global_by_event_name 1000 0
file_instances 1000 0
file_summary_by_event_name 1000 0
file_summary_by_instance 1000 0
+host_cache 1000 0
+hosts 1000 0
mutex_instances 1000 0
+objects_summary_global_by_type 1000 0
performance_timers 5 0
rwlock_instances 1000 0
-setup_consumers 8 0
+setup_actors 1 0
+setup_consumers 12 0
setup_instruments 1000 0
-setup_timers 1 0
+setup_objects 4 0
+setup_timers 4 0
+socket_instances 1000 0
+socket_summary_by_event_name 1000 0
+socket_summary_by_instance 1000 0
+table_io_waits_summary_by_index_usage 1000 0
+table_io_waits_summary_by_table 1000 0
+table_lock_waits_summary_by_table 1000 0
threads 1000 0
+users 1000 0
select lower(TABLE_NAME), DATA_LENGTH, MAX_DATA_LENGTH
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) DATA_LENGTH MAX_DATA_LENGTH
+accounts 0 0
cond_instances 0 0
+events_stages_current 0 0
+events_stages_history 0 0
+events_stages_history_long 0 0
+events_stages_summary_by_account_by_event_name 0 0
+events_stages_summary_by_host_by_event_name 0 0
+events_stages_summary_by_thread_by_event_name 0 0
+events_stages_summary_by_user_by_event_name 0 0
+events_stages_summary_global_by_event_name 0 0
+events_statements_current 0 0
+events_statements_history 0 0
+events_statements_history_long 0 0
+events_statements_summary_by_account_by_event_name 0 0
+events_statements_summary_by_digest 0 0
+events_statements_summary_by_host_by_event_name 0 0
+events_statements_summary_by_thread_by_event_name 0 0
+events_statements_summary_by_user_by_event_name 0 0
+events_statements_summary_global_by_event_name 0 0
events_waits_current 0 0
events_waits_history 0 0
events_waits_history_long 0 0
+events_waits_summary_by_account_by_event_name 0 0
+events_waits_summary_by_host_by_event_name 0 0
events_waits_summary_by_instance 0 0
events_waits_summary_by_thread_by_event_name 0 0
+events_waits_summary_by_user_by_event_name 0 0
events_waits_summary_global_by_event_name 0 0
file_instances 0 0
file_summary_by_event_name 0 0
file_summary_by_instance 0 0
+host_cache 0 0
+hosts 0 0
mutex_instances 0 0
+objects_summary_global_by_type 0 0
performance_timers 0 0
rwlock_instances 0 0
+setup_actors 0 0
setup_consumers 0 0
setup_instruments 0 0
+setup_objects 0 0
setup_timers 0 0
+socket_instances 0 0
+socket_summary_by_event_name 0 0
+socket_summary_by_instance 0 0
+table_io_waits_summary_by_index_usage 0 0
+table_io_waits_summary_by_table 0 0
+table_lock_waits_summary_by_table 0 0
threads 0 0
+users 0 0
select lower(TABLE_NAME), INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) INDEX_LENGTH DATA_FREE AUTO_INCREMENT
+accounts 0 0 NULL
cond_instances 0 0 NULL
+events_stages_current 0 0 NULL
+events_stages_history 0 0 NULL
+events_stages_history_long 0 0 NULL
+events_stages_summary_by_account_by_event_name 0 0 NULL
+events_stages_summary_by_host_by_event_name 0 0 NULL
+events_stages_summary_by_thread_by_event_name 0 0 NULL
+events_stages_summary_by_user_by_event_name 0 0 NULL
+events_stages_summary_global_by_event_name 0 0 NULL
+events_statements_current 0 0 NULL
+events_statements_history 0 0 NULL
+events_statements_history_long 0 0 NULL
+events_statements_summary_by_account_by_event_name 0 0 NULL
+events_statements_summary_by_digest 0 0 NULL
+events_statements_summary_by_host_by_event_name 0 0 NULL
+events_statements_summary_by_thread_by_event_name 0 0 NULL
+events_statements_summary_by_user_by_event_name 0 0 NULL
+events_statements_summary_global_by_event_name 0 0 NULL
events_waits_current 0 0 NULL
events_waits_history 0 0 NULL
events_waits_history_long 0 0 NULL
+events_waits_summary_by_account_by_event_name 0 0 NULL
+events_waits_summary_by_host_by_event_name 0 0 NULL
events_waits_summary_by_instance 0 0 NULL
events_waits_summary_by_thread_by_event_name 0 0 NULL
+events_waits_summary_by_user_by_event_name 0 0 NULL
events_waits_summary_global_by_event_name 0 0 NULL
file_instances 0 0 NULL
file_summary_by_event_name 0 0 NULL
file_summary_by_instance 0 0 NULL
+host_cache 0 0 NULL
+hosts 0 0 NULL
mutex_instances 0 0 NULL
+objects_summary_global_by_type 0 0 NULL
performance_timers 0 0 NULL
rwlock_instances 0 0 NULL
+setup_actors 0 0 NULL
setup_consumers 0 0 NULL
setup_instruments 0 0 NULL
+setup_objects 0 0 NULL
setup_timers 0 0 NULL
+socket_instances 0 0 NULL
+socket_summary_by_event_name 0 0 NULL
+socket_summary_by_instance 0 0 NULL
+table_io_waits_summary_by_index_usage 0 0 NULL
+table_io_waits_summary_by_table 0 0 NULL
+table_lock_waits_summary_by_table 0 0 NULL
threads 0 0 NULL
+users 0 0 NULL
select lower(TABLE_NAME), CREATE_TIME, UPDATE_TIME, CHECK_TIME
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) CREATE_TIME UPDATE_TIME CHECK_TIME
+accounts NULL NULL NULL
cond_instances NULL NULL NULL
+events_stages_current NULL NULL NULL
+events_stages_history NULL NULL NULL
+events_stages_history_long NULL NULL NULL
+events_stages_summary_by_account_by_event_name NULL NULL NULL
+events_stages_summary_by_host_by_event_name NULL NULL NULL
+events_stages_summary_by_thread_by_event_name NULL NULL NULL
+events_stages_summary_by_user_by_event_name NULL NULL NULL
+events_stages_summary_global_by_event_name NULL NULL NULL
+events_statements_current NULL NULL NULL
+events_statements_history NULL NULL NULL
+events_statements_history_long NULL NULL NULL
+events_statements_summary_by_account_by_event_name NULL NULL NULL
+events_statements_summary_by_digest NULL NULL NULL
+events_statements_summary_by_host_by_event_name NULL NULL NULL
+events_statements_summary_by_thread_by_event_name NULL NULL NULL
+events_statements_summary_by_user_by_event_name NULL NULL NULL
+events_statements_summary_global_by_event_name NULL NULL NULL
events_waits_current NULL NULL NULL
events_waits_history NULL NULL NULL
events_waits_history_long NULL NULL NULL
+events_waits_summary_by_account_by_event_name NULL NULL NULL
+events_waits_summary_by_host_by_event_name NULL NULL NULL
events_waits_summary_by_instance NULL NULL NULL
events_waits_summary_by_thread_by_event_name NULL NULL NULL
+events_waits_summary_by_user_by_event_name NULL NULL NULL
events_waits_summary_global_by_event_name NULL NULL NULL
file_instances NULL NULL NULL
file_summary_by_event_name NULL NULL NULL
file_summary_by_instance NULL NULL NULL
+host_cache NULL NULL NULL
+hosts NULL NULL NULL
mutex_instances NULL NULL NULL
+objects_summary_global_by_type NULL NULL NULL
performance_timers NULL NULL NULL
rwlock_instances NULL NULL NULL
+setup_actors NULL NULL NULL
setup_consumers NULL NULL NULL
setup_instruments NULL NULL NULL
+setup_objects NULL NULL NULL
setup_timers NULL NULL NULL
+socket_instances NULL NULL NULL
+socket_summary_by_event_name NULL NULL NULL
+socket_summary_by_instance NULL NULL NULL
+table_io_waits_summary_by_index_usage NULL NULL NULL
+table_io_waits_summary_by_table NULL NULL NULL
+table_lock_waits_summary_by_table NULL NULL NULL
threads NULL NULL NULL
+users NULL NULL NULL
select lower(TABLE_NAME), TABLE_COLLATION, CHECKSUM
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) TABLE_COLLATION CHECKSUM
+accounts utf8_general_ci NULL
cond_instances utf8_general_ci NULL
+events_stages_current utf8_general_ci NULL
+events_stages_history utf8_general_ci NULL
+events_stages_history_long utf8_general_ci NULL
+events_stages_summary_by_account_by_event_name utf8_general_ci NULL
+events_stages_summary_by_host_by_event_name utf8_general_ci NULL
+events_stages_summary_by_thread_by_event_name utf8_general_ci NULL
+events_stages_summary_by_user_by_event_name utf8_general_ci NULL
+events_stages_summary_global_by_event_name utf8_general_ci NULL
+events_statements_current utf8_general_ci NULL
+events_statements_history utf8_general_ci NULL
+events_statements_history_long utf8_general_ci NULL
+events_statements_summary_by_account_by_event_name utf8_general_ci NULL
+events_statements_summary_by_digest utf8_general_ci NULL
+events_statements_summary_by_host_by_event_name utf8_general_ci NULL
+events_statements_summary_by_thread_by_event_name utf8_general_ci NULL
+events_statements_summary_by_user_by_event_name utf8_general_ci NULL
+events_statements_summary_global_by_event_name utf8_general_ci NULL
events_waits_current utf8_general_ci NULL
events_waits_history utf8_general_ci NULL
events_waits_history_long utf8_general_ci NULL
+events_waits_summary_by_account_by_event_name utf8_general_ci NULL
+events_waits_summary_by_host_by_event_name utf8_general_ci NULL
events_waits_summary_by_instance utf8_general_ci NULL
events_waits_summary_by_thread_by_event_name utf8_general_ci NULL
+events_waits_summary_by_user_by_event_name utf8_general_ci NULL
events_waits_summary_global_by_event_name utf8_general_ci NULL
file_instances utf8_general_ci NULL
file_summary_by_event_name utf8_general_ci NULL
file_summary_by_instance utf8_general_ci NULL
+host_cache utf8_general_ci NULL
+hosts utf8_general_ci NULL
mutex_instances utf8_general_ci NULL
+objects_summary_global_by_type utf8_general_ci NULL
performance_timers utf8_general_ci NULL
rwlock_instances utf8_general_ci NULL
+setup_actors utf8_general_ci NULL
setup_consumers utf8_general_ci NULL
setup_instruments utf8_general_ci NULL
+setup_objects utf8_general_ci NULL
setup_timers utf8_general_ci NULL
+socket_instances utf8_general_ci NULL
+socket_summary_by_event_name utf8_general_ci NULL
+socket_summary_by_instance utf8_general_ci NULL
+table_io_waits_summary_by_index_usage utf8_general_ci NULL
+table_io_waits_summary_by_table utf8_general_ci NULL
+table_lock_waits_summary_by_table utf8_general_ci NULL
threads utf8_general_ci NULL
+users utf8_general_ci NULL
select lower(TABLE_NAME), TABLE_COMMENT
from information_schema.tables
where TABLE_SCHEMA='performance_schema';
lower(TABLE_NAME) TABLE_COMMENT
+accounts
cond_instances
+events_stages_current
+events_stages_history
+events_stages_history_long
+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
+events_statements_current
+events_statements_history
+events_statements_history_long
+events_statements_summary_by_account_by_event_name
+events_statements_summary_by_digest
+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
events_waits_current
events_waits_history
events_waits_history_long
+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_instances
file_summary_by_event_name
file_summary_by_instance
+host_cache
+hosts
mutex_instances
+objects_summary_global_by_type
performance_timers
rwlock_instances
+setup_actors
setup_consumers
setup_instruments
+setup_objects
setup_timers
+socket_instances
+socket_summary_by_event_name
+socket_summary_by_instance
+table_io_waits_summary_by_index_usage
+table_io_waits_summary_by_table
+table_lock_waits_summary_by_table
threads
+users
diff --git a/mysql-test/suite/perfschema/r/innodb_table_io.result b/mysql-test/suite/perfschema/r/innodb_table_io.result
new file mode 100644
index 00000000000..d6dd7e3b122
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/innodb_table_io.result
@@ -0,0 +1,149 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = InnoDB;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note Table does not support optimize, doing recreate + analyze instead
+test.no_index_tab optimize status OK
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/memory_table_io.result b/mysql-test/suite/perfschema/r/memory_table_io.result
new file mode 100644
index 00000000000..8d314d52ec3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/memory_table_io.result
@@ -0,0 +1,147 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = MEMORY;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MEMORY DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note The storage engine for the table doesn't support optimize
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/merge_table_io.result b/mysql-test/suite/perfschema/r/merge_table_io.result
new file mode 100644
index 00000000000..8d93d3798a4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/merge_table_io.result
@@ -0,0 +1,177 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+drop table if exists test.no_index_tab_1;
+drop table if exists test.no_index_tab_2;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab_1
+( a varchar(255) not null, b int not null) engine = MyISAM;
+insert into marker set a = 1;
+create table test.no_index_tab_2 like test.no_index_tab_1;
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = merge
+union = (test.no_index_tab_1,test.no_index_tab_2) insert_method = first;
+insert into marker set a = 1;
+show create table test.no_index_tab_1;
+Table Create Table
+no_index_tab_1 CREATE TABLE `no_index_tab_1` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+show create table test.no_index_tab_2;
+Table Create Table
+no_index_tab_2 CREATE TABLE `no_index_tab_2` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`no_index_tab_1`,`no_index_tab_2`)
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize note The storage engine for the table doesn't support optimize
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab_1;
+insert into marker set a = 1;
+drop table test.no_index_tab_2;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result
index 1dbde982328..2481367950b 100644
--- a/mysql-test/suite/perfschema/r/misc.result
+++ b/mysql-test/suite/perfschema/r/misc.result
@@ -1,3 +1,39 @@
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+CREATE TABLE test.t_before(a INT);
+INSERT INTO test.t_before VALUES (1);
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+test t_before
+RENAME TABLE test.t_before TO test.t_after;
+SELECT COUNT(*) FROM test.t_after;
+COUNT(*)
+1
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+test t_after
+DROP TABLE test.t_after;
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+CREATE TABLE test.t1(a INT);
+INSERT INTO test.t1 VALUES (1);
+CREATE VIEW test.v1 AS SELECT * FROM test.t1;
+SELECT COUNT(*) FROM test.v1;
+COUNT(*)
+1
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
+test t1
+DROP VIEW test.v1;
+DROP TABLE test.t1;
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
SELECT EVENT_ID FROM performance_schema.events_waits_current
WHERE THREAD_ID IN
(SELECT THREAD_ID FROM performance_schema.threads)
@@ -6,11 +42,20 @@ AND EVENT_NAME IN
WHERE NAME LIKE "wait/synch/%")
LIMIT 1;
create table test.t1(a int) engine=performance_schema;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
create table test.t1 like performance_schema.events_waits_current;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
create table performance_schema.t1(a int);
ERROR 42000: CREATE command denied to user 'root'@'localhost' for table 't1'
+SELECT object_schema, object_name FROM performance_schema.objects_summary_global_by_type
+WHERE object_schema='test';
+object_schema object_name
drop table if exists test.ghost;
create table test.ghost (a int, b int);
alter table test.ghost add index index_a(a);
@@ -27,3 +72,23 @@ where file_name like "%ghost%";
FILE_NAME EVENT_NAME OPEN_COUNT
select * from performance_schema.no_such_table;
ERROR 42S02: Table 'performance_schema.no_such_table' doesn't exist
+DROP TABLE IF EXISTS t_60905;
+CREATE TABLE t_60905 (i INT, j INT, KEY(i)) ENGINE = InnoDB;
+INSERT INTO t_60905 VALUES
+(1,2), (3,4), (5,6), (7,8), (9,10);
+DELETE FROM t_60905 WHERE i = 1;
+DELETE FROM t_60905 WHERE j = 8;
+SELECT object_schema,
+object_name,
+index_name,
+count_fetch,
+count_insert,
+count_update,
+count_delete
+FROM performance_schema.table_io_waits_summary_by_index_usage
+WHERE object_schema = 'test'
+ AND object_name = 't_60905';
+object_schema object_name index_name count_fetch count_insert count_update count_delete
+test t_60905 i 2 0 0 1
+test t_60905 NULL 5 5 0 1
+DROP TABLE t_60905;
diff --git a/mysql-test/suite/perfschema/r/multi_table_io.result b/mysql-test/suite/perfschema/r/multi_table_io.result
new file mode 100644
index 00000000000..b72cc6b164f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/multi_table_io.result
@@ -0,0 +1,108 @@
+drop schema if exists test1;
+drop table if exists test.t1;
+create schema test1;
+create table test.t1 (col1 bigint, col2 varchar(30)) engine = myisam;
+insert into test.t1 values(1,'One');
+create table test1.t2 like test.t1;
+show create table test.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `col1` bigint(20) DEFAULT NULL,
+ `col2` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table test1.t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `col1` bigint(20) DEFAULT NULL,
+ `col2` varchar(30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+update performance_schema.setup_consumers set enabled = 'YES';
+insert into test1.t2 select * from test.t1;
+insert into marker set a = 1;
+select * from test.t1 natural join test1.t2;
+col1 col2
+1 One
+insert into marker set a = 1;
+select * from test.t1 where col2 = (select col2 from test1.t2 where test.t1.col1 = test1.t2.col1);
+col1 col2
+1 One
+insert into marker set a = 1;
+update test.t1 AS a natural join test1.t2 AS b SET a.col2 = 'updated' , b.col2 = 'updated';
+insert into marker set a = 1;
+delete from test.t1, test1.t2 using test.t1 inner join test1.t2
+where test.t1.col1 = test1.t2.col1;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ('test','test1')
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test1 t2 delete NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+drop table test.t1;
+drop schema test1;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/myisam_file_io.result b/mysql-test/suite/perfschema/r/myisam_file_io.result
index 5cdcf6ac789..1014abee53b 100644
--- a/mysql-test/suite/perfschema/r/myisam_file_io.result
+++ b/mysql-test/suite/perfschema/r/myisam_file_io.result
@@ -43,19 +43,27 @@ wait/io/file/myisam/dfile mi_dynrec.c: write 20 no_index_tab.MYD
wait/io/file/myisam/kfile mi_open.c: write 124 no_index_tab.MYI
show status like 'performance_schema_%';
Variable_name Value
+Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
Performance_schema_locker_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
update performance_schema.setup_instruments set enabled='YES';
drop table test.no_index_tab;
diff --git a/mysql-test/suite/perfschema/r/myisam_table_io.result b/mysql-test/suite/perfschema/r/myisam_table_io.result
new file mode 100644
index 00000000000..517252a9dd6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/myisam_table_io.result
@@ -0,0 +1,145 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = MyISAM;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize status OK
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/nesting.result b/mysql-test/suite/perfschema/r/nesting.result
new file mode 100644
index 00000000000..33bdbd7036c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/nesting.result
@@ -0,0 +1,233 @@
+"================== con1 connected =================="
+select "MARKER_BEGIN" as marker;
+marker
+MARKER_BEGIN
+select "This is simple statement one" as payload;
+payload
+This is simple statement one
+select "This is simple statement two" as payload;
+payload
+This is simple statement two
+select "This is the first part of a multi query" as payload;
+select "And this is the second part of a multi query" as payload;
+select "With a third part to make things complete" as payload;
+$$
+payload
+This is the first part of a multi query
+payload
+And this is the second part of a multi query
+payload
+With a third part to make things complete
+select "MARKER_END" as marker;
+marker
+MARKER_END
+select "Con1 is done with payload" as status;
+status
+Con1 is done with payload
+"================== con1 done =================="
+set @con1_tid = (select thread_id from performance_schema.threads
+where processlist_user = 'user1');
+select (@con1_tid is not null) as expected;
+expected
+1
+set @marker_begin = (select event_id from performance_schema.events_statements_history_long
+where sql_text like "%MARKER_BEGIN%" and thread_id = @con1_tid);
+select (@marker_begin is not null) as expected;
+expected
+1
+set @marker_end = (select end_event_id from performance_schema.events_statements_history_long
+where sql_text like "%MARKER_END%" and thread_id = @con1_tid);
+select (@marker_end is not null) as expected;
+expected
+1
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+select * from (
+(
+select (event_id - @marker_begin) as relative_event_id,
+(end_event_id - @marker_begin) as relative_end_event_id,
+event_name,
+sql_text as comment,
+nesting_event_type,
+(nesting_event_id - @marker_begin) as relative_nesting_event_id
+from performance_schema.events_statements_history_long
+where (thread_id = @con1_tid)
+and (@marker_begin <= event_id)
+and (end_event_id <= @marker_end)
+)
+union
+(
+select (event_id - @marker_begin) as relative_event_id,
+(end_event_id - @marker_begin) as relative_end_event_id,
+event_name,
+"(stage)" as comment,
+nesting_event_type,
+(nesting_event_id - @marker_begin) as relative_nesting_event_id
+from performance_schema.events_stages_history_long
+where (thread_id = @con1_tid)
+and (@marker_begin <= event_id)
+and (end_event_id <= @marker_end)
+)
+union
+(
+select (event_id - @marker_begin) as relative_event_id,
+(end_event_id - @marker_begin) as relative_end_event_id,
+event_name,
+operation as comment,
+nesting_event_type,
+(nesting_event_id - @marker_begin) as relative_nesting_event_id
+from performance_schema.events_waits_history_long
+where (thread_id = @con1_tid)
+and (@marker_begin <= event_id)
+and (end_event_id <= @marker_end)
+)
+) all_events
+order by relative_event_id asc;
+relative_event_id relative_end_event_id event_name comment nesting_event_type relative_nesting_event_id
+0 17 statement/sql/select select "MARKER_BEGIN" as marker NULL NULL
+1 5 stage/sql/init (stage) STATEMENT 0
+2 2 wait/io/socket/sql/client_connection recv STAGE 1
+3 3 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
+4 4 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 1
+5 5 wait/io/file/sql/query_log write STAGE 1
+6 6 stage/sql/checking permissions (stage) STATEMENT 0
+7 7 stage/sql/Opening tables (stage) STATEMENT 0
+8 8 stage/sql/init (stage) STATEMENT 0
+9 9 stage/sql/optimizing (stage) STATEMENT 0
+10 10 stage/sql/executing (stage) STATEMENT 0
+11 11 stage/sql/end (stage) STATEMENT 0
+12 12 stage/sql/query end (stage) STATEMENT 0
+13 13 stage/sql/closing tables (stage) STATEMENT 0
+14 15 stage/sql/freeing items (stage) STATEMENT 0
+15 15 wait/io/socket/sql/client_connection send STAGE 14
+16 17 stage/sql/cleaning up (stage) STATEMENT 0
+17 17 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 16
+18 18 idle idle NULL NULL
+19 36 statement/sql/select select "This is simple statement one" as payload NULL NULL
+20 24 stage/sql/init (stage) STATEMENT 19
+21 21 wait/io/socket/sql/client_connection recv STAGE 20
+22 22 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 20
+23 23 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 20
+24 24 wait/io/file/sql/query_log write STAGE 20
+25 25 stage/sql/checking permissions (stage) STATEMENT 19
+26 26 stage/sql/Opening tables (stage) STATEMENT 19
+27 27 stage/sql/init (stage) STATEMENT 19
+28 28 stage/sql/optimizing (stage) STATEMENT 19
+29 29 stage/sql/executing (stage) STATEMENT 19
+30 30 stage/sql/end (stage) STATEMENT 19
+31 31 stage/sql/query end (stage) STATEMENT 19
+32 32 stage/sql/closing tables (stage) STATEMENT 19
+33 34 stage/sql/freeing items (stage) STATEMENT 19
+34 34 wait/io/socket/sql/client_connection send STAGE 33
+35 36 stage/sql/cleaning up (stage) STATEMENT 19
+36 36 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 35
+37 37 idle idle NULL NULL
+38 55 statement/sql/select select "This is simple statement two" as payload NULL NULL
+39 43 stage/sql/init (stage) STATEMENT 38
+40 40 wait/io/socket/sql/client_connection recv STAGE 39
+41 41 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 39
+42 42 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 39
+43 43 wait/io/file/sql/query_log write STAGE 39
+44 44 stage/sql/checking permissions (stage) STATEMENT 38
+45 45 stage/sql/Opening tables (stage) STATEMENT 38
+46 46 stage/sql/init (stage) STATEMENT 38
+47 47 stage/sql/optimizing (stage) STATEMENT 38
+48 48 stage/sql/executing (stage) STATEMENT 38
+49 49 stage/sql/end (stage) STATEMENT 38
+50 50 stage/sql/query end (stage) STATEMENT 38
+51 51 stage/sql/closing tables (stage) STATEMENT 38
+52 53 stage/sql/freeing items (stage) STATEMENT 38
+53 53 wait/io/socket/sql/client_connection send STAGE 52
+54 55 stage/sql/cleaning up (stage) STATEMENT 38
+55 55 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 54
+56 56 idle idle NULL NULL
+57 72 statement/sql/select select "This is the first part of a multi query" as payload;
+select "And this is the second part of a multi query" as payload;
+select "With a third part to make things complete" as payload NULL NULL
+58 62 stage/sql/init (stage) STATEMENT 57
+59 59 wait/io/socket/sql/client_connection recv STAGE 58
+60 60 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 58
+61 61 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 58
+62 62 wait/io/file/sql/query_log write STAGE 58
+63 63 stage/sql/checking permissions (stage) STATEMENT 57
+64 64 stage/sql/Opening tables (stage) STATEMENT 57
+65 65 stage/sql/init (stage) STATEMENT 57
+66 66 stage/sql/optimizing (stage) STATEMENT 57
+67 67 stage/sql/executing (stage) STATEMENT 57
+68 68 stage/sql/end (stage) STATEMENT 57
+69 69 stage/sql/query end (stage) STATEMENT 57
+70 70 stage/sql/closing tables (stage) STATEMENT 57
+71 72 stage/sql/freeing items (stage) STATEMENT 57
+72 72 wait/io/socket/sql/client_connection send STAGE 71
+73 86 statement/sql/select select "And this is the second part of a multi query" as payload;
+select "With a third part to make things complete" as payload NULL NULL
+74 76 stage/sql/init (stage) STATEMENT 73
+75 75 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 74
+76 76 wait/io/file/sql/query_log write STAGE 74
+77 77 stage/sql/checking permissions (stage) STATEMENT 73
+78 78 stage/sql/Opening tables (stage) STATEMENT 73
+79 79 stage/sql/init (stage) STATEMENT 73
+80 80 stage/sql/optimizing (stage) STATEMENT 73
+81 81 stage/sql/executing (stage) STATEMENT 73
+82 82 stage/sql/end (stage) STATEMENT 73
+83 83 stage/sql/query end (stage) STATEMENT 73
+84 84 stage/sql/closing tables (stage) STATEMENT 73
+85 86 stage/sql/freeing items (stage) STATEMENT 73
+86 86 wait/io/socket/sql/client_connection send STAGE 85
+87 102 statement/sql/select select "With a third part to make things complete" as payload NULL NULL
+88 90 stage/sql/init (stage) STATEMENT 87
+89 89 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 88
+90 90 wait/io/file/sql/query_log write STAGE 88
+91 91 stage/sql/checking permissions (stage) STATEMENT 87
+92 92 stage/sql/Opening tables (stage) STATEMENT 87
+93 93 stage/sql/init (stage) STATEMENT 87
+94 94 stage/sql/optimizing (stage) STATEMENT 87
+95 95 stage/sql/executing (stage) STATEMENT 87
+96 96 stage/sql/end (stage) STATEMENT 87
+97 97 stage/sql/query end (stage) STATEMENT 87
+98 98 stage/sql/closing tables (stage) STATEMENT 87
+99 100 stage/sql/freeing items (stage) STATEMENT 87
+100 100 wait/io/socket/sql/client_connection send STAGE 99
+101 102 stage/sql/cleaning up (stage) STATEMENT 87
+102 102 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 101
+103 103 idle idle NULL NULL
+104 121 statement/sql/select select "MARKER_END" as marker NULL NULL
+105 109 stage/sql/init (stage) STATEMENT 104
+106 106 wait/io/socket/sql/client_connection recv STAGE 105
+107 107 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 105
+108 108 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 105
+109 109 wait/io/file/sql/query_log write STAGE 105
+110 110 stage/sql/checking permissions (stage) STATEMENT 104
+111 111 stage/sql/Opening tables (stage) STATEMENT 104
+112 112 stage/sql/init (stage) STATEMENT 104
+113 113 stage/sql/optimizing (stage) STATEMENT 104
+114 114 stage/sql/executing (stage) STATEMENT 104
+115 115 stage/sql/end (stage) STATEMENT 104
+116 116 stage/sql/query end (stage) STATEMENT 104
+117 117 stage/sql/closing tables (stage) STATEMENT 104
+118 119 stage/sql/freeing items (stage) STATEMENT 104
+119 119 wait/io/socket/sql/client_connection send STAGE 118
+120 121 stage/sql/cleaning up (stage) STATEMENT 104
+121 121 wait/synch/mutex/sql/THD::LOCK_thd_data lock STAGE 120
diff --git a/mysql-test/suite/perfschema/r/no_threads.result b/mysql-test/suite/perfschema/r/no_threads.result
index 89ae72c8df1..f78667f4f01 100644
--- a/mysql-test/suite/perfschema/r/no_threads.result
+++ b/mysql-test/suite/perfschema/r/no_threads.result
@@ -40,4 +40,5 @@ left(source, locate(":", source)) as short_source
from performance_schema.events_waits_history_long;
event_name operation short_source
wait/synch/mutex/mysys/THR_LOCK_myisam lock mi_create.c:
+update performance_schema.setup_instruments set enabled='YES';
drop table test.t1;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
new file mode 100644
index 00000000000..72b1f35a8e6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -0,0 +1,745 @@
+drop procedure if exists check_instrument;
+create procedure check_instrument(in instr_name varchar(128))
+begin
+declare count_expected integer;
+declare count_actual integer;
+declare is_wait integer;
+declare is_stage integer;
+declare is_statement integer;
+declare is_wait_table integer;
+declare is_stage_table integer;
+declare is_statement_table integer;
+declare pfs_table_name varchar(64);
+declare msg varchar(512);
+declare msg_detail varchar(512);
+declare cmd_1 varchar(512);
+declare cmd_2 varchar(512);
+declare done integer default 0;
+declare debug integer default 0;
+declare pfs_cursor CURSOR FOR
+select table_name from information_schema.tables
+where table_schema= 'performance_schema'
+ and table_name like "events_%_by_event_name%";
+declare continue handler for sqlstate '02000'
+ set done = 1;
+select (instr_name like "wait/%") or (instr_name like "idle/%") into is_wait;
+select (instr_name like "stage/%") into is_stage;
+select (instr_name like "statement/%") into is_statement;
+select instr_name, is_wait, is_stage, is_statement;
+select count(name)
+from performance_schema.setup_instruments
+where name like (concat(instr_name, "%"))
+into count_expected;
+set cmd_1= "select count(*) from (select distinct event_name from performance_schema.";
+set cmd_2= concat(" where event_name like \"",
+ instr_name,
+ "%\") t into @count_actual");
+open pfs_cursor;
+repeat
+fetch pfs_cursor into pfs_table_name;
+if not done then
+select (pfs_table_name like "%waits%") into is_wait_table;
+select (pfs_table_name like "%stages%") into is_stage_table;
+select (pfs_table_name like "%statements%") into is_statement_table;
+select concat("Checking table ", pfs_table_name, " ...") as status;
+select concat(cmd_1, pfs_table_name, cmd_2) into @cmd;
+if debug = 1
+then
+select @cmd;
+end if;
+prepare stmt from @cmd;
+execute stmt;
+drop prepare stmt;
+set msg_detail= concat("table ", pfs_table_name,
+", instruments ", count_expected,
+", found ", @count_actual);
+if is_wait = 1 and is_wait_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing wait events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_wait = 1 and is_wait_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected wait events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_stage = 1 and is_stage_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing stage events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_stage = 1 and is_stage_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected stage events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_statement = 1 and is_statement_table = 1 and @count_actual <> count_expected
+then
+set msg= concat("Missing statement events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+if is_statement = 1 and is_statement_table = 0 and @count_actual <> 0
+then
+set msg= concat("Unexpected statement events: ", msg_detail);
+signal sqlstate '05000' set message_text= msg;
+end if;
+end if;
+until done
+end repeat;
+close pfs_cursor;
+-- Dont want to return a 02000 NOT FOUND, there should be a better way
+signal sqlstate '01000' set message_text='Done', mysql_errno=12000;
+end
+$
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+call check_instrument("wait/synch/mutex/");
+instr_name is_wait is_stage is_statement
+wait/synch/mutex/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/synch/rwlock/");
+instr_name is_wait is_stage is_statement
+wait/synch/rwlock/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/synch/cond/");
+instr_name is_wait is_stage is_statement
+wait/synch/cond/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/synch/");
+instr_name is_wait is_stage is_statement
+wait/synch/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/io/file/");
+instr_name is_wait is_stage is_statement
+wait/io/file/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/io/net/");
+instr_name is_wait is_stage is_statement
+wait/io/net/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/io/table/");
+instr_name is_wait is_stage is_statement
+wait/io/table/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/io/");
+instr_name is_wait is_stage is_statement
+wait/io/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/lock/table/");
+instr_name is_wait is_stage is_statement
+wait/lock/table/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/lock/");
+instr_name is_wait is_stage is_statement
+wait/lock/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("wait/");
+instr_name is_wait is_stage is_statement
+wait/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("stage/");
+instr_name is_wait is_stage is_statement
+stage/ 0 1 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("statement/com/");
+instr_name is_wait is_stage is_statement
+statement/com/ 0 0 1
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("statement/sql/");
+instr_name is_wait is_stage is_statement
+statement/sql/ 0 0 1
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("statement/");
+instr_name is_wait is_stage is_statement
+statement/ 0 0 1
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("idle/io/socket");
+instr_name is_wait is_stage is_statement
+idle/io/socket 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+call check_instrument("idle/");
+instr_name is_wait is_stage is_statement
+idle/ 1 0 0
+status
+Checking table events_stages_summary_by_account_by_event_name ...
+status
+Checking table events_stages_summary_by_host_by_event_name ...
+status
+Checking table events_stages_summary_by_thread_by_event_name ...
+status
+Checking table events_stages_summary_by_user_by_event_name ...
+status
+Checking table events_stages_summary_global_by_event_name ...
+status
+Checking table events_statements_summary_by_account_by_event_name ...
+status
+Checking table events_statements_summary_by_host_by_event_name ...
+status
+Checking table events_statements_summary_by_thread_by_event_name ...
+status
+Checking table events_statements_summary_by_user_by_event_name ...
+status
+Checking table events_statements_summary_global_by_event_name ...
+status
+Checking table events_waits_summary_by_account_by_event_name ...
+status
+Checking table events_waits_summary_by_host_by_event_name ...
+status
+Checking table events_waits_summary_by_thread_by_event_name ...
+status
+Checking table events_waits_summary_by_user_by_event_name ...
+status
+Checking table events_waits_summary_global_by_event_name ...
+Warnings:
+Warning 12000 Done
+drop procedure check_instrument;
diff --git a/mysql-test/suite/perfschema/r/part_table_io.result b/mysql-test/suite/perfschema/r/part_table_io.result
new file mode 100644
index 00000000000..1fa91e82ae0
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/part_table_io.result
@@ -0,0 +1,177 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = MyISAM
+PARTITION BY KEY (b) PARTITIONS 2;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY KEY (b)
+PARTITIONS 2 */
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 3
+foo 2
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 3
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize status OK
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade.result b/mysql-test/suite/perfschema/r/pfs_upgrade.result
index 4d7d9e28fe8..eff1d0d48a0 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade.result
@@ -8,24 +8,59 @@ use performance_schema;
show tables like "user_table";
Tables_in_performance_schema (user_table)
user_table
-ERROR 1050 (42S01) at line 183: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 213: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 227: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 241: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 262: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 283: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 303: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 320: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 339: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 359: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 376: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 394: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 412: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 428: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 445: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 461: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 478: Table 'threads' already exists
-ERROR 1644 (HY000) at line 1126: Unexpected content found in the performance_schema database.
+Warning: Using a password on the command line interface can be insecure.
+Warning: Using a password on the command line interface can be insecure.
+ERROR 1050 (42S01) at line 100: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 125: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 150: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 175: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 188: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 201: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 214: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 228: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 241: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 253: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 262: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 291: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 322: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 429: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 438: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 452: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 462: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 472: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 481: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 498: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 509: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 517: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 562: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 606: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 685: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 705: Table 'threads' already exists
+ERROR 1050 (42S01) at line 721: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 737: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 753: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 792: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 806: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 818: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 864: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 910: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 956: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 988: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1020: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1052: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1085: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1116: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1125: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1134: Table 'users' already exists
+ERROR 1050 (42S01) at line 1144: Table 'accounts' already exists
+ERROR 1050 (42S01) at line 1178: Table 'events_statements_summary_by_digest' already exists
+ERROR 1644 (HY000) at line 1598: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
show tables like "user_table";
Tables_in_performance_schema (user_table)
@@ -38,24 +73,59 @@ use performance_schema;
show tables like "user_view";
Tables_in_performance_schema (user_view)
user_view
-ERROR 1050 (42S01) at line 183: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 213: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 227: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 241: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 262: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 283: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 303: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 320: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 339: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 359: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 376: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 394: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 412: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 428: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 445: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 461: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 478: Table 'threads' already exists
-ERROR 1644 (HY000) at line 1126: Unexpected content found in the performance_schema database.
+Warning: Using a password on the command line interface can be insecure.
+Warning: Using a password on the command line interface can be insecure.
+ERROR 1050 (42S01) at line 100: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 125: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 150: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 175: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 188: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 201: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 214: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 228: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 241: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 253: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 262: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 291: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 322: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 429: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 438: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 452: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 462: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 472: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 481: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 498: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 509: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 517: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 562: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 606: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 685: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 705: Table 'threads' already exists
+ERROR 1050 (42S01) at line 721: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 737: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 753: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 792: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 806: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 818: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 864: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 910: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 956: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 988: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1020: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1052: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1085: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1116: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1125: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1134: Table 'users' already exists
+ERROR 1050 (42S01) at line 1144: Table 'accounts' already exists
+ERROR 1050 (42S01) at line 1178: Table 'events_statements_summary_by_digest' already exists
+ERROR 1644 (HY000) at line 1598: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
show tables like "user_view";
Tables_in_performance_schema (user_view)
@@ -66,24 +136,59 @@ drop view test.user_view;
create procedure test.user_proc()
select "Not supposed to be here";
update mysql.proc set db='performance_schema' where name='user_proc';
-ERROR 1050 (42S01) at line 183: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 213: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 227: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 241: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 262: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 283: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 303: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 320: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 339: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 359: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 376: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 394: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 412: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 428: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 445: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 461: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 478: Table 'threads' already exists
-ERROR 1644 (HY000) at line 1126: Unexpected content found in the performance_schema database.
+Warning: Using a password on the command line interface can be insecure.
+Warning: Using a password on the command line interface can be insecure.
+ERROR 1050 (42S01) at line 100: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 125: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 150: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 175: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 188: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 201: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 214: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 228: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 241: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 253: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 262: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 291: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 322: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 429: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 438: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 452: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 462: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 472: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 481: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 498: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 509: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 517: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 562: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 606: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 685: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 705: Table 'threads' already exists
+ERROR 1050 (42S01) at line 721: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 737: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 753: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 792: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 806: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 818: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 864: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 910: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 956: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 988: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1020: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1052: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1085: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1116: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1125: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1134: Table 'users' already exists
+ERROR 1050 (42S01) at line 1144: Table 'accounts' already exists
+ERROR 1050 (42S01) at line 1178: Table 'events_statements_summary_by_digest' already exists
+ERROR 1644 (HY000) at line 1598: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.proc where db='performance_schema';
name
@@ -94,24 +199,59 @@ drop procedure test.user_proc;
create function test.user_func() returns integer
return 0;
update mysql.proc set db='performance_schema' where name='user_func';
-ERROR 1050 (42S01) at line 183: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 213: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 227: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 241: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 262: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 283: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 303: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 320: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 339: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 359: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 376: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 394: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 412: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 428: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 445: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 461: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 478: Table 'threads' already exists
-ERROR 1644 (HY000) at line 1126: Unexpected content found in the performance_schema database.
+Warning: Using a password on the command line interface can be insecure.
+Warning: Using a password on the command line interface can be insecure.
+ERROR 1050 (42S01) at line 100: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 125: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 150: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 175: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 188: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 201: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 214: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 228: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 241: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 253: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 262: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 291: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 322: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 429: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 438: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 452: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 462: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 472: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 481: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 498: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 509: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 517: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 562: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 606: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 685: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 705: Table 'threads' already exists
+ERROR 1050 (42S01) at line 721: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 737: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 753: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 792: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 806: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 818: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 864: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 910: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 956: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 988: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1020: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1052: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1085: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1116: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1125: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1134: Table 'users' already exists
+ERROR 1050 (42S01) at line 1144: Table 'accounts' already exists
+ERROR 1050 (42S01) at line 1178: Table 'events_statements_summary_by_digest' already exists
+ERROR 1644 (HY000) at line 1598: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.proc where db='performance_schema';
name
@@ -122,24 +262,59 @@ drop function test.user_func;
create event test.user_event on schedule every 1 day do
select "not supposed to be here";
update mysql.event set db='performance_schema' where name='user_event';
-ERROR 1050 (42S01) at line 183: Table 'cond_instances' already exists
-ERROR 1050 (42S01) at line 213: Table 'events_waits_current' already exists
-ERROR 1050 (42S01) at line 227: Table 'events_waits_history' already exists
-ERROR 1050 (42S01) at line 241: Table 'events_waits_history_long' already exists
-ERROR 1050 (42S01) at line 262: Table 'events_waits_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 283: Table 'events_waits_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 303: Table 'events_waits_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 320: Table 'file_instances' already exists
-ERROR 1050 (42S01) at line 339: Table 'file_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 359: Table 'file_summary_by_instance' already exists
-ERROR 1050 (42S01) at line 376: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 394: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 412: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 428: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 445: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 461: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 478: Table 'threads' already exists
-ERROR 1644 (HY000) at line 1126: Unexpected content found in the performance_schema database.
+Warning: Using a password on the command line interface can be insecure.
+Warning: Using a password on the command line interface can be insecure.
+ERROR 1050 (42S01) at line 100: Table 'cond_instances' already exists
+ERROR 1050 (42S01) at line 125: Table 'events_waits_current' already exists
+ERROR 1050 (42S01) at line 150: Table 'events_waits_history' already exists
+ERROR 1050 (42S01) at line 175: Table 'events_waits_history_long' already exists
+ERROR 1050 (42S01) at line 188: Table 'events_waits_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 201: Table 'events_waits_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 214: Table 'events_waits_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 228: Table 'events_waits_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 241: Table 'events_waits_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 253: Table 'events_waits_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 262: Table 'file_instances' already exists
+ERROR 1050 (42S01) at line 291: Table 'file_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 322: Table 'file_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
+ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
+ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
+ERROR 1050 (42S01) at line 429: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 438: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 452: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 462: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 472: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 481: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 498: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 509: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 517: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 562: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 606: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 685: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 705: Table 'threads' already exists
+ERROR 1050 (42S01) at line 721: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 737: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 753: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 792: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 806: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 818: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 864: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 910: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 956: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 988: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1020: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1052: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1085: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1116: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1125: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1134: Table 'users' already exists
+ERROR 1050 (42S01) at line 1144: Table 'accounts' already exists
+ERROR 1050 (42S01) at line 1178: Table 'events_statements_summary_by_digest' already exists
+ERROR 1644 (HY000) at line 1598: Unexpected content found in the performance_schema database.
FATAL ERROR: Upgrade failed
select name from mysql.event where db='performance_schema';
name
diff --git a/mysql-test/suite/perfschema/r/privilege.result b/mysql-test/suite/perfschema/r/privilege.result
index 019d8964523..18c9a8b86f9 100644
--- a/mysql-test/suite/perfschema/r/privilege.result
+++ b/mysql-test/suite/perfschema/r/privilege.result
@@ -53,9 +53,9 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT,GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
grant DELETE on performance_schema.setup_instruments to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE,GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'setup_instruments'
grant SELECT on performance_schema.setup_instruments to 'pfs_user_3'@localhost
with GRANT OPTION;
grant UPDATE on performance_schema.setup_instruments to 'pfs_user_3'@localhost
@@ -78,11 +78,11 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT,GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
grant UPDATE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: UPDATE,GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
grant DELETE on performance_schema.events_waits_current to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE,GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'events_waits_current'
grant SELECT on performance_schema.events_waits_current to 'pfs_user_3'@localhost
with GRANT OPTION;
grant ALL on performance_schema.file_instances to 'pfs_user_3'@localhost
@@ -103,11 +103,11 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_
grant TRIGGER on performance_schema.file_instances to 'pfs_user_3'@localhost;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
grant INSERT on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: INSERT,GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: INSERT, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
grant UPDATE on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: UPDATE,GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: UPDATE, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
grant DELETE on performance_schema.file_instances to 'pfs_user_3'@localhost;
-ERROR 42000: DELETE,GRANT command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: DELETE, GRANT command denied to user 'root'@'localhost' for table 'file_instances'
grant SELECT on performance_schema.file_instances to 'pfs_user_3'@localhost
with GRANT OPTION;
grant LOCK TABLES on performance_schema.* to 'pfs_user_3'@localhost
@@ -152,13 +152,13 @@ before insert on performance_schema.file_instances
for each row begin end;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.setup_instruments;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.events_waits_current;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.file_instances;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
insert into performance_schema.setup_instruments
set name="foo";
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'setup_instruments'
@@ -179,16 +179,16 @@ unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'file_instances'
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -250,13 +250,13 @@ before insert on performance_schema.file_instances
for each row begin end;
ERROR 42000: Access denied for user 'pfs_user_1'@'localhost' to database 'performance_schema'
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.setup_instruments;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.events_waits_current;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.file_instances;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
insert into performance_schema.setup_instruments
set name="foo";
ERROR 42000: INSERT command denied to user 'pfs_user_1'@'localhost' for table 'setup_instruments'
@@ -277,16 +277,16 @@ unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_1'@'localhost' for table 'file_instances'
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -348,13 +348,13 @@ before insert on performance_schema.file_instances
for each row begin end;
ERROR 42000: Access denied for user 'pfs_user_2'@'localhost' to database 'performance_schema'
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.setup_instruments;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.events_waits_current;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.file_instances;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
insert into performance_schema.setup_instruments
set name="foo";
ERROR 42000: INSERT command denied to user 'pfs_user_2'@'localhost' for table 'setup_instruments'
@@ -375,16 +375,16 @@ unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_2'@'localhost' for table 'file_instances'
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -446,13 +446,13 @@ before insert on performance_schema.file_instances
for each row begin end;
ERROR 42000: Access denied for user 'pfs_user_3'@'localhost' to database 'performance_schema'
create table test.t1(a int) engine=PERFORMANCE_SCHEMA;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.setup_instruments;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.events_waits_current;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
create table test.t1 like performance_schema.file_instances;
-ERROR HY000: Can't create table 'test.t1' (errno: 131 "Command not supported by database")
+ERROR HY000: Can't create table 'test.t1' (errno: 131)
insert into performance_schema.setup_instruments
set name="foo";
ERROR 42000: INSERT command denied to user 'pfs_user_3'@'localhost' for table 'setup_instruments'
@@ -473,16 +473,16 @@ unlock tables;
lock table performance_schema.setup_instruments write;
unlock tables;
lock table performance_schema.events_waits_current read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.events_waits_current write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'events_waits_current'
unlock tables;
lock table performance_schema.file_instances read;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
unlock tables;
lock table performance_schema.file_instances write;
-ERROR 42000: SELECT,LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'pfs_user_3'@'localhost' for table 'file_instances'
unlock tables;
#
# WL#4818, NFS2: Can use grants to give normal user access
@@ -575,4 +575,7 @@ DROP USER pfs_user_4;
flush privileges;
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
-UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE';
+UPDATE performance_schema.setup_timers SET timer_name = 'MICROSECOND' where name="idle";
+UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="wait";
+UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="stage";
+UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="statement";
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
new file mode 100644
index 00000000000..eba7ed3c7e8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -0,0 +1,138 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+# We are forced to suppress here the server response.
+optimize table mysql.db;
+update performance_schema.setup_consumers set enabled='YES';
+update performance_schema.setup_objects set enabled='YES'
+ where object_type='TABLE' and object_schema= 'mysql';
+flush privileges;
+insert into test.marker set a = 1;
+insert into test.marker set a = 1;
+insert into test.marker set a = 1;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test", "mysql")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE mysql host fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql user fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
+update performance_schema.setup_objects set enabled='NO'
+ where object_type='TABLE' and object_schema= 'mysql';
diff --git a/mysql-test/suite/perfschema/r/query_cache.result b/mysql-test/suite/perfschema/r/query_cache.result
index c49cb7b718e..9496dcc5aee 100644
--- a/mysql-test/suite/perfschema/r/query_cache.result
+++ b/mysql-test/suite/perfschema/r/query_cache.result
@@ -38,7 +38,7 @@ spins
NULL
select name from performance_schema.setup_instruments order by name limit 1;
name
-wait/io/file/aria/control
+idle
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
@@ -53,7 +53,7 @@ spins
NULL
select name from performance_schema.setup_instruments order by name limit 1;
name
-wait/io/file/aria/control
+idle
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
diff --git a/mysql-test/suite/perfschema/r/relaylog.result b/mysql-test/suite/perfschema/r/relaylog.result
index a1d10265f4d..195dcaa6917 100644
--- a/mysql-test/suite/perfschema/r/relaylog.result
+++ b/mysql-test/suite/perfschema/r/relaylog.result
@@ -1,10 +1,13 @@
include/master-slave.inc
+Warnings:
+Note 1756 Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note 1757 Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
[connection master]
drop table if exists test.t1;
reset master;
create table test.t1(a int);
drop table test.t1;
-show binlog events from <binlog_start>;
+include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; create table test.t1(a int)
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
@@ -20,10 +23,10 @@ from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
-master-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
+master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
select * from performance_schema.file_summary_by_instance
where file_name like "%slave-%" order by file_name;
-FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
"Expect a master binlog + binlog_index"
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
@@ -36,7 +39,7 @@ from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
-master-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
+master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
@@ -47,7 +50,7 @@ from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
-wait/io/file/sql/binlog_index NONE MANY NONE MANY
+wait/io/file/sql/binlog_index MANY NONE NONE NONE
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
@@ -57,29 +60,27 @@ where event_name like "%MYSQL_BIN_LOG%"
order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
-wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect no slave relay log"
select * from performance_schema.file_summary_by_instance
where event_name like "%relaylog%" order by file_name;
-FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
-EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
-wait/io/file/sql/relaylog 0 0 0 0
-wait/io/file/sql/relaylog_index 0 0 0 0
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+wait/io/file/sql/relaylog 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+wait/io/file/sql/relaylog_index 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
-wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
"============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
-FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
+FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
@@ -95,10 +96,10 @@ where file_name like "%slave-%"
order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
-slave-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
+slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY
-slave-relay-bin.index wait/io/file/sql/relaylog_index MANY MANY MANY MANY
+slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
"Expect a slave binlog + binlog_index"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
@@ -111,7 +112,8 @@ from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
-slave-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
+slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
+slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
@@ -122,7 +124,7 @@ from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
-wait/io/file/sql/binlog_index NONE MANY NONE MANY
+wait/io/file/sql/binlog_index MANY NONE MANY NONE
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
@@ -132,7 +134,6 @@ where event_name like "%MYSQL_BIN_LOG%"
order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
-wait/synch/cond/sql/MYSQL_BIN_LOG::COND_queue_busy NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect a slave relay log"
@@ -152,7 +153,6 @@ order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY
-slave-relay-bin.index wait/io/file/sql/relaylog_index MANY MANY MANY MANY
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
@@ -163,7 +163,7 @@ from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/relaylog MANY MANY MANY MANY
-wait/io/file/sql/relaylog_index MANY MANY MANY MANY
+wait/io/file/sql/relaylog_index MANY NONE NONE NONE
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
@@ -172,6 +172,5 @@ where event_name like "%MYSQL_RELAY_LOG%"
and event_name not like "%MYSQL_RELAY_LOG::update_cond"
order by event_name;
EVENT_NAME COUNT_STAR
-wait/synch/cond/sql/MYSQL_RELAY_LOG::COND_queue_busy NONE
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
include/stop_slave.inc
diff --git a/mysql-test/suite/perfschema/r/rollback_table_io.result b/mysql-test/suite/perfschema/r/rollback_table_io.result
new file mode 100644
index 00000000000..a4053dd5bc3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/rollback_table_io.result
@@ -0,0 +1,88 @@
+drop table if exists test.t1;
+create table test.t1 (col1 bigint, col2 varchar(30)) engine = InnoDB;
+show create table test.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `col1` bigint(20) DEFAULT NULL,
+ `col2` varchar(30) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1
+insert into test.t1 values(1,'One');
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+update performance_schema.setup_consumers set enabled = 'YES';
+set autocommit = off;
+delete from test.t1 where col1 = 1;
+insert into marker set a = 1;
+rollback;
+insert into marker set a = 1;
+update test.t1 set col2 = 'Updated' where col1 = 1;
+insert into marker set a = 1;
+rollback;
+insert into marker set a = 1;
+insert into test.t1 values(2,'Two');
+insert into marker set a = 1;
+rollback;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ('test')
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+drop table test.t1;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result
index 5bafa137af5..7f1e1190634 100644
--- a/mysql-test/suite/perfschema/r/schema.result
+++ b/mysql-test/suite/perfschema/r/schema.result
@@ -1,41 +1,461 @@
-show databases;
-Database
-information_schema
-mtr
-mysql
+show databases like 'performance_schema';
+Database (performance_schema)
performance_schema
-test
+show create database performance_schema;
+Database Create Database
+performance_schema CREATE DATABASE `performance_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
use performance_schema;
show tables;
Tables_in_performance_schema
+accounts
cond_instances
+events_stages_current
+events_stages_history
+events_stages_history_long
+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
+events_statements_current
+events_statements_history
+events_statements_history_long
+events_statements_summary_by_account_by_event_name
+events_statements_summary_by_digest
+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
events_waits_current
events_waits_history
events_waits_history_long
+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_instances
file_summary_by_event_name
file_summary_by_instance
+host_cache
+hosts
mutex_instances
+objects_summary_global_by_type
performance_timers
rwlock_instances
+setup_actors
setup_consumers
setup_instruments
+setup_objects
setup_timers
+socket_instances
+socket_summary_by_event_name
+socket_summary_by_instance
+table_io_waits_summary_by_index_usage
+table_io_waits_summary_by_table
+table_lock_waits_summary_by_table
threads
+users
+show create table accounts;
+Table Create Table
+accounts CREATE TABLE `accounts` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `CURRENT_CONNECTIONS` bigint(20) NOT NULL,
+ `TOTAL_CONNECTIONS` bigint(20) NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table cond_instances;
Table Create Table
cond_instances CREATE TABLE `cond_instances` (
`NAME` varchar(128) NOT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_current;
+Table Create Table
+events_stages_current CREATE TABLE `events_stages_current` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_history;
+Table Create Table
+events_stages_history CREATE TABLE `events_stages_history` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_history_long;
+Table Create Table
+events_stages_history_long CREATE TABLE `events_stages_history_long` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_by_host_by_event_name;
+Table Create Table
+events_stages_summary_by_host_by_event_name CREATE TABLE `events_stages_summary_by_host_by_event_name` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_by_thread_by_event_name;
+Table Create Table
+events_stages_summary_by_thread_by_event_name CREATE TABLE `events_stages_summary_by_thread_by_event_name` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_by_user_by_event_name;
+Table Create Table
+events_stages_summary_by_user_by_event_name CREATE TABLE `events_stages_summary_by_user_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_by_account_by_event_name;
+Table Create Table
+events_stages_summary_by_account_by_event_name CREATE TABLE `events_stages_summary_by_account_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_stages_summary_global_by_event_name;
+Table Create Table
+events_stages_summary_global_by_event_name CREATE TABLE `events_stages_summary_global_by_event_name` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_current;
+Table Create Table
+events_statements_current CREATE TABLE `events_statements_current` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SQL_TEXT` longtext,
+ `DIGEST` varchar(32) DEFAULT NULL,
+ `DIGEST_TEXT` longtext,
+ `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `MYSQL_ERRNO` int(11) DEFAULT NULL,
+ `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+ `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+ `ERRORS` bigint(20) unsigned NOT NULL,
+ `WARNINGS` bigint(20) unsigned NOT NULL,
+ `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_history;
+Table Create Table
+events_statements_history CREATE TABLE `events_statements_history` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SQL_TEXT` longtext,
+ `DIGEST` varchar(32) DEFAULT NULL,
+ `DIGEST_TEXT` longtext,
+ `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `MYSQL_ERRNO` int(11) DEFAULT NULL,
+ `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+ `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+ `ERRORS` bigint(20) unsigned NOT NULL,
+ `WARNINGS` bigint(20) unsigned NOT NULL,
+ `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_history_long;
+Table Create Table
+events_statements_history_long CREATE TABLE `events_statements_history_long` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `SOURCE` varchar(64) DEFAULT NULL,
+ `TIMER_START` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_END` bigint(20) unsigned DEFAULT NULL,
+ `TIMER_WAIT` bigint(20) unsigned DEFAULT NULL,
+ `LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SQL_TEXT` longtext,
+ `DIGEST` varchar(32) DEFAULT NULL,
+ `DIGEST_TEXT` longtext,
+ `CURRENT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned DEFAULT NULL,
+ `MYSQL_ERRNO` int(11) DEFAULT NULL,
+ `RETURNED_SQLSTATE` varchar(5) DEFAULT NULL,
+ `MESSAGE_TEXT` varchar(128) DEFAULT NULL,
+ `ERRORS` bigint(20) unsigned NOT NULL,
+ `WARNINGS` bigint(20) unsigned NOT NULL,
+ `ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_host_by_event_name;
+Table Create Table
+events_statements_summary_by_host_by_event_name CREATE TABLE `events_statements_summary_by_host_by_event_name` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_thread_by_event_name;
+Table Create Table
+events_statements_summary_by_thread_by_event_name CREATE TABLE `events_statements_summary_by_thread_by_event_name` (
+ `THREAD_ID` int(11) NOT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_user_by_event_name;
+Table Create Table
+events_statements_summary_by_user_by_event_name CREATE TABLE `events_statements_summary_by_user_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_by_account_by_event_name;
+Table Create Table
+events_statements_summary_by_account_by_event_name CREATE TABLE `events_statements_summary_by_account_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_statements_summary_global_by_event_name;
+Table Create Table
+events_statements_summary_global_by_event_name CREATE TABLE `events_statements_summary_global_by_event_name` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `SUM_LOCK_TIME` bigint(20) unsigned NOT NULL,
+ `SUM_ERRORS` bigint(20) unsigned NOT NULL,
+ `SUM_WARNINGS` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_AFFECTED` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_SENT` bigint(20) unsigned NOT NULL,
+ `SUM_ROWS_EXAMINED` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_DISK_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_CREATED_TMP_TABLES` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_FULL_RANGE_JOIN` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_RANGE_CHECK` bigint(20) unsigned NOT NULL,
+ `SUM_SELECT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_MERGE_PASSES` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_RANGE` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_ROWS` bigint(20) unsigned NOT NULL,
+ `SUM_SORT_SCAN` bigint(20) unsigned NOT NULL,
+ `SUM_NO_INDEX_USED` bigint(20) unsigned NOT NULL,
+ `SUM_NO_GOOD_INDEX_USED` bigint(20) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_current;
Table Create Table
events_waits_current CREATE TABLE `events_waits_current` (
`THREAD_ID` int(11) NOT NULL,
`EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
`EVENT_NAME` varchar(128) NOT NULL,
`SOURCE` varchar(64) DEFAULT NULL,
`TIMER_START` bigint(20) unsigned DEFAULT NULL,
@@ -44,11 +464,13 @@ events_waits_current CREATE TABLE `events_waits_current` (
`SPINS` int(10) unsigned DEFAULT NULL,
`OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
`OBJECT_NAME` varchar(512) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
`OBJECT_TYPE` varchar(64) DEFAULT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
- `OPERATION` varchar(16) NOT NULL,
- `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+ `OPERATION` varchar(32) NOT NULL,
+ `NUMBER_OF_BYTES` bigint(20) DEFAULT NULL,
`FLAGS` int(10) unsigned DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_history;
@@ -56,6 +478,7 @@ Table Create Table
events_waits_history CREATE TABLE `events_waits_history` (
`THREAD_ID` int(11) NOT NULL,
`EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
`EVENT_NAME` varchar(128) NOT NULL,
`SOURCE` varchar(64) DEFAULT NULL,
`TIMER_START` bigint(20) unsigned DEFAULT NULL,
@@ -64,11 +487,13 @@ events_waits_history CREATE TABLE `events_waits_history` (
`SPINS` int(10) unsigned DEFAULT NULL,
`OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
`OBJECT_NAME` varchar(512) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
`OBJECT_TYPE` varchar(64) DEFAULT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
- `OPERATION` varchar(16) NOT NULL,
- `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+ `OPERATION` varchar(32) NOT NULL,
+ `NUMBER_OF_BYTES` bigint(20) DEFAULT NULL,
`FLAGS` int(10) unsigned DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_history_long;
@@ -76,6 +501,7 @@ Table Create Table
events_waits_history_long CREATE TABLE `events_waits_history_long` (
`THREAD_ID` int(11) NOT NULL,
`EVENT_ID` bigint(20) unsigned NOT NULL,
+ `END_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
`EVENT_NAME` varchar(128) NOT NULL,
`SOURCE` varchar(64) DEFAULT NULL,
`TIMER_START` bigint(20) unsigned DEFAULT NULL,
@@ -84,18 +510,31 @@ events_waits_history_long CREATE TABLE `events_waits_history_long` (
`SPINS` int(10) unsigned DEFAULT NULL,
`OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
`OBJECT_NAME` varchar(512) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
`OBJECT_TYPE` varchar(64) DEFAULT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`NESTING_EVENT_ID` bigint(20) unsigned DEFAULT NULL,
- `OPERATION` varchar(16) NOT NULL,
- `NUMBER_OF_BYTES` bigint(20) unsigned DEFAULT NULL,
+ `NESTING_EVENT_TYPE` enum('STATEMENT','STAGE','WAIT') DEFAULT NULL,
+ `OPERATION` varchar(32) NOT NULL,
+ `NUMBER_OF_BYTES` bigint(20) DEFAULT NULL,
`FLAGS` int(10) unsigned DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_by_host_by_event_name;
+Table Create Table
+events_waits_summary_by_host_by_event_name CREATE TABLE `events_waits_summary_by_host_by_event_name` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_summary_by_instance;
Table Create Table
events_waits_summary_by_instance CREATE TABLE `events_waits_summary_by_instance` (
`EVENT_NAME` varchar(128) NOT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`COUNT_STAR` bigint(20) unsigned NOT NULL,
`SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
@@ -113,6 +552,29 @@ events_waits_summary_by_thread_by_event_name CREATE TABLE `events_waits_summary_
`AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_by_user_by_event_name;
+Table Create Table
+events_waits_summary_by_user_by_event_name CREATE TABLE `events_waits_summary_by_user_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table events_waits_summary_by_account_by_event_name;
+Table Create Table
+events_waits_summary_by_account_by_event_name CREATE TABLE `events_waits_summary_by_account_by_event_name` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table events_waits_summary_global_by_event_name;
Table Create Table
events_waits_summary_global_by_event_name CREATE TABLE `events_waits_summary_global_by_event_name` (
@@ -134,28 +596,117 @@ show create table file_summary_by_event_name;
Table Create Table
file_summary_by_event_name CREATE TABLE `file_summary_by_event_name` (
`EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_READ` bigint(20) NOT NULL,
`COUNT_WRITE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) NOT NULL,
+ `COUNT_MISC` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_MISC` bigint(20) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table file_summary_by_instance;
Table Create Table
file_summary_by_instance CREATE TABLE `file_summary_by_instance` (
`FILE_NAME` varchar(512) NOT NULL,
`EVENT_NAME` varchar(128) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
`COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_READ` bigint(20) NOT NULL,
`COUNT_WRITE` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
- `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) NOT NULL,
+ `COUNT_MISC` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_MISC` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table host_cache;
+Table Create Table
+host_cache CREATE TABLE `host_cache` (
+ `IP` varchar(64) NOT NULL,
+ `HOST` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `HOST_VALIDATED` enum('YES','NO') NOT NULL,
+ `SUM_CONNECT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HOST_BLOCKED_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NAMEINFO_TRANSIENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NAMEINFO_PERMANENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_FORMAT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_ADDRINFO_TRANSIENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_ADDRINFO_PERMANENT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_FCRDNS_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HOST_ACL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_NO_AUTH_PLUGIN_ERRORS` bigint(20) NOT NULL,
+ `COUNT_AUTH_PLUGIN_ERRORS` bigint(20) NOT NULL,
+ `COUNT_HANDSHAKE_ERRORS` bigint(20) NOT NULL,
+ `COUNT_PROXY_USER_ERRORS` bigint(20) NOT NULL,
+ `COUNT_PROXY_USER_ACL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_AUTHENTICATION_ERRORS` bigint(20) NOT NULL,
+ `COUNT_SSL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_MAX_USER_CONNECTIONS_ERRORS` bigint(20) NOT NULL,
+ `COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS` bigint(20) NOT NULL,
+ `COUNT_DEFAULT_DATABASE_ERRORS` bigint(20) NOT NULL,
+ `COUNT_INIT_CONNECT_ERRORS` bigint(20) NOT NULL,
+ `COUNT_LOCAL_ERRORS` bigint(20) NOT NULL,
+ `COUNT_UNKNOWN_ERRORS` bigint(20) NOT NULL,
+ `FIRST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `LAST_SEEN` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `FIRST_ERROR_SEEN` timestamp NULL DEFAULT '0000-00-00 00:00:00',
+ `LAST_ERROR_SEEN` timestamp NULL DEFAULT '0000-00-00 00:00:00'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table hosts;
+Table Create Table
+hosts CREATE TABLE `hosts` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `CURRENT_CONNECTIONS` bigint(20) NOT NULL,
+ `TOTAL_CONNECTIONS` bigint(20) NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table mutex_instances;
Table Create Table
mutex_instances CREATE TABLE `mutex_instances` (
`NAME` varchar(128) NOT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table objects_summary_global_by_type;
+Table Create Table
+objects_summary_global_by_type CREATE TABLE `objects_summary_global_by_type` (
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table performance_timers;
Table Create Table
performance_timers CREATE TABLE `performance_timers` (
@@ -168,10 +719,17 @@ show create table rwlock_instances;
Table Create Table
rwlock_instances CREATE TABLE `rwlock_instances` (
`NAME` varchar(128) NOT NULL,
- `OBJECT_INSTANCE_BEGIN` bigint(20) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
`WRITE_LOCKED_BY_THREAD_ID` int(11) DEFAULT NULL,
`READ_LOCKED_BY_COUNT` int(10) unsigned NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_actors;
+Table Create Table
+setup_actors CREATE TABLE `setup_actors` (
+ `HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
+ `ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table setup_consumers;
Table Create Table
setup_consumers CREATE TABLE `setup_consumers` (
@@ -185,16 +743,271 @@ setup_instruments CREATE TABLE `setup_instruments` (
`ENABLED` enum('YES','NO') NOT NULL,
`TIMED` enum('YES','NO') NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table setup_objects;
+Table Create Table
+setup_objects CREATE TABLE `setup_objects` (
+ `OBJECT_TYPE` enum('TABLE') NOT NULL DEFAULT 'TABLE',
+ `OBJECT_SCHEMA` varchar(64) DEFAULT '%',
+ `OBJECT_NAME` varchar(64) NOT NULL DEFAULT '%',
+ `ENABLED` enum('YES','NO') NOT NULL DEFAULT 'YES',
+ `TIMED` enum('YES','NO') NOT NULL DEFAULT 'YES'
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table setup_timers;
Table Create Table
setup_timers CREATE TABLE `setup_timers` (
`NAME` varchar(64) NOT NULL,
`TIMER_NAME` enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table socket_instances;
+Table Create Table
+socket_instances CREATE TABLE `socket_instances` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
+ `THREAD_ID` int(11) DEFAULT NULL,
+ `SOCKET_ID` int(11) NOT NULL,
+ `IP` varchar(64) NOT NULL,
+ `PORT` int(11) NOT NULL,
+ `STATE` enum('IDLE','ACTIVE') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table socket_summary_by_instance;
+Table Create Table
+socket_summary_by_instance CREATE TABLE `socket_summary_by_instance` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `OBJECT_INSTANCE_BEGIN` bigint(20) unsigned NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_MISC` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_MISC` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table socket_summary_by_event_name;
+Table Create Table
+socket_summary_by_event_name CREATE TABLE `socket_summary_by_event_name` (
+ `EVENT_NAME` varchar(128) NOT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_READ` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_NUMBER_OF_BYTES_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_MISC` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_MISC` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_MISC` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_io_waits_summary_by_index_usage;
+Table Create Table
+table_io_waits_summary_by_index_usage CREATE TABLE `table_io_waits_summary_by_index_usage` (
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `INDEX_NAME` varchar(64) DEFAULT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_FETCH` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `COUNT_INSERT` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `COUNT_DELETE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_io_waits_summary_by_table;
+Table Create Table
+table_io_waits_summary_by_table CREATE TABLE `table_io_waits_summary_by_table` (
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_FETCH` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_FETCH` bigint(20) unsigned NOT NULL,
+ `COUNT_INSERT` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_INSERT` bigint(20) unsigned NOT NULL,
+ `COUNT_UPDATE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_UPDATE` bigint(20) unsigned NOT NULL,
+ `COUNT_DELETE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_DELETE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_DELETE` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table table_lock_waits_summary_by_table;
+Table Create Table
+table_lock_waits_summary_by_table CREATE TABLE `table_lock_waits_summary_by_table` (
+ `OBJECT_TYPE` varchar(64) DEFAULT NULL,
+ `OBJECT_SCHEMA` varchar(64) DEFAULT NULL,
+ `OBJECT_NAME` varchar(64) DEFAULT NULL,
+ `COUNT_STAR` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WAIT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_NORMAL` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_NORMAL` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_WITH_SHARED_LOCKS` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_HIGH_PRIORITY` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_NO_INSERT` bigint(20) unsigned NOT NULL,
+ `COUNT_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_READ_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_ALLOW_WRITE` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_CONCURRENT_INSERT` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_DELAYED` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_LOW_PRIORITY` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_NORMAL` bigint(20) unsigned NOT NULL,
+ `COUNT_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `SUM_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `MIN_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `AVG_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL,
+ `MAX_TIMER_WRITE_EXTERNAL` bigint(20) unsigned NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
show create table threads;
Table Create Table
threads CREATE TABLE `threads` (
`THREAD_ID` int(11) NOT NULL,
+ `NAME` varchar(128) NOT NULL,
+ `TYPE` varchar(10) NOT NULL,
`PROCESSLIST_ID` int(11) DEFAULT NULL,
- `NAME` varchar(128) NOT NULL
+ `PROCESSLIST_USER` varchar(16) DEFAULT NULL,
+ `PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
+ `PROCESSLIST_DB` varchar(64) DEFAULT NULL,
+ `PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
+ `PROCESSLIST_TIME` bigint(20) DEFAULT NULL,
+ `PROCESSLIST_STATE` varchar(64) DEFAULT NULL,
+ `PROCESSLIST_INFO` longtext,
+ `PARENT_THREAD_ID` int(11) DEFAULT NULL,
+ `ROLE` varchar(64) DEFAULT NULL,
+ `INSTRUMENTED` enum('YES','NO') NOT NULL
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+show create table users;
+Table Create Table
+users CREATE TABLE `users` (
+ `USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+ `CURRENT_CONNECTIONS` bigint(20) NOT NULL,
+ `TOTAL_CONNECTIONS` bigint(20) NOT NULL
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
diff --git a/mysql-test/suite/perfschema/r/selects.result b/mysql-test/suite/perfschema/r/selects.result
index 4c59cc3338e..c14d152856f 100644
--- a/mysql-test/suite/perfschema/r/selects.result
+++ b/mysql-test/suite/perfschema/r/selects.result
@@ -1,4 +1,6 @@
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
+UPDATE performance_schema.setup_instruments SET enabled = 'NO', timed = 'NO'
+ where NAME='wait/io/table/sql/handler';
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
ENGINE=MyISAM;
@@ -110,3 +112,4 @@ DROP FUNCTION t_ps_func;
DROP EVENT t_ps_event;
DROP TABLE t1;
DROP TABLE t_event;
+UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
diff --git a/mysql-test/suite/perfschema/r/server_init.result b/mysql-test/suite/perfschema/r/server_init.result
index 5497267080e..ed267aeb8c2 100644
--- a/mysql-test/suite/perfschema/r/server_init.result
+++ b/mysql-test/suite/perfschema/r/server_init.result
@@ -12,10 +12,6 @@ where name like "wait/synch/mutex/mysys/THR_LOCK_open";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/mysys/THR_LOCK_isam";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/mysys/THR_LOCK_myisam";
count(name)
1
@@ -44,6 +40,10 @@ where name like "wait/synch/mutex/sql/LOCK_thread_count";
count(name)
1
select count(name) from mutex_instances
+where name like "wait/synch/mutex/sql/LOCK_log_throttle_qni";
+count(name)
+1
+select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_status";
count(name)
1
@@ -56,7 +56,7 @@ where name like "wait/synch/mutex/sql/LOCK_delayed_insert";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_uuid_short_generator";
+where name like "wait/synch/mutex/sql/LOCK_uuid_generator";
count(name)
1
select count(name) from mutex_instances
@@ -82,7 +82,7 @@ count(name)
select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_manager";
count(name)
-0
+1
select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/LOCK_global_system_variables";
count(name)
@@ -104,10 +104,6 @@ where name like "wait/synch/mutex/sql/LOCK_server_started";
count(name)
1
select count(name) from mutex_instances
-where name like "wait/synch/mutex/sql/LOCK_rpl_status";
-count(name)
-1
-select count(name) from mutex_instances
where name like "wait/synch/mutex/sql/Query_cache::structure_guard_mutex";
count(name)
1
@@ -170,7 +166,7 @@ count(name)
select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_manager";
count(name)
-0
+1
select count(name) from cond_instances
where name like "wait/synch/cond/sql/COND_thread_cache";
count(name)
@@ -180,10 +176,6 @@ where name like "wait/synch/cond/sql/COND_flush_thread_cache";
count(name)
1
select count(name) from cond_instances
-where name like "wait/synch/cond/sql/COND_rpl_status";
-count(name)
-1
-select count(name) from cond_instances
where name like "wait/synch/cond/sql/Query_cache::COND_cache_status_changed";
count(name)
1
diff --git a/mysql-test/suite/perfschema/r/setup_actors.result b/mysql-test/suite/perfschema/r/setup_actors.result
new file mode 100644
index 00000000000..038fb623ab6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_actors.result
@@ -0,0 +1,135 @@
+select * from performance_schema.setup_actors;
+HOST USER ROLE
+% % %
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('hosta', 'user1', '%');
+insert into performance_schema.setup_actors
+values ('%', 'user2', '%');
+insert into performance_schema.setup_actors
+values ('localhost', 'user3', '%');
+insert into performance_schema.setup_actors
+values ('hostb', '%', '%');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+hostb % %
+hosta user1 %
+% user2 %
+localhost user3 %
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+grant select on test.* to user5@localhost;
+flush privileges;
+# Switch to (con1, localhost, user1, , )
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user1 localhost
+# Switch to connection default
+insert into performance_schema.setup_actors
+values ('%', 'user1', '%');
+# Switch to connection con1
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user1 localhost
+# Disconnect con1
+# Switch to (con2, localhost, user2, , )
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID=connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user2 localhost
+# Disconnect con2
+# Switch to connection default
+drop table if exists test.t1;
+create table test.t1 (col1 bigint);
+lock table test.t1 write;
+# Switch to (con3, localhost, user3, , )
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user3 localhost
+# Send a statement to the server, but do not wait till the result
+# comes back. We will pull this later.
+insert into test.t1 set col1 = 1;
+# Switch to (con4, localhost, user4, , )
+# Poll till INFO is no more NULL and State = 'Waiting for table metadata lock'.
+select count(*) = 1
+from performance_schema.threads T inner join information_schema.PROCESSLIST P
+on T.PROCESSLIST_ID = P.ID and T.PROCESSLIST_USER = P.USER and
+T.PROCESSLIST_HOST = P.HOST and T.PROCESSLIST_DB = P.DB and
+T.PROCESSLIST_COMMAND = P.COMMAND and T.PROCESSLIST_INFO = P.INFO
+where T.PROCESSLIST_USER = 'user3' and T.NAME = 'thread/sql/one_connection';
+count(*) = 1
+1
+# Switch to connection default
+unlock tables;
+# Switch to connection con3 and reap the result of the no more blocked insert
+# Switch to connection default
+drop table test.t1;
+# Disconnect con3
+# Switch to connection con4
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND NO user4 localhost
+# Disconnect con4
+# Switch to connection default
+insert into performance_schema.setup_actors
+values ('localhost', '%', '%');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+hostb % %
+localhost % %
+% user1 %
+hosta user1 %
+% user2 %
+localhost user3 %
+# Switch to (con4b, localhost, user4, , )
+select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user4 localhost
+# Disconnect con4b
+# Switch to connection default
+insert into performance_schema.setup_actors
+values ('%', 'user5', '%');
+create sql security definer view test.v1 as select NAME, TYPE, INSTRUMENTED, PROCESSLIST_USER, PROCESSLIST_HOST
+from performance_schema.threads
+where PROCESSLIST_ID = connection_id();
+# Switch to (con5, localhost, user5, , )
+select * from performance_schema.threads;
+ERROR 42000: SELECT command denied to user 'user5'@'localhost' for table 'threads'
+select * from test.v1;
+NAME TYPE INSTRUMENTED PROCESSLIST_USER PROCESSLIST_HOST
+thread/sql/one_connection FOREGROUND YES user5 localhost
+# Disconnect con5
+# Switch to connection default and cleanup
+drop view test.v1;
+revoke all privileges, grant option from user1@localhost;
+revoke all privileges, grant option from user2@localhost;
+revoke all privileges, grant option from user3@localhost;
+revoke all privileges, grant option from user4@localhost;
+revoke all privileges, grant option from user5@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+drop user user5@localhost;
+flush privileges;
+truncate table performance_schema.setup_actors;
+insert into performance_schema.setup_actors
+values ('%', '%', '%');
+select * from performance_schema.setup_actors;
+HOST USER ROLE
+% % %
diff --git a/mysql-test/suite/perfschema/r/setup_consumers_defaults.result b/mysql-test/suite/perfschema/r/setup_consumers_defaults.result
new file mode 100644
index 00000000000..c6e03513d75
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_consumers_defaults.result
@@ -0,0 +1,20 @@
+SELECT * FROM performance_schema.setup_consumers ORDER BY name;
+NAME ENABLED
+events_stages_current NO
+events_stages_history YES
+events_stages_history_long NO
+events_statements_current YES
+events_statements_history NO
+events_statements_history_long YES
+events_waits_current NO
+events_waits_history YES
+events_waits_history_long NO
+global_instrumentation YES
+statements_digest YES
+thread_instrumentation YES
+SELECT @@performance_schema_consumer_events_stages_current;
+ERROR HY000: Unknown system variable 'performance_schema_consumer_events_stages_current'
+SET @@performance_schema_consumer_events_stages_current=0;
+ERROR HY000: Unknown system variable 'performance_schema_consumer_events_stages_current'
+SHOW VARIABLES LIKE "performance_schema_consumer%";
+Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/setup_instruments_defaults.result b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
new file mode 100644
index 00000000000..531af43d798
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_instruments_defaults.result
@@ -0,0 +1,36 @@
+SELECT * FROM performance_schema.setup_instruments
+WHERE name IN (
+'wait/synch/mutex/sql/LOCK_user_conn',
+'wait/synch/mutex/sql/LOCK_uuid_generator',
+'wait/synch/mutex/sql/LOCK_xid_cache'
+ 'stage/sql/creating table')
+AND enabled = 'yes' AND timed = 'no'
+ORDER BY name;
+NAME ENABLED TIMED
+wait/synch/mutex/sql/LOCK_user_conn YES NO
+wait/synch/mutex/sql/LOCK_uuid_generator YES NO
+SELECT * FROM performance_schema.setup_instruments
+WHERE name = 'wait/synch/mutex/sql/LOCK_thread_count'
+AND enabled = 'no' AND timed = 'no';
+NAME ENABLED TIMED
+wait/synch/mutex/sql/LOCK_thread_count NO NO
+SELECT * FROM performance_schema.setup_instruments
+WHERE name IN (
+'wait/synch/mutex/sql/LOG_INFO::lock',
+'wait/synch/mutex/sql/THD::LOCK_thd_data')
+AND enabled = 'yes' AND timed = 'yes'
+ORDER BY name;
+NAME ENABLED TIMED
+wait/synch/mutex/sql/LOG_INFO::lock YES YES
+wait/synch/mutex/sql/THD::LOCK_thd_data YES YES
+SELECT * FROM performance_schema.setup_instruments
+WHERE name IN (
+'wait/synch/mutex/sql/Delayed_insert::mutex',
+'wait/synch/mutex/sql/hash_filo::lock')
+AND enabled = 'no' AND timed = 'no'
+ORDER BY name;
+NAME ENABLED TIMED
+wait/synch/mutex/sql/Delayed_insert::mutex NO NO
+wait/synch/mutex/sql/hash_filo::lock NO NO
+SHOW VARIABLES LIKE "%/wait/synch/mutex%";
+Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/setup_objects.result b/mysql-test/suite/perfschema/r/setup_objects.result
new file mode 100644
index 00000000000..e623aeb8521
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/setup_objects.result
@@ -0,0 +1,207 @@
+drop table if exists test.setup_objects;
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES', timed='YES'
+ where name in ('wait/io/table/sql/handler', 'wait/lock/table/sql/handler');
+truncate table performance_schema.events_waits_history_long;
+create table test.setup_objects as select * from performance_schema.setup_objects;
+truncate table performance_schema.setup_objects;
+insert into performance_schema.setup_objects
+values ('TABLE', 'db1', 't1', 'YES', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db1', 't2', 'YES', 'NO');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db1', '%', 'YES', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db2', 't1', 'YES', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db2', 't2', 'YES', 'NO');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db3', 't1', 'YES', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db3', 't2', 'NO', 'NO');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db3', '%', 'NO', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db4', 't1', 'NO', 'YES');
+insert into performance_schema.setup_objects
+values ('TABLE', 'db4', '%', 'YES', 'NO');
+insert into performance_schema.setup_objects
+values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+show warnings;
+Level Code Message
+Warning 1265 Data truncated for column 'OBJECT_TYPE' at row 1
+Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
+insert into performance_schema.setup_objects
+values ('TABLE', 'bad2', 'bad2', 'MAYBE', 'NO');
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+show warnings;
+Level Code Message
+Warning 1265 Data truncated for column 'ENABLED' at row 1
+Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
+insert into performance_schema.setup_objects
+values ('TABLE', 'bad3', 'bad3', 'YES', 'MAYBE NOT');
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+show warnings;
+Level Code Message
+Warning 1265 Data truncated for column 'TIMED' at row 1
+Error 1452 Cannot add or update a child row: a foreign key constraint fails ()
+select * from performance_schema.setup_objects
+order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE db1 % YES YES
+TABLE db1 t1 YES YES
+TABLE db1 t2 YES NO
+TABLE db2 t1 YES YES
+TABLE db2 t2 YES NO
+TABLE db3 % NO YES
+TABLE db3 t1 YES YES
+TABLE db3 t2 NO NO
+TABLE db4 % YES NO
+TABLE db4 t1 NO YES
+update performance_schema.setup_objects
+set OBJECT_TYPE='SOMETHING' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+ERROR HY000: Invalid performance_schema usage.
+update performance_schema.setup_objects
+set ENABLED='MAYBE' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+update performance_schema.setup_objects
+set TIMED='MAYBE NOT' where OBJECT_SCHEMA='db1' and OBJECT_NAME='t1';
+ERROR 23000: Cannot add or update a child row: a foreign key constraint fails ()
+select * from performance_schema.setup_objects
+order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE db1 % YES YES
+TABLE db1 t1 YES YES
+TABLE db1 t2 YES NO
+TABLE db2 t1 YES YES
+TABLE db2 t2 YES NO
+TABLE db3 % NO YES
+TABLE db3 t1 YES YES
+TABLE db3 t2 NO NO
+TABLE db4 % YES NO
+TABLE db4 t1 NO YES
+drop database if exists db1;
+drop database if exists db2;
+drop database if exists db3;
+drop database if exists db4;
+drop database if exists db5;
+create database db1;
+create database db2;
+create database db3;
+create database db4;
+create database db5;
+create table db1.t1(a int);
+create table db1.t2(a int);
+create table db1.t3(a int);
+create table db1.t4(a int);
+create table db1.t5(a int);
+create table db2.t1(a int);
+create table db2.t2(a int);
+create table db2.t3(a int);
+create table db2.t4(a int);
+create table db2.t5(a int);
+create table db3.t1(a int);
+create table db3.t2(a int);
+create table db3.t3(a int);
+create table db3.t4(a int);
+create table db3.t5(a int);
+create table db4.t1(a int);
+create table db4.t2(a int);
+create table db4.t3(a int);
+create table db4.t4(a int);
+create table db4.t5(a int);
+create table db5.t1(a int);
+select * from db1.t1;
+a
+select * from db1.t2;
+a
+select * from db1.t3;
+a
+select * from db1.t4;
+a
+select * from db1.t5;
+a
+select * from db2.t1;
+a
+select * from db2.t2;
+a
+select * from db2.t3;
+a
+select * from db2.t4;
+a
+select * from db2.t5;
+a
+select * from db3.t1;
+a
+select * from db3.t2;
+a
+select * from db3.t3;
+a
+select * from db3.t4;
+a
+select * from db3.t5;
+a
+select * from db4.t1;
+a
+select * from db4.t2;
+a
+select * from db4.t3;
+a
+select * from db4.t4;
+a
+select * from db4.t5;
+a
+select * from db5.t1;
+a
+create table db5.t2(a int);
+select * from db3.t2;
+a
+select distinct OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+from performance_schema.events_waits_history_long
+where OBJECT_SCHEMA like "db%"
+ group by OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+order by OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA;
+OBJECT_TYPE OBJECT_NAME OBJECT_SCHEMA
+TABLE t1 db1
+TABLE t1 db2
+TABLE t1 db3
+TABLE t2 db1
+TABLE t2 db2
+TABLE t2 db4
+TABLE t3 db1
+TABLE t3 db4
+TABLE t4 db1
+TABLE t4 db4
+TABLE t5 db1
+TABLE t5 db4
+select distinct OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+from performance_schema.events_waits_history_long
+where OBJECT_SCHEMA like "db%" and TIMER_END is not NULL
+group by OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA
+order by OBJECT_TYPE, OBJECT_NAME, OBJECT_SCHEMA;
+OBJECT_TYPE OBJECT_NAME OBJECT_SCHEMA
+TABLE t1 db1
+TABLE t1 db2
+TABLE t1 db3
+TABLE t3 db1
+TABLE t4 db1
+TABLE t5 db1
+update performance_schema.setup_objects
+set timed='YES' where OBJECT_SCHEMA = '%';
+create table db5.t3(a int);
+select * from db3.t3;
+a
+truncate table performance_schema.setup_objects;
+select count(*) from performance_schema.setup_objects;
+count(*)
+0
+drop database db1;
+drop database db2;
+drop database db3;
+drop database db4;
+drop database db5;
+truncate table performance_schema.setup_objects;
+insert into performance_schema.setup_objects select * from test.setup_objects;
+drop table test.setup_objects;
+update performance_schema.setup_instruments set enabled='YES', timed='YES';
diff --git a/mysql-test/suite/perfschema/r/short_option_1.result b/mysql-test/suite/perfschema/r/short_option_1.result
index d97ece1f67a..6004dc96327 100644
--- a/mysql-test/suite/perfschema/r/short_option_1.result
+++ b/mysql-test/suite/perfschema/r/short_option_1.result
@@ -19,8 +19,6 @@ log ON
show variables like 'general_log';
Variable_name Value
general_log ON
-show variables like 'new';
-Variable_name Value
show variables like 'log_warnings';
Variable_name Value
log_warnings 3
diff --git a/mysql-test/suite/perfschema/r/socket_connect.result b/mysql-test/suite/perfschema/r/socket_connect.result
new file mode 100644
index 00000000000..10540fd3071
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_connect.result
@@ -0,0 +1,177 @@
+#==============================================================================
+# Establish the level of IPV6 support
+#==============================================================================
+#==============================================================================
+# Get hostname, port number
+#==============================================================================
+SELECT @@hostname INTO @MY_HOSTNAME;
+SELECT @@port INTO @MY_MASTER_PORT;
+#==============================================================================
+# 1.0 Get the default connection object_instance_begin, thread id and verify
+# the expected number of client connections.
+#==============================================================================
+
+# 1.1 Confirm only one client connection
+
+SELECT COUNT(*) INTO @my_client_connections
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE "%client_connection%";
+
+# 1.2 Get the default THREAD_ID;
+
+SELECT THREAD_ID INTO @my_thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+# 1.3 Get the default OBJECT_INSTANCE_BEGIN
+
+SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+#==============================================================================
+# 2.0 ESTABLISH TCP/IP CONNECTION 1
+# Connect with IP = localhost (127.0.0.1 or ::1)
+#==============================================================================
+
+# 2.1 Get the connection thread id
+
+SELECT THREAD_ID INTO @my_thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+# 2.2 Get the connection object instance begin
+
+SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+
+# 2.3 Get the connection port
+
+SELECT PORT INTO @my_port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+
+# 2.4 Verify that the connection is 127.0.0.1 or ::1
+
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1')
+AND PORT= @con1_port
+AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
+Expect 1
+1
+
+# 2.5 Verify that the same connection is in the summary instance table
+
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_summary_by_instance
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN= @con1_object_id;
+Expect 1
+1
+
+# Switch to connection default
+
+#==============================================================================
+# 3.0 ESTABLISH TCP/IP CONNECTION 2
+# Connect with IP = localhost (127.0.0.1 or ::1)
+#==============================================================================
+
+# 3.1 Get the connection thread id
+
+SELECT THREAD_ID INTO @my_thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+# 3.2 Get the connection object instance begin
+
+SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+
+# 3.3 Get the connection port
+
+SELECT PORT INTO @my_port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+
+# 3.4 Verify that the connection is 127.0.0.1 or ::1
+
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1')
+AND PORT= @con2_port
+AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
+Expect 1
+1
+
+# 3.5 Verify that the same connection is in the summary instance table
+
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_summary_by_instance
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
+Expect 1
+1
+
+# 3.6 Verify that the connection is 127.0.0.1 or ::1
+
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1')
+AND PORT= @con2_port
+AND OBJECT_INSTANCE_BEGIN= @con2_object_id;
+Expect 1
+1
+#==============================================================================
+# 4.0 Verify both connections exist in the instance tables
+#==============================================================================
+
+# 4.1 Verify that there are two TCP/IP connections in the socket instance table
+
+SELECT COUNT(*) = 2 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
+Expect 1
+1
+
+# 4.2 Verify that there are two TCP/IP connections in the summary instance table
+
+SELECT COUNT(*) = 2 AS 'Expect 1'
+FROM performance_schema.socket_summary_by_instance
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
+Expect 1
+1
+#==============================================================================
+# 5.0 Drop the client connections
+#==============================================================================
+# 5.1 Disconnect con1
+# 5.2 Disconnect con2
+#==============================================================================
+# 6.0 Verify sockets were removed from the instance tables
+#==============================================================================
+
+# 6.1 Verify that there are no TCP/IP connections in the socket instance table
+
+SELECT COUNT(*) = 0 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+AND (IP LIKE '%127.0.0.1' OR IP LIKE '%::1');
+Expect 1
+1
+
+# 6.2 Verify that there are no TCP/IP connections in the summary instance table
+
+SELECT COUNT(*) = 0 AS 'Expect 1'
+FROM performance_schema.socket_summary_by_instance
+WHERE EVENT_NAME LIKE '%client_connection%'
+ AND OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin;
+Expect 1
+1
diff --git a/mysql-test/suite/perfschema/r/socket_instances_func.result b/mysql-test/suite/perfschema/r/socket_instances_func.result
new file mode 100644
index 00000000000..ee1eac73879
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_instances_func.result
@@ -0,0 +1,208 @@
+# Take a snapshot of SOCKET_INSTANCES
+CREATE TEMPORARY TABLE my_socket_instances AS
+SELECT * FROM performance_schema.socket_instances;
+# Get thread id of the default connection
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Establish local TCP/IP connection (con1,localhost,root,,test,,)
+# Store the thread id of connection 1 (tcp/ip)
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Store the port of connection 1 (tcp/ip)
+SELECT PORT INTO @port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+# Switch to connection default
+# Establish second local TCP/IP connection (con1,localhost,root,,test,,)
+# Store the thread_id of connection 2 (tcp/ip)
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Store the port of connection 2 (tcp/ip)
+SELECT PORT INTO @port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+# Switch to connection default
+# Establish local unix domain connection (con3,localhost,root,,test,,)
+# Store the thread id of connection 3 (unix domain)
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Store the port of connection 3 (unix domain)
+SELECT PORT INTO @port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+# Switch to connection default
+# EVENT_NAME is the "wait/io/socket/*" instrument identifier.
+SELECT COUNT(*) = 0 AS "Expect 1"
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME NOT LIKE 'wait/io/socket/%';
+Expect 1
+1
+# OBJECT_INSTANCE_BEGIN is an arbitrary identifier, guaranteed to be unique.
+SELECT COUNT(*) = COUNT(DISTINCT OBJECT_INSTANCE_BEGIN) AS "Expect 1"
+FROM performance_schema.socket_instances;
+Expect 1
+1
+# SOCKET_ID is the internal file handle assigned to the socket.
+SELECT COUNT(*) = COUNT(DISTINCT SOCKET_ID) AS "Expect 1"
+FROM performance_schema.socket_instances;
+Expect 1
+1
+# Characteristics per our thread
+# There must be only one entry with our thread_id
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# TCP/IP connections should have a unique port number
+# Connection 1 (tcp/ip)
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE PORT = @port;
+Expect 1
+1
+# Connection 2 (tcp/ip)
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE PORT = @port;
+Expect 1
+1
+# Check the content for the default connection (unix domain)
+SELECT COUNT(*) = 1 as 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/client_connection'
+AND PORT = 0 AND THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of 'server_tcpip_socket' entry
+# Server listening socket, TCP/IP
+# There is only one entry with 'wait/io/socket/sql/server_tcpip_socket'.
+# It shares the same thread id as 'wait/io/socket/sql/server_unix_socket'.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+Expect 1
+1
+# Get the 'server_tcpip_socket' thread id
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+# Check the content.
+SELECT THREAD_ID = @thread_id
+AND (IP = '0.0.0.0' OR IP = '::')
+AND PORT = @port
+AND STATE = 'ACTIVE' AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+Expect 1
+1
+# Characteristics of 'server_unix_socket' entry
+# Server listening socket, unix domain (socket file)
+# There is only one entry with 'wait/io/socket/sql/server_unix_socket'.
+# It shares the same thread id as 'wait/io/socket/sql/server_tcpip_socket'.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
+Expect 1
+1
+# Get the 'server_unix_socket' thread id
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
+# Check the content.
+SELECT THREAD_ID = @thread_id
+AND IP = ''
+ AND PORT = 0
+AND STATE = 'ACTIVE' AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_unix_socket';
+Expect 1
+1
+# Server listening sockets (TCP and Unix) are handled on the same thread
+SELECT COUNT(*) = 2 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+SELECT COUNT(*) = 2 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+#Compare server listener socket thread ids
+select @match_thread_id;
+@match_thread_id
+1
+# Check content for client connection 1 (tcpip)
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND (IP LIKE '%127.0.0.1' OR IP = '::1')
+AND PORT = @port
+AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of entries with THREAD_ID of con1
+# There is only one entry with this id.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Check content for client connection 2 (tcpip)
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND (IP LIKE '%127.0.0.1' OR IP = '::1')
+AND PORT = @port
+AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of entries with THREAD_ID of con2
+# There is only one entry with this id.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Check the content for client connection 3 (unix domain).
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND IP = ''
+ AND PORT = 0
+AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of entries with THREAD_ID of con3
+# There is only one entry with this id.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Show differences to socket_instances before con1, con2 and con3 connecting
+SELECT EVENT_NAME, IP
+FROM performance_schema.socket_instances
+WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
+NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
+FROM my_socket_instances)
+ORDER BY THREAD_ID;
+EVENT_NAME IP
+wait/io/socket/sql/client_connection <LOCALHOST>
+wait/io/socket/sql/client_connection <LOCALHOST>
+wait/io/socket/sql/client_connection
+# Disconnect con1, con2 and con3
+# After waiting a bit we should have no differences to socket_instances
+# before con1, con2, con3 connecting.
+SELECT *
+FROM performance_schema.socket_instances
+WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
+NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
+FROM my_socket_instances)
+ORDER BY THREAD_ID;
+EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
diff --git a/mysql-test/suite/perfschema/r/socket_instances_func_win.result b/mysql-test/suite/perfschema/r/socket_instances_func_win.result
new file mode 100644
index 00000000000..bb0f43abee3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_instances_func_win.result
@@ -0,0 +1,144 @@
+# Take a snapshot of SOCKET_INSTANCES
+CREATE TEMPORARY TABLE my_socket_instances AS
+SELECT * FROM performance_schema.socket_instances;
+# Get thread id of the default connection
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Establish local TCP/IP connection (con1,localhost,root,,test,,)
+# Store the thread id of connection 1 (tcp/ip)
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Store the port of connection 1 (tcp/ip)
+SELECT PORT INTO @port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+# Switch to connection default
+# Establish second local TCP/IP connection (con1,localhost,root,,test,,)
+# Store the thread_id of connection 2 (tcp/ip)
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+# Store the port of connection 2 (tcp/ip)
+SELECT PORT INTO @port
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+# Switch to connection default
+# EVENT_NAME is the "wait/io/socket/*" instrument identifier.
+SELECT COUNT(*) = 0 AS "Expect 1"
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME NOT LIKE 'wait/io/socket/%';
+Expect 1
+1
+# OBJECT_INSTANCE_BEGIN is an arbitrary identifier, guaranteed to be unique.
+SELECT COUNT(*) = COUNT(DISTINCT OBJECT_INSTANCE_BEGIN) AS "Expect 1"
+FROM performance_schema.socket_instances;
+Expect 1
+1
+# SOCKET_ID is the internal file handle assigned to the socket.
+SELECT COUNT(*) = COUNT(DISTINCT SOCKET_ID) AS "Expect 1"
+FROM performance_schema.socket_instances;
+Expect 1
+1
+# Characteristics per our thread
+# There must be only one entry with our thread_id
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# TCP/IP connections should have a unique port number
+# Connection 1 (tcp/ip)
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE PORT = @port;
+Expect 1
+1
+# Connection 2 (tcp/ip)
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE PORT = @port;
+Expect 1
+1
+# Check the content for the default connection (tcpip)
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND (IP LIKE '%127.0.0.1' OR IP = '::1') AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of 'server_tcpip_socket' entry
+# Server listening socket, TCP/IP
+# There is only one entry with 'wait/io/socket/sql/server_tcpip_socket'.
+# It shares the same thread id as 'wait/io/socket/sql/server_unix_socket'.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+Expect 1
+1
+# Get the 'server_tcpip_socket' thread id
+SELECT THREAD_ID INTO @thread_id
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+# Check the content.
+SELECT THREAD_ID = @thread_id
+AND (IP = '0.0.0.0' OR IP = '::')
+AND PORT = @port
+AND STATE = 'ACTIVE' AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE EVENT_NAME = 'wait/io/socket/sql/server_tcpip_socket';
+Expect 1
+1
+# Check content for client connection 1 (tcpip)
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND (IP LIKE '%127.0.0.1' OR IP = '::1')
+AND PORT = @port
+AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of entries with THREAD_ID of con1
+# There is only one entry with this id.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Check content for client connection 2 (tcpip)
+SELECT EVENT_NAME = 'wait/io/socket/sql/client_connection'
+ AND (IP LIKE '%127.0.0.1' OR IP = '::1')
+AND PORT = @port
+AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Characteristics of entries with THREAD_ID of con2
+# There is only one entry with this id.
+SELECT COUNT(*) = 1 AS 'Expect 1'
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @thread_id;
+Expect 1
+1
+# Show differences to socket_instances before con1, con2 and con3 connecting
+SELECT EVENT_NAME, IP
+FROM performance_schema.socket_instances
+WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
+NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
+FROM my_socket_instances)
+ORDER BY THREAD_ID;
+EVENT_NAME IP
+wait/io/socket/sql/client_connection <LOCALHOST>
+wait/io/socket/sql/client_connection <LOCALHOST>
+# Disconnect con1 and con2
+# After waiting a bit we should have no differences to socket_instances
+# before con1, con2 connecting.
+SELECT *
+FROM performance_schema.socket_instances
+WHERE (EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE)
+NOT IN (SELECT EVENT_NAME,OBJECT_INSTANCE_BEGIN,THREAD_ID,SOCKET_ID,IP,PORT,STATE
+FROM my_socket_instances)
+ORDER BY THREAD_ID;
+EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
new file mode 100644
index 00000000000..9cd668c8e7a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_event_name_func.result
@@ -0,0 +1,121 @@
+#==============================================================================
+# Establish the level of IPV6 support
+#==============================================================================
+#==============================================================================
+# Get hostname, port number
+#==============================================================================
+SELECT @@hostname INTO @MY_HOSTNAME;
+SELECT @@port INTO @MY_MASTER_PORT;
+#==============================================================================
+# 1.0 TEST INITIALIZATION
+#==============================================================================
+
+# 1.1 Disable instrumentation of the default (this) connection
+
+UPDATE performance_schema.threads
+SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+# 1.2 Get the default THREAD_ID;
+
+SELECT THREAD_ID INTO @my_thread_id
+FROM performance_schema.threads
+WHERE PROCESSLIST_ID = CONNECTION_ID();
+
+# 1.3 Get the default OBJECT_INSTANCE_BEGIN
+
+SELECT OBJECT_INSTANCE_BEGIN INTO @my_object_instance_begin
+FROM performance_schema.socket_instances
+WHERE THREAD_ID = @my_thread_id;
+
+# 1.4 Create a test database
+
+CREATE SCHEMA mysqltest;
+
+# 1.5 Create a table to store summary values from socket_summary_by_instance
+and socket_summary_by_event_name
+
+CREATE TABLE mysqltest.my_socket_summary AS
+SELECT * FROM performance_schema.socket_summary_by_instance
+WHERE 1 = 0;
+
+# 1.6 Drop object_instance_begin from my_socket_summary
+
+ALTER TABLE mysqltest.my_socket_summary
+DROP COLUMN OBJECT_INSTANCE_BEGIN;
+
+# 1.7 Add an auto_inc column to my_socket_summary
+
+ALTER TABLE mysqltest.my_socket_summary
+ADD COLUMN (n INT AUTO_INCREMENT, PRIMARY KEY(n));
+
+# 1.8 Create test tables
+
+CREATE TABLE mysqltest.t1 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
+CREATE TABLE mysqltest.t2 (n INT AUTO_INCREMENT, s1 VARCHAR(1024), PRIMARY KEY(n));
+#==============================================================================
+# 2.0 ESTABLISH CLIENT CONNECTIONS
+#==============================================================================
+
+# 2.1 Connection 1 (tcp/ip, 127.0.0.1 or ::1)
+
+
+# 2.2 Connection 2 (localhost or unix domain socket)
+
+#==============================================================================
+# 3.0 RUN THE TESTS
+#==============================================================================
+
+# 3.1 Clear performance schema tables
+
+TRUNCATE performance_schema.socket_summary_by_instance;
+TRUNCATE performance_schema.socket_summary_by_event_name;
+
+# 3.2 Get the 'before' sum of bytes written from socket_summary_by_instance
+for later comparison to the 'after' byte count as a simple confirmation
+that the table was updated.
+
+SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
+FROM performance_schema.socket_summary_by_instance;
+
+# 3.3 From connection 1, insert one a 1K row of data into t1
+
+USE mysqltest;
+INSERT INTO t1 (s1) VALUES (REPEAT('a', 1024));
+INSERT INTO t1 (s1) SELECT s1 FROM t1;
+
+# 3.4 From connection 2, insert one a 1K row of data into t2
+
+USE mysqltest;
+INSERT INTO t2 (s1) VALUES (REPEAT('a', 1024));
+INSERT INTO t2 (s1) SELECT s1 FROM t2;
+
+# 3.5 Get the 'after' sum of bytes written from socket_summary_by_instance
+
+SELECT sum(SUM_NUMBER_OF_BYTES_WRITE) INTO @my_write_count
+FROM performance_schema.socket_summary_by_instance;
+
+# 3.6 Verify that SUM_NUMBER_OF_BYTES_WRITE increased
+
+
+# socket_summary_by_instance was updated
+
+#==============================================================================
+# 4.0 VERIFY RESULTS
+#==============================================================================
+
+# 4.1 Verify that the totals in socket_summary_by_event_name are
+consistent with totals in socket_summary_by_instance
+
+#==============================================================================
+# 5.0 Clean up
+#==============================================================================
+
+# 5.1 Disconnect con1
+
+
+# 5.2 Disconnect con2
+
+
+# 5.3 Drop mysqltest
+
+DROP DATABASE mysqltest;
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
new file mode 100644
index 00000000000..a273bbde92c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func.result
@@ -0,0 +1,205 @@
+# The logging of commands and result sets is mostly disabled.
+# There are some messages which help to observe the progress of the test.
+# In case some check fails
+# - a message about this will be printed
+# - some SQL commands which show the unexpected state will be executed
+# (logging enabled)
+# - the test might abort
+#
+# 0. Check, build or set prequisites
+UPDATE performance_schema.threads
+SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
+# 1. Basic checks
+# 1.1 Check that the entry of the disconnected old default session really
+# disappeared from performance_schema.socket_summary_by_instance.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 1.2 Check the base line
+TRUNCATE TABLE mysqltest.my_socket_summary_by_instance;
+# 2. Variations on Connect
+# 2.1 Connect fails because the user is unknown
+# length of user name = 4 character
+# length of default db = 9 character
+ERROR 28000: Access denied for user 'boot'@'localhost' (using password: NO)
+# 2.2 Connect fails because the user is unknown
+# length of user name = 14 character (10 more than in 2.1)
+# length of default db = 9 character
+ERROR 28000: Access denied for user 'boot0123456789'@'localhost' (using password: NO)
+# 2.3 Connect should pass, host = localhost
+# length of user name = 4 character
+# length of default db = 9 character
+# 2.4 Connect should pass, host = localhost
+# length of user name = 4 character
+# length of default db = 14 character (5 more than 2.3)
+# 2.5 Connect should pass, host = localhost
+# length of user name = 10 character
+# length of default db = 9 character
+GRANT ALL PRIVILEGES ON *.* TO 'root012345'@'localhost';
+DROP USER 'root012345'@'localhost';
+# 2.6 Connect should pass, host = localhost
+# length of user name = 14 character
+# length of default db = 9 character
+GRANT ALL PRIVILEGES ON *.* to 'root0123456789'@'localhost';
+DROP USER 'root0123456789'@'localhost';
+# 2.7 Connect should pass, host = my_localhost
+# length of user name = 4 character
+# length of default db = 9 character
+# connection runs through server_tcpip_socket !
+DO 1;
+# 3 Variations on SELECT
+# 3.1 Check a SELECT ending with server sending an error message.
+# Error message is short (unknown table).
+SELECT col2 FROM does_not_exist;
+ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+# 3.2 SELECT ending with server sending an error message.
+# Now the statement is a bit longer but the error message
+# length does again not depend on statement.
+SELECT col2 FROM does_not_exist WHERE col1 = 0;
+ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+# 3.3 SELECT ending with server sending an error message.
+# The statement has the same length like in 3.2 but the error
+# message is now different and much longer.
+SELECT col2 FROM does_not_exist WHERE col1 A 0;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A 0' at line 1
+# 3.4 SELECT ending with server sending an error message.
+# Statement and error message are a bit longer than in 3.1
+# because the table name is longer.
+SELECT col2 FROM does_not_exist0123;
+ERROR 42S02: Table 'mysqltest.does_not_exist0123' doesn't exist
+# 3.5 SELECT earning an empty result set.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1;
+col2
+# 3.6 SELECT earning an empty result set.
+# Short column name is replaced by longer alias.
+SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1;
+my_super_col
+# 3.7 SELECT earning one row with an empty string.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1;
+col2
+
+# 3.8 SELECT earning one row with one string one char long.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2;
+col2
+a
+# 3.9 SELECT earning one row with one string 1024 char long.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3;
+col2
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+# 3.10 SELECT earning two rows with an empty string
+SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2;
+col2
+
+
+# 3.11 Check that the preceding Connects/SQL command runs have not
+# caused some unexpected state.
+# 4. Check delta (value_after_action - value_before_action) details
+# 4.1 Check that
+# - no change in COUNT_* leads to no change in
+# SUM_TIMER_* and no change in SUM_NUMBER_OF_BYTES_*
+# - increased COUNT_READ leads to increased
+# SUM_NUMBER_OF_BYTES_READ
+# - increased COUNT_WRITE leads to increased
+# SUM_NUMBER_OF_BYTES_WRITE
+# Attention:
+# The time required for some action might be below timer resolution.
+# Therefore some increased COUNT_* does not need to lead to an
+# increased SUM_TIMER_*.
+# 4.2 Results must be stable
+# 4.3 Counters must be 0 in client_connection for the default session
+# Instrumenting is disabled since a long time and the counter were
+# reset via TRUNCATE just after the disabling.
+# 4.4 Check the differences caused by SQL statements
+# 4.4.1 There must be no changes in counters of instances
+# NOT LIKE '%client_connection' because everything gets charged
+# into client_connection of the acting connection.
+# 4.4.2 In case of SELECT and our scenarios even COUNT_READ and COUNT_MISC
+# are stable.
+# 4.4.3 In our testing scenarios we get for the client_connection entry
+# of the acting connection
+# -> OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0
+# Check the differences between changes caused by SQL statements
+# These differences must correspond to parameters like
+# - statement, table name or column name length
+# - number of rows in result set, size of rows in result set etc.
+# 4.4.4 Compare impact of statements
+# SELECT col2 FROM does_not_exist WHERE col1 = 0
+# SELECT col2 FROM does_not_exist
+# One statement is longer than the other.
+# Both statements fail with the same error message (table does not exist)
+# 4.4.5 Compare impact of statements
+# SELECT col2 FROM does_not_exist WHERE col1 A 0
+# SELECT col2 FROM does_not_exist WHERE col1 = 0
+# Both statements have the same length and fail.
+# The length of the error messages differs.
+# 4.4.6 Compare impact of statements
+# SELECT col2 FROM does_not_exist0123
+# SELECT col2 FROM does_not_exist
+# Both statements fail (table does not exist).
+# The length of the statement and the length of the error messages differs.
+# Reason for both differences is the length of the table name.
+# 4.4.7 Compare impact of statements
+# SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
+# Both statements get an empty result set.
+# The length of the statements and the length of the result sets differs.
+# Reason for both differences is the length of the some column name.
+# 4.4.8 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
+# Both statements differ in the statement length.
+# One statement earns an empty result set.
+# The other statement earns one row containing an empty string.
+# 4.4.9 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns one row containing a string 1 byte long.
+# 4.4.10 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns one row containing a string 1024 byte long.
+# 4.4.11 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns two rows containing an empty string.
+# 4.5 Check the differences caused by Connects
+# Attention: Succesful Connects run an additional "DO 1".
+# 4.5.1 Connects do not charge anything into READ or WRITE counters
+# of the instance with EVENT_NAME NOT LIKE ('%client_connection%').
+# This mean all these counters must be 0.
+# 4.5.2 Connects using for host the value 'localhost'
+# 4.5.2.1 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
+# because we run through server_unix_socket.
+# 4.5.2.2 For the instance with EVENT_NAME LIKE '%server_unix_socket'
+# COUNT_MISC > 0 must be valid.
+# 4.5.3 Connects using for host a value <> 'localhost'
+# 4.5.3.1 For the instance with EVENT_NAME LIKE '%server_unix_socket'
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
+# because we run through server_tcpip_socket.
+# 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
+# COUNT_MISC > 0 must be valid.
+# 4.5.4 Failing Connects do not cause any row with EVENT_NAME
+# LIKE '%client_connection'
+# 4.5.5 Successful Connects cause a new instance with EVENT_NAME
+# LIKE '%client_connection'
+# 4.6 Check the differences caused by Connects
+# - INSTANCES with an EVENT_NAME like server_tcpip_socket or
+# server_unix_socket are already checked
+# - the stability of results is already checked
+# So we con go with the results of the first run.
+# 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+# 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
+# 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
+# 4.6.4 Checks based on comparison of results for connects
+# 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
+# 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
+# 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+# It must reset all counters.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 6. Cleanup
diff --git a/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
new file mode 100644
index 00000000000..2bdc2524bbc
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/socket_summary_by_instance_func_win.result
@@ -0,0 +1,208 @@
+# The logging of commands and result sets is mostly disabled.
+# There are some messages which help to observe the progress of the test.
+# In case some check fails
+# - a message about this will be printed
+# - some SQL commands which show the unexpected state will be executed
+# (logging enabled)
+# - the test might abort
+#
+# 0. Check, build or set prequisites
+UPDATE performance_schema.threads
+SET INSTRUMENTED='NO' WHERE PROCESSLIST_ID = CONNECTION_ID();
+# 1. Basic checks
+# 1.1 Check that the entry of the disconnected old default session really
+# disappeared from performance_schema.socket_summary_by_instance.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 1.2 Check the base line
+TRUNCATE TABLE mysqltest.my_socket_summary_by_instance;
+# 2. Variations on Connect
+# 2.1 Connect fails because the user is unknown
+# length of user name = 4 character
+# length of default db = 9 character
+ERROR 28000: Access denied for user 'boot'@'localhost' (using password: NO)
+# 2.2 Connect fails because the user is unknown
+# length of user name = 14 character (10 more than in 2.1)
+# length of default db = 9 character
+ERROR 28000: Access denied for user 'boot0123456789'@'localhost' (using password: NO)
+# 2.3 Connect should pass, host = localhost
+# length of user name = 4 character
+# length of default db = 9 character
+# 2.4 Connect should pass, host = localhost
+# length of user name = 4 character
+# length of default db = 14 character (5 more than 2.3)
+# 2.5 Connect should pass, host = localhost
+# length of user name = 10 character
+# length of default db = 9 character
+GRANT ALL PRIVILEGES ON *.* TO 'root012345'@'localhost';
+DROP USER 'root012345'@'localhost';
+# 2.6 Connect should pass, host = localhost
+# length of user name = 14 character
+# length of default db = 9 character
+GRANT ALL PRIVILEGES ON *.* to 'root0123456789'@'localhost';
+DROP USER 'root0123456789'@'localhost';
+# 2.7 Connect should pass, host = my_localhost
+# length of user name = 4 character
+# length of default db = 9 character
+# connection runs through server_tcpip_socket !
+DO 1;
+# 3 Variations on SELECT
+# 3.1 Check a SELECT ending with server sending an error message.
+# Error message is short (unknown table).
+SELECT col2 FROM does_not_exist;
+ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+# 3.2 SELECT ending with server sending an error message.
+# Now the statement is a bit longer but the error message
+# length does again not depend on statement.
+SELECT col2 FROM does_not_exist WHERE col1 = 0;
+ERROR 42S02: Table 'mysqltest.does_not_exist' doesn't exist
+# 3.3 SELECT ending with server sending an error message.
+# The statement has the same length like in 3.2 but the error
+# message is now different and much longer.
+SELECT col2 FROM does_not_exist WHERE col1 A 0;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'A 0' at line 1
+# 3.4 SELECT ending with server sending an error message.
+# Statement and error message are a bit longer than in 3.1
+# because the table name is longer.
+SELECT col2 FROM does_not_exist0123;
+ERROR 42S02: Table 'mysqltest.does_not_exist0123' doesn't exist
+# 3.5 SELECT earning an empty result set.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1;
+col2
+# 3.6 SELECT earning an empty result set.
+# Short column name is replaced by longer alias.
+SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1;
+my_super_col
+# 3.7 SELECT earning one row with an empty string.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1;
+col2
+
+# 3.8 SELECT earning one row with one string one char long.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2;
+col2
+a
+# 3.9 SELECT earning one row with one string 1024 char long.
+SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3;
+col2
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+# 3.10 SELECT earning two rows with an empty string
+SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2;
+col2
+
+
+# 3.11 Check that the preceding Connects/SQL command runs have not
+# caused some unexpected state.
+# 4. Check delta (value_after_action - value_before_action) details
+# 4.1 Check that
+# - no change in COUNT_* leads to no change in
+# SUM_TIMER_* and no change in SUM_NUMBER_OF_BYTES_*
+# - increased COUNT_READ leads to increased
+# SUM_NUMBER_OF_BYTES_READ
+# - increased COUNT_WRITE leads to increased
+# SUM_NUMBER_OF_BYTES_WRITE
+# Attention:
+# The time required for some action might be below timer resolution.
+# Therefore some increased COUNT_* does not need to lead to an
+# increased SUM_TIMER_*.
+# 4.2 Results must be stable
+# 4.3 Counters must be 0 in client_connection for the default session
+# Instrumenting is disabled since a long time and the counter were
+# reset via TRUNCATE just after the disabling.
+# 4.4 Check the differences caused by SQL statements
+# 4.4.1 There must be no changes in counters of instances
+# NOT LIKE '%client_connection' because everything gets charged
+# into client_connection of the acting connection.
+# 4.4.2 In case of SELECT and our scenarios even COUNT_READ and COUNT_MISC
+# are stable.
+# 4.4.3 In our testing scenarios we get for the client_connection entry
+# of the acting connection
+# -> OBJECT_INSTANCE_BEGIN <> @default_object_instance_begin
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0
+# SKIPPED FOR WINDOWS
+# Check the differences between changes caused by SQL statements
+# These differences must correspond to parameters like
+# - statement, table name or column name length
+# - number of rows in result set, size of rows in result set etc.
+# 4.4.4 Compare impact of statements
+# SELECT col2 FROM does_not_exist WHERE col1 = 0
+# SELECT col2 FROM does_not_exist
+# One statement is longer than the other.
+# Both statements fail with the same error message (table does not exist)
+# 4.4.5 Compare impact of statements
+# SELECT col2 FROM does_not_exist WHERE col1 A 0
+# SELECT col2 FROM does_not_exist WHERE col1 = 0
+# Both statements have the same length and fail.
+# The length of the error messages differs.
+# 4.4.6 Compare impact of statements
+# SELECT col2 FROM does_not_exist0123
+# SELECT col2 FROM does_not_exist
+# Both statements fail (table does not exist).
+# The length of the statement and the length of the error messages differs.
+# Reason for both differences is the length of the table name.
+# 4.4.7 Compare impact of statements
+# SELECT col2 AS my_super_col FROM mysqltest.my_aux WHERE col1 = -1
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
+# Both statements get an empty result set.
+# The length of the statements and the length of the result sets differs.
+# Reason for both differences is the length of the some column name.
+# 4.4.8 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = -1
+# Both statements differ in the statement length.
+# One statement earns an empty result set.
+# The other statement earns one row containing an empty string.
+# 4.4.9 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 2
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns one row containing a string 1 byte long.
+# 4.4.10 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 3
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns one row containing a string 1024 byte long.
+# 4.4.11 Compare impact of statements
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 < 2
+# SELECT col2 FROM mysqltest.my_aux WHERE col1 = 1
+# Both statements have the same length.
+# One statement earns an one row containing an empty string.
+# The other statement earns two rows containing an empty string.
+# 4.5 Check the differences caused by Connects
+# Attention: Succesful Connects run an additional "DO 1".
+# 4.5.1 Connects do not charge anything into READ or WRITE counters
+# of the instance with EVENT_NAME NOT LIKE ('%client_connection%').
+# This mean all these counters must be 0.
+# 4.5.2 Connects using for host the value 'localhost'
+# 4.5.2.1 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
+# because we run through server_unix_socket.
+# 4.5.2.2 For the instance with EVENT_NAME LIKE '%server_unix_socket'
+# COUNT_MISC > 0 must be valid.
+# SKIPPED FOR WINDOWS
+# 4.5.3 Connects using for host a value <> 'localhost'
+# 4.5.3.1 For the instance with EVENT_NAME LIKE '%server_unix_socket'
+# COUNT_MISC = 0 AND SUM_TIMER_MISC = 0 must be valid
+# because we run through server_tcpip_socket.
+# SKIPPED FOR WINDOWS
+# 4.5.3.2 For the instance with EVENT_NAME LIKE '%server_tcpip_socket'
+# COUNT_MISC > 0 must be valid.
+# 4.5.4 Failing Connects do not cause any row with EVENT_NAME
+# LIKE '%client_connection'
+# 4.5.5 Successful Connects cause a new instance with EVENT_NAME
+# LIKE '%client_connection'
+# 4.6 Check the differences caused by Connects
+# - INSTANCES with an EVENT_NAME like server_tcpip_socket or
+# server_unix_socket are already checked
+# - the stability of results is already checked
+# So we con go with the results of the first run.
+# 4.6.1 The SUM_OF_BYTES_WRITE value is the same for all Connects.
+# 4.6.2 The SUM_OF_BYTES_WRITE value hast to be > 100.
+# 4.6.3 COUNT_READ, COUNT_WRITE and COUNT_MISC have to be to be > 0
+# 4.6.4 Checks based on comparison of results for connects
+# 4.6.4 The user name length affects the SUM_OF_BYTES_READ value
+# 4.6.5 The database name length affects the SUM_OF_BYTES_READ value
+# 5. Check the impact of TRUNCATE on socket_summary_by_instance.
+# It must reset all counters.
+TRUNCATE TABLE performance_schema.socket_summary_by_instance;
+# 6. Cleanup
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_function.result b/mysql-test/suite/perfschema/r/stage_mdl_function.result
new file mode 100644
index 00000000000..39cf2b08e85
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/stage_mdl_function.result
@@ -0,0 +1,34 @@
+drop function if exists test.f1;
+create function test.f1() returns int
+return 1;
+begin;
+select test.f1();
+test.f1()
+1
+drop function test.f1;
+call dump_one_thread('user1');
+username event_name sql_text
+user1 statement/sql/select select test.f1()
+username event_name nesting_event_type
+username event_name nesting_event_type
+user1 stage/sql/System lock STATEMENT
+user1 stage/sql/init STATEMENT
+user1 stage/sql/optimizing STATEMENT
+user1 stage/sql/executing STATEMENT
+user1 stage/sql/Opening tables STATEMENT
+user1 stage/sql/end STATEMENT
+user1 stage/sql/query end STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/freeing items STATEMENT
+user1 stage/sql/cleaning up STATEMENT
+call dump_one_thread('user2');
+username event_name sql_text
+user2 statement/sql/drop_function drop function test.f1
+username event_name nesting_event_type
+user2 stage/sql/Waiting for stored function metadata lock STATEMENT
+username event_name nesting_event_type
+user2 stage/sql/init STATEMENT
+select f1();
+f1()
+1
+commit;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_global.result b/mysql-test/suite/perfschema/r/stage_mdl_global.result
new file mode 100644
index 00000000000..de5df8f189a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/stage_mdl_global.result
@@ -0,0 +1,24 @@
+flush tables with read lock;
+insert into test.t1 values (1), (2), (3);
+call dump_one_thread('user1');
+username event_name sql_text
+user1 statement/sql/flush flush tables with read lock
+username event_name nesting_event_type
+username event_name nesting_event_type
+user1 stage/sql/init STATEMENT
+user1 stage/sql/Waiting for query cache lock STATEMENT
+user1 stage/sql/init STATEMENT
+user1 stage/sql/query end STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/freeing items STATEMENT
+user1 stage/sql/cleaning up STATEMENT
+call dump_one_thread('user2');
+username event_name sql_text
+user2 statement/sql/insert insert into test.t1 values (1), (2), (3)
+username event_name nesting_event_type
+user2 stage/sql/Waiting for global read lock STATEMENT
+username event_name nesting_event_type
+user2 stage/sql/init STATEMENT
+user2 stage/sql/checking permissions STATEMENT
+user2 stage/sql/Opening tables STATEMENT
+unlock tables;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_procedure.result b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
new file mode 100644
index 00000000000..b214a8ec290
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/stage_mdl_procedure.result
@@ -0,0 +1,42 @@
+drop function if exists test.f1;
+drop procedure if exists test.p1;
+create function test.f1() returns int
+begin
+call test.p1();
+return 1;
+end
+$$
+create procedure test.p1()
+begin end;
+begin;
+select test.f1();
+test.f1()
+1
+drop procedure test.p1;
+call dump_one_thread('user1');
+username event_name sql_text
+user1 statement/sql/select select test.f1()
+username event_name nesting_event_type
+username event_name nesting_event_type
+user1 stage/sql/executing STATEMENT
+user1 stage/sql/Opening tables STATEMENT
+user1 stage/sql/query end STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/Opening tables STATEMENT
+user1 stage/sql/end STATEMENT
+user1 stage/sql/query end STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/freeing items STATEMENT
+user1 stage/sql/cleaning up STATEMENT
+call dump_one_thread('user2');
+username event_name sql_text
+user2 statement/sql/drop_procedure drop procedure test.p1
+username event_name nesting_event_type
+user2 stage/sql/Waiting for stored procedure metadata lock STATEMENT
+username event_name nesting_event_type
+user2 stage/sql/init STATEMENT
+select test.f1();
+test.f1()
+1
+commit;
+drop function test.f1;
diff --git a/mysql-test/suite/perfschema/r/stage_mdl_table.result b/mysql-test/suite/perfschema/r/stage_mdl_table.result
new file mode 100644
index 00000000000..b64d94f406c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/stage_mdl_table.result
@@ -0,0 +1,37 @@
+begin;
+insert into test.t1 values (1), (2), (3);
+commit;
+begin;
+select * from test.t1 for update;
+a
+1
+2
+3
+alter table test.t1 add column (b int);
+call dump_one_thread('user1');
+username event_name sql_text
+user1 statement/sql/select select * from test.t1 for update
+username event_name nesting_event_type
+username event_name nesting_event_type
+user1 stage/sql/optimizing STATEMENT
+user1 stage/sql/statistics STATEMENT
+user1 stage/sql/preparing STATEMENT
+user1 stage/sql/executing STATEMENT
+user1 stage/sql/Sending data STATEMENT
+user1 stage/sql/end STATEMENT
+user1 stage/sql/query end STATEMENT
+user1 stage/sql/closing tables STATEMENT
+user1 stage/sql/freeing items STATEMENT
+user1 stage/sql/cleaning up STATEMENT
+call dump_one_thread('user2');
+username event_name sql_text
+user2 statement/sql/alter_table alter table test.t1 add column (b int)
+username event_name nesting_event_type
+user2 stage/sql/Waiting for table metadata lock STATEMENT
+username event_name nesting_event_type
+user2 stage/sql/init STATEMENT
+user2 stage/sql/checking permissions STATEMENT
+user2 stage/sql/checking permissions STATEMENT
+user2 stage/sql/init STATEMENT
+user2 stage/sql/Opening tables STATEMENT
+commit;
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
new file mode 100644
index 00000000000..7f3746f15e1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -0,0 +1,120 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+select * from performance_schema.setup_instruments
+where name like "idle" and enabled='YES';
+NAME ENABLED TIMED
+select * from performance_schema.events_waits_summary_global_by_event_name
+where event_name like "idle" and count_star > 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_thread_by_event_name
+where event_name like "idle" and count_star > 0;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_user_by_event_name
+where event_name like "idle" and count_star > 0;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_host_by_event_name
+where event_name like "idle" and count_star > 0;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_account_by_event_name
+where event_name like "idle" and count_star > 0;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
new file mode 100644
index 00000000000..bdc6e99ce1d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -0,0 +1,120 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+select * from performance_schema.setup_instruments
+where name like "stage/%" and enabled='YES';
+NAME ENABLED TIMED
+select * from performance_schema.events_stages_summary_global_by_event_name
+where count_star > 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_thread_by_event_name
+where count_star > 0;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_user_by_event_name
+where count_star > 0;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_host_by_event_name
+where count_star > 0;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_account_by_event_name
+where count_star > 0;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
new file mode 100644
index 00000000000..61c3f5a7a87
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -0,0 +1,120 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+select * from performance_schema.setup_instruments
+where name like "statement/%" and enabled='YES';
+NAME ENABLED TIMED
+select * from performance_schema.events_statements_summary_global_by_event_name
+where count_star > 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_thread_by_event_name
+where count_star > 0;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_user_by_event_name
+where count_star > 0;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_host_by_event_name
+where count_star > 0;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_account_by_event_name
+where count_star > 0;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
new file mode 100644
index 00000000000..5344a45e70e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -0,0 +1,120 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+select * from performance_schema.setup_instruments
+where name like "wait/%" and enabled='YES';
+NAME ENABLED TIMED
+select * from performance_schema.events_waits_summary_global_by_event_name
+where event_name like "wait/%" and count_star > 0;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_thread_by_event_name
+where event_name like "wait/%" and count_star > 0;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_user_by_event_name
+where event_name like "wait/%" and count_star > 0;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_host_by_event_name
+where event_name like "wait/%" and count_star > 0;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_account_by_event_name
+where event_name like "wait/%" and count_star > 0;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
new file mode 100644
index 00000000000..4fa005de8d5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -0,0 +1,126 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
new file mode 100644
index 00000000000..b6320ee594d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -0,0 +1,112 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 0
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_accounts_size";
+Variable_name Value
+performance_schema_accounts_size 0
+select count(*) from performance_schema.accounts;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_ACCOUNTS_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
index f32ffe327a2..b876365fa18 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_class.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 0
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_cond_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
index ef853ccc710..415968733f6 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_cond_inst.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 0
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_cond_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_digests.result b/mysql-test/suite/perfschema/r/start_server_no_digests.result
new file mode 100644
index 00000000000..38d6d2750f6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_digests.result
@@ -0,0 +1,92 @@
+####################################
+# SETUP
+####################################
+CREATE DATABASE statements_digest;
+USE statements_digest;
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int, b int);
+CREATE TABLE t4(a int, b int);
+CREATE TABLE t5(a int, b int, c int);
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+####################################
+# EXECUTION
+####################################
+SELECT 1 FROM t1;
+1
+SELECT 1 FROM `t1`;
+1
+SELECT 1,2 FROM t1;
+1 2
+SELECT 1, 2, 3, 4 FROM t1;
+1 2 3 4
+SELECT 1 FROM t2;
+1
+SELECT 1,2 FROM t2;
+1 2
+SELECT 1, 2, 3, 4 FROM t2;
+1 2 3 4
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t4 VALUES (1, 2);
+INSERT INTO t5 VALUES (1, 2, 3);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
+INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+SELECT 1 + 1;
+1 + 1
+2
+SELECT 1;
+1
+1
+SELECT 1 /* This is an inline comment */ + 1;
+1 /* This is an inline comment */ + 1
+2
+SELECT 1+
+/*
+this is a
+multiple-line comment
+*/
+1;
+1+
+/*
+this is a
+multiple-line comment
+*/
+1
+2
+CREATE SCHEMA statements_digest_temp;
+DROP SCHEMA statements_digest_temp;
+CREATE DATABASE statements_digest_temp;
+DROP DATABASE statements_digest_temp;
+SELECT 1 from t11;
+ERROR 42S02: Table 'statements_digest.t11' doesn't exist
+create table t11 (c char(4));
+create table t11 (c char(4));
+ERROR 42S01: Table 't11' already exists
+insert into t11 values("MySQL");
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
+DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+SHOW VARIABLES LIKE "performance_schema_digests_size";
+Variable_name Value
+performance_schema_digests_size 0
+SELECT COUNT(*) FROM performance_schema.events_statements_summary_by_digest;
+COUNT(*)
+0
+####################################
+# CLEANUP
+####################################
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP TABLE IF EXISTS t5;
+DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_class.result b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
index bafb4cac270..12a7d9b0fb1 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_class.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 0
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_file_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
index 2e557e5510a..af71c0e19a0 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_file_inst.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 0
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_file_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
new file mode 100644
index 00000000000..98d6aaf0deb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -0,0 +1,112 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 0
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_hosts_size";
+Variable_name Value
+performance_schema_hosts_size 0
+select count(*) from performance_schema.hosts;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_HOSTS_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
index b6d359ae5d2..13566a5ca81 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_class.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 0
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_mutex_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
index 190d58378ac..bbe50aa7b9c 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result
@@ -10,35 +10,74 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
@@ -47,11 +86,18 @@ performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
performance_schema_max_mutex_instances 0
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_mutex_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
index b27159828f6..8f443e3e08e 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 0
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_rwlock_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
index 7466235c42f..89af89e1314 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
performance_schema_max_rwlock_instances 0
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_rwlock_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
new file mode 100644
index 00000000000..d2e31d6eda7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -0,0 +1,108 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_setup_actors_size";
+Variable_name Value
+performance_schema_setup_actors_size 0
+select count(*) from performance_schema.setup_actors;
+count(*)
+0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
new file mode 100644
index 00000000000..9365d908ec7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -0,0 +1,108 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 0
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_setup_objects_size";
+Variable_name Value
+performance_schema_setup_objects_size 0
+select count(*) from performance_schema.setup_objects;
+count(*)
+0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
new file mode 100644
index 00000000000..526b163a2b5
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -0,0 +1,119 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 0
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_socket_classes";
+Variable_name Value
+performance_schema_max_socket_classes 0
+select count(*) from performance_schema.setup_instruments
+where name like "wait/io/socket/%";
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_SOCKET_CLASSES_LOST';
+variable_value > 0
+1
+select count(*) from performance_schema.socket_instances;
+count(*)
+0
+show status like "performance_schema_socket_instances_lost";
+Variable_name Value
+Performance_schema_socket_instances_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
new file mode 100644
index 00000000000..78b2d4aaad8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -0,0 +1,122 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 0
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_socket_classes";
+Variable_name Value
+performance_schema_max_socket_classes 10
+select count(*) > 0 from performance_schema.setup_instruments
+where name like "wait/io/socket/%";
+count(*) > 0
+1
+show status like "performance_schema_socket_classes_lost";
+Variable_name Value
+Performance_schema_socket_classes_lost 0
+show variables like "performance_schema_max_socket_instances";
+Variable_name Value
+performance_schema_max_socket_instances 0
+select count(*) from performance_schema.socket_instances;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_SOCKET_INSTANCES_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
new file mode 100644
index 00000000000..de41ea4e3f3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -0,0 +1,128 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_stage_classes";
+Variable_name Value
+performance_schema_max_stage_classes 0
+select count(*) from performance_schema.setup_instruments
+where name like "stage/%";
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_STAGE_CLASSES_LOST';
+variable_value > 0
+1
+select count(*) from performance_schema.events_stages_current;
+count(*)
+0
+select count(*) from performance_schema.events_stages_history;
+count(*)
+0
+select count(*) from performance_schema.events_stages_history_long;
+count(*)
+0
+select count(*) from performance_schema.events_stages_summary_by_thread_by_event_name;
+count(*)
+0
+select count(*) from performance_schema.events_stages_summary_global_by_event_name;
+count(*)
+0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
new file mode 100644
index 00000000000..33c20cf8dfd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 0
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_stages_history_size";
+Variable_name Value
+performance_schema_events_stages_history_size 0
+select count(*) from performance_schema.events_stages_history;
+count(*)
+0
+truncate table performance_schema.events_stages_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
new file mode 100644
index 00000000000..3cbec7fe891
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 0
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_stages_history_long_size";
+Variable_name Value
+performance_schema_events_stages_history_long_size 0
+select count(*) from performance_schema.events_stages_history_long;
+count(*)
+0
+truncate table performance_schema.events_stages_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
new file mode 100644
index 00000000000..f918d5a47f1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
@@ -0,0 +1,128 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 0
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_statement_classes";
+Variable_name Value
+performance_schema_max_statement_classes 0
+select count(*) from performance_schema.setup_instruments
+where name like "statement/%";
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_STATEMENT_CLASSES_LOST';
+variable_value > 0
+1
+select count(*) from performance_schema.events_statements_current;
+count(*)
+0
+select count(*) from performance_schema.events_statements_history;
+count(*)
+0
+select count(*) from performance_schema.events_statements_history_long;
+count(*)
+0
+select count(*) from performance_schema.events_statements_summary_by_thread_by_event_name;
+count(*)
+0
+select count(*) from performance_schema.events_statements_summary_global_by_event_name;
+count(*)
+0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
new file mode 100644
index 00000000000..d304e0c8f49
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 0
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_statements_history_size";
+Variable_name Value
+performance_schema_events_statements_history_size 0
+select count(*) from performance_schema.events_statements_history;
+count(*)
+0
+truncate table performance_schema.events_statements_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
new file mode 100644
index 00000000000..d7bb4ca598a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 0
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_statements_history_long_size";
+Variable_name Value
+performance_schema_events_statements_history_long_size 0
+select count(*) from performance_schema.events_statements_history_long;
+count(*)
+0
+truncate table performance_schema.events_statements_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
new file mode 100644
index 00000000000..eef0a0d60ae
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -0,0 +1,124 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_table_instances";
+Variable_name Value
+performance_schema_max_table_instances 500
+show variables like "performance_schema_max_table_handles";
+Variable_name Value
+performance_schema_max_table_handles 0
+drop table if exists test.instrument_me;
+create table test.instrument_me(a int);
+insert into test.instrument_me values (1), (2), (3);
+select * from test.instrument_me;
+a
+1
+2
+3
+drop table test.instrument_me;
+show variables like "performance_schema_max_table_instances";
+Variable_name Value
+performance_schema_max_table_instances 500
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_HANDLES_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
new file mode 100644
index 00000000000..9a54dc8168c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -0,0 +1,124 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 0
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_max_table_instances";
+Variable_name Value
+performance_schema_max_table_instances 0
+show variables like "performance_schema_max_table_handles";
+Variable_name Value
+performance_schema_max_table_handles 1000
+drop table if exists test.instrument_me;
+create table test.instrument_me(a int);
+insert into test.instrument_me values (1), (2), (3);
+select * from test.instrument_me;
+a
+1
+2
+3
+drop table test.instrument_me;
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_TABLE_INSTANCES_LOST';
+variable_value > 0
+1
+show status like "performance_schema_table_handles_lost";
+Variable_name Value
+Performance_schema_table_handles_lost 0
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
index 075c22bc405..b1fb2a4718a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_class.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 0
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_thread_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
index 763b5b69ca1..7e95947dab0 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_thread_inst.result
@@ -10,48 +10,94 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
performance_schema_max_thread_instances 0
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show variables like "performance_schema_max_thread_classes";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
new file mode 100644
index 00000000000..96e80f3fefd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -0,0 +1,112 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 0
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_users_size";
+Variable_name Value
+performance_schema_users_size 0
+select count(*) from performance_schema.users;
+count(*)
+0
+select variable_value > 0 from information_schema.global_status
+where variable_name like 'PERFORMANCE_SCHEMA_USERS_LOST';
+variable_value > 0
+1
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
new file mode 100644
index 00000000000..63d80712f25
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 0
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_waits_history_size";
+Variable_name Value
+performance_schema_events_waits_history_size 0
+select count(*) from performance_schema.events_waits_history;
+count(*)
+0
+truncate table performance_schema.events_waits_history;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
new file mode 100644
index 00000000000..705be71b828
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result
@@ -0,0 +1,109 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+1
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 0
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema_events_waits_history_long_size";
+Variable_name Value
+performance_schema_events_waits_history_long_size 0
+select count(*) from performance_schema.events_waits_history_long;
+count(*)
+0
+truncate table performance_schema.events_waits_history_long;
diff --git a/mysql-test/suite/perfschema/r/start_server_nothing.result b/mysql-test/suite/perfschema/r/start_server_nothing.result
new file mode 100644
index 00000000000..6d81d08d30e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result
@@ -0,0 +1,251 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+5
+select count(*) from performance_schema.setup_consumers;
+count(*)
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
+0
+select count(*) from performance_schema.setup_timers;
+count(*)
+4
+select * from performance_schema.accounts;
+select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
+select * from performance_schema.events_waits_current;
+select * from performance_schema.events_waits_history;
+select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+select * from performance_schema.events_waits_summary_by_instance;
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+select * from performance_schema.events_waits_summary_global_by_event_name;
+select * from performance_schema.file_instances;
+select * from performance_schema.file_summary_by_event_name;
+select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
+select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
+select * from performance_schema.performance_timers;
+select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
+select * from performance_schema.setup_consumers;
+select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
+select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
+select * from performance_schema.threads;
+select * from performance_schema.users;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 0
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 0
+performance_schema_events_stages_history_size 0
+performance_schema_events_statements_history_long_size 0
+performance_schema_events_statements_history_size 0
+performance_schema_events_waits_history_long_size 0
+performance_schema_events_waits_history_size 0
+performance_schema_hosts_size 0
+performance_schema_max_cond_classes 0
+performance_schema_max_cond_instances 0
+performance_schema_max_file_classes 0
+performance_schema_max_file_handles 0
+performance_schema_max_file_instances 0
+performance_schema_max_mutex_classes 0
+performance_schema_max_mutex_instances 0
+performance_schema_max_rwlock_classes 0
+performance_schema_max_rwlock_instances 0
+performance_schema_max_socket_classes 0
+performance_schema_max_socket_instances 0
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 0
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 0
+performance_schema_max_thread_classes 0
+performance_schema_max_thread_instances 0
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 0
+performance_schema_users_size 0
+show engine PERFORMANCE_SCHEMA status;
+show status like "performance_schema%";
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 0
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 0
+performance_schema_events_stages_history_size 0
+performance_schema_events_statements_history_long_size 0
+performance_schema_events_statements_history_size 0
+performance_schema_events_waits_history_long_size 0
+performance_schema_events_waits_history_size 0
+performance_schema_hosts_size 0
+performance_schema_max_cond_classes 0
+performance_schema_max_cond_instances 0
+performance_schema_max_file_classes 0
+performance_schema_max_file_handles 0
+performance_schema_max_file_instances 0
+performance_schema_max_mutex_classes 0
+performance_schema_max_mutex_instances 0
+performance_schema_max_rwlock_classes 0
+performance_schema_max_rwlock_instances 0
+performance_schema_max_socket_classes 0
+performance_schema_max_socket_instances 0
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 0
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 0
+performance_schema_max_thread_classes 0
+performance_schema_max_thread_instances 0
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 0
+performance_schema_users_size 0
+select * from performance_schema.setup_instruments;
+NAME ENABLED TIMED
+wait/io/table/sql/handler YES YES
+wait/lock/table/sql/handler YES YES
+idle YES YES
+select TIMER_NAME from performance_schema.performance_timers;
+TIMER_NAME
+CYCLE
+NANOSECOND
+MICROSECOND
+MILLISECOND
+TICK
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+select * from performance_schema.setup_timers;
+NAME TIMER_NAME
+idle MICROSECOND
+wait CYCLE
+stage NANOSECOND
+statement NANOSECOND
+select * from performance_schema.accounts;
+USER HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select * from performance_schema.cond_instances;
+NAME OBJECT_INSTANCE_BEGIN
+select * from performance_schema.events_stages_current;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_stages_history;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_stages_history_long;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_stages_summary_global_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_statements_current;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_statements_history;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_statements_history_long;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT LOCK_TIME SQL_TEXT DIGEST DIGEST_TEXT CURRENT_SCHEMA OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME OBJECT_INSTANCE_BEGIN MYSQL_ERRNO RETURNED_SQLSTATE MESSAGE_TEXT ERRORS WARNINGS ROWS_AFFECTED ROWS_SENT ROWS_EXAMINED CREATED_TMP_DISK_TABLES CREATED_TMP_TABLES SELECT_FULL_JOIN SELECT_FULL_RANGE_JOIN SELECT_RANGE SELECT_RANGE_CHECK SELECT_SCAN SORT_MERGE_PASSES SORT_RANGE SORT_ROWS SORT_SCAN NO_INDEX_USED NO_GOOD_INDEX_USED NESTING_EVENT_ID NESTING_EVENT_TYPE
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_statements_summary_global_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT SUM_LOCK_TIME SUM_ERRORS SUM_WARNINGS SUM_ROWS_AFFECTED SUM_ROWS_SENT SUM_ROWS_EXAMINED SUM_CREATED_TMP_DISK_TABLES SUM_CREATED_TMP_TABLES SUM_SELECT_FULL_JOIN SUM_SELECT_FULL_RANGE_JOIN SUM_SELECT_RANGE SUM_SELECT_RANGE_CHECK SUM_SELECT_SCAN SUM_SORT_MERGE_PASSES SUM_SORT_RANGE SUM_SORT_ROWS SUM_SORT_SCAN SUM_NO_INDEX_USED SUM_NO_GOOD_INDEX_USED
+select * from performance_schema.events_waits_current;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
+select * from performance_schema.events_waits_history;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
+select * from performance_schema.events_waits_history_long;
+THREAD_ID EVENT_ID END_EVENT_ID EVENT_NAME SOURCE TIMER_START TIMER_END TIMER_WAIT SPINS OBJECT_SCHEMA OBJECT_NAME INDEX_NAME OBJECT_TYPE OBJECT_INSTANCE_BEGIN NESTING_EVENT_ID NESTING_EVENT_TYPE OPERATION NUMBER_OF_BYTES FLAGS
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+USER HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
+HOST EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_instance;
+EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+THREAD_ID EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
+USER EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.events_waits_summary_global_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+wait/io/table/sql/handler 0 0 0 0 0
+wait/lock/table/sql/handler 0 0 0 0 0
+idle 0 0 0 0 0
+select * from performance_schema.file_instances;
+FILE_NAME EVENT_NAME OPEN_COUNT
+select * from performance_schema.file_summary_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.file_summary_by_instance;
+FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.socket_instances;
+EVENT_NAME OBJECT_INSTANCE_BEGIN THREAD_ID SOCKET_ID IP PORT STATE
+select * from performance_schema.socket_summary_by_instance;
+EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.socket_summary_by_event_name;
+EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
+select * from performance_schema.hosts;
+HOST CURRENT_CONNECTIONS TOTAL_CONNECTIONS
+select * from performance_schema.mutex_instances;
+NAME OBJECT_INSTANCE_BEGIN LOCKED_BY_THREAD_ID
+select * from performance_schema.objects_summary_global_by_type;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
+select * from performance_schema.rwlock_instances;
+NAME OBJECT_INSTANCE_BEGIN WRITE_LOCKED_BY_THREAD_ID READ_LOCKED_BY_COUNT
+select * from performance_schema.setup_actors;
+HOST USER ROLE
+select * from performance_schema.setup_objects;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.threads;
+THREAD_ID NAME TYPE PROCESSLIST_ID PROCESSLIST_USER PROCESSLIST_HOST PROCESSLIST_DB PROCESSLIST_COMMAND PROCESSLIST_TIME PROCESSLIST_STATE PROCESSLIST_INFO PARENT_THREAD_ID ROLE INSTRUMENTED
+select * from performance_schema.users;
+USER CURRENT_CONNECTIONS TOTAL_CONNECTIONS
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 4cdfad654ae..264d71d2ecb 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -10,63 +10,143 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
0
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema OFF
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show status like "performance_schema%";
Variable_name Value
+Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
Performance_schema_locker_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation NO
+thread_instrumentation NO
+statements_digest YES
+select * from performance_schema.setup_instruments;
+NAME ENABLED TIMED
+select * from performance_schema.setup_actors;
+HOST USER ROLE
+select * from performance_schema.setup_objects;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+select * from performance_schema.setup_timers;
+NAME TIMER_NAME
+idle MICROSECOND
+wait CYCLE
+stage NANOSECOND
+statement NANOSECOND
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index a17f78b27db..4fa005de8d5 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -10,63 +10,117 @@ count(*)
5
select count(*) from performance_schema.setup_consumers;
count(*)
-8
-select count(*) > 0 from performance_schema.setup_instruments;
-count(*) > 0
+12
+select count(*) > 3 from performance_schema.setup_instruments;
+count(*) > 3
1
select count(*) from performance_schema.setup_timers;
count(*)
-1
+4
+select * from performance_schema.accounts;
select * from performance_schema.cond_instances;
+select * from performance_schema.events_stages_current;
+select * from performance_schema.events_stages_history;
+select * from performance_schema.events_stages_history_long;
+select * from performance_schema.events_stages_summary_by_account_by_event_name;
+select * from performance_schema.events_stages_summary_by_host_by_event_name;
+select * from performance_schema.events_stages_summary_by_thread_by_event_name;
+select * from performance_schema.events_stages_summary_by_user_by_event_name;
+select * from performance_schema.events_stages_summary_global_by_event_name;
+select * from performance_schema.events_statements_current;
+select * from performance_schema.events_statements_history;
+select * from performance_schema.events_statements_history_long;
+select * from performance_schema.events_statements_summary_by_account_by_event_name;
+select * from performance_schema.events_statements_summary_by_host_by_event_name;
+select * from performance_schema.events_statements_summary_by_thread_by_event_name;
+select * from performance_schema.events_statements_summary_by_user_by_event_name;
+select * from performance_schema.events_statements_summary_global_by_event_name;
select * from performance_schema.events_waits_current;
select * from performance_schema.events_waits_history;
select * from performance_schema.events_waits_history_long;
+select * from performance_schema.events_waits_summary_by_account_by_event_name;
+select * from performance_schema.events_waits_summary_by_host_by_event_name;
select * from performance_schema.events_waits_summary_by_instance;
select * from performance_schema.events_waits_summary_by_thread_by_event_name;
+select * from performance_schema.events_waits_summary_by_user_by_event_name;
select * from performance_schema.events_waits_summary_global_by_event_name;
select * from performance_schema.file_instances;
select * from performance_schema.file_summary_by_event_name;
select * from performance_schema.file_summary_by_instance;
+select * from performance_schema.host_cache;
+select * from performance_schema.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.hosts;
select * from performance_schema.mutex_instances;
+select * from performance_schema.objects_summary_global_by_type;
select * from performance_schema.performance_timers;
select * from performance_schema.rwlock_instances;
+select * from performance_schema.setup_actors;
select * from performance_schema.setup_consumers;
select * from performance_schema.setup_instruments;
+select * from performance_schema.setup_objects;
select * from performance_schema.setup_timers;
+select * from performance_schema.table_io_waits_summary_by_index_usage;
+select * from performance_schema.table_io_waits_summary_by_table;
+select * from performance_schema.table_lock_waits_summary_by_table;
select * from performance_schema.threads;
+select * from performance_schema.users;
show variables like "performance_schema%";
Variable_name Value
performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
performance_schema_events_waits_history_long_size 10000
performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
performance_schema_max_cond_classes 80
performance_schema_max_cond_instances 1000
performance_schema_max_file_classes 50
performance_schema_max_file_handles 32768
performance_schema_max_file_instances 10000
performance_schema_max_mutex_classes 200
-performance_schema_max_mutex_instances 10000
+performance_schema_max_mutex_instances 5000
performance_schema_max_rwlock_classes 30
-performance_schema_max_rwlock_instances 10000
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
performance_schema_max_table_handles 1000
performance_schema_max_table_instances 500
performance_schema_max_thread_classes 50
-performance_schema_max_thread_instances 1000
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show status like "performance_schema%";
show status like "performance_schema%";
Variable_name Value
+Performance_schema_accounts_lost 0
Performance_schema_cond_classes_lost 0
Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
Performance_schema_file_classes_lost 0
Performance_schema_file_handles_lost 0
Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
Performance_schema_locker_lost 0
Performance_schema_mutex_classes_lost 0
Performance_schema_mutex_instances_lost 0
Performance_schema_rwlock_classes_lost 0
Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
Performance_schema_table_handles_lost 0
Performance_schema_table_instances_lost 0
Performance_schema_thread_classes_lost 0
Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
new file mode 100644
index 00000000000..c6a1cf16c66
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -0,0 +1,108 @@
+####################################
+# SETUP
+####################################
+CREATE DATABASE statements_digest;
+USE statements_digest;
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int, b int);
+CREATE TABLE t4(a int, b int);
+CREATE TABLE t5(a int, b int, c int);
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+####################################
+# EXECUTION
+####################################
+SELECT 1 FROM t1;
+1
+SELECT 1 FROM `t1`;
+1
+SELECT 1,2 FROM t1;
+1 2
+SELECT 1, 2, 3, 4 FROM t1;
+1 2 3 4
+SELECT 1 FROM t2;
+1
+SELECT 1,2 FROM t2;
+1 2
+SELECT 1, 2, 3, 4 FROM t2;
+1 2 3 4
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t4 VALUES (1, 2);
+INSERT INTO t5 VALUES (1, 2, 3);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
+INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+SELECT 1 + 1;
+1 + 1
+2
+SELECT 1;
+1
+1
+SELECT 1 /* This is an inline comment */ + 1;
+1 /* This is an inline comment */ + 1
+2
+SELECT 1+
+/*
+this is a
+multiple-line comment
+*/
+1;
+1+
+/*
+this is a
+multiple-line comment
+*/
+1
+2
+CREATE SCHEMA statements_digest_temp;
+DROP SCHEMA statements_digest_temp;
+CREATE DATABASE statements_digest_temp;
+DROP DATABASE statements_digest_temp;
+SELECT 1 from t11;
+ERROR 42S02: Table 'statements_digest.t11' doesn't exist
+create table t11 (c char(4));
+create table t11 (c char(4));
+ERROR 42S01: Table 't11' already exists
+insert into t11 values("MySQL");
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
+SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
+DIGEST DIGEST_TEXT COUNT_STAR SUM_ROWS_AFFECTED SUM_WARNINGS SUM_ERRORS
+dee8f4f04e57a5e456c31892855e6835 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1 0 0 0
+658a159558b029617bfa7c090827fc31 SELECT ? FROM t1 1 0 0 0
+66c495c9ee7e052e0db2212a0cd7a3cd SELECT ? FROM `t1` 1 0 0 0
+e7f8dc15f1156f57978116e457cc7488 SELECT ?, ... FROM t1 2 0 0 0
+5098d41dbf74d89d261b29400c46dae7 SELECT ? FROM t2 1 0 0 0
+3b8d5477aa795a19c9e9183e4ad04e6b SELECT ?, ... FROM t2 2 0 0 0
+5737343d989b1c42464fd3632614d25e INSERT INTO t1 VALUES (?) 1 1 0 0
+1e7fe109d5dd49394ee079690a029452 INSERT INTO t2 VALUES (?) 1 1 0 0
+d63092ea2fa59316f398af6283bf80a5 INSERT INTO t3 VALUES (...) 1 1 0 0
+7383272b3a17c661872524713abae82f INSERT INTO t4 VALUES (...) 1 1 0 0
+42e8c9d8a502b06ac931886d3ff1ed1e INSERT INTO t5 VALUES (...) 1 1 0 0
+db545539039d269501474510fbc2da56 INSERT INTO t1 VALUES (?) /* , ... */ 2 7 0 0
+446dead39135f87b4fc4168f00dff254 INSERT INTO t3 VALUES (...) /* , ... */ 1 3 0 0
+3ec23fcc5b568c4ad359703ff996e0bd INSERT INTO t5 VALUES (...) /* , ... */ 1 3 0 0
+6b473a776aa59140774b6ee689e68c9e SELECT ? + ? 3 0 0 0
+b608da273ea6dffe2120354f751cc8ba SELECT ? 1 0 0 0
+30046d97cfdc44c95bdaa7f3987d0a20 CREATE SCHEMA statements_digest_temp 2 2 0 0
+8e40e6461f3ab4454ddb8f21b5cda3ba DROP SCHEMA statements_digest_temp 2 0 0 0
+b2a18812618a648d37136507aa1abf76 SELECT ? FROM t11 1 0 0 1
+26b3a8aaadea1ef0afd3658728b3b2c9 CREATE TABLE t11 ( c CHARACTER (?) ) 2 0 0 1
+fe695877d27d136594145ebd4f683491 INSERT INTO t11 VALUES (?) 1 1 1 0
+09dae9a52da4bcb4bd4f396e3f723980 SHOW WARNINGS 1 0 0 0
+####################################
+# CLEANUP
+####################################
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP TABLE IF EXISTS t5;
+DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
new file mode 100644
index 00000000000..c01ae691a8b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -0,0 +1,123 @@
+####################################
+# SETUP
+####################################
+CREATE DATABASE statements_digest;
+USE statements_digest;
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int, b int);
+CREATE TABLE t4(a int, b int);
+CREATE TABLE t5(a int, b int, c int);
+SELECT * FROM performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current NO
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+####################################
+# EXECUTION
+####################################
+SELECT 1 FROM t1;
+1
+SELECT 1 FROM `t1`;
+1
+SELECT 1,2 FROM t1;
+1 2
+SELECT 1, 2, 3, 4 FROM t1;
+1 2 3 4
+SELECT 1 FROM t2;
+1
+SELECT 1,2 FROM t2;
+1 2
+SELECT 1, 2, 3, 4 FROM t2;
+1 2 3 4
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t4 VALUES (1, 2);
+INSERT INTO t5 VALUES (1, 2, 3);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
+INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+SELECT 1 + 1;
+1 + 1
+2
+SELECT 1;
+1
+1
+SELECT 1 /* This is an inline comment */ + 1;
+1 /* This is an inline comment */ + 1
+2
+SELECT 1+
+/*
+this is a
+multiple-line comment
+*/
+1;
+1+
+/*
+this is a
+multiple-line comment
+*/
+1
+2
+CREATE SCHEMA statements_digest_temp;
+DROP SCHEMA statements_digest_temp;
+CREATE DATABASE statements_digest_temp;
+DROP DATABASE statements_digest_temp;
+SELECT 1 from t11;
+ERROR 42S02: Table 'statements_digest.t11' doesn't exist
+create table t11 (c char(4));
+create table t11 (c char(4));
+ERROR 42S01: Table 't11' already exists
+insert into t11 values("MySQL");
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+digest digest_text count_star
+dee8f4f04e57a5e456c31892855e6835 TRUNCATE TABLE performance_schema . events_statements_summary_by_digest 1
+658a159558b029617bfa7c090827fc31 SELECT ? FROM t1 1
+66c495c9ee7e052e0db2212a0cd7a3cd SELECT ? FROM `t1` 1
+e7f8dc15f1156f57978116e457cc7488 SELECT ?, ... FROM t1 2
+5098d41dbf74d89d261b29400c46dae7 SELECT ? FROM t2 1
+3b8d5477aa795a19c9e9183e4ad04e6b SELECT ?, ... FROM t2 2
+5737343d989b1c42464fd3632614d25e INSERT INTO t1 VALUES (?) 1
+1e7fe109d5dd49394ee079690a029452 INSERT INTO t2 VALUES (?) 1
+d63092ea2fa59316f398af6283bf80a5 INSERT INTO t3 VALUES (...) 1
+7383272b3a17c661872524713abae82f INSERT INTO t4 VALUES (...) 1
+42e8c9d8a502b06ac931886d3ff1ed1e INSERT INTO t5 VALUES (...) 1
+db545539039d269501474510fbc2da56 INSERT INTO t1 VALUES (?) /* , ... */ 2
+446dead39135f87b4fc4168f00dff254 INSERT INTO t3 VALUES (...) /* , ... */ 1
+3ec23fcc5b568c4ad359703ff996e0bd INSERT INTO t5 VALUES (...) /* , ... */ 1
+6b473a776aa59140774b6ee689e68c9e SELECT ? + ? 3
+b608da273ea6dffe2120354f751cc8ba SELECT ? 1
+30046d97cfdc44c95bdaa7f3987d0a20 CREATE SCHEMA statements_digest_temp 2
+8e40e6461f3ab4454ddb8f21b5cda3ba DROP SCHEMA statements_digest_temp 2
+b2a18812618a648d37136507aa1abf76 SELECT ? FROM t11 1
+26b3a8aaadea1ef0afd3658728b3b2c9 CREATE TABLE t11 ( c CHARACTER (?) ) 2
+fe695877d27d136594145ebd4f683491 INSERT INTO t11 VALUES (?) 1
+09dae9a52da4bcb4bd4f396e3f723980 SHOW WARNINGS 1
+SELECT digest, digest_text FROM performance_schema.events_statements_current;
+digest digest_text
+####################################
+# CLEANUP
+####################################
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP TABLE IF EXISTS t5;
+DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
new file mode 100644
index 00000000000..57c92aca988
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
@@ -0,0 +1,102 @@
+####################################
+# SETUP
+####################################
+CREATE DATABASE statements_digest;
+USE statements_digest;
+CREATE TABLE t1(a int);
+CREATE TABLE t2(a int);
+CREATE TABLE t3(a int, b int);
+CREATE TABLE t4(a int, b int);
+CREATE TABLE t5(a int, b int, c int);
+SELECT * FROM performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest NO
+TRUNCATE TABLE performance_schema.events_statements_summary_by_digest;
+####################################
+# EXECUTION
+####################################
+SELECT 1 FROM t1;
+1
+SELECT 1 FROM `t1`;
+1
+SELECT 1,2 FROM t1;
+1 2
+SELECT 1, 2, 3, 4 FROM t1;
+1 2 3 4
+SELECT 1 FROM t2;
+1
+SELECT 1,2 FROM t2;
+1 2
+SELECT 1, 2, 3, 4 FROM t2;
+1 2 3 4
+INSERT INTO t1 VALUES (1);
+INSERT INTO t2 VALUES (1);
+INSERT INTO t3 VALUES (1, 2);
+INSERT INTO t4 VALUES (1, 2);
+INSERT INTO t5 VALUES (1, 2, 3);
+INSERT INTO t1 VALUES (1), (2), (3);
+INSERT INTO t1 VALUES (1), (2), (3), (4);
+INSERT INTO t3 VALUES (1, 2), (3, 4), (5, 6);
+INSERT INTO t5 VALUES (1, 2, 3), (4, 5, 6), (7, 8, 9);
+SELECT 1 + 1;
+1 + 1
+2
+SELECT 1;
+1
+1
+SELECT 1 /* This is an inline comment */ + 1;
+1 /* This is an inline comment */ + 1
+2
+SELECT 1+
+/*
+this is a
+multiple-line comment
+*/
+1;
+1+
+/*
+this is a
+multiple-line comment
+*/
+1
+2
+CREATE SCHEMA statements_digest_temp;
+DROP SCHEMA statements_digest_temp;
+CREATE DATABASE statements_digest_temp;
+DROP DATABASE statements_digest_temp;
+SELECT 1 from t11;
+ERROR 42S02: Table 'statements_digest.t11' doesn't exist
+create table t11 (c char(4));
+create table t11 (c char(4));
+ERROR 42S01: Table 't11' already exists
+insert into t11 values("MySQL");
+Warnings:
+Warning 1265 Data truncated for column 'c' at row 1
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
+digest digest_text count_star
+SELECT digest, digest_text FROM performance_schema.events_statements_current;
+digest digest_text
+NULL NULL
+####################################
+# CLEANUP
+####################################
+DROP TABLE IF EXISTS t1;
+DROP TABLE IF EXISTS t2;
+DROP TABLE IF EXISTS t3;
+DROP TABLE IF EXISTS t4;
+DROP TABLE IF EXISTS t5;
+DROP DATABASE IF EXISTS statements_digest;
diff --git a/mysql-test/suite/perfschema/r/statement_digest_long_query.result b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
new file mode 100644
index 00000000000..c074b704147
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result
@@ -0,0 +1,12 @@
+USE performance_schema;
+truncate table events_statements_summary_by_digest;
+SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;
+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
+511
+####################################
+# QUERYING PS STATEMENT DIGEST
+####################################
+SELECT digest, digest_text, count_star FROM events_statements_summary_by_digest;
+digest digest_text count_star
+56ae4a1bea5f5babaa469039be3fd979 TRUNCATE TABLE events_statements_summary_by_digest 1
+abda1fecf4bb4811f508a861272700a8 SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ... 1
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
new file mode 100644
index 00000000000..a0dbf56d48c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
@@ -0,0 +1,1742 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 0
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
new file mode 100644
index 00000000000..19855924ab6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
@@ -0,0 +1,1741 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 132
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
new file mode 100644
index 00000000000..0dde7f5408d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
@@ -0,0 +1,1742 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 0
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
new file mode 100644
index 00000000000..ee4d0445baf
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
@@ -0,0 +1,1741 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 132
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
new file mode 100644
index 00000000000..9d2904f2ae3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
@@ -0,0 +1,1816 @@
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
new file mode 100644
index 00000000000..c8f5d3100b4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
@@ -0,0 +1,1853 @@
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
new file mode 100644
index 00000000000..944d3dd2e61
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
@@ -0,0 +1,1816 @@
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 44 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 44 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/io/table/sql/handler 81 TABLE test t3
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/io/table/sql/handler 81 TABLE test t3
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 96
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 40 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 56 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 0
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
new file mode 100644
index 00000000000..997838562ca
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
@@ -0,0 +1,1853 @@
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 30 TABLE test t2
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/io/table/sql/handler 44 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 30 TABLE test t2
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/io/table/sql/handler 44 TABLE test t3
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t2
+wait/lock/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 81 TABLE test t3
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t2
+wait/lock/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 81 TABLE test t3
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 144
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 40 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 48 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 56 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 132
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
new file mode 100644
index 00000000000..1f74e0dcb3b
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -0,0 +1,1741 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name='global_instrumentation';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation NO
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
new file mode 100644
index 00000000000..f3d8d996144
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
@@ -0,0 +1,1742 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 0
+TABLE test t3 82
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 0
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
new file mode 100644
index 00000000000..ef619f555b4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
@@ -0,0 +1,1741 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 43
+TABLE test t2 60
+TABLE test t3 82
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 47
+TABLE test t2 64
+TABLE test t3 86
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
new file mode 100644
index 00000000000..852578cb83c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
@@ -0,0 +1,1742 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 0
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 0
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 96
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 0
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 0
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
new file mode 100644
index 00000000000..1139727f5fb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
@@ -0,0 +1,1741 @@
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 18
+TABLE test t2 24
+TABLE test t3 31
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 54
+TABLE test t3 72
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 65
+TABLE test t2 90
+TABLE test t3 123
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 144
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 93
+TABLE test t2 132
+TABLE test t3 184
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 97
+TABLE test t2 136
+TABLE test t3 188
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
new file mode 100644
index 00000000000..18e3e473f63
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
new file mode 100644
index 00000000000..1f7711b6a88
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
new file mode 100644
index 00000000000..777e6aefb28
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
new file mode 100644
index 00000000000..16cfbcbc7e2
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
new file mode 100644
index 00000000000..f17b7c59f03
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result
@@ -0,0 +1,1780 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
new file mode 100644
index 00000000000..7bfb0e79c14
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result
@@ -0,0 +1,1798 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 23 TABLE test t1
+wait/io/table/sql/handler 36 TABLE test t2
+wait/io/table/sql/handler 54 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
new file mode 100644
index 00000000000..0731e991cdc
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result
@@ -0,0 +1,1780 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 44 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 44 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 81 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 81 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
new file mode 100644
index 00000000000..eb6e7699b3a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result
@@ -0,0 +1,1798 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 8 TABLE test t1
+wait/io/table/sql/handler 12 TABLE test t2
+wait/io/table/sql/handler 17 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 30 TABLE test t2
+wait/io/table/sql/handler 44 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 20 TABLE test t1
+wait/io/table/sql/handler 30 TABLE test t2
+wait/io/table/sql/handler 44 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t2
+wait/io/table/sql/handler 81 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 35 TABLE test t1
+wait/io/table/sql/handler 54 TABLE test t2
+wait/io/table/sql/handler 81 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/io/table/sql/handler 53 TABLE test t1
+wait/io/table/sql/handler 84 TABLE test t2
+wait/io/table/sql/handler 128 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
new file mode 100644
index 00000000000..0af7102834c
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 77
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 77
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 0
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
new file mode 100644
index 00000000000..de35029ac87
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 113
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 113
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 18 12 6 12 2 4 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 32 20 12 20 4 8 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 46 28 18 28 6 12 0
+TABLE test t3 index_b 6 6 0 6 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 23 15 8 15 2 6 0
+TABLE test t2 36 24 12 24 4 8 0
+TABLE test t3 54 36 18 36 6 12 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 23
+TABLE test t2 36
+TABLE test t3 54
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
new file mode 100644
index 00000000000..1d0432aafb3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 25
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 25
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 0
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 64
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 64
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 116
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 116
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 0
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 25
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 39
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 52
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 65
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 25
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 39
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 52
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 65
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 181
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 181
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 0
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
new file mode 100644
index 00000000000..3b697344190
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/lock/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 37
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 37
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 6 4 2 4 1 1 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 2 1 1 1 0 1 0
+TABLE test t2 NULL 10 6 4 6 2 2 0
+TABLE test t2 index_b 1 1 0 1 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 1 1 0 1 0 0 0
+TABLE test t3 NULL 14 8 6 8 3 3 0
+TABLE test t3 index_b 2 2 0 2 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 1 1 0 1 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 8 5 3 5 1 2 0
+TABLE test t2 12 8 4 8 2 2 0
+TABLE test t3 17 11 6 11 3 3 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 8
+TABLE test t2 12
+TABLE test t3 17
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 94
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 94
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 15 10 5 10 2 3 0
+TABLE test t1 index_b 1 1 0 1 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 4 2 2 2 0 2 0
+TABLE test t2 NULL 26 16 10 16 4 6 0
+TABLE test t2 index_b 2 2 0 2 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 2 2 0 2 0 0 0
+TABLE test t3 NULL 37 22 15 22 6 9 0
+TABLE test t3 index_b 5 5 0 5 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 2 2 0 2 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 20 13 7 13 2 5 0
+TABLE test t2 30 20 10 20 4 6 0
+TABLE test t3 44 29 15 29 6 9 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 30
+TABLE test t3 44
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 170
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 170
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 27 18 9 18 3 6 0
+TABLE test t1 index_b 2 2 0 2 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 6 3 3 3 0 3 0
+TABLE test t2 NULL 48 30 18 30 6 12 0
+TABLE test t2 index_b 3 3 0 3 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 3 3 0 3 0 0 0
+TABLE test t3 NULL 69 42 27 42 9 18 0
+TABLE test t3 index_b 9 9 0 9 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 3 3 0 3 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 35 23 12 23 3 9 0
+TABLE test t2 54 36 18 36 6 12 0
+TABLE test t3 81 54 27 54 9 18 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 35
+TABLE test t2 54
+TABLE test t3 81
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 37
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 57
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 76
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 95
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 37
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 57
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 76
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 95
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 265
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 265
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 42 28 14 28 4 10 0
+TABLE test t1 index_b 3 3 0 3 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 8 4 4 4 0 4 0
+TABLE test t2 NULL 76 48 28 48 8 20 0
+TABLE test t2 index_b 4 4 0 4 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 4 4 0 4 0 0 0
+TABLE test t3 NULL 110 68 42 68 12 30 0
+TABLE test t3 index_b 14 14 0 14 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 4 4 0 4 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 53 35 18 35 4 14 0
+TABLE test t2 84 56 28 56 8 20 0
+TABLE test t3 128 86 42 86 12 30 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 53
+TABLE test t2 84
+TABLE test t3 128
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
new file mode 100644
index 00000000000..11d10132af4
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
new file mode 100644
index 00000000000..300d41bf2f7
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 48
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
new file mode 100644
index 00000000000..e21145b190f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
new file mode 100644
index 00000000000..2b9743a78d6
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name='thread_instrumentation';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation NO
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 48
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
new file mode 100644
index 00000000000..7c713a0d95d
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result
@@ -0,0 +1,1780 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
new file mode 100644
index 00000000000..da916174671
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result
@@ -0,0 +1,1798 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 24 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t2
+wait/lock/table/sql/handler 32 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
new file mode 100644
index 00000000000..8a917a421bb
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result
@@ -0,0 +1,1780 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 96
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 40 TABLE test t1
+wait/lock/table/sql/handler 56 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
new file mode 100644
index 00000000000..ae82e88135f
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result
@@ -0,0 +1,1798 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current YES
+events_stages_history YES
+events_stages_history_long YES
+events_statements_current YES
+events_statements_history YES
+events_statements_history_long YES
+events_waits_current YES
+events_waits_history YES
+events_waits_history_long YES
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 10 TABLE test t1
+wait/lock/table/sql/handler 12 TABLE test t2
+wait/lock/table/sql/handler 14 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 20 TABLE test t1
+wait/lock/table/sql/handler 24 TABLE test t2
+wait/lock/table/sql/handler 28 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/lock/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 30 TABLE test t1
+wait/lock/table/sql/handler 36 TABLE test t2
+wait/lock/table/sql/handler 42 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 144
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 40 TABLE test t1
+wait/lock/table/sql/handler 48 TABLE test t2
+wait/lock/table/sql/handler 56 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 48
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+wait/lock/table/sql/handler 44 TABLE test t1
+wait/lock/table/sql/handler 52 TABLE test t2
+wait/lock/table/sql/handler 60 TABLE test t3
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
new file mode 100644
index 00000000000..cf0ab57f9ba
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 56
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 56
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 0
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
new file mode 100644
index 00000000000..628ef237ffd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_actors
+where user in ('user2', 'user4');
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user3 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 84
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 84
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 24 10 14 4 0 0 1 5 0 0 7
+TABLE test t2 28 10 18 4 0 0 1 5 0 0 9
+TABLE test t3 32 10 22 4 0 0 1 5 0 0 11
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 24
+TABLE test t2 28
+TABLE test t3 32
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
new file mode 100644
index 00000000000..a19fa183531
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result
@@ -0,0 +1,1744 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+delete from performance_schema.setup_objects
+where object_name='t2';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 24
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 24
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 0
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 48
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 48
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 0
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 0
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 24
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 24
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 96
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 96
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 0
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 32
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 24
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 24
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 24
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 32
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 24
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 24
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 24
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 104
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 104
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 0
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
new file mode 100644
index 00000000000..3a3377799f3
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result
@@ -0,0 +1,1743 @@
+update performance_schema.setup_instruments
+set enabled='NO' where name='wait/io/table/sql/handler';
+update performance_schema.setup_consumers
+set enabled='NO' where name like 'event%';
+select * from performance_schema.setup_actors
+order by USER, HOST, ROLE;
+HOST USER ROLE
+localhost user1 %
+localhost user2 %
+localhost user3 %
+localhost user4 %
+select * from performance_schema.setup_objects
+order by object_type, object_schema, object_name;
+OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+TABLE test t1 YES YES
+TABLE test t2 YES NO
+TABLE test t3 YES NO
+select * from performance_schema.setup_consumers;
+NAME ENABLED
+events_stages_current NO
+events_stages_history NO
+events_stages_history_long NO
+events_statements_current NO
+events_statements_history NO
+events_statements_history_long NO
+events_waits_current NO
+events_waits_history NO
+events_waits_history_long NO
+global_instrumentation YES
+thread_instrumentation YES
+statements_digest YES
+flush tables;
+truncate performance_schema.objects_summary_global_by_type;
+truncate performance_schema.table_io_waits_summary_by_index_usage;
+truncate performance_schema.table_io_waits_summary_by_table;
+truncate performance_schema.table_lock_waits_summary_by_table;
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+truncate performance_schema.events_waits_summary_global_by_event_name;
+truncate performance_schema.events_waits_history_long;
+show variables like "performance_schema%";
+Variable_name Value
+performance_schema ON
+performance_schema_accounts_size 100
+performance_schema_digests_size 200
+performance_schema_events_stages_history_long_size 1000
+performance_schema_events_stages_history_size 10
+performance_schema_events_statements_history_long_size 1000
+performance_schema_events_statements_history_size 10
+performance_schema_events_waits_history_long_size 10000
+performance_schema_events_waits_history_size 10
+performance_schema_hosts_size 100
+performance_schema_max_cond_classes 80
+performance_schema_max_cond_instances 1000
+performance_schema_max_file_classes 50
+performance_schema_max_file_handles 32768
+performance_schema_max_file_instances 10000
+performance_schema_max_mutex_classes 200
+performance_schema_max_mutex_instances 5000
+performance_schema_max_rwlock_classes 30
+performance_schema_max_rwlock_instances 5000
+performance_schema_max_socket_classes 10
+performance_schema_max_socket_instances 1000
+performance_schema_max_stage_classes 150
+performance_schema_max_statement_classes 168
+performance_schema_max_table_handles 1000
+performance_schema_max_table_instances 500
+performance_schema_max_thread_classes 50
+performance_schema_max_thread_instances 200
+performance_schema_setup_actors_size 100
+performance_schema_setup_objects_size 100
+performance_schema_users_size 100
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+"================== Step 1 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+execute dump_waits_user;
+user event_name count_star
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+"================== con1 connected =================="
+"================== Step 2 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+insert into test.t1 set a=101, b=1, c=1;
+insert into test.t2 set a=102, b=2, c=2;
+insert into test.t2 set a=103, b=3, c=3;
+insert into test.t3 set a=104, b=4, c=4;
+insert into test.t3 set a=105, b=5, c=5;
+insert into test.t3 set a=106, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 0
+103 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 0
+105 5 5 0
+106 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=101;
+update test.t2 set d=d+1 where a=101;
+update test.t3 set d=d+1 where a=101;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 1
+"================== con1 marker =================="
+"================== Step 3 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+"================== con2 connected =================="
+"================== Step 4 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 36
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 36
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 10 4 6 2 0 0 0 2 0 0 3
+TABLE test t2 12 4 8 2 0 0 0 2 0 0 4
+TABLE test t3 14 4 10 2 0 0 0 2 0 0 5
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 10
+TABLE test t2 12
+TABLE test t3 14
+insert into test.t1 set a=201, b=1, c=1;
+insert into test.t2 set a=202, b=2, c=2;
+insert into test.t2 set a=203, b=3, c=3;
+insert into test.t3 set a=204, b=4, c=4;
+insert into test.t3 set a=205, b=5, c=5;
+insert into test.t3 set a=206, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 2
+201 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 1
+103 3 3 1
+202 2 2 0
+203 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 1
+105 5 5 1
+106 6 6 1
+204 4 4 0
+205 5 5 0
+206 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=201;
+update test.t2 set d=d+1 where a=201;
+update test.t3 set d=d+1 where a=201;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 2
+205 5 5 1
+"================== con2 marker =================="
+"================== Step 5 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+"================== con3 connected =================="
+"================== Step 6 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 72
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 72
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 20 8 12 4 0 0 0 4 0 0 6
+TABLE test t2 24 8 16 4 0 0 0 4 0 0 8
+TABLE test t3 28 8 20 4 0 0 0 4 0 0 10
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 20
+TABLE test t2 24
+TABLE test t3 28
+insert into test.t1 set a=301, b=1, c=1;
+insert into test.t2 set a=302, b=2, c=2;
+insert into test.t2 set a=303, b=3, c=3;
+insert into test.t3 set a=304, b=4, c=4;
+insert into test.t3 set a=305, b=5, c=5;
+insert into test.t3 set a=306, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 3
+201 1 1 2
+301 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 2
+103 3 3 2
+202 2 2 1
+203 3 3 1
+302 2 2 0
+303 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 2
+105 5 5 2
+106 6 6 2
+204 4 4 1
+205 5 5 1
+206 6 6 1
+304 4 4 0
+305 5 5 0
+306 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=301;
+update test.t2 set d=d+1 where a=301;
+update test.t3 set d=d+1 where a=301;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 3
+205 5 5 2
+305 5 5 1
+"================== con3 marker =================="
+"================== Step 7 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+"================== con4 connected =================="
+"================== Step 8 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 108
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 108
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 30 12 18 6 0 0 0 6 0 0 9
+TABLE test t2 36 12 24 6 0 0 0 6 0 0 12
+TABLE test t3 42 12 30 6 0 0 0 6 0 0 15
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 30
+TABLE test t2 36
+TABLE test t3 42
+insert into test.t1 set a=401, b=1, c=1;
+insert into test.t2 set a=402, b=2, c=2;
+insert into test.t2 set a=403, b=3, c=3;
+insert into test.t3 set a=404, b=4, c=4;
+insert into test.t3 set a=405, b=5, c=5;
+insert into test.t3 set a=406, b=6, c=6;
+select * from test.t1;
+a b c d
+101 1 1 4
+201 1 1 3
+301 1 1 2
+401 1 1 0
+select * from test.t2;
+a b c d
+102 2 2 3
+103 3 3 3
+202 2 2 2
+203 3 3 2
+302 2 2 1
+303 3 3 1
+402 2 2 0
+403 3 3 0
+select * from test.t3;
+a b c d
+104 4 4 3
+105 5 5 3
+106 6 6 3
+204 4 4 2
+205 5 5 2
+206 6 6 2
+304 4 4 1
+305 5 5 1
+306 6 6 1
+404 4 4 0
+405 5 5 0
+406 6 6 0
+update test.t1 set d=d+1;
+update test.t2 set d=d+1;
+update test.t3 set d=d+1;
+update test.t1 set d=d+1 where a=401;
+update test.t2 set d=d+1 where a=401;
+update test.t3 set d=d+1 where a=401;
+select * from test.t1 where b=5;
+a b c d
+select * from test.t2 where b=5;
+a b c d
+select * from test.t3 where b=5;
+a b c d
+105 5 5 4
+205 5 5 3
+305 5 5 2
+405 5 5 1
+"================== con4 marker =================="
+"================== Step 9 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 36
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 36
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 144
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 144
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 40 16 24 8 0 0 0 8 0 0 12
+TABLE test t2 48 16 32 8 0 0 0 8 0 0 16
+TABLE test t3 56 16 40 8 0 0 0 8 0 0 20
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 40
+TABLE test t2 48
+TABLE test t3 56
+lock tables test.t1 read, test.t2 read, test.t3 read;
+unlock tables;
+lock tables test.t1 write, test.t2 write, test.t3 write;
+unlock tables;
+"================== con1 marker =================="
+"================== Step 10 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+flush tables;
+"================== flush marker =================="
+"================== Step 11 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+set global read_only=1;
+set global read_only=0;
+"================== global read_only marker =================="
+"================== Step 12 =================="
+call dump_thread();
+username event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con1 disconnected =================="
+"================== Step 13 =================="
+call dump_thread();
+username status
+user1 not found
+username event_name count_star
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con2 disconnected =================="
+"================== Step 14 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username event_name count_star
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con3 disconnected =================="
+"================== Step 15 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username event_name count_star
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+"================== con4 disconnected =================="
+"================== Step 16 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_thread_by_event_name;
+"================== BY_THREAD truncated =================="
+"================== Step 17 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 48
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 36
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 36
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 36
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_account_by_event_name;
+"================== BY_ACCOUNT truncated =================="
+"================== Step 18 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 48
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 36
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 36
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 36
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_user_by_event_name;
+"================== BY_USER truncated =================="
+"================== Step 19 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 156
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_by_host_by_event_name;
+"================== BY_HOST truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 156
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 44 18 26 8 0 0 1 9 0 0 13
+TABLE test t2 52 18 34 8 0 0 1 9 0 0 17
+TABLE test t3 60 18 42 8 0 0 1 9 0 0 21
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 44
+TABLE test t2 52
+TABLE test t3 60
+truncate performance_schema.events_waits_summary_global_by_event_name;
+"================== GLOBAL truncated =================="
+"================== Step 21 =================="
+call dump_thread();
+username status
+user1 not found
+username status
+user2 not found
+username status
+user3 not found
+username status
+user4 not found
+execute dump_waits_account;
+user host event_name count_star
+user1 localhost wait/io/table/sql/handler 0
+user1 localhost wait/lock/table/sql/handler 0
+user2 localhost wait/io/table/sql/handler 0
+user2 localhost wait/lock/table/sql/handler 0
+user3 localhost wait/io/table/sql/handler 0
+user3 localhost wait/lock/table/sql/handler 0
+user4 localhost wait/io/table/sql/handler 0
+user4 localhost wait/lock/table/sql/handler 0
+execute dump_waits_user;
+user event_name count_star
+user1 wait/io/table/sql/handler 0
+user1 wait/lock/table/sql/handler 0
+user2 wait/io/table/sql/handler 0
+user2 wait/lock/table/sql/handler 0
+user3 wait/io/table/sql/handler 0
+user3 wait/lock/table/sql/handler 0
+user4 wait/io/table/sql/handler 0
+user4 wait/lock/table/sql/handler 0
+execute dump_waits_host;
+host event_name count_star
+localhost wait/io/table/sql/handler 0
+localhost wait/lock/table/sql/handler 0
+execute dump_waits_global;
+event_name count_star
+wait/io/table/sql/handler 0
+wait/lock/table/sql/handler 0
+execute dump_waits_history;
+event_name count(event_name) object_type object_schema object_name
+execute dump_waits_index_io;
+object_type object_schema object_name index_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 NULL 0 0 0 0 0 0 0
+TABLE test t1 index_b 0 0 0 0 0 0 0
+TABLE test t1 index_cb 0 0 0 0 0 0 0
+TABLE test t1 PRIMARY 0 0 0 0 0 0 0
+TABLE test t2 NULL 0 0 0 0 0 0 0
+TABLE test t2 index_b 0 0 0 0 0 0 0
+TABLE test t2 index_cb 0 0 0 0 0 0 0
+TABLE test t2 PRIMARY 0 0 0 0 0 0 0
+TABLE test t3 NULL 0 0 0 0 0 0 0
+TABLE test t3 index_b 0 0 0 0 0 0 0
+TABLE test t3 index_cb 0 0 0 0 0 0 0
+TABLE test t3 PRIMARY 0 0 0 0 0 0 0
+execute dump_waits_table_io;
+object_type object_schema object_name count_star count_read count_write count_fetch count_insert count_update count_delete
+TABLE test t1 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0
+execute dump_waits_table_lock;
+object_type object_schema object_name count_star count_read count_write count_read_normal count_read_with_shared_locks count_read_high_priority count_read_no_insert count_read_external count_write_delayed count_write_low_priority count_write_external
+TABLE test t1 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t2 0 0 0 0 0 0 0 0 0 0 0
+TABLE test t3 0 0 0 0 0 0 0 0 0 0 0
+execute dump_objects_summary;
+object_type object_schema object_name count_star
+TABLE test t1 0
+TABLE test t2 0
+TABLE test t3 0
+show status like "performance_schema%";
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
new file mode 100644
index 00000000000..731925578b1
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -0,0 +1,815 @@
+select * from information_schema.columns where table_schema="performance_schema"
+ order by table_name, ordinal_position;
+TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
+def performance_schema accounts USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema accounts HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema accounts CURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema accounts TOTAL_CONNECTIONS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema cond_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema cond_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_current SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_stages_current TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_current NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_stages_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_history SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_stages_history TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_stages_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_history_long SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_stages_history_long TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_history_long NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_host_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_by_user_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_stages_summary_global_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_current SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_current TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current LOCK_TIME 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SQL_TEXT 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_current DIGEST 11 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_statements_current DIGEST_TEXT 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_current CURRENT_SCHEMA 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_current OBJECT_TYPE 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_current OBJECT_SCHEMA 15 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_current OBJECT_NAME 16 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_current OBJECT_INSTANCE_BEGIN 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current MYSQL_ERRNO 18 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_current RETURNED_SQLSTATE 19 NULL YES varchar 5 15 NULL NULL NULL utf8 utf8_general_ci varchar(5) select,insert,update,references
+def performance_schema events_statements_current MESSAGE_TEXT 20 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_current ERRORS 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current WARNINGS 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current ROWS_AFFECTED 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current ROWS_SENT 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current ROWS_EXAMINED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current CREATED_TMP_DISK_TABLES 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current CREATED_TMP_TABLES 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SELECT_FULL_JOIN 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SELECT_FULL_RANGE_JOIN 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SELECT_RANGE 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SELECT_RANGE_CHECK 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SELECT_SCAN 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SORT_MERGE_PASSES 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SORT_RANGE 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SORT_ROWS 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current SORT_SCAN 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_current NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_statements_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_history SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history LOCK_TIME 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SQL_TEXT 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_history DIGEST 11 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_statements_history DIGEST_TEXT 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_history CURRENT_SCHEMA 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history OBJECT_TYPE 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history OBJECT_SCHEMA 15 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history OBJECT_NAME 16 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history OBJECT_INSTANCE_BEGIN 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history MYSQL_ERRNO 18 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_history RETURNED_SQLSTATE 19 NULL YES varchar 5 15 NULL NULL NULL utf8 utf8_general_ci varchar(5) select,insert,update,references
+def performance_schema events_statements_history MESSAGE_TEXT 20 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_history ERRORS 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history WARNINGS 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history ROWS_AFFECTED 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history ROWS_SENT 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history ROWS_EXAMINED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history CREATED_TMP_DISK_TABLES 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history CREATED_TMP_TABLES 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SELECT_FULL_JOIN 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SELECT_FULL_RANGE_JOIN 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SELECT_RANGE 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SELECT_RANGE_CHECK 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SELECT_SCAN 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SORT_MERGE_PASSES 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SORT_RANGE 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SORT_ROWS 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history SORT_SCAN 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_statements_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_history_long SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history_long TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long LOCK_TIME 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SQL_TEXT 10 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_history_long DIGEST 11 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_statements_history_long DIGEST_TEXT 12 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_history_long CURRENT_SCHEMA 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history_long OBJECT_TYPE 14 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history_long OBJECT_SCHEMA 15 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history_long OBJECT_NAME 16 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_statements_history_long OBJECT_INSTANCE_BEGIN 17 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long MYSQL_ERRNO 18 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_history_long RETURNED_SQLSTATE 19 NULL YES varchar 5 15 NULL NULL NULL utf8 utf8_general_ci varchar(5) select,insert,update,references
+def performance_schema events_statements_history_long MESSAGE_TEXT 20 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_history_long ERRORS 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long WARNINGS 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long ROWS_AFFECTED 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long ROWS_SENT 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long ROWS_EXAMINED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long CREATED_TMP_DISK_TABLES 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long CREATED_TMP_TABLES 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SELECT_FULL_JOIN 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SELECT_FULL_RANGE_JOIN 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SELECT_RANGE 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SELECT_RANGE_CHECK 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SELECT_SCAN 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SORT_MERGE_PASSES 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SORT_RANGE 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SORT_ROWS 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long SORT_SCAN 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long NO_INDEX_USED 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_LOCK_TIME 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_ERRORS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_WARNINGS 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_ROWS_AFFECTED 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_ROWS_SENT 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_ROWS_EXAMINED 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_CREATED_TMP_DISK_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_CREATED_TMP_TABLES 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SELECT_FULL_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SELECT_FULL_RANGE_JOIN 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SELECT_RANGE 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SELECT_RANGE_CHECK 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SELECT_SCAN 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SORT_MERGE_PASSES 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SORT_RANGE 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SORT_ROWS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_SORT_SCAN 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_NO_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_account_by_event_name SUM_NO_GOOD_INDEX_USED 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest DIGEST 1 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_statements_summary_by_digest DIGEST_TEXT 2 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema events_statements_summary_by_digest COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_LOCK_TIME 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ERRORS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_WARNINGS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_AFFECTED 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_SENT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_ROWS_EXAMINED 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_DISK_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_CREATED_TMP_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_FULL_RANGE_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_RANGE_CHECK 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SELECT_SCAN 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_MERGE_PASSES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_RANGE 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_ROWS 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_digest FIRST_SEEN 27 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema events_statements_summary_by_digest LAST_SEEN 28 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_LOCK_TIME 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_ERRORS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_WARNINGS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_ROWS_AFFECTED 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_ROWS_SENT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_ROWS_EXAMINED 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_CREATED_TMP_DISK_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_CREATED_TMP_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SELECT_FULL_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SELECT_FULL_RANGE_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SELECT_RANGE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SELECT_RANGE_CHECK 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SELECT_SCAN 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_MERGE_PASSES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_RANGE 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_ROWS 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_host_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_LOCK_TIME 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_ERRORS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_WARNINGS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_ROWS_AFFECTED 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_ROWS_SENT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_ROWS_EXAMINED 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_CREATED_TMP_DISK_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_CREATED_TMP_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SELECT_FULL_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SELECT_FULL_RANGE_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SELECT_RANGE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SELECT_RANGE_CHECK 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SELECT_SCAN 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_MERGE_PASSES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_RANGE 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_ROWS 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_LOCK_TIME 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_ERRORS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_WARNINGS 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_ROWS_AFFECTED 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_ROWS_SENT 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_ROWS_EXAMINED 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_CREATED_TMP_DISK_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_CREATED_TMP_TABLES 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SELECT_FULL_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SELECT_FULL_RANGE_JOIN 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SELECT_RANGE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SELECT_RANGE_CHECK 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SELECT_SCAN 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SORT_MERGE_PASSES 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SORT_RANGE 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SORT_ROWS 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_by_user_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_LOCK_TIME 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_ERRORS 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_WARNINGS 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_ROWS_AFFECTED 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_ROWS_SENT 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_ROWS_EXAMINED 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_CREATED_TMP_DISK_TABLES 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_CREATED_TMP_TABLES 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SELECT_FULL_JOIN 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SELECT_FULL_RANGE_JOIN 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SELECT_RANGE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SELECT_RANGE_CHECK 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SELECT_SCAN 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SORT_MERGE_PASSES 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SORT_RANGE 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SORT_ROWS 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_SORT_SCAN 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_NO_INDEX_USED 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_statements_summary_global_by_event_name SUM_NO_GOOD_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_current EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_current SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_current TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current SPINS 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_current OBJECT_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_current OBJECT_NAME 11 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
+def performance_schema events_waits_current INDEX_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_current OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_current OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_current NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_waits_current OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_waits_current NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema events_waits_current FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_history THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_history EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_history SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history SPINS 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_history OBJECT_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history OBJECT_NAME 11 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
+def performance_schema events_waits_history INDEX_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_waits_history OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_waits_history NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema events_waits_history FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_history_long THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_history_long EVENT_ID 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long END_EVENT_ID 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long EVENT_NAME 4 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_history_long SOURCE 5 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history_long TIMER_START 6 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long TIMER_END 7 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long SPINS 9 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_history_long OBJECT_SCHEMA 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history_long OBJECT_NAME 11 NULL YES varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
+def performance_schema events_waits_history_long INDEX_NAME 12 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history_long OBJECT_TYPE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema events_waits_history_long OBJECT_INSTANCE_BEGIN 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long NESTING_EVENT_ID 15 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_history_long NESTING_EVENT_TYPE 16 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references
+def performance_schema events_waits_history_long OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema events_waits_history_long NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema events_waits_history_long FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_account_by_event_name MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_host_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_by_instance OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_instance MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_by_user_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema events_waits_summary_global_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_instances FILE_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
+def performance_schema file_instances EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema file_instances OPEN_COUNT 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema file_summary_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name COUNT_READ 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_TIMER_READ 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MIN_TIMER_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name AVG_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MAX_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_NUMBER_OF_BYTES_READ 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema file_summary_by_event_name COUNT_WRITE 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_TIMER_WRITE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MIN_TIMER_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name AVG_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MAX_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_NUMBER_OF_BYTES_WRITE 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema file_summary_by_event_name COUNT_MISC 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name SUM_TIMER_MISC 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MIN_TIMER_MISC 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name AVG_TIMER_MISC 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_event_name MAX_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance FILE_NAME 1 NULL NO varchar 512 1536 NULL NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references
+def performance_schema file_summary_by_instance EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema file_summary_by_instance OBJECT_INSTANCE_BEGIN 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance COUNT_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MIN_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance AVG_TIMER_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MAX_TIMER_READ 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_NUMBER_OF_BYTES_READ 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema file_summary_by_instance COUNT_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MIN_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance AVG_TIMER_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MAX_TIMER_WRITE 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_NUMBER_OF_BYTES_WRITE 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema file_summary_by_instance COUNT_MISC 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance SUM_TIMER_MISC 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MIN_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance AVG_TIMER_MISC 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema file_summary_by_instance MAX_TIMER_MISC 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema hosts HOST 1 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema hosts CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema hosts TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache IP 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema host_cache HOST 2 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
+def performance_schema host_cache HOST_VALIDATED 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema host_cache SUM_CONNECT_ERRORS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HOST_BLOCKED_ERRORS 5 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NAMEINFO_TRANSIENT_ERRORS 6 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NAMEINFO_PERMANENT_ERRORS 7 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_FORMAT_ERRORS 8 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_ADDRINFO_TRANSIENT_ERRORS 9 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_ADDRINFO_PERMANENT_ERRORS 10 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_FCRDNS_ERRORS 11 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HOST_ACL_ERRORS 12 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_NO_AUTH_PLUGIN_ERRORS 13 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_AUTH_PLUGIN_ERRORS 14 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_HANDSHAKE_ERRORS 15 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_PROXY_USER_ERRORS 16 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_PROXY_USER_ACL_ERRORS 17 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_AUTHENTICATION_ERRORS 18 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_SSL_ERRORS 19 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_MAX_USER_CONNECTIONS_ERRORS 20 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS 21 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_DEFAULT_DATABASE_ERRORS 22 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_INIT_CONNECT_ERRORS 23 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_LOCAL_ERRORS 24 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache COUNT_UNKNOWN_ERRORS 25 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema host_cache FIRST_SEEN 26 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema host_cache LAST_SEEN 27 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema host_cache FIRST_ERROR_SEEN 28 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema host_cache LAST_ERROR_SEEN 29 0000-00-00 00:00:00 YES timestamp NULL NULL NULL NULL 0 NULL NULL timestamp select,insert,update,references
+def performance_schema mutex_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema mutex_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema mutex_instances LOCKED_BY_THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema objects_summary_global_by_type OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema objects_summary_global_by_type OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema objects_summary_global_by_type OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema objects_summary_global_by_type COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema objects_summary_global_by_type SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema objects_summary_global_by_type MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema objects_summary_global_by_type AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema objects_summary_global_by_type MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema performance_timers TIMER_NAME 1 NULL NO enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') select,insert,update,references
+def performance_schema performance_timers TIMER_FREQUENCY 2 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema performance_timers TIMER_RESOLUTION 3 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema performance_timers TIMER_OVERHEAD 4 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema rwlock_instances NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema rwlock_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema rwlock_instances WRITE_LOCKED_BY_THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema rwlock_instances READ_LOCKED_BY_COUNT 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references
+def performance_schema setup_actors HOST 1 % NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references
+def performance_schema setup_actors USER 2 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema setup_actors ROLE 3 % NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema setup_consumers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema setup_consumers ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema setup_instruments NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema setup_instruments ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema setup_instruments TIMED 3 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema setup_objects OBJECT_TYPE 1 TABLE NO enum 5 15 NULL NULL NULL utf8 utf8_general_ci enum('TABLE') select,insert,update,references
+def performance_schema setup_objects OBJECT_SCHEMA 2 % YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema setup_objects OBJECT_NAME 3 % NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema setup_objects ENABLED 4 YES NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema setup_objects TIMED 5 YES NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema setup_timers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema setup_timers TIMER_NAME 2 NULL NO enum 11 33 NULL NULL NULL utf8 utf8_general_ci enum('CYCLE','NANOSECOND','MICROSECOND','MILLISECOND','TICK') select,insert,update,references
+def performance_schema socket_instances EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema socket_instances OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_instances THREAD_ID 3 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema socket_instances SOCKET_ID 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema socket_instances IP 5 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema socket_instances PORT 6 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema socket_instances STATE 7 NULL NO enum 6 18 NULL NULL NULL utf8 utf8_general_ci enum('IDLE','ACTIVE') select,insert,update,references
+def performance_schema socket_summary_by_event_name EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema socket_summary_by_event_name COUNT_STAR 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_TIMER_WAIT 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MIN_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name AVG_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MAX_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name COUNT_READ 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_TIMER_READ 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MIN_TIMER_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name AVG_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MAX_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_NUMBER_OF_BYTES_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name COUNT_WRITE 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_TIMER_WRITE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MIN_TIMER_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name AVG_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MAX_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_NUMBER_OF_BYTES_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name COUNT_MISC 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name SUM_TIMER_MISC 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MIN_TIMER_MISC 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name AVG_TIMER_MISC 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_event_name MAX_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance EVENT_NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema socket_summary_by_instance OBJECT_INSTANCE_BEGIN 2 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance COUNT_READ 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_TIMER_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MIN_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance AVG_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MAX_TIMER_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_NUMBER_OF_BYTES_READ 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance COUNT_WRITE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_TIMER_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MIN_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance AVG_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MAX_TIMER_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_NUMBER_OF_BYTES_WRITE 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance COUNT_MISC 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance SUM_TIMER_MISC 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MIN_TIMER_MISC 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance AVG_TIMER_MISC 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema socket_summary_by_instance MAX_TIMER_MISC 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage INDEX_NAME 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_STAR 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_WAIT 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_READ 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_READ 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_WRITE 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_FETCH 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_FETCH 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_FETCH 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_FETCH 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_FETCH 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_INSERT 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_INSERT 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_INSERT 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_INSERT 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_INSERT 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_UPDATE 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_UPDATE 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_UPDATE 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_UPDATE 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_UPDATE 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage COUNT_DELETE 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage SUM_TIMER_DELETE 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MIN_TIMER_DELETE 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage AVG_TIMER_DELETE 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_index_usage MAX_TIMER_DELETE 39 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_table OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_table OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_READ 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_WRITE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_FETCH 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_FETCH 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_FETCH 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_FETCH 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_FETCH 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_INSERT 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_INSERT 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_INSERT 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_INSERT 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_INSERT 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_UPDATE 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_UPDATE 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_UPDATE 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_UPDATE 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_UPDATE 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table COUNT_DELETE 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table SUM_TIMER_DELETE 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MIN_TIMER_DELETE 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table AVG_TIMER_DELETE 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_io_waits_summary_by_table MAX_TIMER_DELETE 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table OBJECT_TYPE 1 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table OBJECT_SCHEMA 2 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table OBJECT_NAME 3 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WAIT 8 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ 9 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ 10 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ 11 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ 12 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ 13 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE 14 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE 15 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE 16 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE 17 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE 18 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ_NORMAL 19 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ_NORMAL 20 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ_NORMAL 21 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ_NORMAL 22 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ_NORMAL 23 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ_WITH_SHARED_LOCKS 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ_WITH_SHARED_LOCKS 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ_WITH_SHARED_LOCKS 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ_WITH_SHARED_LOCKS 27 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ_WITH_SHARED_LOCKS 28 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ_HIGH_PRIORITY 29 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ_HIGH_PRIORITY 30 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ_HIGH_PRIORITY 31 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ_HIGH_PRIORITY 32 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ_HIGH_PRIORITY 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ_NO_INSERT 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ_NO_INSERT 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ_NO_INSERT 36 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ_NO_INSERT 37 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ_NO_INSERT 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_READ_EXTERNAL 39 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_READ_EXTERNAL 40 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_READ_EXTERNAL 41 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_READ_EXTERNAL 42 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_READ_EXTERNAL 43 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_ALLOW_WRITE 44 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_ALLOW_WRITE 45 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_ALLOW_WRITE 46 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_ALLOW_WRITE 47 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_ALLOW_WRITE 48 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_CONCURRENT_INSERT 49 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_CONCURRENT_INSERT 50 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_CONCURRENT_INSERT 51 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_CONCURRENT_INSERT 52 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_CONCURRENT_INSERT 53 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_DELAYED 54 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_DELAYED 55 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_DELAYED 56 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_DELAYED 57 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_DELAYED 58 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_LOW_PRIORITY 59 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_LOW_PRIORITY 60 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_LOW_PRIORITY 61 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_LOW_PRIORITY 62 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_LOW_PRIORITY 63 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_NORMAL 64 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_NORMAL 65 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_NORMAL 66 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_NORMAL 67 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_NORMAL 68 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table COUNT_WRITE_EXTERNAL 69 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table SUM_TIMER_WRITE_EXTERNAL 70 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MIN_TIMER_WRITE_EXTERNAL 71 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table AVG_TIMER_WRITE_EXTERNAL 72 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema table_lock_waits_summary_by_table MAX_TIMER_WRITE_EXTERNAL 73 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema threads THREAD_ID 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema threads NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references
+def performance_schema threads TYPE 3 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references
+def performance_schema threads PROCESSLIST_ID 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references
+def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select,insert,update,references
+def performance_schema threads PROCESSLIST_DB 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema threads PROCESSLIST_COMMAND 8 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references
+def performance_schema threads PROCESSLIST_TIME 9 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema threads PROCESSLIST_STATE 10 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema threads PROCESSLIST_INFO 11 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
+def performance_schema threads PARENT_THREAD_ID 12 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
+def performance_schema threads ROLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema threads INSTRUMENTED 14 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references
+def performance_schema users USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references
+def performance_schema users CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema users TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+select count(*) from information_schema.columns
+where table_schema="performance_schema" and data_type = "bigint"
+ and column_name like "%number_of_bytes" into @count_byte_columns;
+select @count_byte_columns > 0;
+@count_byte_columns > 0
+1
+select count(*) from information_schema.columns
+where table_schema="performance_schema" and data_type="bigint"
+ and column_name like "%number_of_bytes"
+ and column_type not like "%unsigned" into @count_byte_signed;
+select (@count_byte_columns - @count_byte_signed) = 0;
+(@count_byte_columns - @count_byte_signed) = 0
+1
+select count(*) from information_schema.columns
+where table_schema="performance_schema" and data_type = "bigint"
+ and column_name like "%object_instance_begin" into @count_object_columns;
+select @count_object_columns > 0;
+@count_object_columns > 0
+1
+select count(*) from information_schema.columns
+where table_schema="performance_schema" and data_type="bigint"
+ and column_name like "%object_instance_begin"
+ and column_type like "%unsigned" into @count_object_unsigned;
+select (@count_object_columns - @count_object_unsigned) = 0;
+(@count_object_columns - @count_object_unsigned) = 0
+1
diff --git a/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result b/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result
index 86252d4ca01..e9537e5474c 100644
--- a/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result
+++ b/mysql-test/suite/perfschema/r/tampered_perfschema_table1.result
@@ -1,5 +1,5 @@
call mtr.add_suppression(
-"Column count of mysql.setup_instruments is wrong. "
+"Column count of performance_schema.setup_instruments is wrong. "
"Expected 4, found 3. The table is probably corrupted");
select * from performance_schema.setup_instruments limit 1;
ERROR HY000: Native table 'performance_schema'.'setup_instruments' has the wrong structure
diff --git a/mysql-test/suite/perfschema/r/temp_table_io.result b/mysql-test/suite/perfschema/r/temp_table_io.result
new file mode 100644
index 00000000000..732d1acac6a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/temp_table_io.result
@@ -0,0 +1,118 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop temporary table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled = 'YES';
+insert into marker set a = 1;
+create temporary table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = MyISAM;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TEMPORARY TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.no_index_tab set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.no_index_tab set a = 'bar';
+insert into marker set a = 1;
+select * from test.no_index_tab limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.no_index_tab where b = 3;
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.no_index_tab;
+Table Op Msg_type Msg_text
+test.no_index_tab optimize status OK
+insert into marker set a = 1;
+select * from test.no_index_tab;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.no_index_tab;
+insert into marker set a = 1;
+drop temporary table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/threads_innodb.result b/mysql-test/suite/perfschema/r/threads_innodb.result
new file mode 100644
index 00000000000..fdbd7469c7e
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_innodb.result
@@ -0,0 +1,14 @@
+SELECT name, type, processlist_user, processlist_host, processlist_db,
+processlist_command, processlist_time, processlist_state, processlist_info,
+parent_thread_id, role, instrumented
+FROM performance_schema.threads
+WHERE name LIKE 'thread/innodb/%'
+GROUP BY name;
+name type processlist_user processlist_host processlist_db processlist_command processlist_time processlist_state processlist_info parent_thread_id role instrumented
+thread/innodb/io_handler_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/page_cleaner_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/srv_error_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/srv_lock_timeout_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/srv_master_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/srv_monitor_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
+thread/innodb/srv_purge_thread BACKGROUND NULL NULL NULL NULL NULL NULL NULL NULL NULL YES
diff --git a/mysql-test/suite/perfschema/r/threads_insert_delayed.result b/mysql-test/suite/perfschema/r/threads_insert_delayed.result
new file mode 100644
index 00000000000..b3bcdc49f58
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_insert_delayed.result
@@ -0,0 +1,19 @@
+DROP TABLE IF EXISTS t1;
+DROP TEMPORARY TABLE IF EXISTS t2;
+CREATE TABLE t1 (f1 BIGINT) ENGINE = MyISAM;
+CREATE TEMPORARY TABLE t2 AS
+SELECT thread_id FROM performance_schema.threads WHERE 1 = 2;
+SELECT COUNT(*) = 0 AS expect_1 FROM performance_schema.threads
+WHERE name = 'thread/sql/delayed_insert';
+expect_1
+1
+INSERT INTO t2 SELECT thread_id
+FROM performance_schema.threads;
+INSERT DELAYED INTO t1 SET f1 = SLEEP(3);
+SELECT name, type, instrumented, processlist_user, processlist_host
+FROM performance_schema.threads
+WHERE thread_id NOT IN (SELECT thread_id FROM t2);
+name type instrumented processlist_user processlist_host
+thread/sql/delayed_insert FOREGROUND YES root localhost
+DROP TABLE t1;
+DROP TEMPORARY TABLE t2;
diff --git a/mysql-test/suite/perfschema/r/threads_mysql.result b/mysql-test/suite/perfschema/r/threads_mysql.result
new file mode 100644
index 00000000000..4da857f83fc
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/threads_mysql.result
@@ -0,0 +1,108 @@
+SET GLOBAL event_scheduler = OFF;
+SELECT name, type, processlist_user, processlist_host, processlist_db,
+processlist_command, processlist_info,
+IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
+AS unified_parent_thread_id,
+role, instrumented
+FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%'
+ORDER BY name;
+name thread/sql/main
+type BACKGROUND
+processlist_user NULL
+processlist_host NULL
+processlist_db NULL
+processlist_command NULL
+processlist_info INTERNAL DDL LOG RECOVER IN PROGRESS
+unified_parent_thread_id NULL
+role NULL
+instrumented YES
+name thread/sql/one_connection
+type FOREGROUND
+processlist_user root
+processlist_host localhost
+processlist_db test
+processlist_command Query
+processlist_info SELECT name, type, processlist_user, processlist_host, processlist_db,
+processlist_command, processlist_info,
+IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
+AS unified_parent_thread_id,
+role, instrumented
+FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%'
+ORDER BY name
+unified_parent_thread_id unified parent_thread_id
+role NULL
+instrumented YES
+name thread/sql/signal_handler
+type BACKGROUND
+processlist_user NULL
+processlist_host NULL
+processlist_db NULL
+processlist_command NULL
+processlist_info NULL
+unified_parent_thread_id unified parent_thread_id
+role NULL
+instrumented YES
+CREATE TEMPORARY TABLE t1 AS
+SELECT thread_id FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%';
+SET GLOBAL event_scheduler = ON;
+SELECT name, type, processlist_user, processlist_host, processlist_db,
+processlist_command, processlist_info,
+IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
+AS unified_parent_thread_id,
+role, instrumented
+FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%'
+ AND thread_id NOT IN (SELECT thread_id FROM t1)
+ORDER BY name;
+name thread/sql/event_scheduler
+type FOREGROUND
+processlist_user root
+processlist_host localhost
+processlist_db NULL
+processlist_command Sleep
+processlist_info NULL
+unified_parent_thread_id unified parent_thread_id
+role NULL
+instrumented YES
+TRUNCATE t1;
+INSERT INTO t1
+SELECT thread_id FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%';
+SELECT COUNT(*) INTO @aux FROM t1;
+DROP EVENT IF EXISTS t_ps_event;
+CREATE EVENT t_ps_event
+ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
+DO SELECT SLEEP(3);
+SELECT name, type, processlist_user, processlist_host, processlist_db,
+processlist_command, processlist_info,
+IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
+AS unified_parent_thread_id,
+role, instrumented
+FROM performance_schema.threads
+WHERE name LIKE 'thread/sql%'
+ AND thread_id NOT IN (SELECT thread_id FROM t1)
+ORDER BY name;
+name thread/sql/event_worker
+type FOREGROUND
+processlist_user root
+processlist_host localhost
+processlist_db NULL
+processlist_command Sleep
+processlist_info SELECT SLEEP(3)
+unified_parent_thread_id unified parent_thread_id
+role NULL
+instrumented YES
+SELECT t2.name AS parent_thread_name, t1.name AS child_thread_name
+FROM performance_schema.threads t1 INNER JOIN performance_schema.threads t2
+ON t1.parent_thread_id = t2.thread_id
+WHERE t1.name LIKE 'thread/sql%'
+ AND t1.parent_thread_id IS NOT NULL
+ORDER BY parent_thread_name, child_thread_name;
+parent_thread_name child_thread_name
+thread/sql/event_scheduler thread/sql/event_worker
+thread/sql/main thread/sql/one_connection
+thread/sql/main thread/sql/signal_handler
+thread/sql/one_connection thread/sql/event_scheduler
diff --git a/mysql-test/suite/perfschema/r/trigger_table_io.result b/mysql-test/suite/perfschema/r/trigger_table_io.result
new file mode 100644
index 00000000000..a8207a8b32a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/trigger_table_io.result
@@ -0,0 +1,205 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop table if exists test.t1;
+drop table if exists test.t2;
+create table test.t1 (a int, v int) engine = MyISAM;
+create table test.t2 (b int, v int) engine = MyISAM;
+create trigger t1_bi before insert on t1
+for each row insert into test.t2 set b = new.a, v = 0;
+create trigger t1_ai after insert on t1
+for each row update test.t2 set v = 1 where b = new.a;
+create trigger t1_bu before update on t1
+for each row update test.t2 set v = 3 where b = old.a;
+create trigger t1_au after update on t1
+for each row update test.t2 set v = 4 where b = new.a;
+create trigger t1_bd before delete on t1
+for each row delete from test.t2 where b = old.a;
+create trigger t1_ad after delete on t1
+for each row insert into test.t2 set b = old.a, v = 99;
+update performance_schema.setup_consumers set enabled = 'YES';
+insert into marker set a = 1;
+insert into t1 set a = 1, v = 10;
+insert into marker set a = 1;
+insert into t1 set a = 2, v = 20;
+insert into marker set a = 1;
+select * from t1;
+a v
+1 10
+2 20
+insert into marker set a = 1;
+select * from t2;
+b v
+1 1
+2 1
+insert into marker set a = 1;
+update t1 set v = v + 100;
+insert into marker set a = 1;
+select * from t1;
+a v
+1 110
+2 120
+insert into marker set a = 1;
+select * from t2;
+b v
+1 4
+2 4
+insert into marker set a = 1;
+delete from t1 where a = 1;
+insert into marker set a = 1;
+select * from t1;
+a v
+2 120
+insert into marker set a = 1;
+select * from t2;
+b v
+1 99
+2 4
+insert into marker set a = 1;
+delete from t1 where a = 2;
+insert into marker set a = 1;
+select * from t1;
+a v
+insert into marker set a = 1;
+select * from t2;
+b v
+1 99
+2 99
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 update NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t1 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test t2 fetch NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+drop table test.t1;
+drop table test.t2;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';
diff --git a/mysql-test/suite/perfschema/r/view_table_io.result b/mysql-test/suite/perfschema/r/view_table_io.result
new file mode 100644
index 00000000000..1d05ad38f56
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/view_table_io.result
@@ -0,0 +1,154 @@
+drop table if exists test.marker;
+create table test.marker(a int);
+update performance_schema.setup_consumers set enabled='NO';
+update performance_schema.setup_instruments set enabled='NO';
+update performance_schema.setup_instruments set enabled='YES'
+ where name like "wait/io/table/%";
+truncate table performance_schema.events_waits_history_long;
+flush status;
+flush tables;
+drop view if exists test.v1;
+drop table if exists test.no_index_tab;
+update performance_schema.setup_consumers set enabled='YES';
+insert into marker set a = 1;
+create table test.no_index_tab
+( a varchar(255) not null, b int not null) engine = MyISAM;
+insert into marker set a = 1;
+show create table test.no_index_tab;
+Table Create Table
+no_index_tab CREATE TABLE `no_index_tab` (
+ `a` varchar(255) NOT NULL,
+ `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+insert into marker set a = 1;
+create view test.v1 as select * from test.no_index_tab;
+insert into marker set a = 1;
+insert into test.v1 set a = 'foo', b = 1;
+insert into marker set a = 1;
+insert into test.v1 set a = 'foo', b = 2;
+insert into marker set a = 1;
+insert into test.v1 set a = 'foo', b = 3;
+insert into marker set a = 1;
+select * from test.v1;
+a b
+foo 1
+foo 2
+foo 3
+insert into marker set a = 1;
+update test.v1 set a = 'bar';
+insert into marker set a = 1;
+select * from test.v1 limit 2;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+delete from test.v1 where b = 3;
+insert into marker set a = 1;
+select * from test.v1;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+optimize table test.v1;
+Table Op Msg_type Msg_text
+test.v1 optimize Error 'test.v1' is not BASE TABLE
+test.v1 optimize error Corrupt
+insert into marker set a = 1;
+select * from test.v1;
+a b
+bar 1
+bar 2
+insert into marker set a = 1;
+truncate table test.v1;
+ERROR 42S02: Table 'test.v1' doesn't exist
+insert into marker set a = 1;
+drop view test.v1;
+insert into marker set a = 1;
+drop table test.no_index_tab;
+update performance_schema.setup_consumers set enabled='NO';
+select event_name,
+left(source, locate(":", source)) as short_source,
+object_type, object_schema,
+if (locate("#sql-", object_name), "#sql-XXXX", object_name)
+as pretty_name,
+operation, number_of_bytes
+from performance_schema.events_waits_history_long
+where event_name like 'wait/io/table/%'
+ and object_schema in ("test")
+order by thread_id, event_id;
+event_name short_source object_type object_schema pretty_name operation number_of_bytes
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab update NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab delete NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test no_index_tab fetch NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+wait/io/table/sql/handler handler.cc: TABLE test marker insert NULL
+show status like 'performance_schema_%';
+Variable_name Value
+Performance_schema_accounts_lost 0
+Performance_schema_cond_classes_lost 0
+Performance_schema_cond_instances_lost 0
+Performance_schema_digest_lost 0
+Performance_schema_file_classes_lost 0
+Performance_schema_file_handles_lost 0
+Performance_schema_file_instances_lost 0
+Performance_schema_hosts_lost 0
+Performance_schema_locker_lost 0
+Performance_schema_mutex_classes_lost 0
+Performance_schema_mutex_instances_lost 0
+Performance_schema_rwlock_classes_lost 0
+Performance_schema_rwlock_instances_lost 0
+Performance_schema_socket_classes_lost 0
+Performance_schema_socket_instances_lost 0
+Performance_schema_stage_classes_lost 0
+Performance_schema_statement_classes_lost 0
+Performance_schema_table_handles_lost 0
+Performance_schema_table_instances_lost 0
+Performance_schema_thread_classes_lost 0
+Performance_schema_thread_instances_lost 0
+Performance_schema_users_lost 0
+truncate performance_schema.events_waits_history_long;
+flush status;
+update performance_schema.setup_consumers set enabled='NO';
+truncate performance_schema.events_waits_history_long;
+drop table test.marker;
+flush status;
+update performance_schema.setup_instruments set enabled='YES';
+update performance_schema.setup_consumers set enabled='YES';