summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mysql/psi/mysql_file.h2
-rw-r--r--include/mysql/psi/mysql_idle.h2
-rw-r--r--include/mysql/psi/mysql_mdl.h2
-rw-r--r--include/mysql/psi/mysql_memory.h2
-rw-r--r--include/mysql/psi/mysql_ps.h2
-rw-r--r--include/mysql/psi/mysql_socket.h2
-rw-r--r--include/mysql/psi/mysql_sp.h2
-rw-r--r--include/mysql/psi/mysql_stage.h2
-rw-r--r--include/mysql/psi/mysql_statement.h2
-rw-r--r--include/mysql/psi/mysql_table.h2
-rw-r--r--include/mysql/psi/mysql_thread.h9
-rw-r--r--include/mysql/psi/mysql_transaction.h2
-rw-r--r--include/mysql/psi/psi.h13
-rw-r--r--include/mysql/psi/psi_abi_v0.h2
-rw-r--r--include/mysql/psi/psi_abi_v1.h2
-rw-r--r--include/mysql/psi/psi_abi_v1.h.pp3
-rw-r--r--include/mysql/psi/psi_abi_v2.h2
-rw-r--r--include/mysql/psi/psi_base.h8
-rw-r--r--include/mysql/psi/psi_memory.h2
-rw-r--r--mysql-test/suite/perfschema/include/processlist_load.inc39
-rw-r--r--mysql-test/suite/perfschema/include/processlist_set.inc17
-rw-r--r--mysql-test/suite/perfschema/r/ddl_processlist.result20
-rw-r--r--mysql-test/suite/perfschema/r/dml_handler.result69
-rw-r--r--mysql-test/suite/perfschema/r/dml_processlist.result24
-rw-r--r--mysql-test/suite/perfschema/r/information_schema.result10
-rw-r--r--mysql-test/suite/perfschema/r/max_program_zero.result1
-rw-r--r--mysql-test/suite/perfschema/r/misc_global_status.result101
-rw-r--r--mysql-test/suite/perfschema/r/ortho_iter.result1
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_event.result1
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_func.result1
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_proc.result1
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_table.result1
-rw-r--r--mysql-test/suite/perfschema/r/pfs_upgrade_view.result1
-rw-r--r--mysql-test/suite/perfschema/r/privilege_table_io.result1
-rw-r--r--mysql-test/suite/perfschema/r/processlist.result201
-rw-r--r--mysql-test/suite/perfschema/r/processlist_57.result345
-rw-r--r--mysql-test/suite/perfschema/r/processlist_acl.result255
-rw-r--r--mysql-test/suite/perfschema/r/processlist_anonymous.result66
-rw-r--r--mysql-test/suite/perfschema/r/processlist_no_pfs.result181
-rw-r--r--mysql-test/suite/perfschema/r/processlist_port.result145
-rw-r--r--mysql-test/suite/perfschema/r/processlist_reg_user.result89
-rw-r--r--mysql-test/suite/perfschema/r/schema.result1
-rw-r--r--mysql-test/suite/perfschema/r/show_sanity.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_idle.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_stages.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_statements.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_transactions.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_disable_waits.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_innodb.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_index.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_low_table_lock.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_account.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_cond_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_file_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_host.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_index.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mdl.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_memory_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_mutex_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_rwlock_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_actors.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_setup_objects.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_socket_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stage_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_stages_history_long.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statement_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_statements_history_long.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_hdl.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_table_lock.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_class.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_thread_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_user.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_waits_history_long.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_nothing.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_off.result1
-rw-r--r--mysql-test/suite/perfschema/r/start_server_on.result1
-rw-r--r--mysql-test/suite/perfschema/r/statement_program_lost_inst.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_off.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_global_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_hist_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_io_aggregate_thread_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_global_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_hist_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_2u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_2t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_lock_aggregate_thread_4u_3t.result1
-rw-r--r--mysql-test/suite/perfschema/r/table_schema.result8
-rw-r--r--mysql-test/suite/perfschema/r/threads_mysql.result16
-rw-r--r--mysql-test/suite/perfschema/t/ddl_processlist.test32
-rw-r--r--mysql-test/suite/perfschema/t/dml_processlist.test39
-rw-r--r--mysql-test/suite/perfschema/t/misc_global_status-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/misc_global_status.test134
-rw-r--r--mysql-test/suite/perfschema/t/processlist-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/processlist.test197
-rw-r--r--mysql-test/suite/perfschema/t/processlist_57.test349
-rw-r--r--mysql-test/suite/perfschema/t/processlist_acl-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/processlist_acl.test196
-rw-r--r--mysql-test/suite/perfschema/t/processlist_anonymous.test111
-rw-r--r--mysql-test/suite/perfschema/t/processlist_no_pfs-master.opt2
-rw-r--r--mysql-test/suite/perfschema/t/processlist_no_pfs.test29
-rw-r--r--mysql-test/suite/perfschema/t/processlist_port-master.opt1
-rw-r--r--mysql-test/suite/perfschema/t/processlist_port.test162
-rw-r--r--mysql-test/suite/perfschema/t/processlist_reg_user.test134
-rw-r--r--mysql-test/suite/perfschema/t/threads_mysql.test6
-rw-r--r--storage/perfschema/CMakeLists.txt4
-rw-r--r--storage/perfschema/cursor_by_account.cc2
-rw-r--r--storage/perfschema/cursor_by_account.h2
-rw-r--r--storage/perfschema/cursor_by_host.cc2
-rw-r--r--storage/perfschema/cursor_by_host.h2
-rw-r--r--storage/perfschema/cursor_by_thread.cc2
-rw-r--r--storage/perfschema/cursor_by_thread.h2
-rw-r--r--storage/perfschema/cursor_by_thread_connect_attr.cc2
-rw-r--r--storage/perfschema/cursor_by_thread_connect_attr.h2
-rw-r--r--storage/perfschema/cursor_by_user.cc2
-rw-r--r--storage/perfschema/cursor_by_user.h2
-rw-r--r--storage/perfschema/ha_perfschema.cc49
-rw-r--r--storage/perfschema/ha_perfschema.h2
-rw-r--r--storage/perfschema/pfs.cc15
-rw-r--r--storage/perfschema/pfs.h2
-rw-r--r--storage/perfschema/pfs_account.cc29
-rw-r--r--storage/perfschema/pfs_account.h2
-rw-r--r--storage/perfschema/pfs_atomic.h2
-rw-r--r--storage/perfschema/pfs_autosize.cc2
-rw-r--r--storage/perfschema/pfs_buffer_container.cc2
-rw-r--r--storage/perfschema/pfs_buffer_container.h2
-rw-r--r--storage/perfschema/pfs_builtin_memory.cc2
-rw-r--r--storage/perfschema/pfs_builtin_memory.h2
-rw-r--r--storage/perfschema/pfs_check.cc2
-rw-r--r--storage/perfschema/pfs_column_types.h2
-rw-r--r--storage/perfschema/pfs_column_values.cc2
-rw-r--r--storage/perfschema/pfs_column_values.h2
-rw-r--r--storage/perfschema/pfs_con_slice.cc2
-rw-r--r--storage/perfschema/pfs_con_slice.h2
-rw-r--r--storage/perfschema/pfs_defaults.cc2
-rw-r--r--storage/perfschema/pfs_defaults.h2
-rw-r--r--storage/perfschema/pfs_digest.cc2
-rw-r--r--storage/perfschema/pfs_digest.h2
-rw-r--r--storage/perfschema/pfs_engine_table.cc105
-rw-r--r--storage/perfschema/pfs_engine_table.h32
-rw-r--r--storage/perfschema/pfs_events.h2
-rw-r--r--storage/perfschema/pfs_events_stages.cc2
-rw-r--r--storage/perfschema/pfs_events_stages.h2
-rw-r--r--storage/perfschema/pfs_events_statements.cc2
-rw-r--r--storage/perfschema/pfs_events_statements.h2
-rw-r--r--storage/perfschema/pfs_events_transactions.cc2
-rw-r--r--storage/perfschema/pfs_events_transactions.h2
-rw-r--r--storage/perfschema/pfs_events_waits.cc2
-rw-r--r--storage/perfschema/pfs_events_waits.h2
-rw-r--r--storage/perfschema/pfs_global.cc2
-rw-r--r--storage/perfschema/pfs_global.h2
-rw-r--r--storage/perfschema/pfs_host.cc2
-rw-r--r--storage/perfschema/pfs_host.h2
-rw-r--r--storage/perfschema/pfs_instr.cc4
-rw-r--r--storage/perfschema/pfs_instr.h5
-rw-r--r--storage/perfschema/pfs_instr_class.cc2
-rw-r--r--storage/perfschema/pfs_instr_class.h5
-rw-r--r--storage/perfschema/pfs_lock.h2
-rw-r--r--storage/perfschema/pfs_memory.cc2
-rw-r--r--storage/perfschema/pfs_memory.h2
-rw-r--r--storage/perfschema/pfs_prepared_stmt.cc2
-rw-r--r--storage/perfschema/pfs_prepared_stmt.h2
-rw-r--r--storage/perfschema/pfs_program.cc2
-rw-r--r--storage/perfschema/pfs_program.h2
-rw-r--r--storage/perfschema/pfs_server.cc2
-rw-r--r--storage/perfschema/pfs_server.h2
-rw-r--r--storage/perfschema/pfs_setup_actor.cc2
-rw-r--r--storage/perfschema/pfs_setup_actor.h2
-rw-r--r--storage/perfschema/pfs_setup_object.cc2
-rw-r--r--storage/perfschema/pfs_setup_object.h2
-rw-r--r--storage/perfschema/pfs_stat.h2
-rw-r--r--storage/perfschema/pfs_status.cc2
-rw-r--r--storage/perfschema/pfs_status.h2
-rw-r--r--storage/perfschema/pfs_timer.cc2
-rw-r--r--storage/perfschema/pfs_timer.h2
-rw-r--r--storage/perfschema/pfs_user.cc2
-rw-r--r--storage/perfschema/pfs_user.h2
-rw-r--r--storage/perfschema/pfs_variable.cc2
-rw-r--r--storage/perfschema/pfs_variable.h2
-rw-r--r--storage/perfschema/pfs_visitor.cc2
-rw-r--r--storage/perfschema/pfs_visitor.h2
-rw-r--r--storage/perfschema/table_accounts.cc12
-rw-r--r--storage/perfschema/table_accounts.h3
-rw-r--r--storage/perfschema/table_all_instr.cc2
-rw-r--r--storage/perfschema/table_all_instr.h2
-rw-r--r--storage/perfschema/table_esgs_by_account_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esgs_by_account_by_event_name.h3
-rw-r--r--storage/perfschema/table_esgs_by_host_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esgs_by_host_by_event_name.h3
-rw-r--r--storage/perfschema/table_esgs_by_thread_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esgs_by_thread_by_event_name.h3
-rw-r--r--storage/perfschema/table_esgs_by_user_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esgs_by_user_by_event_name.h3
-rw-r--r--storage/perfschema/table_esgs_global_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esgs_global_by_event_name.h3
-rw-r--r--storage/perfschema/table_esms_by_account_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esms_by_account_by_event_name.h3
-rw-r--r--storage/perfschema/table_esms_by_digest.cc12
-rw-r--r--storage/perfschema/table_esms_by_digest.h3
-rw-r--r--storage/perfschema/table_esms_by_host_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esms_by_host_by_event_name.h3
-rw-r--r--storage/perfschema/table_esms_by_program.cc12
-rw-r--r--storage/perfschema/table_esms_by_program.h3
-rw-r--r--storage/perfschema/table_esms_by_thread_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esms_by_thread_by_event_name.h3
-rw-r--r--storage/perfschema/table_esms_by_user_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esms_by_user_by_event_name.h3
-rw-r--r--storage/perfschema/table_esms_global_by_event_name.cc12
-rw-r--r--storage/perfschema/table_esms_global_by_event_name.h3
-rw-r--r--storage/perfschema/table_ets_by_account_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ets_by_account_by_event_name.h3
-rw-r--r--storage/perfschema/table_ets_by_host_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ets_by_host_by_event_name.h3
-rw-r--r--storage/perfschema/table_ets_by_thread_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ets_by_thread_by_event_name.h3
-rw-r--r--storage/perfschema/table_ets_by_user_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ets_by_user_by_event_name.h3
-rw-r--r--storage/perfschema/table_ets_global_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ets_global_by_event_name.h3
-rw-r--r--storage/perfschema/table_events_stages.cc32
-rw-r--r--storage/perfschema/table_events_stages.h5
-rw-r--r--storage/perfschema/table_events_statements.cc32
-rw-r--r--storage/perfschema/table_events_statements.h5
-rw-r--r--storage/perfschema/table_events_transactions.cc32
-rw-r--r--storage/perfschema/table_events_transactions.h5
-rw-r--r--storage/perfschema/table_events_waits.cc32
-rw-r--r--storage/perfschema/table_events_waits.h5
-rw-r--r--storage/perfschema/table_events_waits_summary.cc12
-rw-r--r--storage/perfschema/table_events_waits_summary.h3
-rw-r--r--storage/perfschema/table_ews_by_account_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ews_by_account_by_event_name.h3
-rw-r--r--storage/perfschema/table_ews_by_host_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ews_by_host_by_event_name.h3
-rw-r--r--storage/perfschema/table_ews_by_thread_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ews_by_thread_by_event_name.h3
-rw-r--r--storage/perfschema/table_ews_by_user_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ews_by_user_by_event_name.h3
-rw-r--r--storage/perfschema/table_ews_global_by_event_name.cc12
-rw-r--r--storage/perfschema/table_ews_global_by_event_name.h3
-rw-r--r--storage/perfschema/table_file_instances.cc12
-rw-r--r--storage/perfschema/table_file_instances.h3
-rw-r--r--storage/perfschema/table_file_summary_by_event_name.cc12
-rw-r--r--storage/perfschema/table_file_summary_by_event_name.h3
-rw-r--r--storage/perfschema/table_file_summary_by_instance.cc12
-rw-r--r--storage/perfschema/table_file_summary_by_instance.h3
-rw-r--r--storage/perfschema/table_global_status.cc12
-rw-r--r--storage/perfschema/table_global_status.h3
-rw-r--r--storage/perfschema/table_global_variables.cc12
-rw-r--r--storage/perfschema/table_global_variables.h3
-rw-r--r--storage/perfschema/table_helper.cc2
-rw-r--r--storage/perfschema/table_helper.h2
-rw-r--r--storage/perfschema/table_host_cache.cc12
-rw-r--r--storage/perfschema/table_host_cache.h3
-rw-r--r--storage/perfschema/table_hosts.cc12
-rw-r--r--storage/perfschema/table_hosts.h3
-rw-r--r--storage/perfschema/table_md_locks.cc12
-rw-r--r--storage/perfschema/table_md_locks.h3
-rw-r--r--storage/perfschema/table_mems_by_account_by_event_name.cc12
-rw-r--r--storage/perfschema/table_mems_by_account_by_event_name.h3
-rw-r--r--storage/perfschema/table_mems_by_host_by_event_name.cc12
-rw-r--r--storage/perfschema/table_mems_by_host_by_event_name.h3
-rw-r--r--storage/perfschema/table_mems_by_thread_by_event_name.cc12
-rw-r--r--storage/perfschema/table_mems_by_thread_by_event_name.h3
-rw-r--r--storage/perfschema/table_mems_by_user_by_event_name.cc12
-rw-r--r--storage/perfschema/table_mems_by_user_by_event_name.h3
-rw-r--r--storage/perfschema/table_mems_global_by_event_name.cc12
-rw-r--r--storage/perfschema/table_mems_global_by_event_name.h3
-rw-r--r--storage/perfschema/table_os_global_by_type.cc12
-rw-r--r--storage/perfschema/table_os_global_by_type.h3
-rw-r--r--storage/perfschema/table_performance_timers.cc12
-rw-r--r--storage/perfschema/table_performance_timers.h3
-rw-r--r--storage/perfschema/table_prepared_stmt_instances.cc12
-rw-r--r--storage/perfschema/table_prepared_stmt_instances.h3
-rw-r--r--storage/perfschema/table_processlist.cc406
-rw-r--r--storage/perfschema/table_processlist.h133
-rw-r--r--storage/perfschema/table_replication_applier_configuration.cc12
-rw-r--r--storage/perfschema/table_replication_applier_configuration.h3
-rw-r--r--storage/perfschema/table_replication_applier_status.cc12
-rw-r--r--storage/perfschema/table_replication_applier_status.h3
-rw-r--r--storage/perfschema/table_replication_applier_status_by_coordinator.cc12
-rw-r--r--storage/perfschema/table_replication_applier_status_by_coordinator.h3
-rw-r--r--storage/perfschema/table_replication_applier_status_by_worker.cc12
-rw-r--r--storage/perfschema/table_replication_applier_status_by_worker.h3
-rw-r--r--storage/perfschema/table_replication_connection_configuration.cc12
-rw-r--r--storage/perfschema/table_replication_connection_configuration.h3
-rw-r--r--storage/perfschema/table_replication_connection_status.cc12
-rw-r--r--storage/perfschema/table_replication_connection_status.h3
-rw-r--r--storage/perfschema/table_replication_group_member_stats.cc12
-rw-r--r--storage/perfschema/table_replication_group_member_stats.h3
-rw-r--r--storage/perfschema/table_replication_group_members.cc12
-rw-r--r--storage/perfschema/table_replication_group_members.h3
-rw-r--r--storage/perfschema/table_session_account_connect_attrs.cc12
-rw-r--r--storage/perfschema/table_session_account_connect_attrs.h3
-rw-r--r--storage/perfschema/table_session_connect.cc2
-rw-r--r--storage/perfschema/table_session_connect.h2
-rw-r--r--storage/perfschema/table_session_connect_attrs.cc12
-rw-r--r--storage/perfschema/table_session_connect_attrs.h3
-rw-r--r--storage/perfschema/table_session_status.cc12
-rw-r--r--storage/perfschema/table_session_status.h3
-rw-r--r--storage/perfschema/table_session_variables.cc12
-rw-r--r--storage/perfschema/table_session_variables.h3
-rw-r--r--storage/perfschema/table_setup_actors.cc12
-rw-r--r--storage/perfschema/table_setup_actors.h3
-rw-r--r--storage/perfschema/table_setup_consumers.cc12
-rw-r--r--storage/perfschema/table_setup_consumers.h3
-rw-r--r--storage/perfschema/table_setup_instruments.cc12
-rw-r--r--storage/perfschema/table_setup_instruments.h3
-rw-r--r--storage/perfschema/table_setup_objects.cc12
-rw-r--r--storage/perfschema/table_setup_objects.h3
-rw-r--r--storage/perfschema/table_setup_timers.cc12
-rw-r--r--storage/perfschema/table_setup_timers.h3
-rw-r--r--storage/perfschema/table_socket_instances.cc12
-rw-r--r--storage/perfschema/table_socket_instances.h3
-rw-r--r--storage/perfschema/table_socket_summary_by_event_name.cc12
-rw-r--r--storage/perfschema/table_socket_summary_by_event_name.h3
-rw-r--r--storage/perfschema/table_socket_summary_by_instance.cc12
-rw-r--r--storage/perfschema/table_socket_summary_by_instance.h3
-rw-r--r--storage/perfschema/table_status_by_account.cc12
-rw-r--r--storage/perfschema/table_status_by_account.h3
-rw-r--r--storage/perfschema/table_status_by_host.cc12
-rw-r--r--storage/perfschema/table_status_by_host.h3
-rw-r--r--storage/perfschema/table_status_by_thread.cc14
-rw-r--r--storage/perfschema/table_status_by_thread.h3
-rw-r--r--storage/perfschema/table_status_by_user.cc12
-rw-r--r--storage/perfschema/table_status_by_user.h3
-rw-r--r--storage/perfschema/table_sync_instances.cc32
-rw-r--r--storage/perfschema/table_sync_instances.h5
-rw-r--r--storage/perfschema/table_table_handles.cc12
-rw-r--r--storage/perfschema/table_table_handles.h3
-rw-r--r--storage/perfschema/table_threads.cc12
-rw-r--r--storage/perfschema/table_threads.h3
-rw-r--r--storage/perfschema/table_tiws_by_index_usage.cc12
-rw-r--r--storage/perfschema/table_tiws_by_index_usage.h3
-rw-r--r--storage/perfschema/table_tiws_by_table.cc12
-rw-r--r--storage/perfschema/table_tiws_by_table.h3
-rw-r--r--storage/perfschema/table_tlws_by_table.cc12
-rw-r--r--storage/perfschema/table_tlws_by_table.h3
-rw-r--r--storage/perfschema/table_users.cc12
-rw-r--r--storage/perfschema/table_users.h3
-rw-r--r--storage/perfschema/table_uvar_by_thread.cc12
-rw-r--r--storage/perfschema/table_uvar_by_thread.h3
-rw-r--r--storage/perfschema/table_variables_by_thread.cc12
-rw-r--r--storage/perfschema/table_variables_by_thread.h3
-rw-r--r--storage/perfschema/unittest/CMakeLists.txt2
-rw-r--r--storage/perfschema/unittest/conf.txt2
-rw-r--r--storage/perfschema/unittest/pfs-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_account-oom-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_connect_attr-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_host-oom-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_instr-oom-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_instr-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_instr_class-oom-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_instr_class-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_misc-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_noop-t.cc4
-rw-r--r--storage/perfschema/unittest/pfs_server_stubs.cc2
-rw-r--r--storage/perfschema/unittest/pfs_timer-t.cc2
-rw-r--r--storage/perfschema/unittest/pfs_user-oom-t.cc2
-rw-r--r--storage/perfschema/unittest/stub_global_status_var.h2
-rw-r--r--storage/perfschema/unittest/stub_pfs_defaults.h2
-rw-r--r--storage/perfschema/unittest/stub_pfs_global.h2
-rw-r--r--storage/perfschema/unittest/stub_print_error.h2
401 files changed, 4852 insertions, 527 deletions
diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h
index 9f87aa3e64f..8f0fe6d9c78 100644
--- a/include/mysql/psi/mysql_file.h
+++ b/include/mysql/psi/mysql_file.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_idle.h b/include/mysql/psi/mysql_idle.h
index ca657b4476b..61a25f20a0e 100644
--- a/include/mysql/psi/mysql_idle.h
+++ b/include/mysql/psi/mysql_idle.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h
index 4dba7ccb2c1..45723a60d3b 100644
--- a/include/mysql/psi/mysql_mdl.h
+++ b/include/mysql/psi/mysql_mdl.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h
index 11a8f8438a7..03dc181b83d 100644
--- a/include/mysql/psi/mysql_memory.h
+++ b/include/mysql/psi/mysql_memory.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_ps.h b/include/mysql/psi/mysql_ps.h
index e664d07c451..a3291e3402e 100644
--- a/include/mysql/psi/mysql_ps.h
+++ b/include/mysql/psi/mysql_ps.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_socket.h b/include/mysql/psi/mysql_socket.h
index ea86db0049c..3bc22dddca9 100644
--- a/include/mysql/psi/mysql_socket.h
+++ b/include/mysql/psi/mysql_socket.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_sp.h b/include/mysql/psi/mysql_sp.h
index 68b79f1b852..1fec59cec91 100644
--- a/include/mysql/psi/mysql_sp.h
+++ b/include/mysql/psi/mysql_sp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h
index 2e09004d93e..473611dc66d 100644
--- a/include/mysql/psi/mysql_stage.h
+++ b/include/mysql/psi/mysql_stage.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_statement.h b/include/mysql/psi/mysql_statement.h
index 953400ff7e0..bee98456d2f 100644
--- a/include/mysql/psi/mysql_statement.h
+++ b/include/mysql/psi/mysql_statement.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_table.h b/include/mysql/psi/mysql_table.h
index 7492f41ca5b..a0755aa4c92 100644
--- a/include/mysql/psi/mysql_table.h
+++ b/include/mysql/psi/mysql_table.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h
index 479d1511df4..c25e90f2120 100644
--- a/include/mysql/psi/mysql_thread.h
+++ b/include/mysql/psi/mysql_thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -1320,6 +1320,13 @@ static inline void inline_mysql_thread_set_psi_THD(THD *thd)
}
#endif /* __cplusplus */
+static inline void mysql_thread_set_peer_port(uint port MY_ATTRIBUTE ((unused))) {
+#ifdef HAVE_PSI_THREAD_INTERFACE
+ struct PSI_thread *psi = PSI_THREAD_CALL(get_thread)();
+ PSI_THREAD_CALL(set_thread_peer_port)(psi, port);
+#endif
+}
+
#endif
#endif /* DISABLE_MYSQL_THREAD_H */
diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h
index 075b8543fbd..763c3aa05dd 100644
--- a/include/mysql/psi/mysql_transaction.h
+++ b/include/mysql/psi/mysql_transaction.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h
index e16a194db1f..98bcffd7b5c 100644
--- a/include/mysql/psi/psi.h
+++ b/include/mysql/psi/psi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -1678,6 +1678,15 @@ typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
*/
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
+/**
+ Assign the remote (peer) port to the instrumented thread.
+
+ @param thread pointer to the thread instrumentation
+ @param port the remote port
+*/
+typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread,
+ unsigned int port);
+
/** Delete the current thread instrumentation. */
typedef void (*delete_current_thread_v1_t)(void);
@@ -2724,6 +2733,8 @@ struct PSI_v1
start_metadata_wait_v1_t start_metadata_wait;
end_metadata_wait_v1_t end_metadata_wait;
+
+ set_thread_peer_port_v1_t set_thread_peer_port;
};
/** @} (end of group Group_PSI_v1) */
diff --git a/include/mysql/psi/psi_abi_v0.h b/include/mysql/psi/psi_abi_v0.h
index 2272c41b9d5..2fe6546ecac 100644
--- a/include/mysql/psi/psi_abi_v0.h
+++ b/include/mysql/psi/psi_abi_v0.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/psi_abi_v1.h b/include/mysql/psi/psi_abi_v1.h
index ba244be38b6..78c2ddb094f 100644
--- a/include/mysql/psi/psi_abi_v1.h
+++ b/include/mysql/psi/psi_abi_v1.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/psi_abi_v1.h.pp b/include/mysql/psi/psi_abi_v1.h.pp
index 10fcde7128e..b84be5867a9 100644
--- a/include/mysql/psi/psi_abi_v1.h.pp
+++ b/include/mysql/psi/psi_abi_v1.h.pp
@@ -463,6 +463,8 @@ typedef void (*set_thread_start_time_v1_t)(time_t start_time);
typedef void (*set_thread_state_v1_t)(const char* state);
typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
+typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread,
+ unsigned int port);
typedef void (*delete_current_thread_v1_t)(void);
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
@@ -834,6 +836,7 @@ struct PSI_v1
destroy_metadata_lock_v1_t destroy_metadata_lock;
start_metadata_wait_v1_t start_metadata_wait;
end_metadata_wait_v1_t end_metadata_wait;
+ set_thread_peer_port_v1_t set_thread_peer_port;
};
typedef struct PSI_v1 PSI;
typedef struct PSI_mutex_info_v1 PSI_mutex_info;
diff --git a/include/mysql/psi/psi_abi_v2.h b/include/mysql/psi/psi_abi_v2.h
index c70cfc8cb93..0aeebaca779 100644
--- a/include/mysql/psi/psi_abi_v2.h
+++ b/include/mysql/psi/psi_abi_v2.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h
index 624a55cff32..66d709b48ef 100644
--- a/include/mysql/psi/psi_base.h
+++ b/include/mysql/psi/psi_base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -89,6 +89,12 @@ extern "C" {
*/
#define PSI_FLAG_VOLATILITY_SESSION (1 << 6)
+/**
+ System thread flag.
+ Indicates that the instrumented object exists on a system thread.
+*/
+#define PSI_FLAG_THREAD_SYSTEM (1 << 9)
+
#ifdef HAVE_PSI_INTERFACE
/**
diff --git a/include/mysql/psi/psi_memory.h b/include/mysql/psi/psi_memory.h
index 4640a29b4ef..454c3dbe2a1 100644
--- a/include/mysql/psi/psi_memory.h
+++ b/include/mysql/psi/psi_memory.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/mysql-test/suite/perfschema/include/processlist_load.inc b/mysql-test/suite/perfschema/include/processlist_load.inc
new file mode 100644
index 00000000000..5a14ea17d07
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/processlist_load.inc
@@ -0,0 +1,39 @@
+# ../include/processlist_load.inc
+#
+# SUMMARY
+#
+# Execute PROCESSLIST queries, sorted by user
+#
+# USAGE
+#
+# Example: Using processlist_set.inc to set @@global.performance_schema_show_processlist
+#
+# let $pfs_spl = on/off
+# --source ../include/processlist_set.inc
+# --source ../include/processlist_load.inc
+#
+# Columns
+# 1 <Id> 2 <User> 3 <Host> 4 <db> 5 <Command> 6 <Time> 7 <State> 8 <Info>
+
+# Sort SHOW PROCESSLIST by User instead of Id because Id is not zero-padded
+# Unique usernames give best results
+--echo
+--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
+--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
+--sorted_result
+SHOW FULL PROCESSLIST;
+
+--echo
+--echo # Performance Schema processlist table
+--echo
+--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
+--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
+select * from performance_schema.processlist order by user, id;
+
+--echo
+--echo # Information Schema processlist table
+--echo
+--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
+--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
+select * from information_schema.processlist order by user, id;
+
diff --git a/mysql-test/suite/perfschema/include/processlist_set.inc b/mysql-test/suite/perfschema/include/processlist_set.inc
new file mode 100644
index 00000000000..a15e09fd989
--- /dev/null
+++ b/mysql-test/suite/perfschema/include/processlist_set.inc
@@ -0,0 +1,17 @@
+# ../include/processlist_set.inc
+#
+# SUMMARY
+#
+# Set the value of performance_schema_show_proceslist then
+# wait for the operation to complete
+#
+# USAGE
+#
+# let $pfs_spl = on;
+# --source ../include/processlist_set.inc
+
+eval set @@global.performance_schema_show_processlist = $pfs_spl;
+
+let $wait_condition = show variables where variable_name like '%show_processlist%' and value = '$pfs_spl';
+--source include/wait_condition.inc
+
diff --git a/mysql-test/suite/perfschema/r/ddl_processlist.result b/mysql-test/suite/perfschema/r/ddl_processlist.result
new file mode 100644
index 00000000000..3b1b8608725
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/ddl_processlist.result
@@ -0,0 +1,20 @@
+select @@global.performance_schema_show_processlist into @save_processlist;
+set @@global.performance_schema_show_processlist = 'on';
+alter table performance_schema.processlist
+add column foo integer;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+truncate table performance_schema.processlist;
+ERROR HY000: Invalid performance_schema usage.
+alter table performance_schema.processlist
+add index test_index(info);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+create unique index test_index
+on performance_schema.processlist(host);
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+drop index `PRIMARY`
+ on performance_schema.processlist;
+ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
+CREATE TABLE test.create_select
+AS SELECT * from performance_schema.processlist;
+DROP TABLE test.create_select;
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/dml_handler.result b/mysql-test/suite/perfschema/r/dml_handler.result
index 3ee00750f59..46722993102 100644
--- a/mysql-test/suite/perfschema/r/dml_handler.result
+++ b/mysql-test/suite/perfschema/r/dml_handler.result
@@ -9,105 +9,108 @@ 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=87;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=88;
HANDLER performance_schema.variables_by_thread OPEN;
ERROR HY000: Table storage engine for 'variables_by_thread' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=86;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=87;
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=85;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=86;
HANDLER performance_schema.user_variables_by_thread OPEN;
ERROR HY000: Table storage engine for 'user_variables_by_thread' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=84;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=85;
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=83;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=84;
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=82;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=83;
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=81;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=82;
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=80;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=81;
HANDLER performance_schema.table_handles OPEN;
ERROR HY000: Table storage engine for 'table_handles' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=79;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=80;
HANDLER performance_schema.status_by_user OPEN;
ERROR HY000: Table storage engine for 'status_by_user' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=78;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=79;
HANDLER performance_schema.status_by_thread OPEN;
ERROR HY000: Table storage engine for 'status_by_thread' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=77;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=78;
HANDLER performance_schema.status_by_host OPEN;
ERROR HY000: Table storage engine for 'status_by_host' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=76;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=77;
HANDLER performance_schema.status_by_account OPEN;
ERROR HY000: Table storage engine for 'status_by_account' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=75;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=76;
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=74;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=75;
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=73;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=74;
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=72;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=73;
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=71;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=72;
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=70;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=71;
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=69;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=70;
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=68;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=69;
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=67;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=68;
HANDLER performance_schema.session_variables OPEN;
ERROR HY000: Table storage engine for 'session_variables' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=66;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=67;
HANDLER performance_schema.session_status OPEN;
ERROR HY000: Table storage engine for 'session_status' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=65;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=66;
HANDLER performance_schema.session_connect_attrs OPEN;
ERROR HY000: Table storage engine for 'session_connect_attrs' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=64;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=65;
HANDLER performance_schema.session_account_connect_attrs OPEN;
ERROR HY000: Table storage engine for 'session_account_connect_attrs' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=63;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=64;
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=62;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=63;
HANDLER performance_schema.replication_group_members OPEN;
ERROR HY000: Table storage engine for 'replication_group_members' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=61;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=62;
HANDLER performance_schema.replication_group_member_stats OPEN;
ERROR HY000: Table storage engine for 'replication_group_member_stats' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=60;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=61;
HANDLER performance_schema.replication_connection_status OPEN;
ERROR HY000: Table storage engine for 'replication_connection_status' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=59;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=60;
HANDLER performance_schema.replication_connection_configuration OPEN;
ERROR HY000: Table storage engine for 'replication_connection_configuration' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=58;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=59;
HANDLER performance_schema.replication_applier_status_by_worker OPEN;
ERROR HY000: Table storage engine for 'replication_applier_status_by_worker' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=57;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=58;
HANDLER performance_schema.replication_applier_status_by_coordinator OPEN;
ERROR HY000: Table storage engine for 'replication_applier_status_by_coordinator' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=56;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=57;
HANDLER performance_schema.replication_applier_status OPEN;
ERROR HY000: Table storage engine for 'replication_applier_status' doesn't have this option
-SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=55;
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=56;
HANDLER performance_schema.replication_applier_configuration OPEN;
ERROR HY000: Table storage engine for 'replication_applier_configuration' doesn't have this option
+SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=55;
+HANDLER performance_schema.processlist OPEN;
+ERROR HY000: Table storage engine for 'processlist' doesn't have this option
SELECT TABLE_NAME INTO @table_name FROM table_list WHERE id=54;
HANDLER performance_schema.prepared_statements_instances OPEN;
ERROR HY000: Table storage engine for 'prepared_statements_instances' doesn't have this option
diff --git a/mysql-test/suite/perfschema/r/dml_processlist.result b/mysql-test/suite/perfschema/r/dml_processlist.result
new file mode 100644
index 00000000000..f3627807a49
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/dml_processlist.result
@@ -0,0 +1,24 @@
+select @@global.performance_schema_show_processlist into @save_processlist;
+set @@global.performance_schema_show_processlist = 'on';
+select * from performance_schema.processlist
+where user like 'event_scheduler';
+select * from performance_schema.processlist
+where user = 'FOO';
+insert into performance_schema.processlist
+values (12, 'foo', 'bar', 'test', null, 1000, 'state', 'info');
+ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'processlist'
+update performance_schema.processlist
+set id=12, user='foo';
+ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'processlist'
+delete from performance_schema.processlist
+where id <> 99;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist'
+delete from performance_schema.processlist;
+ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist'
+LOCK TABLES performance_schema.processlist READ;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist'
+UNLOCK TABLES;
+LOCK TABLES performance_schema.processlist WRITE;
+ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist'
+UNLOCK TABLES;
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/information_schema.result b/mysql-test/suite/perfschema/r/information_schema.result
index 040b3371cdf..8cfff3f8f2b 100644
--- a/mysql-test/suite/perfschema/r/information_schema.result
+++ b/mysql-test/suite/perfschema/r/information_schema.result
@@ -56,6 +56,7 @@ performance_schema mutex_instances def
performance_schema objects_summary_global_by_type def
performance_schema performance_timers def
performance_schema prepared_statements_instances def
+performance_schema processlist def
performance_schema replication_applier_configuration def
performance_schema replication_applier_status def
performance_schema replication_applier_status_by_coordinator def
@@ -147,6 +148,7 @@ mutex_instances BASE TABLE PERFORMANCE_SCHEMA
objects_summary_global_by_type BASE TABLE PERFORMANCE_SCHEMA
performance_timers BASE TABLE PERFORMANCE_SCHEMA
prepared_statements_instances BASE TABLE PERFORMANCE_SCHEMA
+processlist BASE TABLE PERFORMANCE_SCHEMA
replication_applier_configuration BASE TABLE PERFORMANCE_SCHEMA
replication_applier_status BASE TABLE PERFORMANCE_SCHEMA
replication_applier_status_by_coordinator BASE TABLE PERFORMANCE_SCHEMA
@@ -238,6 +240,7 @@ mutex_instances 10 Dynamic
objects_summary_global_by_type 10 Dynamic
performance_timers 10 Fixed
prepared_statements_instances 10 Dynamic
+processlist 10 Dynamic
replication_applier_configuration 10 Fixed
replication_applier_status 10 Fixed
replication_applier_status_by_coordinator 10 Dynamic
@@ -328,6 +331,7 @@ mutex_instances 0
objects_summary_global_by_type 0
performance_timers 0
prepared_statements_instances 0
+processlist 0
replication_applier_configuration 0
replication_applier_status 0
replication_applier_status_by_coordinator 0
@@ -426,6 +430,7 @@ mutex_instances 0 0
objects_summary_global_by_type 0 0
performance_timers 0 0
prepared_statements_instances 0 0
+processlist 0 0
replication_applier_configuration 0 0
replication_applier_status 0 0
replication_applier_status_by_coordinator 0 0
@@ -517,6 +522,7 @@ mutex_instances 0 0 NULL
objects_summary_global_by_type 0 0 NULL
performance_timers 0 0 NULL
prepared_statements_instances 0 0 NULL
+processlist 0 0 NULL
replication_applier_configuration 0 0 NULL
replication_applier_status 0 0 NULL
replication_applier_status_by_coordinator 0 0 NULL
@@ -608,6 +614,7 @@ mutex_instances NULL NULL NULL
objects_summary_global_by_type NULL NULL NULL
performance_timers NULL NULL NULL
prepared_statements_instances NULL NULL NULL
+processlist NULL NULL NULL
replication_applier_configuration NULL NULL NULL
replication_applier_status NULL NULL NULL
replication_applier_status_by_coordinator NULL NULL NULL
@@ -699,6 +706,7 @@ mutex_instances utf8_general_ci NULL
objects_summary_global_by_type utf8_general_ci NULL
performance_timers utf8_general_ci NULL
prepared_statements_instances utf8_general_ci NULL
+processlist utf8_general_ci NULL
replication_applier_configuration utf8_general_ci NULL
replication_applier_status utf8_general_ci NULL
replication_applier_status_by_coordinator utf8_general_ci NULL
@@ -790,6 +798,7 @@ mutex_instances
objects_summary_global_by_type
performance_timers
prepared_statements_instances
+processlist
replication_applier_configuration
replication_applier_status
replication_applier_status_by_coordinator
@@ -881,6 +890,7 @@ mutex_instances
objects_summary_global_by_type
performance_timers
prepared_statements_instances
+processlist
replication_applier_configuration
replication_applier_status
replication_applier_status_by_coordinator
diff --git a/mysql-test/suite/perfschema/r/max_program_zero.result b/mysql-test/suite/perfschema/r/max_program_zero.result
index 9a2a30f2f9e..ba569a6a910 100644
--- a/mysql-test/suite/perfschema/r/max_program_zero.result
+++ b/mysql-test/suite/perfschema/r/max_program_zero.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/misc_global_status.result b/mysql-test/suite/perfschema/r/misc_global_status.result
new file mode 100644
index 00000000000..14080af8249
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/misc_global_status.result
@@ -0,0 +1,101 @@
+CREATE USER user1@localhost;
+CREATE USER user2@localhost;
+CREATE USER user3@localhost;
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+SET GLOBAL show_compatibility_56=0;
+TRUNCATE TABLE performance_schema.accounts;
+FLUSH PRIVILEGES;
+CREATE TABLE test.t_range(a int, b int, PRIMARY KEY(a));
+INSERT INTO test.t_range values (1, 1), (2,2), (3, 3), (4, 4), (5, 5);
+INSERT INTO test.t_range values (6, 6), (7,7), (8, 8), (9, 9), (10, 10);
+FLUSH STATUS;
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+a b
+3 3
+4 4
+5 5
+SELECT * from performance_schema.session_status
+WHERE VARIABLE_NAME = 'Select_range';
+VARIABLE_NAME VARIABLE_VALUE
+Select_range 1
+VARIABLE_NAME DELTA
+Select_range 1
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+a b
+3 3
+4 4
+5 5
+SELECT * from performance_schema.session_status
+WHERE VARIABLE_NAME = 'Select_range';
+VARIABLE_NAME VARIABLE_VALUE
+Select_range 1
+VARIABLE_NAME DELTA
+Select_range 2
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+a b
+3 3
+4 4
+5 5
+SELECT * from test.t_range where (a >= 4) AND (a <= 6);
+a b
+4 4
+5 5
+6 6
+SELECT * from performance_schema.session_status
+WHERE VARIABLE_NAME = 'Select_range';
+VARIABLE_NAME VARIABLE_VALUE
+Select_range 2
+VARIABLE_NAME DELTA
+Select_range 4
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+a b
+3 3
+4 4
+5 5
+SELECT * from test.t_range where (a >= 4) AND (a <= 6);
+a b
+4 4
+5 5
+6 6
+SELECT * from test.t_range where (a >= 5) AND (a <= 7);
+a b
+5 5
+6 6
+7 7
+SELECT * from performance_schema.session_status
+WHERE VARIABLE_NAME = 'Select_range';
+VARIABLE_NAME VARIABLE_VALUE
+Select_range 3
+VARIABLE_NAME DELTA
+Select_range 7
+VARIABLE_NAME DELTA
+Select_range 7
+SELECT `USER`, `HOST`, VARIABLE_NAME, VARIABLE_VALUE
+FROM performance_schema.status_by_account WHERE VARIABLE_NAME = 'Select_range'
+ AND `USER` LIKE 'user%'
+ ORDER BY `USER`;
+USER HOST VARIABLE_NAME VARIABLE_VALUE
+user1 localhost Select_range 1
+user2 localhost Select_range 2
+user3 localhost Select_range 3
+VARIABLE_NAME DELTA
+Select_range 7
+TRUNCATE TABLE performance_schema.accounts;
+VARIABLE_NAME DELTA
+Select_range 7
+VARIABLE_NAME DELTA
+Select_range 7
+TRUNCATE TABLE performance_schema.accounts;
+VARIABLE_NAME DELTA
+Select_range 7
+DROP TABLE test.t_range;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user2@localhost;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user3@localhost;
+DROP USER user1@localhost;
+DROP USER user2@localhost;
+DROP USER user3@localhost;
+SET GLOBAL show_compatibility_56=1;
+FLUSH PRIVILEGES;
diff --git a/mysql-test/suite/perfschema/r/ortho_iter.result b/mysql-test/suite/perfschema/r/ortho_iter.result
index 4bbddd0c04b..5fd557c0e0e 100644
--- a/mysql-test/suite/perfschema/r/ortho_iter.result
+++ b/mysql-test/suite/perfschema/r/ortho_iter.result
@@ -258,6 +258,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
call check_instrument("wait/synch/mutex/");
instr_name is_wait is_wait_file is_wait_socket is_stage is_statement is_memory is_transaction
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
index cd1e174ccf8..3a927d95f62 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_event.result
@@ -33,6 +33,7 @@ mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_index_usage' alrea
mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'table_lock_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'threads' already exists
+mysql_upgrade: [ERROR] 1050: Table 'processlist' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_current' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history_long' already exists
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
index 1a134c61398..b4e535f15d0 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_func.result
@@ -33,6 +33,7 @@ mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_index_usage' alrea
mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'table_lock_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'threads' already exists
+mysql_upgrade: [ERROR] 1050: Table 'processlist' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_current' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history_long' already exists
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
index 4a0f422f9f0..0b774ede5a6 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_proc.result
@@ -33,6 +33,7 @@ mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_index_usage' alrea
mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'table_lock_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'threads' already exists
+mysql_upgrade: [ERROR] 1050: Table 'processlist' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_current' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history_long' already exists
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
index 36134b1f22b..9b924b16d59 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_table.result
@@ -35,6 +35,7 @@ mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_index_usage' alrea
mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'table_lock_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'threads' already exists
+mysql_upgrade: [ERROR] 1050: Table 'processlist' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_current' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history_long' already exists
diff --git a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
index dfed1199f87..a64e226ce14 100644
--- a/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade_view.result
@@ -35,6 +35,7 @@ mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_index_usage' alrea
mysql_upgrade: [ERROR] 1050: Table 'table_io_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'table_lock_waits_summary_by_table' already exists
mysql_upgrade: [ERROR] 1050: Table 'threads' already exists
+mysql_upgrade: [ERROR] 1050: Table 'processlist' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_current' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history' already exists
mysql_upgrade: [ERROR] 1050: Table 'events_stages_history_long' already exists
diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result
index 7b8ae29e260..969169b5d68 100644
--- a/mysql-test/suite/perfschema/r/privilege_table_io.result
+++ b/mysql-test/suite/perfschema/r/privilege_table_io.result
@@ -65,6 +65,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/processlist.result b/mysql-test/suite/perfschema/r/processlist.result
new file mode 100644
index 00000000000..40c5a0f04a8
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist.result
@@ -0,0 +1,201 @@
+##
+## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+##
+## Test cases:
+## 1. Execute the new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
+## 2. Execute the legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
+## 3. Verify that performance_schema_show_processlist = ON executes the new implementation
+## 4. Verify that performance_schema_show_processlist = OFF executes the legacy code path
+##
+## Results must be manually verified.
+
+### Setup ###
+
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+create user user1@localhost, user2@localhost,
+user3@localhost, user4@localhost;
+
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+
+flush privileges;
+
+use test;
+create table test.t1 (s1 int, s2 int, s3 int, s4 int);
+
+# Switch to (con0, localhost, root, , )
+
+insert into test.t1 values(1, 1, 1, 1);
+insert into test.t1 values(2, 2, 2, 2);
+insert into test.t1 values(3, 3, 3, 3);
+insert into test.t1 values(4, 4, 4, 4);
+
+# Lock test.t1, insert/update/deletes will block
+lock tables t1 read;
+
+# Connect (con1, localhost, user1, , )
+insert into test.t1 values (0, 0, 0, 0);
+
+# Connect (con2, localhost, user2, , )
+update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999;;
+
+# Connect (con3, localhost, user3, , )
+delete from test.t1 where s1 = 3;
+
+# Connect (con4, localhost, user4, , )
+insert into test.t1 values (4, 4, 4, 4);
+
+# Connection default
+
+# Wait for queries to appear in the processlist table
+
+
+### Execute new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
+
+set @@global.performance_schema_show_processlist = on;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+
+### Execute legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
+
+set @@global.performance_schema_show_processlist = off;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
+<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
+<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
+
+
+### Verify feature code path
+
+# Enable SHOW PROCESSLIST via the Performance Schema
+set @@global.performance_schema_show_processlist = on;
+
+# Connection default, send SHOW PROCESSLIST
+SET DEBUG_SYNC='pfs_show_processlist_performance_schema SIGNAL pfs_processlist_pfs WAIT_FOR continue';
+SHOW FULL PROCESSLIST;
+
+# Connection con0
+SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_pfs';
+SET DEBUG_SYNC='now SIGNAL continue';
+
+# Connection default, reap
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> <Info>
+<Id> root <Host> test <Command> <Time> <State> <Info>
+<Id> root <Host> test <Command> <Time> <State> <Info>
+<Id> user1 <Host> test <Command> <Time> <State> <Info>
+<Id> user2 <Host> test <Command> <Time> <State> <Info>
+<Id> user3 <Host> test <Command> <Time> <State> <Info>
+<Id> user4 <Host> test <Command> <Time> <State> <Info>
+
+
+### Verify legacy code path
+
+# Enable the legacy SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = off;
+
+# Connection default, send SHOW PROCESSLIST
+SET DEBUG_SYNC='RESET';
+SET DEBUG_SYNC='pfs_show_processlist_legacy SIGNAL pfs_processlist_legacy WAIT_FOR continue';
+SHOW FULL PROCESSLIST;
+
+# Connection con0
+SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_legacy';
+SET DEBUG_SYNC='now SIGNAL continue';
+
+# Connection default, reap
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> <Info>
+<Id> root <Host> test <Command> <Time> <State> <Info>
+<Id> root <Host> test <Command> <Time> <State> <Info>
+<Id> user1 <Host> test <Command> <Time> <State> <Info>
+<Id> user2 <Host> test <Command> <Time> <State> <Info>
+<Id> user3 <Host> test <Command> <Time> <State> <Info>
+<Id> user4 <Host> test <Command> <Time> <State> <Info>
+
+
+### Clean up ###
+
+# Connection con0, unlock test.t1, disconnect
+unlock tables;
+
+# Connection con1, reap, disconnect
+# Connection con2, reap, disconnect
+# Connection con3, reap, disconnect
+# Connection con4, reap, disconnect
+
+# Connection default
+
+drop table test.t1;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/processlist_57.result b/mysql-test/suite/perfschema/r/processlist_57.result
new file mode 100644
index 00000000000..0068eb6c3cd
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_57.result
@@ -0,0 +1,345 @@
+call mtr.add_suppression("Optional native table 'performance_schema'.'processlist' has the wrong structure or is missing.");
+call mtr.add_suppression("Column count of performance_schema.processlist is wrong. Expected 8, found 2. The table is probably corrupted");
+##
+## Verify fresh 5.7 instance
+##
+SELECT @@global.performance_schema_show_processlist;
+@@global.performance_schema_show_processlist
+0
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+##
+## Simulate old 5.7 instance
+##
+DROP TABLE performance_schema.processlist;
+SHOW CREATE TABLE performance_schema.processlist;
+ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
+##
+## Server shutdown
+##
+##
+### Server restart
+##
+##
+## Verify old 5.7 instance
+##
+SELECT @@global.performance_schema_show_processlist;
+@@global.performance_schema_show_processlist
+0
+SHOW CREATE TABLE performance_schema.processlist;
+ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
+SELECT * FROM performance_schema.processlist;
+ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
+##
+## Perform broken upgrade (case 1)
+##
+CREATE TABLE performance_schema.processlist (a int, b int);
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+a b
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+a b
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+ERROR 42S22: Unknown column 'ID' in 'field list'
+##
+## Server shutdown
+##
+##
+### Server restart
+##
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `a` int(11) DEFAULT NULL,
+ `b` int(11) DEFAULT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+a b
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+a b
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+ERROR 42S22: Unknown column 'ID' in 'field list'
+##
+## Perform broken upgrade (case 2)
+##
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist (
+`ID` bigint(20) unsigned NOT NULL,
+`USER` varchar(32) DEFAULT NULL,
+`HOST` varchar(66) DEFAULT NULL,
+`DB` varchar(64) DEFAULT NULL,
+`COMMAND` varchar(16) DEFAULT NULL,
+`TIME` bigint(20) DEFAULT NULL,
+`STATE` varchar(64) DEFAULT NULL,
+`INFO` longtext
+);
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+##
+## Server shutdown
+##
+##
+### Server restart
+##
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+##
+## Perform broken upgrade (case 3)
+##
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist
+LIKE INFORMATION_SCHEMA.PROCESSLIST;
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(21) unsigned NOT NULL DEFAULT '0',
+ `USER` varchar(32) NOT NULL DEFAULT '',
+ `HOST` varchar(64) NOT NULL DEFAULT '',
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) NOT NULL DEFAULT '',
+ `TIME` int(7) NOT NULL DEFAULT '0',
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+##
+## Server shutdown
+##
+##
+### Server restart
+##
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(21) unsigned NOT NULL DEFAULT '0',
+ `USER` varchar(32) NOT NULL DEFAULT '',
+ `HOST` varchar(64) NOT NULL DEFAULT '',
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) NOT NULL DEFAULT '',
+ `TIME` int(7) NOT NULL DEFAULT '0',
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=InnoDB DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+##
+## Perform correct upgrade
+##
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist (
+`ID` bigint(20) unsigned NOT NULL,
+`USER` varchar(32) DEFAULT NULL,
+`HOST` varchar(66) DEFAULT NULL,
+`DB` varchar(64) DEFAULT NULL,
+`COMMAND` varchar(16) DEFAULT NULL,
+`TIME` bigint(20) DEFAULT NULL,
+`STATE` varchar(64) DEFAULT NULL,
+`INFO` longtext
+) ENGINE = 'PERFORMANCE_SCHEMA';
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] Sending data SHOW PROCESSLIST
+##
+## Server shutdown
+##
+##
+### Server restart
+##
+SHOW CREATE TABLE performance_schema.processlist;
+Table Create Table
+processlist CREATE TABLE `processlist` (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'ON';
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+2 root [HOST:PORT] test Query [TIME] Sending data SHOW PROCESSLIST
+SET GLOBAL performance_schema_show_processlist = 'OFF';
diff --git a/mysql-test/suite/perfschema/r/processlist_acl.result b/mysql-test/suite/perfschema/r/processlist_acl.result
new file mode 100644
index 00000000000..2e60b403484
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_acl.result
@@ -0,0 +1,255 @@
+##
+## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+##
+## Verify handling of the SELECT and PROCESS privileges.
+##
+## Test cases:
+## - Execute SHOW PROCESSLIST (new and legacy) with all privileges
+## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with all privileges
+## - Execute SHOW PROCESSLIST (new and legacy) with no privileges
+## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with no privileges
+##
+## Results must be manually verified.
+
+### Setup ###
+
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+# Control users
+create user user_00@localhost, user_01@localhost;
+grant ALL on *.* to user_00@localhost;
+grant ALL on *.* to user_01@localhost;
+
+# Test users
+create user user_all@localhost, user_none@localhost;
+grant ALL on *.* to user_all@localhost;
+grant USAGE on *.* to user_none@localhost;
+
+flush privileges;
+
+show grants for user_all@localhost;
+Grants for user_all@localhost
+GRANT ALL PRIVILEGES ON *.* TO 'user_all'@'localhost'
+
+show grants for user_none@localhost;
+Grants for user_none@localhost
+GRANT USAGE ON *.* TO 'user_none'@'localhost'
+
+use test;
+create table test.t1 (s1 int, s2 int, s3 int, s4 int);
+
+# Connect (con_00, localhost, user_00, , )
+# Connect (con_01, localhost, user_01, , )
+
+insert into test.t1 values(1, 1, 1, 1);
+insert into test.t1 values(2, 2, 2, 2);
+insert into test.t1 values(3, 3, 3, 3);
+insert into test.t1 values(4, 4, 4, 4);
+
+# Lock test.t1, insert/update/deletes will block
+lock tables t1 read;
+
+# Establish 2 connections for user_all
+# Connect (con_all_1, localhost, user_all, , )
+# Connect (con_all_2, localhost, user_all, , )
+insert into test.t1 values (0, 0, 0, 0);
+
+# Establish 4 connections for user_none
+# Connect (con_none_1, localhost, user_none, , )
+# Connect (con_none_2, localhost, user_none, , )
+# Connect (con_none_3, localhost, user_none, , )
+# Connect (con_none_4, localhost, user_none, , )
+update test.t1 set s1 = s1 + 1, s2 = s2 + 2;;
+
+# Connection con_all_1
+
+# Wait for queries to appear in the processlist table
+
+### Execute SHOW PROCESSLIST with all privileges
+### Expect all users
+
+# New SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = on;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Legacy SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = off;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user_00 <Host> test <Command> <Time> <State> NULL
+<Id> user_01 <Host> test <Command> <Time> <State> NULL
+<Id> user_all <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+
+### Execute SHOW PROCESSLIST with no SELECT and no PROCESS privileges
+### Expect processes only from user_none
+
+# New SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = on;
+
+# Connection con_none_1
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> user_none <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> user_none <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Confirm that only processes from user_none are visible
+
+select count(*) as "Expect 0" from performance_schema.processlist
+where user not in ('user_none');
+Expect 0
+0
+
+# Legacy SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = off;
+
+# Connection con_none_1
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> user_none <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> user_none <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test <Command> <Time> <State> NULL
+<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
+
+
+### Clean up ###
+
+# Disconnect con_00
+# Connection con_01, unlock test.t1, disconnect
+unlock tables;
+# Disconnect con_all_1
+# Reap con_all_2, disconnect
+# Disconnect con_none_1
+# Disconnect con_none_2
+# Disconnect con_none_3
+# Reap con_none_4, disconnect
+
+# Connection default
+
+drop table test.t1;
+drop user user_00@localhost;
+drop user user_01@localhost;
+drop user user_all@localhost;
+drop user user_none@localhost;
+
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/processlist_anonymous.result b/mysql-test/suite/perfschema/r/processlist_anonymous.result
new file mode 100644
index 00000000000..a27a6df2606
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_anonymous.result
@@ -0,0 +1,66 @@
+##
+## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+## Verify behavior for anonymous users and PROCESS_ACL.
+##
+SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
+SET @@global.performance_schema_show_processlist = OFF;
+SHOW GRANTS;
+Grants for @localhost
+GRANT USAGE ON *.* TO ''@'localhost'
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SHOW PROCESSLIST;
+ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
+SET @@global.performance_schema_show_processlist = ON;
+SHOW GRANTS;
+Grants for @localhost
+GRANT USAGE ON *.* TO ''@'localhost'
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+ID USER HOST DB COMMAND TIME STATE INFO
+SELECT * FROM performance_schema.processlist;
+ID USER HOST DB COMMAND TIME STATE INFO
+SHOW PROCESSLIST;
+ERROR 42000: Access denied; you need (at least one of) the PROCESS privilege(s) for this operation
+GRANT PROCESS ON *.* TO ''@'localhost';
+SET @@global.performance_schema_show_processlist = OFF;
+SHOW GRANTS;
+Grants for @localhost
+GRANT PROCESS ON *.* TO ''@'localhost'
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+count(*) >= 2
+1
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+count(*) >= 2
+1
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
+statement/sql/show_processlist SHOW PROCESSLIST 0
+TRUNCATE TABLE performance_schema.events_statements_history;
+set @@global.performance_schema_show_processlist = ON;
+SHOW GRANTS;
+Grants for @localhost
+GRANT PROCESS ON *.* TO ''@'localhost'
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+count(*) >= 2
+1
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+count(*) >= 2
+1
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT ROWS_SENT >= 2
+statement/sql/show_processlist SHOW PROCESSLIST 1
+SET @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/processlist_no_pfs.result b/mysql-test/suite/perfschema/r/processlist_no_pfs.result
new file mode 100644
index 00000000000..16e5a13b52a
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_no_pfs.result
@@ -0,0 +1,181 @@
+show databases;
+Database
+information_schema
+mtr
+mysql
+performance_schema
+sys
+test
+select count(*) from performance_schema.performance_timers;
+count(*)
+0
+select count(*) from performance_schema.setup_consumers;
+count(*)
+0
+select count(*) > 4 from performance_schema.setup_instruments;
+count(*) > 4
+0
+select count(*) from performance_schema.setup_timers;
+count(*)
+0
+Warnings:
+Warning 1681 'performance_schema.setup_timers' is deprecated and will be removed in a future release.
+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_digest;
+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_transactions_current;
+select * from performance_schema.events_transactions_history;
+select * from performance_schema.events_transactions_history_long;
+select * from performance_schema.events_transactions_summary_by_account_by_event_name;
+select * from performance_schema.events_transactions_summary_by_host_by_event_name;
+select * from performance_schema.events_transactions_summary_by_thread_by_event_name;
+select * from performance_schema.events_transactions_summary_by_user_by_event_name;
+select * from performance_schema.events_transactions_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.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_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.hosts;
+select * from performance_schema.memory_summary_by_account_by_event_name;
+select * from performance_schema.memory_summary_by_host_by_event_name;
+select * from performance_schema.memory_summary_by_thread_by_event_name;
+select * from performance_schema.memory_summary_by_user_by_event_name;
+select * from performance_schema.memory_summary_global_by_event_name;
+select * from performance_schema.metadata_locks;
+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.session_account_connect_attrs;
+select * from performance_schema.session_connect_attrs;
+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.socket_instances;
+select * from performance_schema.socket_summary_by_instance;
+select * from performance_schema.socket_summary_by_event_name;
+select * from performance_schema.table_handles;
+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;
+select * from performance_schema.replication_connection_configuration;
+select * from performance_schema.replication_connection_status;
+select * from performance_schema.replication_applier_configuration;
+select * from performance_schema.replication_applier_status;
+select * from performance_schema.replication_applier_status_by_coordinator;
+select * from performance_schema.replication_applier_status_by_worker;
+select * from performance_schema.global_status;
+select * from performance_schema.status_by_thread;
+select * from performance_schema.status_by_user;
+select * from performance_schema.status_by_host;
+select * from performance_schema.status_by_account;
+select * from performance_schema.session_status;
+select * from performance_schema.global_variables;
+select * from performance_schema.variables_by_thread;
+select * from performance_schema.session_variables;
+show global variables like "performance_schema%";
+Variable_name Value
+performance_schema OFF
+performance_schema_accounts_size 0
+performance_schema_digests_size 0
+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_transactions_history_long_size 0
+performance_schema_events_transactions_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_digest_length 0
+performance_schema_max_file_classes 0
+performance_schema_max_file_handles 0
+performance_schema_max_file_instances 0
+performance_schema_max_index_stat 0
+performance_schema_max_memory_classes 0
+performance_schema_max_metadata_locks 0
+performance_schema_max_mutex_classes 0
+performance_schema_max_mutex_instances 0
+performance_schema_max_prepared_statements_instances 0
+performance_schema_max_program_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_sql_text_length 0
+performance_schema_max_stage_classes 0
+performance_schema_max_statement_classes 0
+performance_schema_max_statement_stack 0
+performance_schema_max_table_handles 0
+performance_schema_max_table_instances 0
+performance_schema_max_table_lock_stat 0
+performance_schema_max_thread_classes 0
+performance_schema_max_thread_instances 0
+performance_schema_session_connect_attrs_size 0
+performance_schema_setup_actors_size 0
+performance_schema_setup_objects_size 0
+performance_schema_show_processlist ON
+performance_schema_users_size 0
+show engine PERFORMANCE_SCHEMA status;
+show global status like "performance_schema%";
+
+select * from information_schema.engines
+where engine = "PERFORMANCE_SCHEMA";
+ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
+PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
+
+# If the Performance Schema is disabled, then expect
+# performance-schema-show-processlist = OFF
+# regardless of its initial setting
+
+select @@global.performance_schema_show_processlist;
+@@global.performance_schema_show_processlist
+1
+
+# If the Performance Schema is disabled, then setting
+# performance-schema-show-processlist = ON
+# succeeds, SHOW PROCESSLIST returns no data.
+
+set @@global.performance_schema_show_processlist = ON;
+SHOW PROCESSLIST;
+Id User Host db Command Time State Info
+
+show global variables like "performance_schema";
+Variable_name Value
+performance_schema OFF
diff --git a/mysql-test/suite/perfschema/r/processlist_port.result b/mysql-test/suite/perfschema/r/processlist_port.result
new file mode 100644
index 00000000000..c11ff41f112
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_port.result
@@ -0,0 +1,145 @@
+##
+## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+##
+## Verify the Host field (hostname:port) against the legacy implementation.
+##
+
+### Setup ###
+
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+# Control user
+create user user0@localhost;
+grant ALL on *.* to user0@localhost;
+# Test users
+
+create user user1@localhost, user2@localhost,
+user3@localhost, user4@localhost;
+
+grant USAGE on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+
+flush privileges;
+
+show grants for user1@localhost;
+Grants for user1@localhost
+GRANT USAGE ON *.* TO 'user1'@'localhost'
+
+# Connect (con_user0, 127.0.0.1, user0, , , MASTER_MYPORT, )
+
+select connection_id() into @con_user0_id;
+# Connect (con_user1, 127.0.0.1, user1, , , MASTER_MYPORT, )
+# Connect (con_user2, 127.0.0.1, user2, , , MASTER_MYPORT, )
+# Connect (con_user3, 127.0.0.1, user3, , , MASTER_MYPORT, )
+# Connect (con_user4, 127.0.0.1, user4, , , MASTER_MYPORT, )
+# Connection user0
+
+### Compare the SHOW PROCESSLIST Host column between the new and old implementations
+
+## New SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = on;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Connection user1
+# Get Host:Port, new
+
+## Legacy SHOW PROCESSLIST
+set @@global.performance_schema_show_processlist = off;
+
+SHOW FULL PROCESSLIST;
+Id User Host db Command Time State Info
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Performance Schema processlist table
+
+select * from performance_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Information Schema processlist table
+
+select * from information_schema.processlist order by user, id;
+ID USER HOST DB COMMAND TIME STATE INFO
+<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
+<Id> root <Host> test <Command> <Time> <State> NULL
+<Id> user0 <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
+<Id> user1 <Host> test <Command> <Time> <State> NULL
+<Id> user2 <Host> test <Command> <Time> <State> NULL
+<Id> user3 <Host> test <Command> <Time> <State> NULL
+<Id> user4 <Host> test <Command> <Time> <State> NULL
+
+# Connection user1
+# Get Host:Port, legacy
+
+***SUCCESS*** The SHOW PROCESSLIST Host fields match
+
+### Compare the processlist Host column between Performance Schema and the Information Schema
+
+# Connection con_user0
+
+***SUCCESS*** The processlist Host fields match between the Performance Schema and the Information Schema
+
+
+### Clean up ###
+
+# Disconnect con_user0
+# Disconnect con_user1
+# Disconnect con_user2
+# Disconnect con_user3
+# Disconnect con_user4
+# Connection default
+
+drop user user0@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/r/processlist_reg_user.result b/mysql-test/suite/perfschema/r/processlist_reg_user.result
new file mode 100644
index 00000000000..72e879e4c09
--- /dev/null
+++ b/mysql-test/suite/perfschema/r/processlist_reg_user.result
@@ -0,0 +1,89 @@
+##
+## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+## Verify behavior for regular users and PROCESS_ACL.
+##
+SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
+SET @@global.performance_schema_show_processlist = OFF;
+CREATE USER 'regular'@'localhost';
+SHOW GRANTS;
+Grants for regular@localhost
+GRANT USAGE ON *.* TO 'regular'@'localhost'
+SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
+USER INFO
+regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+SELECT USER, INFO FROM performance_schema.processlist;
+USER INFO
+regular SELECT USER, INFO FROM performance_schema.processlist
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
+statement/sql/show_processlist SHOW PROCESSLIST 0
+TRUNCATE TABLE performance_schema.events_statements_history;
+SET @@global.performance_schema_show_processlist = ON;
+SHOW GRANTS;
+Grants for regular@localhost
+GRANT USAGE ON *.* TO 'regular'@'localhost'
+SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
+USER INFO
+regular SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST
+SELECT USER, INFO FROM performance_schema.processlist;
+USER INFO
+regular SELECT USER, INFO FROM performance_schema.processlist
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT ROWS_SENT
+statement/sql/show_processlist SHOW PROCESSLIST 1
+TRUNCATE TABLE performance_schema.events_statements_history;
+GRANT PROCESS ON *.* TO 'regular'@'localhost';
+SET @@global.performance_schema_show_processlist = OFF;
+SHOW GRANTS;
+Grants for regular@localhost
+GRANT PROCESS ON *.* TO 'regular'@'localhost'
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+count(*) >= 2
+1
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+count(*) >= 2
+1
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT BROKEN_ROWS_SENT
+statement/sql/show_processlist SHOW PROCESSLIST 0
+TRUNCATE TABLE performance_schema.events_statements_history;
+SET @@global.performance_schema_show_processlist = ON;
+SHOW GRANTS;
+Grants for regular@localhost
+GRANT PROCESS ON *.* TO 'regular'@'localhost'
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+count(*) >= 2
+1
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+count(*) >= 2
+1
+SHOW PROCESSLIST;
+SELECT "Previous statement is now completed." as status;
+status
+Previous statement is now completed.
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
+FROM performance_schema.events_statements_history
+WHERE SQL_TEXT = "SHOW PROCESSLIST";
+EVENT_NAME SQL_TEXT ROWS_SENT >= 2
+statement/sql/show_processlist SHOW PROCESSLIST 1
+TRUNCATE TABLE performance_schema.events_statements_history;
+SET @@global.performance_schema_show_processlist = @save_processlist;
+DROP USER 'regular'@'localhost';
diff --git a/mysql-test/suite/perfschema/r/schema.result b/mysql-test/suite/perfschema/r/schema.result
index d09c35779cf..11676811ca9 100644
--- a/mysql-test/suite/perfschema/r/schema.result
+++ b/mysql-test/suite/perfschema/r/schema.result
@@ -61,6 +61,7 @@ mutex_instances
objects_summary_global_by_type
performance_timers
prepared_statements_instances
+processlist
replication_applier_configuration
replication_applier_status
replication_applier_status_by_coordinator
diff --git a/mysql-test/suite/perfschema/r/show_sanity.result b/mysql-test/suite/perfschema/r/show_sanity.result
index dc326dd7f64..6fb33ea4d17 100644
--- a/mysql-test/suite/perfschema/r/show_sanity.result
+++ b/mysql-test/suite/perfschema/r/show_sanity.result
@@ -414,6 +414,7 @@ SHOW_MODE SOURCE VARIABLE_NAME
5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED
5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS
5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG
+5.6 I_S.SESSION_VARIABLES PERFORMANCE_SCHEMA_SHOW_PROCESSLIST
5.6 I_S.SESSION_VARIABLES REPLICATION_OPTIMIZE_FOR_STATIC_PLUGIN_CONFIG
5.6 I_S.SESSION_VARIABLES REPLICATION_SENDER_OBSERVE_COMMIT_ONLY
5.6 I_S.SESSION_VARIABLES TLS_VERSION
@@ -444,6 +445,7 @@ SHOW_MODE SOURCE VARIABLE_NAME
5.6 I_S.SESSION_VARIABLES INNODB_STATS_INCLUDE_DELETE_MARKED
5.6 I_S.SESSION_VARIABLES KEYRING_OPERATIONS
5.6 I_S.SESSION_VARIABLES LOG_STATEMENTS_UNSAFE_FOR_BINLOG
+5.6 I_S.SESSION_VARIABLES PERFORMANCE_SCHEMA_SHOW_PROCESSLIST
5.6 I_S.SESSION_VARIABLES REPLICATION_OPTIMIZE_FOR_STATIC_PLUGIN_CONFIG
5.6 I_S.SESSION_VARIABLES REPLICATION_SENDER_OBSERVE_COMMIT_ONLY
5.6 I_S.SESSION_VARIABLES TLS_VERSION
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_idle.result b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
index 1204e4b57a9..fd49ee31e08 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_idle.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_idle.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_stages.result b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
index 3aa4a6b9573..0c581c6a11b 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_stages.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_stages.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_statements.result b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
index a3f20107af5..ff07ecc36a3 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_statements.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_statements.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
index d77a12f83f2..a1e9b773705 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_transactions.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_disable_waits.result b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
index b59e7b08023..85d0372b31c 100644
--- a/mysql-test/suite/perfschema/r/start_server_disable_waits.result
+++ b/mysql-test/suite/perfschema/r/start_server_disable_waits.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_innodb.result b/mysql-test/suite/perfschema/r/start_server_innodb.result
index 7caf2863dfc..d6519ab8972 100644
--- a/mysql-test/suite/perfschema/r/start_server_innodb.result
+++ b/mysql-test/suite/perfschema/r/start_server_innodb.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_low_index.result b/mysql-test/suite/perfschema/r/start_server_low_index.result
index 87ac365e02c..cea26f48fc1 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_index.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
index 32ff64949a6..c9bd36da386 100644
--- a/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_low_table_lock.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_account.result b/mysql-test/suite/perfschema/r/start_server_no_account.result
index 7986377ec34..a5087f664d5 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_account.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_account.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 d97efeaca69..eb28240939e 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 e3b5332b302..5688da44327 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 152452cc373..a8025c771c8 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 b3a177e5f7f..441defa573b 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_host.result b/mysql-test/suite/perfschema/r/start_server_no_host.result
index 434208b573a..bcd24b5ed16 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_host.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_host.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_index.result b/mysql-test/suite/perfschema/r/start_server_no_index.result
index 31bfffc1ce7..888a0da0927 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_index.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_index.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_mdl.result b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
index 6da730a39ea..ce411ad1ee4 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_mdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_mdl.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
index 06f337c1dff..a540554bed4 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_memory_class.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 b966284b954..c22f50a7cdf 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 ba7f80ec857..0410edddae1 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
index bd5643707b1..27051ff97eb 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_prepared_stmts_instances.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 17b55f88f04..06f74f7651f 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 b8aebe52838..8a0e9bef97d 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index c46c1b61150..0b1042472b2 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_actors.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 206ba243a02..c7589b6ef44 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_setup_objects.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 0
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 1a7de31d12c..25e8d28a2e5 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_class.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 0ee80fbdc34..a3f7ea4f6fa 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_socket_inst.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 83218d0cd0c..c05b6a717e4 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stage_class.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 7605a6742ea..a0f4b066c6f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_stages_history.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 0a657b0207d..881bd12d789 100644
--- 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 8340c9a065e..bf4728f60c9 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statement_class.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 41ec7acac67..0c99faaa601 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_statements_history.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index e730dd5f917..ee20ed74231 100644
--- 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index e2c97655595..d5789acdfc6 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_hdl.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index a591154e1a5..46b0b9941b3 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_inst.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
index ca0b4a864a9..81acb8ad493 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_table_lock.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 bd2718de70d..863680baa37 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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 6eefbf7e885..9ba32bb001a 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances 0
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
index 69e26208045..2e0f61e6a96 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
index c5f2aa23e76..cad715ce16a 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_transactions_history_long.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_no_user.result b/mysql-test/suite/perfschema/r/start_server_no_user.result
index 6d226ad8d5d..aba6c1f1a4b 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_user.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_user.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 0
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 801b8990bdd..ee82e625554 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_waits_history.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index 9a2b667d1ef..77e3a9cea41 100644
--- 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
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_nothing.result b/mysql-test/suite/perfschema/r/start_server_nothing.result
index 0c708b77381..12d59e757e6 100644
--- a/mysql-test/suite/perfschema/r/start_server_nothing.result
+++ b/mysql-test/suite/perfschema/r/start_server_nothing.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances 0
performance_schema_session_connect_attrs_size 0
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 0
+performance_schema_show_processlist OFF
performance_schema_users_size 0
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
@@ -196,6 +197,7 @@ performance_schema_max_thread_instances 0
performance_schema_session_connect_attrs_size 0
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 0
+performance_schema_show_processlist OFF
performance_schema_users_size 0
select * from performance_schema.setup_instruments
order by name;
diff --git a/mysql-test/suite/perfschema/r/start_server_off.result b/mysql-test/suite/perfschema/r/start_server_off.result
index 34ef1183e19..81d9b209615 100644
--- a/mysql-test/suite/perfschema/r/start_server_off.result
+++ b/mysql-test/suite/perfschema/r/start_server_off.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances 0
performance_schema_session_connect_attrs_size 0
performance_schema_setup_actors_size 0
performance_schema_setup_objects_size 0
+performance_schema_show_processlist OFF
performance_schema_users_size 0
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/start_server_on.result b/mysql-test/suite/perfschema/r/start_server_on.result
index 7caf2863dfc..d6519ab8972 100644
--- a/mysql-test/suite/perfschema/r/start_server_on.result
+++ b/mysql-test/suite/perfschema/r/start_server_on.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
diff --git a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
index 81b6bd69e54..071ac042e5a 100644
--- a/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
+++ b/mysql-test/suite/perfschema/r/statement_program_lost_inst.result
@@ -150,6 +150,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show engine PERFORMANCE_SCHEMA status;
show global status like "performance_schema%";
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
index a53604e33fd..012692507d2 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_2t.result
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 9db2bab0e40..0b7284b0b74 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_2u_3t.result
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 1e053c47ae5..698b8e8ce6d 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_2t.result
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 5a9bc84ec07..e49936c366a 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_global_4u_3t.result
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 27a191f1e3c..0a7106d097d 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result
@@ -95,6 +95,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 0b5fd259df2..3df2763c5e5 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result
@@ -94,6 +94,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 59c32ba7fe1..c50dfcdcc2b 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result
@@ -95,6 +95,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 50597b5575c..78b75d38c8f 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result
@@ -94,6 +94,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/table_aggregate_off.result b/mysql-test/suite/perfschema/r/table_aggregate_off.result
index a7995e640ac..8069d8209b8 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_off.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_off.result
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 6d85c5a92ca..5fbc5826238 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_2t.result
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index ea21763a371..a36730d96d4 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_2u_3t.result
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 77c11f86d98..91cbf91c521 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_2t.result
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index a3de3c85f41..d2fe34adc46 100644
--- a/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
+++ b/mysql-test/suite/perfschema/r/table_aggregate_thread_4u_3t.result
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 5cf3b33cfac..accfd1b3dba 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 16be22d8cd2..bf9d9b7e33b 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 55c1e46b026..5a7045ea4f4 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index d09a544105e..fc1dcbeab48 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 4cdfc181099..659922feadc 100644
--- 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
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index e2ed0f3c5fb..eccbedcc5b6 100644
--- 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
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index c818ba89bb6..500e2e1df1d 100644
--- 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
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index ca1b6d37e67..e62fdeb2412 100644
--- 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
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 679ac7a4c07..d33110ad9ea 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 26c3070d242..380a98a4328 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 96ef0a6a6a6..2f9cb5fe1dd 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index a0beb393a74..4b1d7d0d959 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 5d97d0fa177..b5667a4875e 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index f013a396726..7e8d9f37a2c 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index bed4a2f99a5..c50fb6d14f5 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 9d3cc74beb4..51717ecc4c2 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 5cbe7735ebf..aeeb8b98224 100644
--- 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
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index c4a5e08bc74..0e880adc9ad 100644
--- 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
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 8785c2399e7..1405afd3219 100644
--- 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
@@ -97,6 +97,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index b9a8343f868..b24387c3d58 100644
--- 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
@@ -96,6 +96,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 9666c17c1e4..0048340ee6e 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index a31f8f41b96..00ee54e2a05 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index dc440c2b768..2b18c4b19d9 100644
--- 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
@@ -99,6 +99,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
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
index 9aed1d06cb9..7899cda3407 100644
--- 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
@@ -98,6 +98,7 @@ performance_schema_max_thread_instances -1
performance_schema_session_connect_attrs_size 2048
performance_schema_setup_actors_size 100
performance_schema_setup_objects_size 100
+performance_schema_show_processlist OFF
performance_schema_users_size 100
show global status like "performance_schema%";
Variable_name Value
diff --git a/mysql-test/suite/perfschema/r/table_schema.result b/mysql-test/suite/perfschema/r/table_schema.result
index b980a8cd685..e4373660764 100644
--- a/mysql-test/suite/perfschema/r/table_schema.result
+++ b/mysql-test/suite/perfschema/r/table_schema.result
@@ -855,6 +855,14 @@ def performance_schema prepared_statements_instances SUM_SORT_ROWS 32 NULL NO bi
def performance_schema prepared_statements_instances SUM_SORT_SCAN 33 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema prepared_statements_instances SUM_NO_INDEX_USED 34 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def performance_schema prepared_statements_instances SUM_NO_GOOD_INDEX_USED 35 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema processlist ID 1 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
+def performance_schema processlist USER 2 NULL YES varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references
+def performance_schema processlist HOST 3 NULL YES varchar 66 198 NULL NULL NULL utf8 utf8_general_ci varchar(66) select,insert,update,references
+def performance_schema processlist DB 4 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema processlist COMMAND 5 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references
+def performance_schema processlist TIME 6 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references
+def performance_schema processlist STATE 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references
+def performance_schema processlist INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL NULL utf8 utf8_general_ci longtext select,insert,update,references
def performance_schema replication_applier_configuration CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
def performance_schema replication_applier_configuration DESIRED_DELAY 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
def performance_schema replication_applier_status CHANNEL_NAME 1 NULL NO char 64 192 NULL NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references
diff --git a/mysql-test/suite/perfschema/r/threads_mysql.result b/mysql-test/suite/perfschema/r/threads_mysql.result
index b96339b7de0..db78c2af531 100644
--- a/mysql-test/suite/perfschema/r/threads_mysql.result
+++ b/mysql-test/suite/perfschema/r/threads_mysql.result
@@ -3,7 +3,7 @@ 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
+`role`, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/sql%'
ORDER BY name;
@@ -37,7 +37,7 @@ processlist_info SELECT name, type, processlist_user, processlist_host, processl
processlist_command, processlist_info,
IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id')
AS unified_parent_thread_id,
-role, instrumented
+`role`, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/sql%'
ORDER BY name
@@ -72,17 +72,17 @@ 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
+`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_user event_scheduler
processlist_host localhost
processlist_db NULL
-processlist_command Sleep
+processlist_command Daemon
processlist_info NULL
unified_parent_thread_id unified parent_thread_id
role NULL
@@ -100,17 +100,17 @@ 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
+`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_user event_scheduler
processlist_host localhost
processlist_db NULL
-processlist_command Sleep
+processlist_command Connect
processlist_info SELECT SLEEP(3)
unified_parent_thread_id unified parent_thread_id
role NULL
diff --git a/mysql-test/suite/perfschema/t/ddl_processlist.test b/mysql-test/suite/perfschema/t/ddl_processlist.test
new file mode 100644
index 00000000000..d960bf2df89
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/ddl_processlist.test
@@ -0,0 +1,32 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+
+select @@global.performance_schema_show_processlist into @save_processlist;
+set @@global.performance_schema_show_processlist = 'on';
+
+--error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.processlist
+ add column foo integer;
+
+--error ER_WRONG_PERFSCHEMA_USAGE
+truncate table performance_schema.processlist;
+
+--error ER_DBACCESS_DENIED_ERROR
+alter table performance_schema.processlist
+ add index test_index(info);
+
+--error ER_DBACCESS_DENIED_ERROR
+create unique index test_index
+ on performance_schema.processlist(host);
+
+-- error ER_DBACCESS_DENIED_ERROR
+drop index `PRIMARY`
+ on performance_schema.processlist;
+
+CREATE TABLE test.create_select
+ AS SELECT * from performance_schema.processlist;
+
+DROP TABLE test.create_select;
+
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/t/dml_processlist.test b/mysql-test/suite/perfschema/t/dml_processlist.test
new file mode 100644
index 00000000000..c075db3eabd
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/dml_processlist.test
@@ -0,0 +1,39 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+
+select @@global.performance_schema_show_processlist into @save_processlist;
+set @@global.performance_schema_show_processlist = 'on';
+
+--disable_result_log
+select * from performance_schema.processlist
+ where user like 'event_scheduler';
+
+select * from performance_schema.processlist
+ where user = 'FOO';
+--enable_result_log
+
+--error ER_TABLEACCESS_DENIED_ERROR
+insert into performance_schema.processlist
+ values (12, 'foo', 'bar', 'test', null, 1000, 'state', 'info');
+
+--error ER_TABLEACCESS_DENIED_ERROR
+update performance_schema.processlist
+ set id=12, user='foo';
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.processlist
+ where id <> 99;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+delete from performance_schema.processlist;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.processlist READ;
+UNLOCK TABLES;
+
+--error ER_TABLEACCESS_DENIED_ERROR
+LOCK TABLES performance_schema.processlist WRITE;
+UNLOCK TABLES;
+
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/t/misc_global_status-master.opt b/mysql-test/suite/perfschema/t/misc_global_status-master.opt
new file mode 100644
index 00000000000..26b61f08d4e
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/misc_global_status-master.opt
@@ -0,0 +1 @@
+--loose-performance_schema_hosts_size=0
diff --git a/mysql-test/suite/perfschema/t/misc_global_status.test b/mysql-test/suite/perfschema/t/misc_global_status.test
new file mode 100644
index 00000000000..2157096aaa6
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/misc_global_status.test
@@ -0,0 +1,134 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+--source include/have_perfschema.inc
+--source include/have_query_cache_disabled.inc
+
+CREATE USER user1@localhost;
+CREATE USER user2@localhost;
+CREATE USER user3@localhost;
+
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+
+# To aggregate to accounts
+SET GLOBAL show_compatibility_56=0;
+
+TRUNCATE TABLE performance_schema.accounts;
+
+FLUSH PRIVILEGES;
+
+CREATE TABLE test.t_range(a int, b int, PRIMARY KEY(a));
+
+INSERT INTO test.t_range values (1, 1), (2,2), (3, 3), (4, 4), (5, 5);
+INSERT INTO test.t_range values (6, 6), (7,7), (8, 8), (9, 9), (10, 10);
+
+FLUSH STATUS;
+
+let $initial= `SELECT VARIABLE_VALUE FROM performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range'`;
+
+# Causes Select_range to increment (+1)
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+
+SELECT * from performance_schema.session_status
+ WHERE VARIABLE_NAME = 'Select_range';
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+connect(con1, localhost, user1,,);
+# Causes Select_range to increment (+1)
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+
+SELECT * from performance_schema.session_status
+ WHERE VARIABLE_NAME = 'Select_range';
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+connect(con2, localhost, user2,,);
+# Causes Select_range to increment (+2)
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+SELECT * from test.t_range where (a >= 4) AND (a <= 6);
+
+SELECT * from performance_schema.session_status
+ WHERE VARIABLE_NAME = 'Select_range';
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+connect(con3, localhost, user3,,);
+# Causes Select_range to increment (+3)
+SELECT * from test.t_range where (a >= 3) AND (a <= 5);
+SELECT * from test.t_range where (a >= 4) AND (a <= 6);
+SELECT * from test.t_range where (a >= 5) AND (a <= 7);
+
+SELECT * from performance_schema.session_status
+ WHERE VARIABLE_NAME = 'Select_range';
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+--connection default
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+SELECT `USER`, `HOST`, VARIABLE_NAME, VARIABLE_VALUE
+ FROM performance_schema.status_by_account WHERE VARIABLE_NAME = 'Select_range'
+ AND `USER` LIKE 'user%'
+ ORDER BY `USER`;
+
+--disconnect con1
+--disconnect con2
+
+# Wait till all disconnects are completed
+let $count_sessions= 2;
+--source include/wait_until_count_sessions.inc
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+TRUNCATE TABLE performance_schema.accounts;
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+--disconnect con3
+
+# Wait till all disconnects are completed
+let $count_sessions= 1;
+--source include/wait_until_count_sessions.inc
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+# Make sure TRUNCATE on accounts does not add to global_status
+TRUNCATE TABLE performance_schema.accounts;
+
+--disable_query_log
+eval SELECT VARIABLE_NAME, (VARIABLE_VALUE - $initial) AS DELTA from performance_schema.global_status WHERE VARIABLE_NAME = 'Select_range';
+--enable_query_log
+
+DROP TABLE test.t_range;
+
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user2@localhost;
+REVOKE ALL PRIVILEGES, GRANT OPTION FROM user3@localhost;
+DROP USER user1@localhost;
+DROP USER user2@localhost;
+DROP USER user3@localhost;
+
+SET GLOBAL show_compatibility_56=1;
+
+FLUSH PRIVILEGES;
+
diff --git a/mysql-test/suite/perfschema/t/processlist-master.opt b/mysql-test/suite/perfschema/t/processlist-master.opt
new file mode 100644
index 00000000000..f93413a61e5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist-master.opt
@@ -0,0 +1 @@
+--event-scheduler
diff --git a/mysql-test/suite/perfschema/t/processlist.test b/mysql-test/suite/perfschema/t/processlist.test
new file mode 100644
index 00000000000..fed22153931
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist.test
@@ -0,0 +1,197 @@
+--echo ##
+--echo ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+--echo ##
+--echo ## Test cases:
+--echo ## 1. Execute the new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
+--echo ## 2. Execute the legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
+--echo ## 3. Verify that performance_schema_show_processlist = ON executes the new implementation
+--echo ## 4. Verify that performance_schema_show_processlist = OFF executes the legacy code path
+--echo ##
+--echo ## Results must be manually verified.
+
+--source include/no_protocol.inc
+--source include/have_debug.inc
+--source include/have_debug_sync.inc
+--source include/not_embedded.inc
+
+--echo
+--echo ### Setup ###
+--echo
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+--echo
+create user user1@localhost, user2@localhost,
+ user3@localhost, user4@localhost;
+--echo
+grant ALL on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+--echo
+flush privileges;
+
+--echo
+use test;
+create table test.t1 (s1 int, s2 int, s3 int, s4 int);
+
+--echo
+--echo # Switch to (con0, localhost, root, , )
+connect (con0, localhost, root, , );
+--echo
+insert into test.t1 values(1, 1, 1, 1);
+insert into test.t1 values(2, 2, 2, 2);
+insert into test.t1 values(3, 3, 3, 3);
+insert into test.t1 values(4, 4, 4, 4);
+
+--echo
+--echo # Lock test.t1, insert/update/deletes will block
+lock tables t1 read;
+
+--echo
+--echo # Connect (con1, localhost, user1, , )
+connect (con1, localhost, user1, , );
+--send insert into test.t1 values (0, 0, 0, 0)
+
+--echo
+--echo # Connect (con2, localhost, user2, , )
+connect (con2, localhost, user2, , );
+# Create a query > 100 characters
+--send update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999;
+--echo
+--echo # Connect (con3, localhost, user3, , )
+connect (con3, localhost, user3, , );
+--send delete from test.t1 where s1 = 3
+
+--echo
+--echo # Connect (con4, localhost, user4, , )
+connect (con4, localhost, user4, , );
+--send insert into test.t1 values (4, 4, 4, 4)
+
+--echo
+--echo # Connection default
+--connection default
+
+--echo
+--echo # Wait for queries to appear in the processlist table
+let $wait_condition = select count(*) >= 4 from information_schema.processlist
+ where state like '%metadata%';
+--source include/wait_condition.inc
+
+--echo
+--echo
+--echo ### Execute new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
+--echo
+let $pfs_spl = on;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo
+--echo ### Execute legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
+--echo
+let $pfs_spl = off;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo
+--echo ### Verify feature code path
+--echo
+--echo # Enable SHOW PROCESSLIST via the Performance Schema
+let $pfs_spl = on;
+--source ../include/processlist_set.inc
+
+--echo
+--echo # Connection default, send SHOW PROCESSLIST
+--connection default
+SET DEBUG_SYNC='pfs_show_processlist_performance_schema SIGNAL pfs_processlist_pfs WAIT_FOR continue';
+--send SHOW FULL PROCESSLIST
+
+--echo
+--echo # Connection con0
+--connection con0
+SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_pfs';
+SET DEBUG_SYNC='now SIGNAL continue';
+
+--echo
+--echo # Connection default, reap
+--connection default
+--replace_column 1 <Id> 3 <Host> 5 <Command> 6 <Time> 7 <State> 8 <Info>
+--sorted_result
+--reap
+
+--echo
+--echo
+--echo ### Verify legacy code path
+--echo
+--echo # Enable the legacy SHOW PROCESSLIST
+let $pfs_spl = off;
+--source ../include/processlist_set.inc
+
+--echo
+--echo # Connection default, send SHOW PROCESSLIST
+--connection default
+SET DEBUG_SYNC='RESET';
+SET DEBUG_SYNC='pfs_show_processlist_legacy SIGNAL pfs_processlist_legacy WAIT_FOR continue';
+--send SHOW FULL PROCESSLIST
+
+--echo
+--echo # Connection con0
+--connection con0
+SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_legacy';
+SET DEBUG_SYNC='now SIGNAL continue';
+
+--echo
+--echo # Connection default, reap
+--connection default
+--replace_column 1 <Id> 3 <Host> 5 <Command> 6 <Time> 7 <State> 8 <Info>
+--sorted_result
+--reap
+
+--echo
+--echo
+--echo ### Clean up ###
+--echo
+
+--echo # Connection con0, unlock test.t1, disconnect
+--connection con0
+unlock tables;
+--disconnect con0
+
+--disable_query_log
+--disable_result_log
+--echo
+--echo # Connection con1, reap, disconnect
+--connection con1
+--reap
+--disconnect con1
+
+--echo # Connection con2, reap, disconnect
+--connection con2
+--reap
+--disconnect con2
+
+--echo # Connection con3, reap, disconnect
+--connection con3
+--reap
+--disconnect con3
+
+--echo # Connection con4, reap, disconnect
+--connection con4
+--reap
+--disconnect con4
+--enable_result_log
+--enable_query_log
+
+--echo
+--echo # Connection default
+--connection default
+
+--echo
+drop table test.t1;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+--echo
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/t/processlist_57.test b/mysql-test/suite/perfschema/t/processlist_57.test
new file mode 100644
index 00000000000..748d8b7402b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_57.test
@@ -0,0 +1,349 @@
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+call mtr.add_suppression("Optional native table 'performance_schema'.'processlist' has the wrong structure or is missing.");
+call mtr.add_suppression("Column count of performance_schema.processlist is wrong. Expected 8, found 2. The table is probably corrupted");
+
+--echo ##
+--echo ## Verify fresh 5.7 instance
+--echo ##
+
+SELECT @@global.performance_schema_show_processlist;
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+--echo ##
+--echo ## Simulate old 5.7 instance
+--echo ##
+
+DROP TABLE performance_schema.processlist;
+
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE performance_schema.processlist;
+
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--echo ##
+--echo ## Server shutdown
+--echo ##
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--echo ##
+--echo ### Server restart
+--echo ##
+--exec echo "restart:">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+--echo ##
+--echo ## Verify old 5.7 instance
+--echo ##
+
+SELECT @@global.performance_schema_show_processlist;
+
+--error ER_NO_SUCH_TABLE
+SHOW CREATE TABLE performance_schema.processlist;
+
+--error ER_NO_SUCH_TABLE
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+--error ER_NO_SUCH_TABLE
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--error ER_NO_SUCH_TABLE
+SHOW PROCESSLIST;
+
+--echo ##
+--echo ## Perform broken upgrade (case 1)
+--echo ##
+
+CREATE TABLE performance_schema.processlist (a int, b int);
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--error ER_BAD_FIELD_ERROR
+SHOW PROCESSLIST;
+
+--exec echo "wait" > $restart_file
+--echo ##
+--echo ## Server shutdown
+--echo ##
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--echo ##
+--echo ### Server restart
+--echo ##
+--exec echo "restart:">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--error ER_BAD_FIELD_ERROR
+SHOW PROCESSLIST;
+
+--echo ##
+--echo ## Perform broken upgrade (case 2)
+--echo ##
+
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+);
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Works and returns no data, innodb table is empty.
+SHOW PROCESSLIST;
+
+--exec echo "wait" > $restart_file
+--echo ##
+--echo ## Server shutdown
+--echo ##
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--echo ##
+--echo ### Server restart
+--echo ##
+--exec echo "restart:">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Works and returns no data, innodb table is empty.
+SHOW PROCESSLIST;
+
+--echo ##
+--echo ## Perform broken upgrade (case 3)
+--echo ##
+
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist
+ LIKE INFORMATION_SCHEMA.PROCESSLIST;
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Works and returns no data, innodb table is empty.
+SHOW PROCESSLIST;
+
+--exec echo "wait" > $restart_file
+--echo ##
+--echo ## Server shutdown
+--echo ##
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--echo ##
+--echo ### Server restart
+--echo ##
+--exec echo "restart:">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Works and returns no data, innodb table is empty.
+SHOW PROCESSLIST;
+
+--echo ##
+--echo ## Perform correct upgrade
+--echo ##
+
+DROP TABLE performance_schema.processlist;
+CREATE TABLE performance_schema.processlist (
+ `ID` bigint(20) unsigned NOT NULL,
+ `USER` varchar(32) DEFAULT NULL,
+ `HOST` varchar(66) DEFAULT NULL,
+ `DB` varchar(64) DEFAULT NULL,
+ `COMMAND` varchar(16) DEFAULT NULL,
+ `TIME` bigint(20) DEFAULT NULL,
+ `STATE` varchar(64) DEFAULT NULL,
+ `INFO` longtext
+) ENGINE = 'PERFORMANCE_SCHEMA';
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+--exec echo "wait" > $restart_file
+--echo ##
+--echo ## Server shutdown
+--echo ##
+--shutdown_server
+--source include/wait_until_disconnected.inc
+--echo ##
+--echo ### Server restart
+--echo ##
+--exec echo "restart:">$restart_file
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+SHOW CREATE TABLE performance_schema.processlist;
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+SET GLOBAL performance_schema_show_processlist = 'ON';
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM performance_schema.processlist;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+--replace_column 3 [HOST:PORT] 6 [TIME]
+SHOW PROCESSLIST;
+
+# Cleanup
+
+SET GLOBAL performance_schema_show_processlist = 'OFF';
+
diff --git a/mysql-test/suite/perfschema/t/processlist_acl-master.opt b/mysql-test/suite/perfschema/t/processlist_acl-master.opt
new file mode 100644
index 00000000000..f93413a61e5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_acl-master.opt
@@ -0,0 +1 @@
+--event-scheduler
diff --git a/mysql-test/suite/perfschema/t/processlist_acl.test b/mysql-test/suite/perfschema/t/processlist_acl.test
new file mode 100644
index 00000000000..f0733865ebc
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_acl.test
@@ -0,0 +1,196 @@
+--echo ##
+--echo ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+--echo ##
+--echo ## Verify handling of the SELECT and PROCESS privileges.
+--echo ##
+--echo ## Test cases:
+--echo ## - Execute SHOW PROCESSLIST (new and legacy) with all privileges
+--echo ## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with all privileges
+--echo ## - Execute SHOW PROCESSLIST (new and legacy) with no privileges
+--echo ## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with no privileges
+--echo ##
+--echo ## Results must be manually verified.
+--echo
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+--echo ### Setup ###
+--echo
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+--echo
+--echo # Control users
+create user user_00@localhost, user_01@localhost;
+grant ALL on *.* to user_00@localhost;
+grant ALL on *.* to user_01@localhost;
+
+--echo
+--echo # Test users
+create user user_all@localhost, user_none@localhost;
+grant ALL on *.* to user_all@localhost;
+grant USAGE on *.* to user_none@localhost;
+--echo
+flush privileges;
+
+--echo
+show grants for user_all@localhost;
+--echo
+show grants for user_none@localhost;
+
+--echo
+use test;
+create table test.t1 (s1 int, s2 int, s3 int, s4 int);
+
+--echo
+--echo # Connect (con_00, localhost, user_00, , )
+connect (con_00, localhost, user_00, , );
+
+--echo # Connect (con_01, localhost, user_01, , )
+connect (con_01, localhost, user_01, , );
+--echo
+insert into test.t1 values(1, 1, 1, 1);
+insert into test.t1 values(2, 2, 2, 2);
+insert into test.t1 values(3, 3, 3, 3);
+insert into test.t1 values(4, 4, 4, 4);
+
+--echo
+--echo # Lock test.t1, insert/update/deletes will block
+lock tables t1 read;
+
+--echo
+--echo # Establish 2 connections for user_all
+--echo # Connect (con_all_1, localhost, user_all, , )
+connect (con_all_1, localhost, user_all, , );
+
+--echo # Connect (con_all_2, localhost, user_all, , )
+connect (con_all_2, localhost, user_all, , );
+--send insert into test.t1 values (0, 0, 0, 0)
+
+--echo
+--echo # Establish 4 connections for user_none
+--echo # Connect (con_none_1, localhost, user_none, , )
+connect (con_none_1, localhost, user_none, , );
+
+--echo # Connect (con_none_2, localhost, user_none, , )
+connect (con_none_2, localhost, user_none, , );
+
+--echo # Connect (con_none_3, localhost, user_none, , )
+connect (con_none_3, localhost, user_none, , );
+
+--echo # Connect (con_none_4, localhost, user_none, , )
+connect (con_none_4, localhost, user_none, , );
+--send update test.t1 set s1 = s1 + 1, s2 = s2 + 2;
+
+--echo
+--echo # Connection con_all_1
+--connection con_all_1
+
+# Note: When expecting processlist results for all users, the wait_condition
+# and subsequent execution of SHOW PROCESSLIST should be conducted from the
+# same connection to ensure consistent values in the Command and Info columns.
+
+--echo
+--echo # Wait for queries to appear in the processlist table
+let $wait_condition = select count(*) >= 2 from information_schema.processlist
+ where state like '%metadata%';
+--source include/wait_condition.inc
+
+--echo
+--echo ### Execute SHOW PROCESSLIST with all privileges
+--echo ### Expect all users
+--echo
+--echo # New SHOW PROCESSLIST
+let $pfs_spl = on;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo # Legacy SHOW PROCESSLIST
+let $pfs_spl = off;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo
+--echo ### Execute SHOW PROCESSLIST with no SELECT and no PROCESS privileges
+--echo ### Expect processes only from user_none
+--echo
+--echo # New SHOW PROCESSLIST
+let $pfs_spl = on;
+--source ../include/processlist_set.inc
+
+--echo
+--echo # Connection con_none_1
+--connection con_none_1
+--source ../include/processlist_load.inc
+
+--echo
+--echo # Confirm that only processes from user_none are visible
+--echo
+select count(*) as "Expect 0" from performance_schema.processlist
+ where user not in ('user_none');
+
+--echo
+--echo # Legacy SHOW PROCESSLIST
+--connection con_00
+let $pfs_spl = off;
+--source ../include/processlist_set.inc
+
+--echo
+--echo # Connection con_none_1
+--connection con_none_1
+--source ../include/processlist_load.inc
+
+--echo
+--echo
+--echo ### Clean up ###
+--echo
+
+--echo # Disconnect con_00
+--connection con_00
+--disconnect con_00
+
+--echo # Connection con_01, unlock test.t1, disconnect
+--connection con_01
+unlock tables;
+--disconnect con_01
+
+--echo # Disconnect con_all_1
+--connection con_all_1
+--disconnect con_all_1
+
+--echo # Reap con_all_2, disconnect
+--connection con_all_2
+--reap
+--disconnect con_all_2
+
+--echo # Disconnect con_none_1
+--connection con_none_1
+--disconnect con_none_1
+
+--echo # Disconnect con_none_2
+--connection con_none_2
+--disconnect con_none_2
+
+--echo # Disconnect con_none_3
+--connection con_none_3
+--disconnect con_none_3
+
+--echo # Reap con_none_4, disconnect
+--connection con_none_4
+--reap
+--disconnect con_none_4
+
+--echo
+--echo # Connection default
+--connection default
+
+--echo
+drop table test.t1;
+drop user user_00@localhost;
+drop user user_01@localhost;
+drop user user_all@localhost;
+drop user user_none@localhost;
+--echo
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/t/processlist_anonymous.test b/mysql-test/suite/perfschema/t/processlist_anonymous.test
new file mode 100644
index 00000000000..4b8e7ec2e1f
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_anonymous.test
@@ -0,0 +1,111 @@
+--echo ##
+--echo ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+--echo ## Verify behavior for anonymous users and PROCESS_ACL.
+--echo ##
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
+
+--source include/add_anonymous_users.inc
+
+SET @@global.performance_schema_show_processlist = OFF;
+
+connect (anon,localhost,test,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+SHOW GRANTS;
+
+# Empty
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Empty
+SELECT * FROM performance_schema.processlist;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW PROCESSLIST;
+
+connection default;
+
+SET @@global.performance_schema_show_processlist = ON;
+
+connection anon;
+
+SHOW GRANTS;
+
+# Empty
+SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Empty
+SELECT * FROM performance_schema.processlist;
+
+--error ER_SPECIFIC_ACCESS_DENIED_ERROR
+SHOW PROCESSLIST;
+
+disconnect anon;
+connection default;
+
+GRANT PROCESS ON *.* TO ''@'localhost';
+
+SET @@global.performance_schema_show_processlist = OFF;
+
+connect (anon2,localhost,test,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+SHOW GRANTS;
+
+# Full rows
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Full rows
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+
+# Full rows
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+# Returns ROWS_SENT = 0 even when SHOW PROCESSLIST has rows
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+connection anon2;
+
+
+connection default;
+
+TRUNCATE TABLE performance_schema.events_statements_history;
+set @@global.performance_schema_show_processlist = ON;
+
+
+connection anon2;
+
+SHOW GRANTS;
+
+# Full rows
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Full rows
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+
+# Full rows
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+
+disconnect anon2;
+connection default;
+
+--source include/delete_anonymous_users.inc
+
+SET @@global.performance_schema_show_processlist = @save_processlist;
+
diff --git a/mysql-test/suite/perfschema/t/processlist_no_pfs-master.opt b/mysql-test/suite/perfschema/t/processlist_no_pfs-master.opt
new file mode 100644
index 00000000000..6fb075f60bc
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_no_pfs-master.opt
@@ -0,0 +1,2 @@
+--loose-disable-performance-schema
+--loose-performance-schema-show-processlist=ON
diff --git a/mysql-test/suite/perfschema/t/processlist_no_pfs.test b/mysql-test/suite/perfschema/t/processlist_no_pfs.test
new file mode 100644
index 00000000000..273e180a18a
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_no_pfs.test
@@ -0,0 +1,29 @@
+# Tests for PERFORMANCE_SCHEMA
+
+--source include/not_embedded.inc
+
+--source ../include/start_server_common.inc
+
+--echo
+select * from information_schema.engines
+ where engine = "PERFORMANCE_SCHEMA";
+
+--echo
+--echo # If the Performance Schema is disabled, then expect
+--echo # performance-schema-show-processlist = OFF
+--echo # regardless of its initial setting
+--echo
+select @@global.performance_schema_show_processlist;
+
+--echo
+--echo # If the Performance Schema is disabled, then setting
+--echo # performance-schema-show-processlist = ON
+--echo # succeeds, SHOW PROCESSLIST returns no data.
+--echo
+set @@global.performance_schema_show_processlist = ON;
+
+SHOW PROCESSLIST;
+
+--echo
+show global variables like "performance_schema";
+
diff --git a/mysql-test/suite/perfschema/t/processlist_port-master.opt b/mysql-test/suite/perfschema/t/processlist_port-master.opt
new file mode 100644
index 00000000000..f93413a61e5
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_port-master.opt
@@ -0,0 +1 @@
+--event-scheduler
diff --git a/mysql-test/suite/perfschema/t/processlist_port.test b/mysql-test/suite/perfschema/t/processlist_port.test
new file mode 100644
index 00000000000..8403b0c793b
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_port.test
@@ -0,0 +1,162 @@
+--echo ##
+--echo ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+--echo ##
+--echo ## Verify the Host field (hostname:port) against the legacy implementation.
+--echo ##
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+--echo
+--echo ### Setup ###
+--echo
+select @@global.performance_schema_show_processlist into @save_processlist;
+
+--echo
+--echo # Control user
+create user user0@localhost;
+grant ALL on *.* to user0@localhost;
+
+--echo # Test users
+--echo
+create user user1@localhost, user2@localhost,
+ user3@localhost, user4@localhost;
+--echo
+# Grant no privileges to user1 to ensure only one process
+grant USAGE on *.* to user1@localhost;
+grant ALL on *.* to user2@localhost;
+grant ALL on *.* to user3@localhost;
+grant ALL on *.* to user4@localhost;
+--echo
+flush privileges;
+--echo
+show grants for user1@localhost;
+
+--echo
+--echo # Connect (con_user0, 127.0.0.1, user0, , , MASTER_MYPORT, )
+connect (con_user0, 127.0.0.1, user0, , , $MASTER_MYPORT, );
+--echo
+select connection_id() into @con_user0_id;
+
+--echo # Connect (con_user1, 127.0.0.1, user1, , , MASTER_MYPORT, )
+connect (con_user1, 127.0.0.1, user1, , , $MASTER_MYPORT, );
+
+--echo # Connect (con_user2, 127.0.0.1, user2, , , MASTER_MYPORT, )
+connect (con_user2, 127.0.0.1, user2, , , $MASTER_MYPORT, );
+
+--echo # Connect (con_user3, 127.0.0.1, user3, , , MASTER_MYPORT, )
+connect (con_user3, 127.0.0.1, user3, , , $MASTER_MYPORT, );
+
+--echo # Connect (con_user4, 127.0.0.1, user4, , , MASTER_MYPORT, )
+connect (con_user4, 127.0.0.1, user4, , , $MASTER_MYPORT, );
+
+--echo # Connection user0
+--connection con_user0
+let $wait_condition = select connection_id() = @con_user0_id;
+--source include/wait_condition.inc
+
+--echo
+--echo ### Compare the SHOW PROCESSLIST Host column between the new and old implementations
+--echo
+--echo ## New SHOW PROCESSLIST
+let $pfs_spl = on;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo # Connection user1
+--connection con_user1
+
+--echo # Get Host:Port, new
+let $host_new = query_get_value(SHOW FULL PROCESSLIST, Host, 1);
+
+--echo
+--echo ## Legacy SHOW PROCESSLIST
+--connection con_user0
+let $pfs_spl = off;
+--source ../include/processlist_set.inc
+--source ../include/processlist_load.inc
+
+--echo
+--echo # Connection user1
+--connection con_user1
+
+--echo # Get Host:Port, legacy
+let $host_old = query_get_value(SHOW FULL PROCESSLIST, Host, 1);
+
+--echo
+
+## DEBUG ONLY
+## --echo DEBUG: New: $host_new Old: $host_old
+
+if ($host_new == $host_old)
+{
+ --echo ***SUCCESS*** The SHOW PROCESSLIST Host fields match
+}
+
+if ($host_new != $host_old)
+{
+ --echo ***ERROR*** SHOW PROCESSLIST Host fields do not match. New: $host_new Old: $host_old
+}
+
+--echo
+--echo ### Compare the processlist Host column between Performance Schema and the Information Schema
+--echo
+--echo # Connection con_user0
+--connection con_user0
+let $count_new = `select count(*) from performance_schema.processlist`;
+let $count_old = `select count(*) from information_schema.processlist`;
+let $count_join = `select count(*) from performance_schema.processlist pspl
+ left join information_schema.processlist ispl on pspl.host = ispl.host and pspl.id = ispl.id`;
+
+--echo
+
+if ($count_old == $count_join)
+{
+ --echo ***SUCCESS*** The processlist Host fields match between the Performance Schema and the Information Schema
+}
+
+if ($count_old != $count_join)
+{
+ --echo ***ERROR*** The processlist Host fields do not match
+ --echo Count new: $count_new Count old: $count_old Count join: $count_join
+ --echo
+ select * from performance_schema.processlist order by host, id;
+ --echo
+ select * from information_schema.processlist order by host, id;
+ --echo
+ select * from performance_schema.processlist pspl
+ left join information_schema.processlist ispl on pspl.host = ispl.host and pspl.id = ispl.id;
+}
+
+--echo
+--echo
+--echo ### Clean up ###
+--echo
+
+--echo # Disconnect con_user0
+--connection con_user0
+--disconnect con_user0
+--echo # Disconnect con_user1
+--connection con_user1
+--disconnect con_user1
+--echo # Disconnect con_user2
+--connection con_user2
+--disconnect con_user2
+--echo # Disconnect con_user3
+--connection con_user3
+--disconnect con_user3
+--echo # Disconnect con_user4
+--connection con_user4
+--disconnect con_user4
+
+--echo # Connection default
+--connection default
+--echo
+drop user user0@localhost;
+drop user user1@localhost;
+drop user user2@localhost;
+drop user user3@localhost;
+drop user user4@localhost;
+--echo
+set @@global.performance_schema_show_processlist = @save_processlist;
diff --git a/mysql-test/suite/perfschema/t/processlist_reg_user.test b/mysql-test/suite/perfschema/t/processlist_reg_user.test
new file mode 100644
index 00000000000..53dc8abfa63
--- /dev/null
+++ b/mysql-test/suite/perfschema/t/processlist_reg_user.test
@@ -0,0 +1,134 @@
+--echo ##
+--echo ## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
+--echo ## Verify behavior for regular users and PROCESS_ACL.
+--echo ##
+
+--source include/no_protocol.inc
+--source include/not_embedded.inc
+
+SELECT @@global.performance_schema_show_processlist INTO @save_processlist;
+
+--source include/add_anonymous_users.inc
+
+SET @@global.performance_schema_show_processlist = OFF;
+
+CREATE USER 'regular'@'localhost';
+
+connect (reg,localhost,regular,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+SHOW GRANTS;
+
+# Self rows only
+SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Self rows only
+SELECT USER, INFO FROM performance_schema.processlist;
+
+# Self rows only
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+
+# Returns ROWS_SENT = 0 even when SHOW PROCESSLIST has rows
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+
+TRUNCATE TABLE performance_schema.events_statements_history;
+SET @@global.performance_schema_show_processlist = ON;
+
+connection reg;
+
+SHOW GRANTS;
+
+# Self rows only
+SELECT USER, INFO FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Self rows only
+SELECT USER, INFO FROM performance_schema.processlist;
+
+# Self rows only
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+
+TRUNCATE TABLE performance_schema.events_statements_history;
+
+disconnect reg;
+
+GRANT PROCESS ON *.* TO 'regular'@'localhost';
+
+SET @@global.performance_schema_show_processlist = OFF;
+
+connect (reg2,localhost,regular,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+
+SHOW GRANTS;
+
+# Full rows
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Full rows
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+
+# Full rows
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+
+# Returns ROWS_SENT = 0 even when SHOW PROCESSLIST has rows
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT as BROKEN_ROWS_SENT
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+
+TRUNCATE TABLE performance_schema.events_statements_history;
+SET @@global.performance_schema_show_processlist = ON;
+
+connection reg2;
+
+SHOW GRANTS;
+
+# Full rows
+SELECT count(*) >= 2 FROM INFORMATION_SCHEMA.PROCESSLIST;
+
+# Full rows
+SELECT count(*) >= 2 FROM performance_schema.processlist;
+
+# Full rows
+--disable_result_log
+SHOW PROCESSLIST;
+--enable_result_log
+
+SELECT "Previous statement is now completed." as status;
+
+connection default;
+
+SELECT EVENT_NAME, SQL_TEXT, ROWS_SENT >= 2
+ FROM performance_schema.events_statements_history
+ WHERE SQL_TEXT = "SHOW PROCESSLIST";
+
+TRUNCATE TABLE performance_schema.events_statements_history;
+
+disconnect reg2;
+
+--source include/delete_anonymous_users.inc
+
+SET @@global.performance_schema_show_processlist = @save_processlist;
+
+DROP USER 'regular'@'localhost';
+
diff --git a/mysql-test/suite/perfschema/t/threads_mysql.test b/mysql-test/suite/perfschema/t/threads_mysql.test
index 8576c8767d6..05ce84ca0fc 100644
--- a/mysql-test/suite/perfschema/t/threads_mysql.test
+++ b/mysql-test/suite/perfschema/t/threads_mysql.test
@@ -47,7 +47,7 @@ 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
+ `role`, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/sql%'
ORDER BY name;
@@ -66,7 +66,7 @@ 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
+ `role`, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/sql%'
AND thread_id NOT IN (SELECT thread_id FROM t1)
@@ -106,7 +106,7 @@ 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
+ `role`, instrumented
FROM performance_schema.threads
WHERE name LIKE 'thread/sql%'
AND thread_id NOT IN (SELECT thread_id FROM t1)
diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt
index 97785aaba1c..15207bfa571 100644
--- a/storage/perfschema/CMakeLists.txt
+++ b/storage/perfschema/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2022, Oracle and/or its affiliates.
#
#
# This program is free software; you can redistribute it and/or modify
@@ -87,6 +87,7 @@ table_esms_by_host_by_event_name.h
table_esms_by_digest.h
table_esms_by_program.h
table_prepared_stmt_instances.h
+table_processlist.h
table_esms_by_thread_by_event_name.h
table_esms_by_user_by_event_name.h
table_esms_global_by_event_name.h
@@ -203,6 +204,7 @@ table_esms_by_host_by_event_name.cc
table_esms_by_digest.cc
table_esms_by_program.cc
table_prepared_stmt_instances.cc
+table_processlist.cc
table_esms_by_thread_by_event_name.cc
table_esms_by_user_by_event_name.cc
table_esms_global_by_event_name.cc
diff --git a/storage/perfschema/cursor_by_account.cc b/storage/perfschema/cursor_by_account.cc
index 14963979a76..f948d353b2b 100644
--- a/storage/perfschema/cursor_by_account.cc
+++ b/storage/perfschema/cursor_by_account.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_account.h b/storage/perfschema/cursor_by_account.h
index 2b3d3eda117..95b2020db30 100644
--- a/storage/perfschema/cursor_by_account.h
+++ b/storage/perfschema/cursor_by_account.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_host.cc b/storage/perfschema/cursor_by_host.cc
index 4c0ccff6556..feb629a14ba 100644
--- a/storage/perfschema/cursor_by_host.cc
+++ b/storage/perfschema/cursor_by_host.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_host.h b/storage/perfschema/cursor_by_host.h
index cdafbae86d3..e39e35e1f0c 100644
--- a/storage/perfschema/cursor_by_host.h
+++ b/storage/perfschema/cursor_by_host.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_thread.cc b/storage/perfschema/cursor_by_thread.cc
index 18f9776dfbe..22cab4eed66 100644
--- a/storage/perfschema/cursor_by_thread.cc
+++ b/storage/perfschema/cursor_by_thread.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_thread.h b/storage/perfschema/cursor_by_thread.h
index b49d2934710..cb07554e2bb 100644
--- a/storage/perfschema/cursor_by_thread.h
+++ b/storage/perfschema/cursor_by_thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_thread_connect_attr.cc b/storage/perfschema/cursor_by_thread_connect_attr.cc
index 33c21a208f6..03365e276c6 100644
--- a/storage/perfschema/cursor_by_thread_connect_attr.cc
+++ b/storage/perfschema/cursor_by_thread_connect_attr.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_thread_connect_attr.h b/storage/perfschema/cursor_by_thread_connect_attr.h
index 102fb38760b..7848b6b0978 100644
--- a/storage/perfschema/cursor_by_thread_connect_attr.h
+++ b/storage/perfschema/cursor_by_thread_connect_attr.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_user.cc b/storage/perfschema/cursor_by_user.cc
index 094ecd4a29d..03ab997a255 100644
--- a/storage/perfschema/cursor_by_user.cc
+++ b/storage/perfschema/cursor_by_user.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/cursor_by_user.h b/storage/perfschema/cursor_by_user.h
index c5220d6c8b8..e02cd42cf47 100644
--- a/storage/perfschema/cursor_by_user.h
+++ b/storage/perfschema/cursor_by_user.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 80d632aec1f..3ba31e4f133 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -443,6 +443,53 @@ THR_LOCK_DATA **ha_perfschema::store_lock(THD *thd,
int ha_perfschema::delete_table(const char *name)
{
DBUG_ENTER("ha_perfschema::delete_table");
+
+ /*
+ The name string looks like:
+ "./performance_schema/processlist"
+
+ Make a copy of it, parse the '/' to
+ isolate the schema and table name.
+ */
+
+ char table_path[FN_REFLEN+1];
+ strncpy(table_path, name, sizeof(table_path));
+ table_path[FN_REFLEN]='\0';
+
+ char *ptr;
+ char *table_name;
+ char *db_name;
+ const PFS_engine_table_share *share;
+
+ /* Start scan from the end. */
+ ptr = strend(table_path) - 1;
+
+ /* Find path separator */
+ while ((ptr >= table_path) && (*ptr != '\\') && (*ptr != '/')) {
+ ptr--;
+ }
+
+ table_name = ptr + 1;
+ *ptr = '\0';
+
+ /* Find path separator */
+ while ((ptr >= table_path) && (*ptr != '\\') && (*ptr != '/')) {
+ ptr--;
+ }
+
+ db_name = ptr + 1;
+
+ share = find_table_share(db_name, table_name);
+ if (share != NULL) {
+ if (share->m_optional) {
+ /*
+ An optional table is deleted,
+ disarm the checked flag so we don't trust it any more.
+ */
+ share->m_state->m_checked = false;
+ }
+ }
+
DBUG_RETURN(0);
}
diff --git a/storage/perfschema/ha_perfschema.h b/storage/perfschema/ha_perfschema.h
index e0f55253bfd..fab824945a7 100644
--- a/storage/perfschema/ha_perfschema.h
+++ b/storage/perfschema/ha_perfschema.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc
index df06f1c5348..0391f36bf12 100644
--- a/storage/perfschema/pfs.cc
+++ b/storage/perfschema/pfs.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -2561,6 +2561,16 @@ void pfs_set_thread_v1(PSI_thread* thread)
/**
Implementation of the thread instrumentation interface.
+*/
+void pfs_set_thread_peer_port_v1(PSI_thread *thread, uint port) {
+ PFS_thread *pfs = reinterpret_cast<PFS_thread *>(thread);
+ if (likely(pfs != NULL)) {
+ pfs->m_peer_port = port;
+ }
+}
+
+/**
+ Implementation of the thread instrumentation interface.
@sa PSI_v1::delete_current_thread.
*/
void pfs_delete_current_thread_v1(void)
@@ -7121,7 +7131,8 @@ PSI_v1 PFS_v1=
pfs_set_metadata_lock_status_v1,
pfs_destroy_metadata_lock_v1,
pfs_start_metadata_wait_v1,
- pfs_end_metadata_wait_v1
+ pfs_end_metadata_wait_v1,
+ pfs_set_thread_peer_port_v1
};
static void* get_interface(int version)
diff --git a/storage/perfschema/pfs.h b/storage/perfschema/pfs.h
index 56b89ef6f9f..ad19c1daa8c 100644
--- a/storage/perfschema/pfs.h
+++ b/storage/perfschema/pfs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_account.cc b/storage/perfschema/pfs_account.cc
index 8e75538c0be..4983d29ee92 100644
--- a/storage/perfschema/pfs_account.cc
+++ b/storage/perfschema/pfs_account.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -527,30 +527,18 @@ void PFS_account::aggregate_memory(bool alive, PFS_user *safe_user, PFS_host *sa
void PFS_account::aggregate_status(PFS_user *safe_user, PFS_host *safe_host)
{
- if (likely(safe_user != NULL && safe_host != NULL))
- {
- /*
- Aggregate STATUS_BY_ACCOUNT to:
- - STATUS_BY_USER
- - STATUS_BY_HOST
- */
- safe_user->m_status_stats.aggregate(& m_status_stats);
- safe_host->m_status_stats.aggregate(& m_status_stats);
- m_status_stats.reset();
- return;
- }
+ /*
+ Never aggregate to global_status_var,
+ because of the parallel THD -> global_status_var flow.
+ */
if (safe_user != NULL)
{
/*
Aggregate STATUS_BY_ACCOUNT to:
- STATUS_BY_USER
- - GLOBAL_STATUS
*/
safe_user->m_status_stats.aggregate(& m_status_stats);
- m_status_stats.aggregate_to(& global_status_var);
- m_status_stats.reset();
- return;
}
if (safe_host != NULL)
@@ -560,15 +548,8 @@ void PFS_account::aggregate_status(PFS_user *safe_user, PFS_host *safe_host)
- STATUS_BY_HOST
*/
safe_host->m_status_stats.aggregate(& m_status_stats);
- m_status_stats.reset();
- return;
}
- /*
- Aggregate STATUS_BY_ACCOUNT to:
- - GLOBAL_STATUS
- */
- m_status_stats.aggregate_to(& global_status_var);
m_status_stats.reset();
return;
}
diff --git a/storage/perfschema/pfs_account.h b/storage/perfschema/pfs_account.h
index a05e59f8f1d..c9ebc8ef78c 100644
--- a/storage/perfschema/pfs_account.h
+++ b/storage/perfschema/pfs_account.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_atomic.h b/storage/perfschema/pfs_atomic.h
index b0542f092d6..e8170399420 100644
--- a/storage/perfschema/pfs_atomic.h
+++ b/storage/perfschema/pfs_atomic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2009, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_autosize.cc b/storage/perfschema/pfs_autosize.cc
index 4a554b626c6..ad08f427b1d 100644
--- a/storage/perfschema/pfs_autosize.cc
+++ b/storage/perfschema/pfs_autosize.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_buffer_container.cc b/storage/perfschema/pfs_buffer_container.cc
index 7d1d74541d1..dfae6e0ad2e 100644
--- a/storage/perfschema/pfs_buffer_container.cc
+++ b/storage/perfschema/pfs_buffer_container.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_buffer_container.h b/storage/perfschema/pfs_buffer_container.h
index cdbf4119fae..ea4021f39c1 100644
--- a/storage/perfschema/pfs_buffer_container.h
+++ b/storage/perfschema/pfs_buffer_container.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_builtin_memory.cc b/storage/perfschema/pfs_builtin_memory.cc
index 7528b557f19..7f4adc9bde9 100644
--- a/storage/perfschema/pfs_builtin_memory.cc
+++ b/storage/perfschema/pfs_builtin_memory.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_builtin_memory.h b/storage/perfschema/pfs_builtin_memory.h
index 2c9da9dd4a0..c0f0aa86c45 100644
--- a/storage/perfschema/pfs_builtin_memory.h
+++ b/storage/perfschema/pfs_builtin_memory.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc
index cd5efe254de..6fe16e520d4 100644
--- a/storage/perfschema/pfs_check.cc
+++ b/storage/perfschema/pfs_check.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2009, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_column_types.h b/storage/perfschema/pfs_column_types.h
index 6285a1ecddb..49d73d0561c 100644
--- a/storage/perfschema/pfs_column_types.h
+++ b/storage/perfschema/pfs_column_types.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_column_values.cc b/storage/perfschema/pfs_column_values.cc
index 46bbed11f50..1fc5f1d471a 100644
--- a/storage/perfschema/pfs_column_values.cc
+++ b/storage/perfschema/pfs_column_values.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_column_values.h b/storage/perfschema/pfs_column_values.h
index 6bf2f60674b..f33c4383d8e 100644
--- a/storage/perfschema/pfs_column_values.h
+++ b/storage/perfschema/pfs_column_values.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_con_slice.cc b/storage/perfschema/pfs_con_slice.cc
index 9f75c58fb06..a26ee28542f 100644
--- a/storage/perfschema/pfs_con_slice.cc
+++ b/storage/perfschema/pfs_con_slice.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_con_slice.h b/storage/perfschema/pfs_con_slice.h
index 0e14ce87680..338973a50da 100644
--- a/storage/perfschema/pfs_con_slice.h
+++ b/storage/perfschema/pfs_con_slice.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_defaults.cc b/storage/perfschema/pfs_defaults.cc
index 52deec9a7cb..f46e823f67e 100644
--- a/storage/perfschema/pfs_defaults.cc
+++ b/storage/perfschema/pfs_defaults.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_defaults.h b/storage/perfschema/pfs_defaults.h
index 54dd741d9fc..709feb88966 100644
--- a/storage/perfschema/pfs_defaults.h
+++ b/storage/perfschema/pfs_defaults.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_digest.cc b/storage/perfschema/pfs_digest.cc
index 34b35ed7181..4df7567be75 100644
--- a/storage/perfschema/pfs_digest.cc
+++ b/storage/perfschema/pfs_digest.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_digest.h b/storage/perfschema/pfs_digest.h
index 091dd26cc45..6a82a9871c8 100644
--- a/storage/perfschema/pfs_digest.h
+++ b/storage/perfschema/pfs_digest.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_engine_table.cc b/storage/perfschema/pfs_engine_table.cc
index dd380879fdb..96b1e762410 100644
--- a/storage/perfschema/pfs_engine_table.cc
+++ b/storage/perfschema/pfs_engine_table.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -48,6 +48,7 @@
#include "table_file_summary_by_instance.h"
#include "table_file_summary_by_event_name.h"
#include "table_threads.h"
+#include "table_processlist.h"
#include "table_ews_by_host_by_event_name.h"
#include "table_ews_by_user_by_event_name.h"
@@ -333,6 +334,8 @@ static PFS_engine_table_share *all_shares[]=
&table_global_variables::m_share,
&table_session_variables::m_share,
+ &table_processlist::m_share,
+
NULL
};
@@ -385,6 +388,21 @@ void PFS_check_intact::report_error(uint code, const char *fmt, ...)
sql_print_error("%s", buff);
}
+/** Error reporting for schema integrity checks. */
+class PFS_silent_check_intact : public Table_check_intact
+{
+protected:
+ virtual void report_error(uint code, const char *fmt, ...) {}
+
+public:
+ PFS_silent_check_intact()
+ {}
+
+ ~PFS_silent_check_intact()
+ {}
+};
+
+
/**
Check integrity of the actual table schema.
The actual table schema (.frm) is compared to the expected schema.
@@ -398,6 +416,8 @@ void PFS_engine_table_share::check_one_table(THD *thd)
PERFORMANCE_SCHEMA_str.length,
m_name.str, m_name.length,
m_name.str, TL_READ);
+ TABLE_LIST *tl = &tables;
+ uint count = 1;
/* Work around until Bug#32115 is backported. */
LEX dummy_lex;
@@ -405,22 +425,60 @@ void PFS_engine_table_share::check_one_table(THD *thd)
thd->lex= &dummy_lex;
lex_start(thd);
- if (! open_and_lock_tables(thd, &tables, MYSQL_LOCK_IGNORE_TIMEOUT))
+ if (! open_tables(thd, &tl, &count, MYSQL_LOCK_IGNORE_TIMEOUT))
{
PFS_check_intact checker;
- if (!checker.check(tables.table, m_field_def))
- m_checked= true;
+ if (!checker.check(tables.table, m_field_def)) {
+ m_state->m_checked= true;
+ }
close_thread_tables(thd);
}
else
- sql_print_error(ER(ER_WRONG_NATIVE_TABLE_STRUCTURE),
- PERFORMANCE_SCHEMA_str.str, m_name.str);
+ {
+ if (m_optional) {
+ /*
+ TABLE performance_schema.PROCESSLIST is:
+ - a backport from 8.0
+ - a native table
+ - an optional table, not created by upgrade scripts
+ */
+ sql_print_warning(ER(ER_WARN_WRONG_NATIVE_TABLE_STRUCTURE),
+ PERFORMANCE_SCHEMA_str.str, m_name.str);
+ } else {
+ sql_print_error(ER(ER_WRONG_NATIVE_TABLE_STRUCTURE),
+ PERFORMANCE_SCHEMA_str.str, m_name.str);
+ }
+ }
lex_end(&dummy_lex);
thd->lex= old_lex;
}
+bool PFS_engine_table_share::is_table_checked(TABLE *table) const {
+ if (! m_state->m_checked) {
+ if (m_optional) {
+ /*
+ For optional tables (i.e., processlist),
+ the DBA can add the table with CREATE TABLE
+ at any time.
+ The m_checked flag can be still false if the
+ table was missing during server bootstrap.
+ We do not want to force a server shutdown + restart
+ to re-evaluate this flag for an upgraded instance,
+ so perform a last chance check dynamically here.
+ */
+ PFS_silent_check_intact checker;
+
+ if (! checker.check(table, m_field_def)) {
+ m_state->m_checked= true;
+ }
+ }
+ }
+
+ return m_state->m_checked;
+}
+
/** Initialize all the table share locks. */
void PFS_engine_table_share::init_all_locks(void)
{
@@ -453,7 +511,7 @@ int PFS_engine_table_share::write_row(TABLE *table, unsigned char *buf,
Make sure the table structure is as expected before mapping
hard wired columns in m_write_row.
*/
- if (! m_checked)
+ if (! is_table_checked(table))
{
return HA_ERR_TABLE_NEEDS_UPGRADE;
}
@@ -532,7 +590,7 @@ int PFS_engine_table::read_row(TABLE *table,
Make sure the table structure is as expected before mapping
hard wired columns in read_row_values.
*/
- if (! m_share_ptr->m_checked)
+ if (! m_share_ptr->is_table_checked(table))
{
return HA_ERR_TABLE_NEEDS_UPGRADE;
}
@@ -577,7 +635,7 @@ int PFS_engine_table::update_row(TABLE *table,
Make sure the table structure is as expected before mapping
hard wired columns in update_row_values.
*/
- if (! m_share_ptr->m_checked)
+ if (! m_share_ptr->is_table_checked(table))
{
return HA_ERR_TABLE_NEEDS_UPGRADE;
}
@@ -600,7 +658,7 @@ int PFS_engine_table::delete_row(TABLE *table,
Make sure the table structure is as expected before mapping
hard wired columns in delete_row_values.
*/
- if (! m_share_ptr->m_checked)
+ if (! m_share_ptr->is_table_checked(table))
{
return HA_ERR_TABLE_NEEDS_UPGRADE;
}
@@ -901,6 +959,33 @@ PFS_readonly_world_acl::check(ulong want_access, ulong *save_priv) const
return res;
}
+PFS_readonly_processlist_acl pfs_readonly_processlist_acl;
+
+ACL_internal_access_result PFS_readonly_processlist_acl::check(
+ ulong want_access, ulong *save_priv) const {
+ ACL_internal_access_result res =
+ PFS_readonly_acl::check(want_access, save_priv);
+
+ if ((res == ACL_INTERNAL_ACCESS_CHECK_GRANT) && (want_access == SELECT_ACL)) {
+ THD *thd = current_thd;
+ if (thd != NULL) {
+ if (thd->lex->sql_command == SQLCOM_SHOW_PROCESSLIST ||
+ thd->lex->sql_command == SQLCOM_SELECT) {
+ /*
+ For compatibility with the historical
+ SHOW PROCESSLIST command,
+ SHOW PROCESSLIST does not require a
+ SELECT privilege on table performance_schema.processlist,
+ when rewriting the query using table processlist.
+ */
+ return ACL_INTERNAL_ACCESS_GRANTED;
+ }
+ }
+ }
+
+ return res;
+}
+
PFS_truncatable_acl pfs_truncatable_acl;
diff --git a/storage/perfschema/pfs_engine_table.h b/storage/perfschema/pfs_engine_table.h
index 3d28ae2ffbd..79e452551cc 100644
--- a/storage/perfschema/pfs_engine_table.h
+++ b/storage/perfschema/pfs_engine_table.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -285,6 +285,11 @@ typedef int (*pfs_delete_all_rows_t)(void);
/** Callback to get a row count. */
typedef ha_rows (*pfs_get_row_count_t)(void);
+struct PFS_engine_table_share_state {
+ /** Schema integrity flag. */
+ bool m_checked;
+};
+
/**
A PERFORMANCE_SCHEMA table share.
This data is shared by all the table handles opened on the same table.
@@ -293,6 +298,7 @@ struct PFS_engine_table_share
{
static void check_all_tables(THD *thd);
void check_one_table(THD *thd);
+ bool is_table_checked(TABLE *table) const;
static void init_all_locks(void);
static void delete_all_locks(void);
/** Get the row count. */
@@ -318,10 +324,12 @@ struct PFS_engine_table_share
THR_LOCK *m_thr_lock_ptr;
/** Table fields definition. */
TABLE_FIELD_DEF *m_field_def;
- /** Schema integrity flag. */
- bool m_checked;
/** Table is available even if the Performance Schema is disabled. */
bool m_perpetual;
+ /** Table is optional. */
+ bool m_optional;
+ /** Dynamic state. */
+ PFS_engine_table_share_state *m_state;
};
/**
@@ -457,6 +465,24 @@ public:
extern PFS_truncatable_world_acl pfs_truncatable_world_acl;
+/**
+ Privileges for readable processlist tables.
+*/
+class PFS_readonly_processlist_acl : public PFS_readonly_acl {
+ public:
+ PFS_readonly_processlist_acl()
+ {}
+
+ ~PFS_readonly_processlist_acl()
+ {}
+
+ virtual ACL_internal_access_result check(ulong want_access, ulong *save_priv) const;
+};
+
+/** Singleton instance of PFS_readonly_processlist_acl */
+extern PFS_readonly_processlist_acl pfs_readonly_processlist_acl;
+
+
/** Position of a cursor, for simple iterations. */
struct PFS_simple_index
{
diff --git a/storage/perfschema/pfs_events.h b/storage/perfschema/pfs_events.h
index 048ca7d991e..8fe52600c3a 100644
--- a/storage/perfschema/pfs_events.h
+++ b/storage/perfschema/pfs_events.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_stages.cc b/storage/perfschema/pfs_events_stages.cc
index 7996f3a30c6..0d614330313 100644
--- a/storage/perfschema/pfs_events_stages.cc
+++ b/storage/perfschema/pfs_events_stages.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_stages.h b/storage/perfschema/pfs_events_stages.h
index d38a50fe0f7..40828911df7 100644
--- a/storage/perfschema/pfs_events_stages.h
+++ b/storage/perfschema/pfs_events_stages.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_statements.cc b/storage/perfschema/pfs_events_statements.cc
index b4a95c327f2..af00607109b 100644
--- a/storage/perfschema/pfs_events_statements.cc
+++ b/storage/perfschema/pfs_events_statements.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_statements.h b/storage/perfschema/pfs_events_statements.h
index f1ee2f08402..8bba4731281 100644
--- a/storage/perfschema/pfs_events_statements.h
+++ b/storage/perfschema/pfs_events_statements.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_transactions.cc b/storage/perfschema/pfs_events_transactions.cc
index 8b83b71c96b..6f6b1a4cbc6 100644
--- a/storage/perfschema/pfs_events_transactions.cc
+++ b/storage/perfschema/pfs_events_transactions.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_transactions.h b/storage/perfschema/pfs_events_transactions.h
index dae829fb1a8..2fd8428c9bf 100644
--- a/storage/perfschema/pfs_events_transactions.h
+++ b/storage/perfschema/pfs_events_transactions.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_waits.cc b/storage/perfschema/pfs_events_waits.cc
index 28e4f22f9d2..de26ad1f13b 100644
--- a/storage/perfschema/pfs_events_waits.cc
+++ b/storage/perfschema/pfs_events_waits.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_events_waits.h b/storage/perfschema/pfs_events_waits.h
index d2091876c4e..e194803fbd6 100644
--- a/storage/perfschema/pfs_events_waits.h
+++ b/storage/perfschema/pfs_events_waits.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_global.cc b/storage/perfschema/pfs_global.cc
index 8296e77d5b6..97f20eb502e 100644
--- a/storage/perfschema/pfs_global.cc
+++ b/storage/perfschema/pfs_global.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. All rights
reserved.
This program is free software; you can redistribute it and/or modify
diff --git a/storage/perfschema/pfs_global.h b/storage/perfschema/pfs_global.h
index 4b299c80b4d..023f172bf9b 100644
--- a/storage/perfschema/pfs_global.h
+++ b/storage/perfschema/pfs_global.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_host.cc b/storage/perfschema/pfs_host.cc
index 9b3f852aa15..8b284ca8b74 100644
--- a/storage/perfschema/pfs_host.cc
+++ b/storage/perfschema/pfs_host.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_host.h b/storage/perfschema/pfs_host.h
index e006deed93b..4fb5903f4b9 100644
--- a/storage/perfschema/pfs_host.h
+++ b/storage/perfschema/pfs_host.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_instr.cc b/storage/perfschema/pfs_instr.cc
index e7e96d77fb7..925d3122945 100644
--- a/storage/perfschema/pfs_instr.cc
+++ b/storage/perfschema/pfs_instr.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -574,6 +574,8 @@ PFS_thread* create_thread(PFS_thread_class *klass, const void *identity,
pfs->m_account= NULL;
set_thread_account(pfs);
+ pfs->m_peer_port = 0;
+
/*
For child waits, by default,
- NESTING_EVENT_ID is NULL
diff --git a/storage/perfschema/pfs_instr.h b/storage/perfschema/pfs_instr.h
index fefb1bf7884..f8b8799097a 100644
--- a/storage/perfschema/pfs_instr.h
+++ b/storage/perfschema/pfs_instr.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -610,6 +610,9 @@ struct PFS_ALIGNED PFS_thread : PFS_connection_slice
PFS_user *m_user;
PFS_account *m_account;
+ /** Remote (peer) port */
+ uint m_peer_port;
+
/** Reset session connect attributes */
void reset_session_connect_attrs();
diff --git a/storage/perfschema/pfs_instr_class.cc b/storage/perfschema/pfs_instr_class.cc
index 264ec6b7020..3c534b993f0 100644
--- a/storage/perfschema/pfs_instr_class.cc
+++ b/storage/perfschema/pfs_instr_class.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_instr_class.h b/storage/perfschema/pfs_instr_class.h
index 6f3e0c10cdb..d8b91ac3dd9 100644
--- a/storage/perfschema/pfs_instr_class.h
+++ b/storage/perfschema/pfs_instr_class.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -247,6 +247,9 @@ struct PFS_ALIGNED PFS_thread_class
char m_name[PFS_MAX_INFO_NAME_LENGTH];
/** Length in bytes of @c m_name. */
uint m_name_length;
+ /** Instrument flags. */
+ int m_flags;
+ bool is_system_thread() const { return m_flags & PSI_FLAG_THREAD_SYSTEM; }
};
/** Key identifying a table share. */
diff --git a/storage/perfschema/pfs_lock.h b/storage/perfschema/pfs_lock.h
index d26765b3166..fdb23d64cd5 100644
--- a/storage/perfschema/pfs_lock.h
+++ b/storage/perfschema/pfs_lock.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2009, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_memory.cc b/storage/perfschema/pfs_memory.cc
index d2185ecc648..4b4b14fc186 100644
--- a/storage/perfschema/pfs_memory.cc
+++ b/storage/perfschema/pfs_memory.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_memory.h b/storage/perfschema/pfs_memory.h
index a3e753656ce..085f8af8bad 100644
--- a/storage/perfschema/pfs_memory.h
+++ b/storage/perfschema/pfs_memory.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_prepared_stmt.cc b/storage/perfschema/pfs_prepared_stmt.cc
index 409520bd7ac..92579dd4db1 100644
--- a/storage/perfschema/pfs_prepared_stmt.cc
+++ b/storage/perfschema/pfs_prepared_stmt.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_prepared_stmt.h b/storage/perfschema/pfs_prepared_stmt.h
index 14f42857060..ef3fbc3ae6d 100644
--- a/storage/perfschema/pfs_prepared_stmt.h
+++ b/storage/perfschema/pfs_prepared_stmt.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_program.cc b/storage/perfschema/pfs_program.cc
index 4353049b73a..74c2b66e65d 100644
--- a/storage/perfschema/pfs_program.cc
+++ b/storage/perfschema/pfs_program.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_program.h b/storage/perfschema/pfs_program.h
index a34f533d444..56abcee97f7 100644
--- a/storage/perfschema/pfs_program.h
+++ b/storage/perfschema/pfs_program.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_server.cc b/storage/perfschema/pfs_server.cc
index e58ccbdc3be..dfb971d23dd 100644
--- a/storage/perfschema/pfs_server.cc
+++ b/storage/perfschema/pfs_server.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_server.h b/storage/perfschema/pfs_server.h
index 7f290271a67..28f7149346c 100644
--- a/storage/perfschema/pfs_server.h
+++ b/storage/perfschema/pfs_server.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_setup_actor.cc b/storage/perfschema/pfs_setup_actor.cc
index c7e5fa3cf4a..10dd080e79a 100644
--- a/storage/perfschema/pfs_setup_actor.cc
+++ b/storage/perfschema/pfs_setup_actor.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_setup_actor.h b/storage/perfschema/pfs_setup_actor.h
index ee56ff403f2..200452a9ddb 100644
--- a/storage/perfschema/pfs_setup_actor.h
+++ b/storage/perfschema/pfs_setup_actor.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_setup_object.cc b/storage/perfschema/pfs_setup_object.cc
index 88114531778..3caca529e06 100644
--- a/storage/perfschema/pfs_setup_object.cc
+++ b/storage/perfschema/pfs_setup_object.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_setup_object.h b/storage/perfschema/pfs_setup_object.h
index a247d164d18..1a88938947c 100644
--- a/storage/perfschema/pfs_setup_object.h
+++ b/storage/perfschema/pfs_setup_object.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_stat.h b/storage/perfschema/pfs_stat.h
index 0c2711a84bd..bc98d54a759 100644
--- a/storage/perfschema/pfs_stat.h
+++ b/storage/perfschema/pfs_stat.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_status.cc b/storage/perfschema/pfs_status.cc
index acf53c858ae..8eade2ee363 100644
--- a/storage/perfschema/pfs_status.cc
+++ b/storage/perfschema/pfs_status.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_status.h b/storage/perfschema/pfs_status.h
index ab20edcc130..ee9d74426fd 100644
--- a/storage/perfschema/pfs_status.h
+++ b/storage/perfschema/pfs_status.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_timer.cc b/storage/perfschema/pfs_timer.cc
index baa85c1aec0..e0749027365 100644
--- a/storage/perfschema/pfs_timer.cc
+++ b/storage/perfschema/pfs_timer.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_timer.h b/storage/perfschema/pfs_timer.h
index 54fa3a42d6e..3517e272def 100644
--- a/storage/perfschema/pfs_timer.h
+++ b/storage/perfschema/pfs_timer.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_user.cc b/storage/perfschema/pfs_user.cc
index 9e09e1eb878..05dc0e6a769 100644
--- a/storage/perfschema/pfs_user.cc
+++ b/storage/perfschema/pfs_user.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_user.h b/storage/perfschema/pfs_user.h
index db2da9d7cff..1164d2d0af6 100644
--- a/storage/perfschema/pfs_user.h
+++ b/storage/perfschema/pfs_user.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_variable.cc b/storage/perfschema/pfs_variable.cc
index 2fa9d914c1c..2d09f5a3d9e 100644
--- a/storage/perfschema/pfs_variable.cc
+++ b/storage/perfschema/pfs_variable.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_variable.h b/storage/perfschema/pfs_variable.h
index f24f7c3e4f2..d08fec36ba3 100644
--- a/storage/perfschema/pfs_variable.h
+++ b/storage/perfschema/pfs_variable.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_visitor.cc b/storage/perfschema/pfs_visitor.cc
index bc89437bb6a..0915bd4e40d 100644
--- a/storage/perfschema/pfs_visitor.cc
+++ b/storage/perfschema/pfs_visitor.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/pfs_visitor.h b/storage/perfschema/pfs_visitor.h
index 0258388d90a..93f52ca44ab 100644
--- a/storage/perfschema/pfs_visitor.h
+++ b/storage/perfschema/pfs_visitor.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_accounts.cc b/storage/perfschema/table_accounts.cc
index 7c1964721a6..b1609da028b 100644
--- a/storage/perfschema/table_accounts.cc
+++ b/storage/perfschema/table_accounts.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -61,6 +61,11 @@ TABLE_FIELD_DEF
table_accounts::m_field_def=
{ 4, field_types };
+PFS_engine_table_share_state
+table_accounts::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_accounts::m_share=
{
@@ -73,8 +78,9 @@ table_accounts::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_accounts::create()
diff --git a/storage/perfschema/table_accounts.h b/storage/perfschema/table_accounts.h
index 37e682fa9cc..96d6c52da6c 100644
--- a/storage/perfschema/table_accounts.h
+++ b/storage/perfschema/table_accounts.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -49,6 +49,7 @@ struct row_accounts
class table_accounts : public cursor_by_account
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_all_instr.cc b/storage/perfschema/table_all_instr.cc
index b54242fac15..a3396f304ca 100644
--- a/storage/perfschema/table_all_instr.cc
+++ b/storage/perfschema/table_all_instr.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_all_instr.h b/storage/perfschema/table_all_instr.h
index ca27f46fcea..93c7c845cbe 100644
--- a/storage/perfschema/table_all_instr.h
+++ b/storage/perfschema/table_all_instr.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.cc b/storage/perfschema/table_esgs_by_account_by_event_name.cc
index 536fd1be8a9..f0551e6d06d 100644
--- a/storage/perfschema/table_esgs_by_account_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_account_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -86,6 +86,11 @@ TABLE_FIELD_DEF
table_esgs_by_account_by_event_name::m_field_def=
{ 8, field_types };
+PFS_engine_table_share_state
+table_esgs_by_account_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esgs_by_account_by_event_name::m_share=
{
@@ -98,8 +103,9 @@ table_esgs_by_account_by_event_name::m_share=
sizeof(pos_esgs_by_account_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esgs_by_account_by_event_name.h b/storage/perfschema/table_esgs_by_account_by_event_name.h
index ef1ba92f619..11aafcb1323 100644
--- a/storage/perfschema/table_esgs_by_account_by_event_name.h
+++ b/storage/perfschema/table_esgs_by_account_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_esgs_by_account_by_event_name
class table_esgs_by_account_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.cc b/storage/perfschema/table_esgs_by_host_by_event_name.cc
index f04f591c344..ac25b2b42d7 100644
--- a/storage/perfschema/table_esgs_by_host_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_host_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -82,6 +82,11 @@ TABLE_FIELD_DEF
table_esgs_by_host_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_esgs_by_host_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esgs_by_host_by_event_name::m_share=
{
@@ -94,8 +99,9 @@ table_esgs_by_host_by_event_name::m_share=
sizeof(pos_esgs_by_host_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esgs_by_host_by_event_name.h b/storage/perfschema/table_esgs_by_host_by_event_name.h
index 5d1a0466534..51dd9697343 100644
--- a/storage/perfschema/table_esgs_by_host_by_event_name.h
+++ b/storage/perfschema/table_esgs_by_host_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_esgs_by_host_by_event_name
class table_esgs_by_host_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.cc b/storage/perfschema/table_esgs_by_thread_by_event_name.cc
index 5c78f3bfa9e..e8c8f6f850b 100644
--- a/storage/perfschema/table_esgs_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_thread_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -81,6 +81,11 @@ TABLE_FIELD_DEF
table_esgs_by_thread_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_esgs_by_thread_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esgs_by_thread_by_event_name::m_share=
{
@@ -93,8 +98,9 @@ table_esgs_by_thread_by_event_name::m_share=
sizeof(pos_esgs_by_thread_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esgs_by_thread_by_event_name.h b/storage/perfschema/table_esgs_by_thread_by_event_name.h
index ac60e834081..78aedfc1983 100644
--- a/storage/perfschema/table_esgs_by_thread_by_event_name.h
+++ b/storage/perfschema/table_esgs_by_thread_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct pos_esgs_by_thread_by_event_name
class table_esgs_by_thread_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.cc b/storage/perfschema/table_esgs_by_user_by_event_name.cc
index ca4782a33e1..7cc315c99a5 100644
--- a/storage/perfschema/table_esgs_by_user_by_event_name.cc
+++ b/storage/perfschema/table_esgs_by_user_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -81,6 +81,11 @@ TABLE_FIELD_DEF
table_esgs_by_user_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_esgs_by_user_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esgs_by_user_by_event_name::m_share=
{
@@ -93,8 +98,9 @@ table_esgs_by_user_by_event_name::m_share=
sizeof(pos_esgs_by_user_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esgs_by_user_by_event_name.h b/storage/perfschema/table_esgs_by_user_by_event_name.h
index 4403b193ee2..076867a088b 100644
--- a/storage/perfschema/table_esgs_by_user_by_event_name.h
+++ b/storage/perfschema/table_esgs_by_user_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -89,6 +89,7 @@ struct pos_esgs_by_user_by_event_name
class table_esgs_by_user_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esgs_global_by_event_name.cc b/storage/perfschema/table_esgs_global_by_event_name.cc
index 7a132d44f64..34c4bac1806 100644
--- a/storage/perfschema/table_esgs_global_by_event_name.cc
+++ b/storage/perfschema/table_esgs_global_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -77,6 +77,11 @@ TABLE_FIELD_DEF
table_esgs_global_by_event_name::m_field_def=
{ 6, field_types };
+PFS_engine_table_share_state
+table_esgs_global_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esgs_global_by_event_name::m_share=
{
@@ -89,8 +94,9 @@ table_esgs_global_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esgs_global_by_event_name.h b/storage/perfschema/table_esgs_global_by_event_name.h
index f2613b995f4..91d9cbd7554 100644
--- a/storage/perfschema/table_esgs_global_by_event_name.h
+++ b/storage/perfschema/table_esgs_global_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_esgs_global_by_event_name
class table_esgs_global_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_account_by_event_name.cc b/storage/perfschema/table_esms_by_account_by_event_name.cc
index 8879461fbcf..70c2d2335ab 100644
--- a/storage/perfschema/table_esms_by_account_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_account_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -181,6 +181,11 @@ TABLE_FIELD_DEF
table_esms_by_account_by_event_name::m_field_def=
{ 27, field_types };
+PFS_engine_table_share_state
+table_esms_by_account_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_account_by_event_name::m_share=
{
@@ -193,8 +198,9 @@ table_esms_by_account_by_event_name::m_share=
sizeof(pos_esms_by_account_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_account_by_event_name.h b/storage/perfschema/table_esms_by_account_by_event_name.h
index 7edd8b83588..0241599a219 100644
--- a/storage/perfschema/table_esms_by_account_by_event_name.h
+++ b/storage/perfschema/table_esms_by_account_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_esms_by_account_by_event_name
class table_esms_by_account_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_digest.cc b/storage/perfschema/table_esms_by_digest.cc
index 3767d367e9b..67a2e7f5799 100644
--- a/storage/perfschema/table_esms_by_digest.cc
+++ b/storage/perfschema/table_esms_by_digest.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -194,6 +194,11 @@ TABLE_FIELD_DEF
table_esms_by_digest::m_field_def=
{ 29, field_types };
+PFS_engine_table_share_state
+table_esms_by_digest::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_digest::m_share=
{
@@ -206,8 +211,9 @@ table_esms_by_digest::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_digest.h b/storage/perfschema/table_esms_by_digest.h
index 76f1c033513..26577d43dcd 100644
--- a/storage/perfschema/table_esms_by_digest.h
+++ b/storage/perfschema/table_esms_by_digest.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -58,6 +58,7 @@ struct row_esms_by_digest
class table_esms_by_digest : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_host_by_event_name.cc b/storage/perfschema/table_esms_by_host_by_event_name.cc
index f2a11a8389e..27445b57d9d 100644
--- a/storage/perfschema/table_esms_by_host_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_host_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -177,6 +177,11 @@ TABLE_FIELD_DEF
table_esms_by_host_by_event_name::m_field_def=
{ 26, field_types };
+PFS_engine_table_share_state
+table_esms_by_host_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_host_by_event_name::m_share=
{
@@ -189,8 +194,9 @@ table_esms_by_host_by_event_name::m_share=
sizeof(pos_esms_by_host_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_host_by_event_name.h b/storage/perfschema/table_esms_by_host_by_event_name.h
index 7580957f278..199f5581202 100644
--- a/storage/perfschema/table_esms_by_host_by_event_name.h
+++ b/storage/perfschema/table_esms_by_host_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_esms_by_host_by_event_name
class table_esms_by_host_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_program.cc b/storage/perfschema/table_esms_by_program.cc
index e026106078f..621259fead8 100644
--- a/storage/perfschema/table_esms_by_program.cc
+++ b/storage/perfschema/table_esms_by_program.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -209,6 +209,11 @@ TABLE_FIELD_DEF
table_esms_by_program::m_field_def=
{ 32, field_types };
+PFS_engine_table_share_state
+table_esms_by_program::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_program::m_share=
{
@@ -221,8 +226,9 @@ table_esms_by_program::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_program.h b/storage/perfschema/table_esms_by_program.h
index fdafb655918..a9aa47c2300 100644
--- a/storage/perfschema/table_esms_by_program.h
+++ b/storage/perfschema/table_esms_by_program.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -68,6 +68,7 @@ struct row_esms_by_program
class table_esms_by_program : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.cc b/storage/perfschema/table_esms_by_thread_by_event_name.cc
index ea183b87665..5cafafe5dfc 100644
--- a/storage/perfschema/table_esms_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_thread_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -176,6 +176,11 @@ TABLE_FIELD_DEF
table_esms_by_thread_by_event_name::m_field_def=
{ 26, field_types };
+PFS_engine_table_share_state
+table_esms_by_thread_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_thread_by_event_name::m_share=
{
@@ -188,8 +193,9 @@ table_esms_by_thread_by_event_name::m_share=
sizeof(pos_esms_by_thread_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_thread_by_event_name.h b/storage/perfschema/table_esms_by_thread_by_event_name.h
index afae89aad63..784af3e04c7 100644
--- a/storage/perfschema/table_esms_by_thread_by_event_name.h
+++ b/storage/perfschema/table_esms_by_thread_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct pos_esms_by_thread_by_event_name
class table_esms_by_thread_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_by_user_by_event_name.cc b/storage/perfschema/table_esms_by_user_by_event_name.cc
index 95a29002bc4..2a0b53caf08 100644
--- a/storage/perfschema/table_esms_by_user_by_event_name.cc
+++ b/storage/perfschema/table_esms_by_user_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -176,6 +176,11 @@ TABLE_FIELD_DEF
table_esms_by_user_by_event_name::m_field_def=
{ 26, field_types };
+PFS_engine_table_share_state
+table_esms_by_user_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_by_user_by_event_name::m_share=
{
@@ -188,8 +193,9 @@ table_esms_by_user_by_event_name::m_share=
sizeof(pos_esms_by_user_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_by_user_by_event_name.h b/storage/perfschema/table_esms_by_user_by_event_name.h
index b50ef4f4dff..92069382629 100644
--- a/storage/perfschema/table_esms_by_user_by_event_name.h
+++ b/storage/perfschema/table_esms_by_user_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_esms_by_user_by_event_name
class table_esms_by_user_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_esms_global_by_event_name.cc b/storage/perfschema/table_esms_global_by_event_name.cc
index 2a9181cadf4..8b3410ab9a2 100644
--- a/storage/perfschema/table_esms_global_by_event_name.cc
+++ b/storage/perfschema/table_esms_global_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -172,6 +172,11 @@ TABLE_FIELD_DEF
table_esms_global_by_event_name::m_field_def=
{ 25, field_types };
+PFS_engine_table_share_state
+table_esms_global_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_esms_global_by_event_name::m_share=
{
@@ -184,8 +189,9 @@ table_esms_global_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_esms_global_by_event_name.h b/storage/perfschema/table_esms_global_by_event_name.h
index 9071cbdfcf3..f43fb7421b1 100644
--- a/storage/perfschema/table_esms_global_by_event_name.h
+++ b/storage/perfschema/table_esms_global_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_esms_global_by_event_name
class table_esms_global_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ets_by_account_by_event_name.cc b/storage/perfschema/table_ets_by_account_by_event_name.cc
index 279fb03593b..ee570eaa311 100644
--- a/storage/perfschema/table_ets_by_account_by_event_name.cc
+++ b/storage/perfschema/table_ets_by_account_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -136,6 +136,11 @@ TABLE_FIELD_DEF
table_ets_by_account_by_event_name::m_field_def=
{ 18, field_types };
+PFS_engine_table_share_state
+table_ets_by_account_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ets_by_account_by_event_name::m_share=
{
@@ -148,8 +153,9 @@ table_ets_by_account_by_event_name::m_share=
sizeof(pos_ets_by_account_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ets_by_account_by_event_name.h b/storage/perfschema/table_ets_by_account_by_event_name.h
index 3399c27d6e4..e227db2e08e 100644
--- a/storage/perfschema/table_ets_by_account_by_event_name.h
+++ b/storage/perfschema/table_ets_by_account_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct pos_ets_by_account_by_event_name
class table_ets_by_account_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ets_by_host_by_event_name.cc b/storage/perfschema/table_ets_by_host_by_event_name.cc
index 34dc14753a4..f08ec69435e 100644
--- a/storage/perfschema/table_ets_by_host_by_event_name.cc
+++ b/storage/perfschema/table_ets_by_host_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -132,6 +132,11 @@ TABLE_FIELD_DEF
table_ets_by_host_by_event_name::m_field_def=
{ 17, field_types };
+PFS_engine_table_share_state
+table_ets_by_host_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ets_by_host_by_event_name::m_share=
{
@@ -144,8 +149,9 @@ table_ets_by_host_by_event_name::m_share=
sizeof(pos_ets_by_host_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ets_by_host_by_event_name.h b/storage/perfschema/table_ets_by_host_by_event_name.h
index 2188f385701..add2d1a32a6 100644
--- a/storage/perfschema/table_ets_by_host_by_event_name.h
+++ b/storage/perfschema/table_ets_by_host_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct pos_ets_by_host_by_event_name
class table_ets_by_host_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.cc b/storage/perfschema/table_ets_by_thread_by_event_name.cc
index 5b2d56aa89a..bf8749fb7b6 100644
--- a/storage/perfschema/table_ets_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_ets_by_thread_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -131,6 +131,11 @@ TABLE_FIELD_DEF
table_ets_by_thread_by_event_name::m_field_def=
{ 17, field_types };
+PFS_engine_table_share_state
+table_ets_by_thread_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ets_by_thread_by_event_name::m_share=
{
@@ -143,8 +148,9 @@ table_ets_by_thread_by_event_name::m_share=
sizeof(pos_ets_by_thread_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ets_by_thread_by_event_name.h b/storage/perfschema/table_ets_by_thread_by_event_name.h
index dbfe1fae016..a69e19653ee 100644
--- a/storage/perfschema/table_ets_by_thread_by_event_name.h
+++ b/storage/perfschema/table_ets_by_thread_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -92,6 +92,7 @@ struct pos_ets_by_thread_by_event_name
class table_ets_by_thread_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ets_by_user_by_event_name.cc b/storage/perfschema/table_ets_by_user_by_event_name.cc
index 71d9bfa3209..725535f36d9 100644
--- a/storage/perfschema/table_ets_by_user_by_event_name.cc
+++ b/storage/perfschema/table_ets_by_user_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -131,6 +131,11 @@ TABLE_FIELD_DEF
table_ets_by_user_by_event_name::m_field_def=
{ 17, field_types };
+PFS_engine_table_share_state
+table_ets_by_user_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ets_by_user_by_event_name::m_share=
{
@@ -143,8 +148,9 @@ table_ets_by_user_by_event_name::m_share=
sizeof(pos_ets_by_user_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ets_by_user_by_event_name.h b/storage/perfschema/table_ets_by_user_by_event_name.h
index 62721ce9adf..fc18a3e94e6 100644
--- a/storage/perfschema/table_ets_by_user_by_event_name.h
+++ b/storage/perfschema/table_ets_by_user_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct pos_ets_by_user_by_event_name
class table_ets_by_user_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ets_global_by_event_name.cc b/storage/perfschema/table_ets_global_by_event_name.cc
index 64433d32e30..d2d891796e7 100644
--- a/storage/perfschema/table_ets_global_by_event_name.cc
+++ b/storage/perfschema/table_ets_global_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -127,6 +127,11 @@ TABLE_FIELD_DEF
table_ets_global_by_event_name::m_field_def=
{ 16, field_types };
+PFS_engine_table_share_state
+table_ets_global_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ets_global_by_event_name::m_share=
{
@@ -139,8 +144,9 @@ table_ets_global_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ets_global_by_event_name.h b/storage/perfschema/table_ets_global_by_event_name.h
index 717a737f93c..a2136a23210 100644
--- a/storage/perfschema/table_ets_global_by_event_name.h
+++ b/storage/perfschema/table_ets_global_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -59,6 +59,7 @@ struct row_ets_global_by_event_name
class table_ets_global_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_events_stages.cc b/storage/perfschema/table_events_stages.cc
index 7fafcdc615f..a4edf9df2aa 100644
--- a/storage/perfschema/table_events_stages.cc
+++ b/storage/perfschema/table_events_stages.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -105,6 +105,11 @@ TABLE_FIELD_DEF
table_events_stages_current::m_field_def=
{12 , field_types };
+PFS_engine_table_share_state
+table_events_stages_current::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_stages_current::m_share=
{
@@ -117,12 +122,18 @@ table_events_stages_current::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_stages_history::m_table_lock;
+PFS_engine_table_share_state
+table_events_stages_history::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_stages_history::m_share=
{
@@ -135,12 +146,18 @@ table_events_stages_history::m_share=
sizeof(pos_events_stages_history), /* ref length */
&m_table_lock,
&table_events_stages_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_stages_history_long::m_table_lock;
+PFS_engine_table_share_state
+table_events_stages_history_long::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_stages_history_long::m_share=
{
@@ -153,8 +170,9 @@ table_events_stages_history_long::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&table_events_stages_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
table_events_stages_common::table_events_stages_common
diff --git a/storage/perfschema/table_events_stages.h b/storage/perfschema/table_events_stages.h
index 38b6917b77d..c3c6707fbc4 100644
--- a/storage/perfschema/table_events_stages.h
+++ b/storage/perfschema/table_events_stages.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -122,6 +122,7 @@ protected:
class table_events_stages_current : public table_events_stages_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -163,6 +164,7 @@ private:
class table_events_stages_history : public table_events_stages_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -195,6 +197,7 @@ private:
class table_events_stages_history_long : public table_events_stages_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_events_statements.cc b/storage/perfschema/table_events_statements.cc
index 46417d8e670..2b66b746ebd 100644
--- a/storage/perfschema/table_events_statements.cc
+++ b/storage/perfschema/table_events_statements.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -252,6 +252,11 @@ TABLE_FIELD_DEF
table_events_statements_current::m_field_def=
{41 , field_types };
+PFS_engine_table_share_state
+table_events_statements_current::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_statements_current::m_share=
{
@@ -264,12 +269,18 @@ table_events_statements_current::m_share=
sizeof(pos_events_statements_current), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_statements_history::m_table_lock;
+PFS_engine_table_share_state
+table_events_statements_history::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_statements_history::m_share=
{
@@ -282,12 +293,18 @@ table_events_statements_history::m_share=
sizeof(pos_events_statements_history), /* ref length */
&m_table_lock,
&table_events_statements_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_statements_history_long::m_table_lock;
+PFS_engine_table_share_state
+table_events_statements_history_long::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_statements_history_long::m_share=
{
@@ -300,8 +317,9 @@ table_events_statements_history_long::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&table_events_statements_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
table_events_statements_common::table_events_statements_common
diff --git a/storage/perfschema/table_events_statements.h b/storage/perfschema/table_events_statements.h
index 5f326b5c298..64c7fa8e297 100644
--- a/storage/perfschema/table_events_statements.h
+++ b/storage/perfschema/table_events_statements.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -209,6 +209,7 @@ protected:
class table_events_statements_current : public table_events_statements_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -252,6 +253,7 @@ private:
class table_events_statements_history : public table_events_statements_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -286,6 +288,7 @@ private:
class table_events_statements_history_long : public table_events_statements_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_events_transactions.cc b/storage/perfschema/table_events_transactions.cc
index 1f7c6299baa..2e27337727b 100644
--- a/storage/perfschema/table_events_transactions.cc
+++ b/storage/perfschema/table_events_transactions.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -167,6 +167,11 @@ TABLE_FIELD_DEF
table_events_transactions_current::m_field_def=
{24 , field_types };
+PFS_engine_table_share_state
+table_events_transactions_current::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_transactions_current::m_share=
{
@@ -179,12 +184,18 @@ table_events_transactions_current::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_transactions_history::m_table_lock;
+PFS_engine_table_share_state
+table_events_transactions_history::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_transactions_history::m_share=
{
@@ -197,12 +208,18 @@ table_events_transactions_history::m_share=
sizeof(pos_events_transactions_history), /* ref length */
&m_table_lock,
&table_events_transactions_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_transactions_history_long::m_table_lock;
+PFS_engine_table_share_state
+table_events_transactions_history_long::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_transactions_history_long::m_share=
{
@@ -215,8 +232,9 @@ table_events_transactions_history_long::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&table_events_transactions_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
table_events_transactions_common::table_events_transactions_common
diff --git a/storage/perfschema/table_events_transactions.h b/storage/perfschema/table_events_transactions.h
index 3c0c7dd564f..158ee7a56b8 100644
--- a/storage/perfschema/table_events_transactions.h
+++ b/storage/perfschema/table_events_transactions.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -149,6 +149,7 @@ protected:
class table_events_transactions_current : public table_events_transactions_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -190,6 +191,7 @@ private:
class table_events_transactions_history : public table_events_transactions_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -222,6 +224,7 @@ private:
class table_events_transactions_history_long : public table_events_transactions_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_events_waits.cc b/storage/perfschema/table_events_waits.cc
index bb54f03a473..b28c501a493 100644
--- a/storage/perfschema/table_events_waits.cc
+++ b/storage/perfschema/table_events_waits.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -142,6 +142,11 @@ TABLE_FIELD_DEF
table_events_waits_current::m_field_def=
{ 19, field_types };
+PFS_engine_table_share_state
+table_events_waits_current::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_waits_current::m_share=
{
@@ -154,12 +159,18 @@ table_events_waits_current::m_share=
sizeof(pos_events_waits_current), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_waits_history::m_table_lock;
+PFS_engine_table_share_state
+table_events_waits_history::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_waits_history::m_share=
{
@@ -172,12 +183,18 @@ table_events_waits_history::m_share=
sizeof(pos_events_waits_history), /* ref length */
&m_table_lock,
&table_events_waits_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
THR_LOCK table_events_waits_history_long::m_table_lock;
+PFS_engine_table_share_state
+table_events_waits_history_long::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_waits_history_long::m_share=
{
@@ -190,8 +207,9 @@ table_events_waits_history_long::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&table_events_waits_current::m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
table_events_waits_common::table_events_waits_common
diff --git a/storage/perfschema/table_events_waits.h b/storage/perfschema/table_events_waits.h
index b0abcf7b0a6..aa9fa61c002 100644
--- a/storage/perfschema/table_events_waits.h
+++ b/storage/perfschema/table_events_waits.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -167,6 +167,7 @@ protected:
class table_events_waits_current : public table_events_waits_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -209,6 +210,7 @@ private:
class table_events_waits_history : public table_events_waits_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -242,6 +244,7 @@ private:
class table_events_waits_history_long : public table_events_waits_common
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_events_waits_summary.cc b/storage/perfschema/table_events_waits_summary.cc
index 52d3f6ea10d..4415ce5193f 100644
--- a/storage/perfschema/table_events_waits_summary.cc
+++ b/storage/perfschema/table_events_waits_summary.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -79,6 +79,11 @@ TABLE_FIELD_DEF
table_events_waits_summary_by_instance::m_field_def=
{ 7, ews_by_instance_field_types };
+PFS_engine_table_share_state
+table_events_waits_summary_by_instance::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_events_waits_summary_by_instance::m_share=
{
@@ -91,8 +96,9 @@ table_events_waits_summary_by_instance::m_share=
sizeof(pos_all_instr),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_events_waits_summary_by_instance::create(void)
diff --git a/storage/perfschema/table_events_waits_summary.h b/storage/perfschema/table_events_waits_summary.h
index 0e97888f7b6..643c09a8e7c 100644
--- a/storage/perfschema/table_events_waits_summary.h
+++ b/storage/perfschema/table_events_waits_summary.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -57,6 +57,7 @@ struct row_events_waits_summary_by_instance
class table_events_waits_summary_by_instance : public table_all_instr
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ews_by_account_by_event_name.cc b/storage/perfschema/table_ews_by_account_by_event_name.cc
index e6c7ab1a7cf..28f01731845 100644
--- a/storage/perfschema/table_ews_by_account_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_account_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -86,6 +86,11 @@ TABLE_FIELD_DEF
table_ews_by_account_by_event_name::m_field_def=
{ 8, field_types };
+PFS_engine_table_share_state
+table_ews_by_account_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ews_by_account_by_event_name::m_share=
{
@@ -98,8 +103,9 @@ table_ews_by_account_by_event_name::m_share=
sizeof(pos_ews_by_account_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ews_by_account_by_event_name.h b/storage/perfschema/table_ews_by_account_by_event_name.h
index 30b2deb6f30..3447302aa93 100644
--- a/storage/perfschema/table_ews_by_account_by_event_name.h
+++ b/storage/perfschema/table_ews_by_account_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -96,6 +96,7 @@ struct pos_ews_by_account_by_event_name
class table_ews_by_account_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ews_by_host_by_event_name.cc b/storage/perfschema/table_ews_by_host_by_event_name.cc
index 86bce3c43d9..00f054d39cf 100644
--- a/storage/perfschema/table_ews_by_host_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_host_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -82,6 +82,11 @@ TABLE_FIELD_DEF
table_ews_by_host_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_ews_by_host_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ews_by_host_by_event_name::m_share=
{
@@ -94,8 +99,9 @@ table_ews_by_host_by_event_name::m_share=
sizeof(pos_ews_by_host_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ews_by_host_by_event_name.h b/storage/perfschema/table_ews_by_host_by_event_name.h
index ade88d28da4..4c277b26fa5 100644
--- a/storage/perfschema/table_ews_by_host_by_event_name.h
+++ b/storage/perfschema/table_ews_by_host_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -96,6 +96,7 @@ struct pos_ews_by_host_by_event_name
class table_ews_by_host_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.cc b/storage/perfschema/table_ews_by_thread_by_event_name.cc
index 851ac37d7f0..0a7879912ef 100644
--- a/storage/perfschema/table_ews_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_thread_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -81,6 +81,11 @@ TABLE_FIELD_DEF
table_ews_by_thread_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_ews_by_thread_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ews_by_thread_by_event_name::m_share=
{
@@ -93,8 +98,9 @@ table_ews_by_thread_by_event_name::m_share=
sizeof(pos_ews_by_thread_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ews_by_thread_by_event_name.h b/storage/perfschema/table_ews_by_thread_by_event_name.h
index 30ff564563f..f7f44a151d0 100644
--- a/storage/perfschema/table_ews_by_thread_by_event_name.h
+++ b/storage/perfschema/table_ews_by_thread_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -95,6 +95,7 @@ struct pos_ews_by_thread_by_event_name
class table_ews_by_thread_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ews_by_user_by_event_name.cc b/storage/perfschema/table_ews_by_user_by_event_name.cc
index d5205320cf1..e5c51bc37fe 100644
--- a/storage/perfschema/table_ews_by_user_by_event_name.cc
+++ b/storage/perfschema/table_ews_by_user_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -81,6 +81,11 @@ TABLE_FIELD_DEF
table_ews_by_user_by_event_name::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_ews_by_user_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ews_by_user_by_event_name::m_share=
{
@@ -93,8 +98,9 @@ table_ews_by_user_by_event_name::m_share=
sizeof(pos_ews_by_user_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ews_by_user_by_event_name.h b/storage/perfschema/table_ews_by_user_by_event_name.h
index 6883d61394b..e83a030521a 100644
--- a/storage/perfschema/table_ews_by_user_by_event_name.h
+++ b/storage/perfschema/table_ews_by_user_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -96,6 +96,7 @@ struct pos_ews_by_user_by_event_name
class table_ews_by_user_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_ews_global_by_event_name.cc b/storage/perfschema/table_ews_global_by_event_name.cc
index d4169a562b2..bb304153857 100644
--- a/storage/perfschema/table_ews_global_by_event_name.cc
+++ b/storage/perfschema/table_ews_global_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -77,6 +77,11 @@ TABLE_FIELD_DEF
table_ews_global_by_event_name::m_field_def=
{ 6, field_types };
+PFS_engine_table_share_state
+table_ews_global_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_ews_global_by_event_name::m_share=
{
@@ -89,8 +94,9 @@ table_ews_global_by_event_name::m_share=
sizeof(pos_ews_global_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_ews_global_by_event_name.h b/storage/perfschema/table_ews_global_by_event_name.h
index ea146aaee50..e04fb01c096 100644
--- a/storage/perfschema/table_ews_global_by_event_name.h
+++ b/storage/perfschema/table_ews_global_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -84,6 +84,7 @@ struct pos_ews_global_by_event_name
class table_ews_global_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_file_instances.cc b/storage/perfschema/table_file_instances.cc
index 518c9bedad3..29803a31fff 100644
--- a/storage/perfschema/table_file_instances.cc
+++ b/storage/perfschema/table_file_instances.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -60,6 +60,11 @@ TABLE_FIELD_DEF
table_file_instances::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_file_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_file_instances::m_share=
{
@@ -72,8 +77,9 @@ table_file_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_file_instances::create(void)
diff --git a/storage/perfschema/table_file_instances.h b/storage/perfschema/table_file_instances.h
index 073512d7bad..336041f0aff 100644
--- a/storage/perfschema/table_file_instances.h
+++ b/storage/perfschema/table_file_instances.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_file_instances
class table_file_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_file_summary_by_event_name.cc b/storage/perfschema/table_file_summary_by_event_name.cc
index 9a5258111bb..33705b78509 100644
--- a/storage/perfschema/table_file_summary_by_event_name.cc
+++ b/storage/perfschema/table_file_summary_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -166,6 +166,11 @@ TABLE_FIELD_DEF
table_file_summary_by_event_name::m_field_def=
{ 23, field_types };
+PFS_engine_table_share_state
+table_file_summary_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_file_summary_by_event_name::m_share=
{
@@ -178,8 +183,9 @@ table_file_summary_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_file_summary_by_event_name::create(void)
diff --git a/storage/perfschema/table_file_summary_by_event_name.h b/storage/perfschema/table_file_summary_by_event_name.h
index c6e698215fe..7bbedd7503f 100644
--- a/storage/perfschema/table_file_summary_by_event_name.h
+++ b/storage/perfschema/table_file_summary_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_file_summary_by_event_name
class table_file_summary_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_file_summary_by_instance.cc b/storage/perfschema/table_file_summary_by_instance.cc
index d4292421ca7..3a9f35a89fa 100644
--- a/storage/perfschema/table_file_summary_by_instance.cc
+++ b/storage/perfschema/table_file_summary_by_instance.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -176,6 +176,11 @@ TABLE_FIELD_DEF
table_file_summary_by_instance::m_field_def=
{ 25, field_types };
+PFS_engine_table_share_state
+table_file_summary_by_instance::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_file_summary_by_instance::m_share=
{
@@ -188,8 +193,9 @@ table_file_summary_by_instance::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_file_summary_by_instance::create(void)
diff --git a/storage/perfschema/table_file_summary_by_instance.h b/storage/perfschema/table_file_summary_by_instance.h
index 574c4fbd9d5..6db8bcae8df 100644
--- a/storage/perfschema/table_file_summary_by_instance.h
+++ b/storage/perfschema/table_file_summary_by_instance.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -63,6 +63,7 @@ struct row_file_summary_by_instance
class table_file_summary_by_instance : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_global_status.cc b/storage/perfschema/table_global_status.cc
index 8b9ced5ab7f..cf7e97621c6 100644
--- a/storage/perfschema/table_global_status.cc
+++ b/storage/perfschema/table_global_status.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,11 @@ TABLE_FIELD_DEF
table_global_status::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_global_status::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_global_status::m_share=
{
@@ -65,8 +70,9 @@ table_global_status::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- true /* perpetual */
+ true, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_global_status.h b/storage/perfschema/table_global_status.h
index 53d7ca459c9..45c57fb6900 100644
--- a/storage/perfschema/table_global_status.h
+++ b/storage/perfschema/table_global_status.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -68,6 +68,7 @@ class table_global_status : public PFS_engine_table
typedef PFS_simple_index pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_global_variables.cc b/storage/perfschema/table_global_variables.cc
index 4c60f4cdd0a..594cfbf6bde 100644
--- a/storage/perfschema/table_global_variables.cc
+++ b/storage/perfschema/table_global_variables.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,11 @@ TABLE_FIELD_DEF
table_global_variables::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_global_variables::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_global_variables::m_share=
{
@@ -65,8 +70,9 @@ table_global_variables::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- true /* perpetual */
+ true, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_global_variables.h b/storage/perfschema/table_global_variables.h
index 8a9bbd63574..f5429c671a2 100644
--- a/storage/perfschema/table_global_variables.h
+++ b/storage/perfschema/table_global_variables.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -68,6 +68,7 @@ class table_global_variables : public PFS_engine_table
typedef PFS_simple_index pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_helper.cc b/storage/perfschema/table_helper.cc
index 8ba5219aae5..59dc8906ec3 100644
--- a/storage/perfschema/table_helper.cc
+++ b/storage/perfschema/table_helper.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_helper.h b/storage/perfschema/table_helper.h
index 889f447df4e..680339c2257 100644
--- a/storage/perfschema/table_helper.h
+++ b/storage/perfschema/table_helper.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_host_cache.cc b/storage/perfschema/table_host_cache.cc
index 6f088eaffdc..3a580985659 100644
--- a/storage/perfschema/table_host_cache.cc
+++ b/storage/perfschema/table_host_cache.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -187,6 +187,11 @@ TABLE_FIELD_DEF
table_host_cache::m_field_def=
{ 29, field_types };
+PFS_engine_table_share_state
+table_host_cache::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_host_cache::m_share=
{
@@ -199,8 +204,9 @@ table_host_cache::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_host_cache::create(void)
diff --git a/storage/perfschema/table_host_cache.h b/storage/perfschema/table_host_cache.h
index 76a1108ea2e..209bee5484f 100644
--- a/storage/perfschema/table_host_cache.h
+++ b/storage/perfschema/table_host_cache.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -107,6 +107,7 @@ struct row_host_cache
class table_host_cache : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_hosts.cc b/storage/perfschema/table_hosts.cc
index 4a20c516297..99da395088c 100644
--- a/storage/perfschema/table_hosts.cc
+++ b/storage/perfschema/table_hosts.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -57,6 +57,11 @@ TABLE_FIELD_DEF
table_hosts::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_hosts::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_hosts::m_share=
{
@@ -69,8 +74,9 @@ table_hosts::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_hosts::create()
diff --git a/storage/perfschema/table_hosts.h b/storage/perfschema/table_hosts.h
index 4e2690aa36b..089ae75c285 100644
--- a/storage/perfschema/table_hosts.h
+++ b/storage/perfschema/table_hosts.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -49,6 +49,7 @@ struct row_hosts
class table_hosts : public cursor_by_host
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_md_locks.cc b/storage/perfschema/table_md_locks.cc
index 3889c8037e0..05b8da86bf9 100644
--- a/storage/perfschema/table_md_locks.cc
+++ b/storage/perfschema/table_md_locks.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -95,6 +95,11 @@ TABLE_FIELD_DEF
table_metadata_locks::m_field_def=
{ 10, field_types };
+PFS_engine_table_share_state
+table_metadata_locks::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_metadata_locks::m_share=
{
@@ -107,8 +112,9 @@ table_metadata_locks::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_metadata_locks::create(void)
diff --git a/storage/perfschema/table_md_locks.h b/storage/perfschema/table_md_locks.h
index c6a4a2eca8d..ddb133ea7ff 100644
--- a/storage/perfschema/table_md_locks.h
+++ b/storage/perfschema/table_md_locks.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -63,6 +63,7 @@ struct row_metadata_lock
class table_metadata_locks : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_mems_by_account_by_event_name.cc b/storage/perfschema/table_mems_by_account_by_event_name.cc
index a9ac82e74b2..369d5ba4d8d 100644
--- a/storage/perfschema/table_mems_by_account_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_account_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -112,6 +112,11 @@ TABLE_FIELD_DEF
table_mems_by_account_by_event_name::m_field_def=
{ 13, field_types };
+PFS_engine_table_share_state
+table_mems_by_account_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mems_by_account_by_event_name::m_share=
{
@@ -124,8 +129,9 @@ table_mems_by_account_by_event_name::m_share=
sizeof(pos_mems_by_account_by_event_name),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mems_by_account_by_event_name::create(void)
diff --git a/storage/perfschema/table_mems_by_account_by_event_name.h b/storage/perfschema/table_mems_by_account_by_event_name.h
index 9d43c4cf404..626190461d5 100644
--- a/storage/perfschema/table_mems_by_account_by_event_name.h
+++ b/storage/perfschema/table_mems_by_account_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -85,6 +85,7 @@ struct pos_mems_by_account_by_event_name
class table_mems_by_account_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_mems_by_host_by_event_name.cc b/storage/perfschema/table_mems_by_host_by_event_name.cc
index ff3dc8f6a68..d8426166c15 100644
--- a/storage/perfschema/table_mems_by_host_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_host_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -107,6 +107,11 @@ TABLE_FIELD_DEF
table_mems_by_host_by_event_name::m_field_def=
{ 12, field_types };
+PFS_engine_table_share_state
+table_mems_by_host_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mems_by_host_by_event_name::m_share=
{
@@ -119,8 +124,9 @@ table_mems_by_host_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mems_by_host_by_event_name::create(void)
diff --git a/storage/perfschema/table_mems_by_host_by_event_name.h b/storage/perfschema/table_mems_by_host_by_event_name.h
index a4fdde24fbd..f46f3c889e0 100644
--- a/storage/perfschema/table_mems_by_host_by_event_name.h
+++ b/storage/perfschema/table_mems_by_host_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -85,6 +85,7 @@ struct pos_mems_by_host_by_event_name
class table_mems_by_host_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.cc b/storage/perfschema/table_mems_by_thread_by_event_name.cc
index 117bc8f0062..a5be3f6c517 100644
--- a/storage/perfschema/table_mems_by_thread_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_thread_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -107,6 +107,11 @@ TABLE_FIELD_DEF
table_mems_by_thread_by_event_name::m_field_def=
{ 12, field_types };
+PFS_engine_table_share_state
+table_mems_by_thread_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mems_by_thread_by_event_name::m_share=
{
@@ -119,8 +124,9 @@ table_mems_by_thread_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mems_by_thread_by_event_name::create(void)
diff --git a/storage/perfschema/table_mems_by_thread_by_event_name.h b/storage/perfschema/table_mems_by_thread_by_event_name.h
index b89172669e6..17196e0fd80 100644
--- a/storage/perfschema/table_mems_by_thread_by_event_name.h
+++ b/storage/perfschema/table_mems_by_thread_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -85,6 +85,7 @@ struct pos_mems_by_thread_by_event_name
class table_mems_by_thread_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_mems_by_user_by_event_name.cc b/storage/perfschema/table_mems_by_user_by_event_name.cc
index 201082f57d1..179f339d4a2 100644
--- a/storage/perfschema/table_mems_by_user_by_event_name.cc
+++ b/storage/perfschema/table_mems_by_user_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -107,6 +107,11 @@ TABLE_FIELD_DEF
table_mems_by_user_by_event_name::m_field_def=
{ 12, field_types };
+PFS_engine_table_share_state
+table_mems_by_user_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mems_by_user_by_event_name::m_share=
{
@@ -119,8 +124,9 @@ table_mems_by_user_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mems_by_user_by_event_name::create(void)
diff --git a/storage/perfschema/table_mems_by_user_by_event_name.h b/storage/perfschema/table_mems_by_user_by_event_name.h
index 34c4cd518ae..c2ad8bd7462 100644
--- a/storage/perfschema/table_mems_by_user_by_event_name.h
+++ b/storage/perfschema/table_mems_by_user_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -85,6 +85,7 @@ struct pos_mems_by_user_by_event_name
class table_mems_by_user_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_mems_global_by_event_name.cc b/storage/perfschema/table_mems_global_by_event_name.cc
index bca136a55bb..cb06b592363 100644
--- a/storage/perfschema/table_mems_global_by_event_name.cc
+++ b/storage/perfschema/table_mems_global_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -102,6 +102,11 @@ TABLE_FIELD_DEF
table_mems_global_by_event_name::m_field_def=
{ 11, field_types };
+PFS_engine_table_share_state
+table_mems_global_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mems_global_by_event_name::m_share=
{
@@ -114,8 +119,9 @@ table_mems_global_by_event_name::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mems_global_by_event_name::create(void)
diff --git a/storage/perfschema/table_mems_global_by_event_name.h b/storage/perfschema/table_mems_global_by_event_name.h
index 46dbccbd414..eaff095f8d7 100644
--- a/storage/perfschema/table_mems_global_by_event_name.h
+++ b/storage/perfschema/table_mems_global_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -87,6 +87,7 @@ class table_mems_global_by_event_name : public PFS_engine_table
typedef pos_mems_global_by_event_name pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_os_global_by_type.cc b/storage/perfschema/table_os_global_by_type.cc
index c957891f70d..efb3c30db67 100644
--- a/storage/perfschema/table_os_global_by_type.cc
+++ b/storage/perfschema/table_os_global_by_type.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -85,6 +85,11 @@ TABLE_FIELD_DEF
table_os_global_by_type::m_field_def=
{ 8, field_types };
+PFS_engine_table_share_state
+table_os_global_by_type::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_os_global_by_type::m_share=
{
@@ -97,8 +102,9 @@ table_os_global_by_type::m_share=
sizeof(pos_os_global_by_type),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_os_global_by_type.h b/storage/perfschema/table_os_global_by_type.h
index bf7220d9fc7..856919ad2ee 100644
--- a/storage/perfschema/table_os_global_by_type.h
+++ b/storage/perfschema/table_os_global_by_type.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -86,6 +86,7 @@ struct pos_os_global_by_type : public PFS_double_index,
class table_os_global_by_type : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_performance_timers.cc b/storage/perfschema/table_performance_timers.cc
index 1fe44a92285..a082a842c46 100644
--- a/storage/perfschema/table_performance_timers.cc
+++ b/storage/perfschema/table_performance_timers.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -63,6 +63,11 @@ TABLE_FIELD_DEF
table_performance_timers::m_field_def=
{ 4, field_types };
+PFS_engine_table_share_state
+table_performance_timers::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_performance_timers::m_share=
{
@@ -75,8 +80,9 @@ table_performance_timers::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_performance_timers::create(void)
diff --git a/storage/perfschema/table_performance_timers.h b/storage/perfschema/table_performance_timers.h
index 226c2d6a65a..8fe8612b71a 100644
--- a/storage/perfschema/table_performance_timers.h
+++ b/storage/perfschema/table_performance_timers.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,7 @@ struct row_performance_timers
class table_performance_timers : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_prepared_stmt_instances.cc b/storage/perfschema/table_prepared_stmt_instances.cc
index 459a01aae96..6c883584364 100644
--- a/storage/perfschema/table_prepared_stmt_instances.cc
+++ b/storage/perfschema/table_prepared_stmt_instances.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -224,6 +224,11 @@ TABLE_FIELD_DEF
table_prepared_stmt_instances::m_field_def=
{ 35, field_types };
+PFS_engine_table_share_state
+table_prepared_stmt_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_prepared_stmt_instances::m_share=
{
@@ -236,8 +241,9 @@ table_prepared_stmt_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_prepared_stmt_instances.h b/storage/perfschema/table_prepared_stmt_instances.h
index a061e0d9883..e7afe5d48b0 100644
--- a/storage/perfschema/table_prepared_stmt_instances.h
+++ b/storage/perfschema/table_prepared_stmt_instances.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -87,6 +87,7 @@ struct row_prepared_stmt_instances
class table_prepared_stmt_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_processlist.cc b/storage/perfschema/table_processlist.cc
new file mode 100644
index 00000000000..f7f1e72aa0b
--- /dev/null
+++ b/storage/perfschema/table_processlist.cc
@@ -0,0 +1,406 @@
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License, version 2.0,
+ as published by the Free Software Foundation.
+
+ This program is also distributed with certain software (including
+ but not limited to OpenSSL) that is licensed under separate terms,
+ as designated in a particular file or component or in included license
+ documentation. The authors of MySQL hereby grant you an additional
+ permission to link the program and your derivative works with the
+ separately licensed software that they have included with MySQL.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License, version 2.0, for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+/**
+ @file storage/perfschema/table_processlist.cc
+ TABLE PROCESSLIST.
+*/
+
+#include "my_global.h"
+
+#include "table_processlist.h"
+
+#include <assert.h>
+// #include "lex_string.h"
+#include "my_compiler.h"
+
+#include "my_thread.h"
+#include "auth_acls.h"
+#include "field.h"
+#include "sql_class.h"
+#include "sql_parse.h"
+#include "table.h"
+#include "pfs_buffer_container.h"
+#include "pfs_global.h"
+#include "pfs_instr.h"
+#include "pfs_instr_class.h"
+
+THR_LOCK table_processlist::m_table_lock;
+
+static const TABLE_FIELD_TYPE field_types[] =
+{
+ {
+ { C_STRING_WITH_LEN("ID") },
+ { C_STRING_WITH_LEN("bigint(20)") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("USER") },
+ { C_STRING_WITH_LEN("varchar(" USERNAME_CHAR_LENGTH_STR ")") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("HOST") },
+ { C_STRING_WITH_LEN("varchar(" HOST_AND_PORT_LENGTH_STR ")") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("DB") },
+ { C_STRING_WITH_LEN("varchar(64)") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("COMMAND") },
+ { C_STRING_WITH_LEN("varchar(16)") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("TIME") },
+ { C_STRING_WITH_LEN("bigint(20)") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("STATE") },
+ { C_STRING_WITH_LEN("varchar(64)") },
+ { NULL, 0}
+ },
+ {
+ { C_STRING_WITH_LEN("INFO") },
+ { C_STRING_WITH_LEN("longtext") },
+ { NULL, 0}
+ },
+};
+
+TABLE_FIELD_DEF
+table_processlist::m_field_def = {8, field_types};
+
+PFS_engine_table_share_state
+table_processlist::m_share_state = {
+ false /* m_checked */
+};
+
+PFS_engine_table_share table_processlist::m_share = {
+ {C_STRING_WITH_LEN("processlist")},
+ &pfs_readonly_processlist_acl,
+ table_processlist::create,
+ NULL, /* write_row */
+ NULL, /* delete_all_rows */
+ cursor_by_thread::get_row_count,
+ sizeof(PFS_simple_index), /* ref length */
+ &m_table_lock,
+ &m_field_def,
+ false, /* m_perpetual */
+ true, /* m_optional */
+ &m_share_state
+};
+
+PFS_engine_table *table_processlist::create() {
+ return new table_processlist();
+}
+
+table_processlist::table_processlist()
+ : cursor_by_thread(&m_share), m_row_exists(false) {
+ m_row_priv.m_auth = PROCESSLIST_DENIED;
+}
+
+int table_processlist::set_access(void) {
+ THD *thd = current_thd;
+ if (thd == NULL) {
+ /* Robustness, no user session. */
+ m_row_priv.m_auth = PROCESSLIST_DENIED;
+ return 0;
+ }
+
+ if (thd->security_context()->check_access(PROCESS_ACL)) {
+ /* PROCESS_ACL granted. */
+ m_row_priv.m_auth = PROCESSLIST_ALL;
+ return 0;
+ }
+
+ LEX_CSTRING client_priv_user = thd->security_context()->priv_user();
+ if (client_priv_user.length == 0) {
+ /* Anonymous user. */
+ m_row_priv.m_auth = PROCESSLIST_DENIED;
+ return 0;
+ }
+
+ /* Authenticated user, PROCESS_ACL not granted. */
+ m_row_priv.m_auth = PROCESSLIST_USER_ONLY;
+ m_row_priv.m_priv_user_length =
+ std::min(client_priv_user.length, sizeof(m_row_priv.m_priv_user));
+ memcpy(m_row_priv.m_priv_user, client_priv_user.str,
+ m_row_priv.m_priv_user_length);
+ return 0;
+}
+
+int table_processlist::rnd_init(bool scan) {
+ set_access();
+ return 0;
+}
+
+void table_processlist::make_row(PFS_thread *pfs) {
+ pfs_optimistic_state lock;
+ pfs_optimistic_state session_lock;
+ pfs_optimistic_state stmt_lock;
+ PFS_stage_class *stage_class;
+ PFS_thread_class *safe_class;
+
+ m_row_exists = false;
+
+ if (m_row_priv.m_auth == PROCESSLIST_DENIED) {
+ return;
+ }
+
+ /* Protect this reader against thread termination */
+ pfs->m_lock.begin_optimistic_lock(&lock);
+
+ safe_class = sanitize_thread_class(pfs->m_class);
+ if (unlikely(safe_class == NULL)) {
+ return;
+ }
+
+ /* Ignore background threads. */
+ if (pfs->m_username_length == 0 || pfs->m_processlist_id == 0) return;
+
+ m_row.m_processlist_id = pfs->m_processlist_id;
+
+ /* Protect this reader against session attribute changes */
+ pfs->m_session_lock.begin_optimistic_lock(&session_lock);
+
+ /* Maintain user/host compatibility with the legacy SHOW PROCESSLIST. */
+ const char *username = pfs->m_username;
+ uint username_len = pfs->m_username_length;
+ uint hostname_len = pfs->m_hostname_length;
+
+ if (pfs->m_class->is_system_thread()) {
+ if (username_len == 0 ||
+ (!strncmp(username, "root", 4) && username_len == 4)) {
+ username = "system user";
+ username_len = strlen(username);
+ hostname_len = 0;
+ }
+ } else {
+ if (username_len == 0) {
+ username = "unauthenticated user";
+ username_len = strlen(username);
+ hostname_len = 0;
+ }
+ }
+
+ m_row.m_username_length = username_len;
+ if (unlikely(m_row.m_username_length > sizeof(m_row.m_username))) {
+ return;
+ }
+
+ if (m_row.m_username_length != 0) {
+ memcpy(m_row.m_username, username, username_len);
+ }
+
+ m_row.m_hostname_length = hostname_len;
+ if (unlikely(m_row.m_hostname_length > sizeof(m_row.m_hostname))) {
+ return;
+ }
+
+ if (m_row.m_hostname_length != 0) {
+ memcpy(m_row.m_hostname, pfs->m_hostname, m_row.m_hostname_length);
+ }
+
+ if (!pfs->m_session_lock.end_optimistic_lock(&session_lock)) {
+ /*
+ One of the columns:
+ - USER
+ - HOST
+ is being updated.
+ Do not discard the entire row.
+ Do not loop waiting for a stable value.
+ Just return NULL values.
+ */
+ m_row.m_username_length = 0;
+ m_row.m_hostname_length = 0;
+ }
+
+ /* Enforce row filtering. */
+ if (m_row_priv.m_auth == PROCESSLIST_USER_ONLY) {
+ if (m_row.m_username_length != m_row_priv.m_priv_user_length) {
+ return;
+ }
+ if (strncmp(m_row.m_username, m_row_priv.m_priv_user,
+ m_row_priv.m_priv_user_length) != 0) {
+ return;
+ }
+ }
+
+ /* Protect this reader against statement attributes changes */
+ pfs->m_stmt_lock.begin_optimistic_lock(&stmt_lock);
+
+ m_row.m_dbname_length = pfs->m_dbname_length;
+ if (unlikely(m_row.m_dbname_length > sizeof(m_row.m_dbname))) {
+ return;
+ }
+
+ if (m_row.m_dbname_length != 0) {
+ memcpy(m_row.m_dbname, pfs->m_dbname, m_row.m_dbname_length);
+ }
+
+ m_row.m_processlist_info_ptr = &pfs->m_processlist_info[0];
+ m_row.m_processlist_info_length = pfs->m_processlist_info_length;
+
+ if (!pfs->m_stmt_lock.end_optimistic_lock(&stmt_lock)) {
+ /*
+ One of the columns:
+ - DB
+ - INFO
+ is being updated.
+ Do not discard the entire row.
+ Do not loop waiting for a stable value.
+ Just return NULL values.
+ */
+ m_row.m_dbname_length = 0;
+ m_row.m_processlist_info_length = 0;
+ }
+
+ /* Dirty read, sanitize the command. */
+ m_row.m_command = pfs->m_command;
+ if ((m_row.m_command < 0) || (m_row.m_command > COM_END)) {
+ m_row.m_command = COM_END;
+ }
+
+ m_row.m_start_time = pfs->m_start_time;
+
+ stage_class = find_stage_class(pfs->m_stage);
+ if (stage_class != NULL) {
+ m_row.m_processlist_state_ptr =
+ stage_class->m_name + stage_class->m_prefix_length;
+ m_row.m_processlist_state_length =
+ stage_class->m_name_length - stage_class->m_prefix_length;
+ if (m_row.m_processlist_state_length > 64) {
+ /*
+ Column STATE is VARCHAR(64)
+ for compatibility reasons with the historical
+ INFORMATION_SCHEMA.PROCESSLIST table.
+ Stages however can have longer names.
+ We silently truncate data here,
+ so it fits into STATE.
+ */
+ m_row.m_processlist_state_length = 64;
+ }
+ } else {
+ m_row.m_processlist_state_ptr = "";
+ m_row.m_processlist_state_length = 0;
+ }
+
+ m_row.m_port = pfs->m_peer_port;
+
+ if (m_row.m_hostname_length > 0 && m_row.m_port != 0) {
+ /* Create HOST:PORT. */
+ char str_port[10];
+ sprintf(str_port, ":%d", m_row.m_port);
+ std::string host(m_row.m_hostname, m_row.m_hostname_length);
+ std::string host_ip = host + str_port;
+ m_row.m_hostname_length =
+ std::min((int)HOST_AND_PORT_LENGTH, (int)host_ip.length());
+ memcpy(m_row.m_hostname, host_ip.c_str(), m_row.m_hostname_length);
+ }
+
+ if (!pfs->m_lock.end_optimistic_lock(&lock)) {
+ return;
+ }
+
+ m_row_exists = true;
+ return;
+}
+
+int table_processlist::read_row_values(TABLE *table, unsigned char *buf,
+ Field **fields, bool read_all) {
+ Field *f;
+
+ if (unlikely(!m_row_exists)) {
+ return HA_ERR_RECORD_DELETED;
+ }
+
+ /* Set the null bits */
+ assert(table->s->null_bytes == 1);
+ buf[0] = 0;
+
+ for (; (f = *fields); fields++) {
+ if (read_all || bitmap_is_set(table->read_set, f->field_index)) {
+ switch (f->field_index) {
+ case 0: /* ID */
+ set_field_ulonglong(f, m_row.m_processlist_id);
+ break;
+ case 1: /* USER */
+ if (m_row.m_username_length > 0) {
+ set_field_varchar_utf8(f, m_row.m_username,
+ m_row.m_username_length);
+ } else {
+ f->set_null();
+ }
+ break;
+ case 2: /* HOST */
+ if (m_row.m_hostname_length > 0) {
+ set_field_varchar_utf8(f, m_row.m_hostname,
+ m_row.m_hostname_length);
+ } else {
+ f->set_null();
+ }
+ break;
+ case 3: /* DB */
+ if (m_row.m_dbname_length > 0) {
+ set_field_varchar_utf8(f, m_row.m_dbname, m_row.m_dbname_length);
+ } else {
+ f->set_null();
+ }
+ break;
+ case 4: /* COMMAND */
+ set_field_varchar_utf8(f, command_name[m_row.m_command].str,
+ command_name[m_row.m_command].length);
+ break;
+ case 5: /* TIME */
+ if (m_row.m_start_time) {
+ time_t now = my_time(0);
+ ulonglong elapsed =
+ (now > m_row.m_start_time ? now - m_row.m_start_time : 0);
+ set_field_ulonglong(f, elapsed);
+ } else {
+ f->set_null();
+ }
+ break;
+ case 6: /* STATE */
+ /* For compatibility, leave blank if state is NULL. */
+ set_field_varchar_utf8(f, m_row.m_processlist_state_ptr,
+ m_row.m_processlist_state_length);
+ break;
+ case 7: /* INFO */
+ if (m_row.m_processlist_info_length > 0)
+ set_field_blob(f, m_row.m_processlist_info_ptr,
+ m_row.m_processlist_info_length);
+ else {
+ f->set_null();
+ }
+ break;
+ default:
+ assert(false);
+ }
+ }
+ }
+ return 0;
+}
diff --git a/storage/perfschema/table_processlist.h b/storage/perfschema/table_processlist.h
new file mode 100644
index 00000000000..0531fddadf9
--- /dev/null
+++ b/storage/perfschema/table_processlist.h
@@ -0,0 +1,133 @@
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License, version 2.0,
+ as published by the Free Software Foundation.
+
+ This program is also distributed with certain software (including
+ but not limited to OpenSSL) that is licensed under separate terms,
+ as designated in a particular file or component or in included license
+ documentation. The authors of MySQL hereby grant you an additional
+ permission to link the program and your derivative works with the
+ separately licensed software that they have included with MySQL.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License, version 2.0, for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
+#ifndef TABLE_PROCESSLIST_H
+#define TABLE_PROCESSLIST_H
+
+/**
+ @file storage/perfschema/table_processlist.h
+ TABLE THREADS.
+*/
+
+#include <sys/types.h>
+#include <time.h>
+#include <algorithm>
+
+#include "my_hostname.h"
+// #include "my_inttypes.h"
+#include "cursor_by_thread.h"
+#include "pfs_column_types.h"
+
+struct PFS_thread;
+
+/**
+ @addtogroup performance_schema_tables
+ @{
+*/
+
+/**
+ A row of PERFORMANCE_SCHEMA.PROCESSLIST.
+*/
+struct row_processlist {
+ /** Column ID. */
+ ulonglong m_processlist_id;
+ /** Column USER. */
+ char m_username[USERNAME_LENGTH];
+ /** Length in bytes of @c m_username. */
+ uint m_username_length;
+ /** Column HOST. */
+ char m_hostname[HOST_AND_PORT_LENGTH];
+ /** Length in bytes of @c m_hostname. */
+ uint m_hostname_length;
+ /** Port. */
+ uint m_port;
+ /** Column DB. */
+ char m_dbname[NAME_LEN];
+ /** Length in bytes of @c m_dbname. */
+ uint m_dbname_length;
+ /** Column COMMAND. */
+ int m_command;
+ /** Column TIME. */
+ time_t m_start_time;
+ /** Column STATE. */
+ const char *m_processlist_state_ptr;
+ /** Length in bytes of @c m_processlist_state_ptr. */
+ uint m_processlist_state_length;
+ /** Column INFO. */
+ const char *m_processlist_info_ptr;
+ /** Length in bytes of @c m_processlist_info_ptr. */
+ uint m_processlist_info_length;
+};
+
+enum enum_priv_processlist {
+ /** User is not allowed to see any data. */
+ PROCESSLIST_DENIED,
+ /** User does not have the PROCESS_ACL priviledge. */
+ PROCESSLIST_USER_ONLY,
+ /** User has the PROCESS_ACL priviledge. */
+ PROCESSLIST_ALL
+};
+
+struct row_priv_processlist {
+ enum enum_priv_processlist m_auth;
+ char m_priv_user[USERNAME_LENGTH];
+ size_t m_priv_user_length;
+};
+
+/** Table PERFORMANCE_SCHEMA.PROCESSLIST. */
+class table_processlist : public cursor_by_thread {
+ public:
+ static PFS_engine_table_share_state m_share_state;
+ /** Table share */
+ static PFS_engine_table_share m_share;
+ /** Table builder */
+ static PFS_engine_table *create();
+
+ protected:
+ table_processlist();
+
+ virtual int rnd_init(bool scan);
+
+ virtual int read_row_values(TABLE *table, unsigned char *buf, Field **fields,
+ bool read_all);
+ int set_access(void);
+
+ public:
+ virtual ~table_processlist() {}
+
+ private:
+ virtual void make_row(PFS_thread *pfs);
+ /** Table share lock. */
+ static THR_LOCK m_table_lock;
+ /** Fields definition. */
+ static TABLE_FIELD_DEF m_field_def;
+
+ /** Current row. */
+ row_processlist m_row;
+ /** Row privileges. */
+ row_priv_processlist m_row_priv;
+ /** True if the current row exists. */
+ bool m_row_exists;
+};
+
+/** @} */
+#endif
diff --git a/storage/perfschema/table_replication_applier_configuration.cc b/storage/perfschema/table_replication_applier_configuration.cc
index cd807623450..952b5811896 100644
--- a/storage/perfschema/table_replication_applier_configuration.cc
+++ b/storage/perfschema/table_replication_applier_configuration.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -63,6 +63,11 @@ TABLE_FIELD_DEF
table_replication_applier_configuration::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_replication_applier_configuration::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_applier_configuration::m_share=
{
@@ -75,8 +80,9 @@ table_replication_applier_configuration::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_applier_configuration::create(void)
diff --git a/storage/perfschema/table_replication_applier_configuration.h b/storage/perfschema/table_replication_applier_configuration.h
index 934a05b3e16..1c2d3785d4b 100644
--- a/storage/perfschema/table_replication_applier_configuration.h
+++ b/storage/perfschema/table_replication_applier_configuration.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -92,6 +92,7 @@ protected:
public:
~table_replication_applier_configuration();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_applier_status.cc b/storage/perfschema/table_replication_applier_status.cc
index 4094a98565f..9680a59e533 100644
--- a/storage/perfschema/table_replication_applier_status.cc
+++ b/storage/perfschema/table_replication_applier_status.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -72,6 +72,11 @@ TABLE_FIELD_DEF
table_replication_applier_status::m_field_def=
{ 4, field_types };
+PFS_engine_table_share_state
+table_replication_applier_status::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_applier_status::m_share=
{
@@ -84,8 +89,9 @@ table_replication_applier_status::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
diff --git a/storage/perfschema/table_replication_applier_status.h b/storage/perfschema/table_replication_applier_status.h
index 82b0e4c6d58..7bc1def7eef 100644
--- a/storage/perfschema/table_replication_applier_status.h
+++ b/storage/perfschema/table_replication_applier_status.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -103,6 +103,7 @@ protected:
public:
~table_replication_applier_status();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.cc b/storage/perfschema/table_replication_applier_status_by_coordinator.cc
index 2c44e2aab8e..1dc6c68ee5a 100644
--- a/storage/perfschema/table_replication_applier_status_by_coordinator.cc
+++ b/storage/perfschema/table_replication_applier_status_by_coordinator.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -83,6 +83,11 @@ TABLE_FIELD_DEF
table_replication_applier_status_by_coordinator::m_field_def=
{ 6, field_types };
+PFS_engine_table_share_state
+table_replication_applier_status_by_coordinator::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_applier_status_by_coordinator::m_share=
{
@@ -95,8 +100,9 @@ table_replication_applier_status_by_coordinator::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_applier_status_by_coordinator::create(void)
diff --git a/storage/perfschema/table_replication_applier_status_by_coordinator.h b/storage/perfschema/table_replication_applier_status_by_coordinator.h
index 3ba7a9b285b..7bb42ff5da4 100644
--- a/storage/perfschema/table_replication_applier_status_by_coordinator.h
+++ b/storage/perfschema/table_replication_applier_status_by_coordinator.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -109,6 +109,7 @@ protected:
public:
~table_replication_applier_status_by_coordinator();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_applier_status_by_worker.cc b/storage/perfschema/table_replication_applier_status_by_worker.cc
index 30f1caa3497..023bf2c3fe8 100644
--- a/storage/perfschema/table_replication_applier_status_by_worker.cc
+++ b/storage/perfschema/table_replication_applier_status_by_worker.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -92,6 +92,11 @@ TABLE_FIELD_DEF
table_replication_applier_status_by_worker::m_field_def=
{ 8, field_types };
+PFS_engine_table_share_state
+table_replication_applier_status_by_worker::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_applier_status_by_worker::m_share=
{
@@ -104,8 +109,9 @@ table_replication_applier_status_by_worker::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_applier_status_by_worker::create(void)
diff --git a/storage/perfschema/table_replication_applier_status_by_worker.h b/storage/perfschema/table_replication_applier_status_by_worker.h
index 11a31e02518..a14cbf3660f 100644
--- a/storage/perfschema/table_replication_applier_status_by_worker.h
+++ b/storage/perfschema/table_replication_applier_status_by_worker.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -167,6 +167,7 @@ protected:
public:
~table_replication_applier_status_by_worker();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_connection_configuration.cc b/storage/perfschema/table_replication_connection_configuration.cc
index bcb07bf5b79..66013118e6a 100644
--- a/storage/perfschema/table_replication_connection_configuration.cc
+++ b/storage/perfschema/table_replication_connection_configuration.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -145,6 +145,11 @@ TABLE_FIELD_DEF
table_replication_connection_configuration::m_field_def=
{ 19, field_types };
+PFS_engine_table_share_state
+table_replication_connection_configuration::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_connection_configuration::m_share=
{
@@ -157,8 +162,9 @@ table_replication_connection_configuration::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
diff --git a/storage/perfschema/table_replication_connection_configuration.h b/storage/perfschema/table_replication_connection_configuration.h
index 47e2f84d53d..71f4cb2cee9 100644
--- a/storage/perfschema/table_replication_connection_configuration.h
+++ b/storage/perfschema/table_replication_connection_configuration.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -137,6 +137,7 @@ protected:
public:
~table_replication_connection_configuration();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_connection_status.cc b/storage/perfschema/table_replication_connection_status.cc
index ca0b9393ac0..538451bedf2 100644
--- a/storage/perfschema/table_replication_connection_status.cc
+++ b/storage/perfschema/table_replication_connection_status.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -149,6 +149,11 @@ static const TABLE_FIELD_TYPE field_types[]=
TABLE_FIELD_DEF
table_replication_connection_status::m_field_def= { 11, field_types };
+PFS_engine_table_share_state
+table_replication_connection_status::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_connection_status::m_share=
{
@@ -161,8 +166,9 @@ table_replication_connection_status::m_share=
sizeof(pos_t), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_connection_status::create(void)
diff --git a/storage/perfschema/table_replication_connection_status.h b/storage/perfschema/table_replication_connection_status.h
index afc56ba9b54..31eedec5db6 100644
--- a/storage/perfschema/table_replication_connection_status.h
+++ b/storage/perfschema/table_replication_connection_status.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -135,6 +135,7 @@ protected:
public:
~table_replication_connection_status();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_group_member_stats.cc b/storage/perfschema/table_replication_group_member_stats.cc
index d56c56c7874..960baffd364 100644
--- a/storage/perfschema/table_replication_group_member_stats.cc
+++ b/storage/perfschema/table_replication_group_member_stats.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -188,6 +188,11 @@ TABLE_FIELD_DEF
table_replication_group_member_stats::m_field_def=
{ 9, field_types };
+PFS_engine_table_share_state
+table_replication_group_member_stats::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_group_member_stats::m_share=
{
@@ -200,8 +205,9 @@ table_replication_group_member_stats::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_group_member_stats::create(void)
diff --git a/storage/perfschema/table_replication_group_member_stats.h b/storage/perfschema/table_replication_group_member_stats.h
index 7f63856f908..2bc0ca6ed2d 100644
--- a/storage/perfschema/table_replication_group_member_stats.h
+++ b/storage/perfschema/table_replication_group_member_stats.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2014, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -101,6 +101,7 @@ protected:
public:
~table_replication_group_member_stats();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_replication_group_members.cc b/storage/perfschema/table_replication_group_members.cc
index 4e6c004a571..b9e0d20bb8a 100644
--- a/storage/perfschema/table_replication_group_members.cc
+++ b/storage/perfschema/table_replication_group_members.cc
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -130,6 +130,11 @@ TABLE_FIELD_DEF
table_replication_group_members::m_field_def=
{ 5, field_types };
+PFS_engine_table_share_state
+table_replication_group_members::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_replication_group_members::m_share=
{
@@ -142,8 +147,9 @@ table_replication_group_members::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_replication_group_members::create(void)
diff --git a/storage/perfschema/table_replication_group_members.h b/storage/perfschema/table_replication_group_members.h
index b516362a863..a90e81343da 100644
--- a/storage/perfschema/table_replication_group_members.h
+++ b/storage/perfschema/table_replication_group_members.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+ Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -94,6 +94,7 @@ protected:
public:
~table_replication_group_members();
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_session_account_connect_attrs.cc b/storage/perfschema/table_session_account_connect_attrs.cc
index e80ca77e6d9..9a64fcad5c9 100644
--- a/storage/perfschema/table_session_account_connect_attrs.cc
+++ b/storage/perfschema/table_session_account_connect_attrs.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -24,6 +24,11 @@
THR_LOCK table_session_account_connect_attrs::m_table_lock;
+PFS_engine_table_share_state
+table_session_account_connect_attrs::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_session_account_connect_attrs::m_share=
{
@@ -36,8 +41,9 @@ table_session_account_connect_attrs::m_share=
sizeof(pos_connect_attr_by_thread_by_attr), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_session_account_connect_attrs::create()
diff --git a/storage/perfschema/table_session_account_connect_attrs.h b/storage/perfschema/table_session_account_connect_attrs.h
index 6d97972f377..a733d5e0bb9 100644
--- a/storage/perfschema/table_session_account_connect_attrs.h
+++ b/storage/perfschema/table_session_account_connect_attrs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -33,6 +33,7 @@
class table_session_account_connect_attrs : public table_session_connect
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_session_connect.cc b/storage/perfschema/table_session_connect.cc
index a4bbc612165..5a94bfb96fb 100644
--- a/storage/perfschema/table_session_connect.cc
+++ b/storage/perfschema/table_session_connect.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_session_connect.h b/storage/perfschema/table_session_connect.h
index 37313a14407..fa78960ac7e 100644
--- a/storage/perfschema/table_session_connect.h
+++ b/storage/perfschema/table_session_connect.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/table_session_connect_attrs.cc b/storage/perfschema/table_session_connect_attrs.cc
index 193bcbe6818..f7236ba4a0f 100644
--- a/storage/perfschema/table_session_connect_attrs.cc
+++ b/storage/perfschema/table_session_connect_attrs.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -24,6 +24,11 @@
THR_LOCK table_session_connect_attrs::m_table_lock;
+PFS_engine_table_share_state
+table_session_connect_attrs::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_session_connect_attrs::m_share=
{
@@ -36,8 +41,9 @@ table_session_connect_attrs::m_share=
sizeof(pos_connect_attr_by_thread_by_attr), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_session_connect_attrs::create()
diff --git a/storage/perfschema/table_session_connect_attrs.h b/storage/perfschema/table_session_connect_attrs.h
index ef5c0f457c4..05e1e2203bc 100644
--- a/storage/perfschema/table_session_connect_attrs.h
+++ b/storage/perfschema/table_session_connect_attrs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -33,6 +33,7 @@
class table_session_connect_attrs : public table_session_connect
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_session_status.cc b/storage/perfschema/table_session_status.cc
index 3a3d0c60a17..c16a75b7beb 100644
--- a/storage/perfschema/table_session_status.cc
+++ b/storage/perfschema/table_session_status.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,11 @@ TABLE_FIELD_DEF
table_session_status::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_session_status::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_session_status::m_share=
{
@@ -65,8 +70,9 @@ table_session_status::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- true /* perpetual */
+ true, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_session_status.h b/storage/perfschema/table_session_status.h
index ed42d3fc57d..d338ccafa8a 100644
--- a/storage/perfschema/table_session_status.h
+++ b/storage/perfschema/table_session_status.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -70,6 +70,7 @@ class table_session_status : public PFS_engine_table
typedef PFS_simple_index pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_session_variables.cc b/storage/perfschema/table_session_variables.cc
index 35240f683ab..37d7347ae7d 100644
--- a/storage/perfschema/table_session_variables.cc
+++ b/storage/perfschema/table_session_variables.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,11 @@ TABLE_FIELD_DEF
table_session_variables::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_session_variables::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_session_variables::m_share=
{
@@ -65,8 +70,9 @@ table_session_variables::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- true /* perpetual */
+ true, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_session_variables.h b/storage/perfschema/table_session_variables.h
index a32b7483bce..0223438824a 100644
--- a/storage/perfschema/table_session_variables.h
+++ b/storage/perfschema/table_session_variables.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -68,6 +68,7 @@ class table_session_variables : public PFS_engine_table
typedef PFS_simple_index pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_setup_actors.cc b/storage/perfschema/table_setup_actors.cc
index f1bc33d6e85..8280781eec2 100644
--- a/storage/perfschema/table_setup_actors.cc
+++ b/storage/perfschema/table_setup_actors.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -71,6 +71,11 @@ TABLE_FIELD_DEF
table_setup_actors::m_field_def=
{ 5, field_types };
+PFS_engine_table_share_state
+table_setup_actors::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_setup_actors::m_share=
{
@@ -83,8 +88,9 @@ table_setup_actors::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_setup_actors::create()
diff --git a/storage/perfschema/table_setup_actors.h b/storage/perfschema/table_setup_actors.h
index dd9d339c370..7653a3ee220 100644
--- a/storage/perfschema/table_setup_actors.h
+++ b/storage/perfschema/table_setup_actors.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -62,6 +62,7 @@ struct row_setup_actors
class table_setup_actors : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
/** Table builder. */
diff --git a/storage/perfschema/table_setup_consumers.cc b/storage/perfschema/table_setup_consumers.cc
index 7f5cbbce807..3125e63a30f 100644
--- a/storage/perfschema/table_setup_consumers.cc
+++ b/storage/perfschema/table_setup_consumers.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -149,6 +149,11 @@ TABLE_FIELD_DEF
table_setup_consumers::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_setup_consumers::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_setup_consumers::m_share=
{
@@ -161,8 +166,9 @@ table_setup_consumers::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_setup_consumers::create(void)
diff --git a/storage/perfschema/table_setup_consumers.h b/storage/perfschema/table_setup_consumers.h
index 29df92accdc..13412c93257 100644
--- a/storage/perfschema/table_setup_consumers.h
+++ b/storage/perfschema/table_setup_consumers.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -53,6 +53,7 @@ struct row_setup_consumers
class table_setup_consumers : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_setup_instruments.cc b/storage/perfschema/table_setup_instruments.cc
index 960b3fd7a54..b4963e258fd 100644
--- a/storage/perfschema/table_setup_instruments.cc
+++ b/storage/perfschema/table_setup_instruments.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -62,6 +62,11 @@ TABLE_FIELD_DEF
table_setup_instruments::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_setup_instruments::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_setup_instruments::m_share=
{
@@ -74,8 +79,9 @@ table_setup_instruments::m_share=
sizeof(pos_setup_instruments),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_setup_instruments::create(void)
diff --git a/storage/perfschema/table_setup_instruments.h b/storage/perfschema/table_setup_instruments.h
index 233fb85fcde..00a405c1b7a 100644
--- a/storage/perfschema/table_setup_instruments.h
+++ b/storage/perfschema/table_setup_instruments.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -91,6 +91,7 @@ struct pos_setup_instruments : public PFS_double_index
class table_setup_instruments : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_setup_objects.cc b/storage/perfschema/table_setup_objects.cc
index 8d36cf3e645..532b5e9d01e 100644
--- a/storage/perfschema/table_setup_objects.cc
+++ b/storage/perfschema/table_setup_objects.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -72,6 +72,11 @@ TABLE_FIELD_DEF
table_setup_objects::m_field_def=
{ 5, field_types };
+PFS_engine_table_share_state
+table_setup_objects::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_setup_objects::m_share=
{
@@ -84,8 +89,9 @@ table_setup_objects::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
int update_derived_flags()
diff --git a/storage/perfschema/table_setup_objects.h b/storage/perfschema/table_setup_objects.h
index ec21e018a5e..2dd5737c75f 100644
--- a/storage/perfschema/table_setup_objects.h
+++ b/storage/perfschema/table_setup_objects.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -61,6 +61,7 @@ struct row_setup_objects
class table_setup_objects : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
/** Table builder. */
diff --git a/storage/perfschema/table_setup_timers.cc b/storage/perfschema/table_setup_timers.cc
index 73521e7ed33..e8dcdff4144 100644
--- a/storage/perfschema/table_setup_timers.cc
+++ b/storage/perfschema/table_setup_timers.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -80,6 +80,11 @@ TABLE_FIELD_DEF
table_setup_timers::m_field_def=
{ 2, field_types };
+PFS_engine_table_share_state
+table_setup_timers::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_setup_timers::m_share=
{
@@ -92,8 +97,9 @@ table_setup_timers::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_setup_timers::create(void)
diff --git a/storage/perfschema/table_setup_timers.h b/storage/perfschema/table_setup_timers.h
index ddbcfb7cda3..7e3451530a7 100644
--- a/storage/perfschema/table_setup_timers.h
+++ b/storage/perfschema/table_setup_timers.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -49,6 +49,7 @@ struct row_setup_timers
class table_setup_timers : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_socket_instances.cc b/storage/perfschema/table_socket_instances.cc
index 1ea6b9cc33b..0427bcf42ee 100644
--- a/storage/perfschema/table_socket_instances.cc
+++ b/storage/perfschema/table_socket_instances.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -80,6 +80,11 @@ TABLE_FIELD_DEF
table_socket_instances::m_field_def=
{ 7, field_types };
+PFS_engine_table_share_state
+table_socket_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_socket_instances::m_share=
{
@@ -92,8 +97,9 @@ table_socket_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_socket_instances::create(void)
diff --git a/storage/perfschema/table_socket_instances.h b/storage/perfschema/table_socket_instances.h
index cf7e44b1fcf..2f67eba9944 100644
--- a/storage/perfschema/table_socket_instances.h
+++ b/storage/perfschema/table_socket_instances.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -67,6 +67,7 @@ struct row_socket_instances
class table_socket_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_socket_summary_by_event_name.cc b/storage/perfschema/table_socket_summary_by_event_name.cc
index 623b57a6a76..b8bb856f09a 100644
--- a/storage/perfschema/table_socket_summary_by_event_name.cc
+++ b/storage/perfschema/table_socket_summary_by_event_name.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -166,6 +166,11 @@ TABLE_FIELD_DEF
table_socket_summary_by_event_name::m_field_def=
{ 23, field_types };
+PFS_engine_table_share_state
+table_socket_summary_by_event_name::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_socket_summary_by_event_name::m_share=
{
@@ -178,8 +183,9 @@ table_socket_summary_by_event_name::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_socket_summary_by_event_name::create(void)
diff --git a/storage/perfschema/table_socket_summary_by_event_name.h b/storage/perfschema/table_socket_summary_by_event_name.h
index 2f2d2b03e45..5abc8eeb099 100644
--- a/storage/perfschema/table_socket_summary_by_event_name.h
+++ b/storage/perfschema/table_socket_summary_by_event_name.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -56,6 +56,7 @@ struct row_socket_summary_by_event_name
class table_socket_summary_by_event_name : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_socket_summary_by_instance.cc b/storage/perfschema/table_socket_summary_by_instance.cc
index a77324a40ab..6a5fe5d76dd 100644
--- a/storage/perfschema/table_socket_summary_by_instance.cc
+++ b/storage/perfschema/table_socket_summary_by_instance.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -171,6 +171,11 @@ TABLE_FIELD_DEF
table_socket_summary_by_instance::m_field_def=
{ 24, field_types };
+PFS_engine_table_share_state
+table_socket_summary_by_instance::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_socket_summary_by_instance::m_share=
{
@@ -183,8 +188,9 @@ table_socket_summary_by_instance::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_socket_summary_by_instance::create(void)
diff --git a/storage/perfschema/table_socket_summary_by_instance.h b/storage/perfschema/table_socket_summary_by_instance.h
index 87ca63ee01b..961661b0e8a 100644
--- a/storage/perfschema/table_socket_summary_by_instance.h
+++ b/storage/perfschema/table_socket_summary_by_instance.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -59,6 +59,7 @@ struct row_socket_summary_by_instance
class table_socket_summary_by_instance : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_status_by_account.cc b/storage/perfschema/table_status_by_account.cc
index 8aedb083cd0..33878970dbc 100644
--- a/storage/perfschema/table_status_by_account.cc
+++ b/storage/perfschema/table_status_by_account.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -64,6 +64,11 @@ TABLE_FIELD_DEF
table_status_by_account::m_field_def=
{ 4, field_types };
+PFS_engine_table_share_state
+table_status_by_account::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_status_by_account::m_share=
{
@@ -76,8 +81,9 @@ table_status_by_account::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_status_by_account.h b/storage/perfschema/table_status_by_account.h
index 19a4f1db1de..3da5077ebc6 100644
--- a/storage/perfschema/table_status_by_account.h
+++ b/storage/perfschema/table_status_by_account.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -104,6 +104,7 @@ class table_status_by_account : public PFS_engine_table
typedef pos_status_by_account pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_status_by_host.cc b/storage/perfschema/table_status_by_host.cc
index 8188ccd3695..d3de95e8f36 100644
--- a/storage/perfschema/table_status_by_host.cc
+++ b/storage/perfschema/table_status_by_host.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -59,6 +59,11 @@ TABLE_FIELD_DEF
table_status_by_host::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_status_by_host::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_status_by_host::m_share=
{
@@ -71,8 +76,9 @@ table_status_by_host::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_status_by_host.h b/storage/perfschema/table_status_by_host.h
index f1c92268b02..c697638bacf 100644
--- a/storage/perfschema/table_status_by_host.h
+++ b/storage/perfschema/table_status_by_host.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -102,6 +102,7 @@ class table_status_by_host : public PFS_engine_table
typedef pos_status_by_host pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_status_by_thread.cc b/storage/perfschema/table_status_by_thread.cc
index 5b52e5f167c..0f1ac287783 100644
--- a/storage/perfschema/table_status_by_thread.cc
+++ b/storage/perfschema/table_status_by_thread.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -58,6 +58,11 @@ TABLE_FIELD_DEF
table_status_by_thread::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_status_by_thread::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_status_by_thread::m_share=
{
@@ -70,8 +75,9 @@ table_status_by_thread::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
@@ -82,7 +88,7 @@ table_status_by_thread::create(void)
int table_status_by_thread::delete_all_rows(void)
{
- /* Lock required to aggregate to global_status_vars. */
+ /* Lock required to aggregate to global_status_var. */
mysql_mutex_lock(&LOCK_status);
reset_status_by_thread();
diff --git a/storage/perfschema/table_status_by_thread.h b/storage/perfschema/table_status_by_thread.h
index 90a1735d1e2..c3f50941597 100644
--- a/storage/perfschema/table_status_by_thread.h
+++ b/storage/perfschema/table_status_by_thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -100,6 +100,7 @@ class table_status_by_thread : public PFS_engine_table
typedef pos_status_by_thread pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_status_by_user.cc b/storage/perfschema/table_status_by_user.cc
index 545f96ff270..e00e3ac62b2 100644
--- a/storage/perfschema/table_status_by_user.cc
+++ b/storage/perfschema/table_status_by_user.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -60,6 +60,11 @@ TABLE_FIELD_DEF
table_status_by_user::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_status_by_user::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_status_by_user::m_share=
{
@@ -72,8 +77,9 @@ table_status_by_user::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_status_by_user.h b/storage/perfschema/table_status_by_user.h
index 2fe2cc24407..4cf348fdec7 100644
--- a/storage/perfschema/table_status_by_user.h
+++ b/storage/perfschema/table_status_by_user.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -102,6 +102,7 @@ class table_status_by_user : public PFS_engine_table
typedef pos_status_by_user pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_sync_instances.cc b/storage/perfschema/table_sync_instances.cc
index 85f126fc10f..85914894a33 100644
--- a/storage/perfschema/table_sync_instances.cc
+++ b/storage/perfschema/table_sync_instances.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -61,6 +61,11 @@ TABLE_FIELD_DEF
table_mutex_instances::m_field_def=
{ 3, mutex_field_types };
+PFS_engine_table_share_state
+table_mutex_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_mutex_instances::m_share=
{
@@ -73,8 +78,9 @@ table_mutex_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_mutex_instances::create(void)
@@ -235,6 +241,11 @@ TABLE_FIELD_DEF
table_rwlock_instances::m_field_def=
{ 4, rwlock_field_types };
+PFS_engine_table_share_state
+table_rwlock_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_rwlock_instances::m_share=
{
@@ -247,8 +258,9 @@ table_rwlock_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_rwlock_instances::create(void)
@@ -406,6 +418,11 @@ TABLE_FIELD_DEF
table_cond_instances::m_field_def=
{ 2, cond_field_types };
+PFS_engine_table_share_state
+table_cond_instances::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_cond_instances::m_share=
{
@@ -418,8 +435,9 @@ table_cond_instances::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_cond_instances::create(void)
diff --git a/storage/perfschema/table_sync_instances.h b/storage/perfschema/table_sync_instances.h
index 0089628c55a..1e429e78e09 100644
--- a/storage/perfschema/table_sync_instances.h
+++ b/storage/perfschema/table_sync_instances.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -59,6 +59,7 @@ struct row_mutex_instances
class table_mutex_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -119,6 +120,7 @@ struct row_rwlock_instances
class table_rwlock_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
@@ -173,6 +175,7 @@ struct row_cond_instances
class table_cond_instances : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share. */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_table_handles.cc b/storage/perfschema/table_table_handles.cc
index 230ce441382..26374ac37e0 100644
--- a/storage/perfschema/table_table_handles.cc
+++ b/storage/perfschema/table_table_handles.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -86,6 +86,11 @@ TABLE_FIELD_DEF
table_table_handles::m_field_def=
{ 8, field_types };
+PFS_engine_table_share_state
+table_table_handles::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_table_handles::m_share=
{
@@ -98,8 +103,9 @@ table_table_handles::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_table_handles.h b/storage/perfschema/table_table_handles.h
index 3b738d89413..3f2f8c5c1ad 100644
--- a/storage/perfschema/table_table_handles.h
+++ b/storage/perfschema/table_table_handles.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -63,6 +63,7 @@ struct row_table_handles
class table_table_handles : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_threads.cc b/storage/perfschema/table_threads.cc
index 81a43718285..379b97d91be 100644
--- a/storage/perfschema/table_threads.cc
+++ b/storage/perfschema/table_threads.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -122,6 +122,11 @@ TABLE_FIELD_DEF
table_threads::m_field_def=
{ 17, field_types };
+PFS_engine_table_share_state
+table_threads::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_threads::m_share=
{
@@ -134,8 +139,9 @@ table_threads::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_threads::create()
diff --git a/storage/perfschema/table_threads.h b/storage/perfschema/table_threads.h
index 16d8813d2cc..723b2a18306 100644
--- a/storage/perfschema/table_threads.h
+++ b/storage/perfschema/table_threads.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -88,6 +88,7 @@ struct row_threads
class table_threads : public cursor_by_thread
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_tiws_by_index_usage.cc b/storage/perfschema/table_tiws_by_index_usage.cc
index c98eda01cac..22c106e0436 100644
--- a/storage/perfschema/table_tiws_by_index_usage.cc
+++ b/storage/perfschema/table_tiws_by_index_usage.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -241,6 +241,11 @@ TABLE_FIELD_DEF
table_tiws_by_index_usage::m_field_def=
{ 39, field_types };
+PFS_engine_table_share_state
+table_tiws_by_index_usage::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_tiws_by_index_usage::m_share=
{
@@ -253,8 +258,9 @@ table_tiws_by_index_usage::m_share=
sizeof(pos_tiws_by_index_usage),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_tiws_by_index_usage.h b/storage/perfschema/table_tiws_by_index_usage.h
index ec55ce86b2d..fc82b6783f7 100644
--- a/storage/perfschema/table_tiws_by_index_usage.h
+++ b/storage/perfschema/table_tiws_by_index_usage.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -80,6 +80,7 @@ struct pos_tiws_by_index_usage : public PFS_double_index
class table_tiws_by_index_usage : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_tiws_by_table.cc b/storage/perfschema/table_tiws_by_table.cc
index 42bf2593e38..2b0d1e8365b 100644
--- a/storage/perfschema/table_tiws_by_table.cc
+++ b/storage/perfschema/table_tiws_by_table.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -236,6 +236,11 @@ TABLE_FIELD_DEF
table_tiws_by_table::m_field_def=
{ 38, field_types };
+PFS_engine_table_share_state
+table_tiws_by_table::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_tiws_by_table::m_share=
{
@@ -248,8 +253,9 @@ table_tiws_by_table::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_tiws_by_table.h b/storage/perfschema/table_tiws_by_table.h
index 15f2aa7df20..ed7e5d9b235 100644
--- a/storage/perfschema/table_tiws_by_table.h
+++ b/storage/perfschema/table_tiws_by_table.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_tiws_by_table
class table_tiws_by_table : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_tlws_by_table.cc b/storage/perfschema/table_tlws_by_table.cc
index f3d62da3478..b4b181153b4 100644
--- a/storage/perfschema/table_tlws_by_table.cc
+++ b/storage/perfschema/table_tlws_by_table.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -386,6 +386,11 @@ TABLE_FIELD_DEF
table_tlws_by_table::m_field_def=
{ sizeof(field_types) / sizeof(TABLE_FIELD_TYPE), field_types };
+PFS_engine_table_share_state
+table_tlws_by_table::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_tlws_by_table::m_share=
{
@@ -398,8 +403,9 @@ table_tlws_by_table::m_share=
sizeof(PFS_simple_index),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_tlws_by_table.h b/storage/perfschema/table_tlws_by_table.h
index 0add6ac5a6c..87b4cf1db00 100644
--- a/storage/perfschema/table_tlws_by_table.h
+++ b/storage/perfschema/table_tlws_by_table.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -55,6 +55,7 @@ struct row_tlws_by_table
class table_tlws_by_table : public PFS_engine_table
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_users.cc b/storage/perfschema/table_users.cc
index 99d681b8b8b..d20e37ffa5c 100644
--- a/storage/perfschema/table_users.cc
+++ b/storage/perfschema/table_users.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -57,6 +57,11 @@ TABLE_FIELD_DEF
table_users::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_users::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_users::m_share=
{
@@ -69,8 +74,9 @@ table_users::m_share=
sizeof(PFS_simple_index), /* ref length */
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table* table_users::create()
diff --git a/storage/perfschema/table_users.h b/storage/perfschema/table_users.h
index d8d68f513b7..06db6e30267 100644
--- a/storage/perfschema/table_users.h
+++ b/storage/perfschema/table_users.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -49,6 +49,7 @@ struct row_users
class table_users : public cursor_by_user
{
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
/** Table builder */
diff --git a/storage/perfschema/table_uvar_by_thread.cc b/storage/perfschema/table_uvar_by_thread.cc
index d153851a999..af53858ce4d 100644
--- a/storage/perfschema/table_uvar_by_thread.cc
+++ b/storage/perfschema/table_uvar_by_thread.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -152,6 +152,11 @@ TABLE_FIELD_DEF
table_uvar_by_thread::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_uvar_by_thread::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_uvar_by_thread::m_share=
{
@@ -164,8 +169,9 @@ table_uvar_by_thread::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- false /* perpetual */
+ false, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_uvar_by_thread.h b/storage/perfschema/table_uvar_by_thread.h
index c3a541536e8..7be23458cc5 100644
--- a/storage/perfschema/table_uvar_by_thread.h
+++ b/storage/perfschema/table_uvar_by_thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -146,6 +146,7 @@ class table_uvar_by_thread : public PFS_engine_table
typedef pos_uvar_by_thread pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/table_variables_by_thread.cc b/storage/perfschema/table_variables_by_thread.cc
index b339ed7af7c..7cfc19e7359 100644
--- a/storage/perfschema/table_variables_by_thread.cc
+++ b/storage/perfschema/table_variables_by_thread.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -58,6 +58,11 @@ TABLE_FIELD_DEF
table_variables_by_thread::m_field_def=
{ 3, field_types };
+PFS_engine_table_share_state
+table_variables_by_thread::m_share_state = {
+ false /* m_checked */
+};
+
PFS_engine_table_share
table_variables_by_thread::m_share=
{
@@ -70,8 +75,9 @@ table_variables_by_thread::m_share=
sizeof(pos_t),
&m_table_lock,
&m_field_def,
- false, /* checked */
- true /* perpetual */
+ true, /* m_perpetual */
+ false, /* m_optional */
+ &m_share_state
};
PFS_engine_table*
diff --git a/storage/perfschema/table_variables_by_thread.h b/storage/perfschema/table_variables_by_thread.h
index 5143067adbb..a9e70388366 100644
--- a/storage/perfschema/table_variables_by_thread.h
+++ b/storage/perfschema/table_variables_by_thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -101,6 +101,7 @@ class table_variables_by_thread : public PFS_engine_table
typedef pos_variables_by_thread pos_t;
public:
+ static PFS_engine_table_share_state m_share_state;
/** Table share */
static PFS_engine_table_share m_share;
static PFS_engine_table* create();
diff --git a/storage/perfschema/unittest/CMakeLists.txt b/storage/perfschema/unittest/CMakeLists.txt
index 5577930617b..ec09a1136fc 100644
--- a/storage/perfschema/unittest/CMakeLists.txt
+++ b/storage/perfschema/unittest/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2022, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/conf.txt b/storage/perfschema/unittest/conf.txt
index 197eba97365..678ec35d507 100644
--- a/storage/perfschema/unittest/conf.txt
+++ b/storage/perfschema/unittest/conf.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2009, 2021, Oracle and/or its affiliates.
+# Copyright (c) 2009, 2022, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs-t.cc b/storage/perfschema/unittest/pfs-t.cc
index e90e6f63d15..256fa144577 100644
--- a/storage/perfschema/unittest/pfs-t.cc
+++ b/storage/perfschema/unittest/pfs-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_account-oom-t.cc b/storage/perfschema/unittest/pfs_account-oom-t.cc
index 562a273eaba..1ad451baad8 100644
--- a/storage/perfschema/unittest/pfs_account-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_account-oom-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_connect_attr-t.cc b/storage/perfschema/unittest/pfs_connect_attr-t.cc
index c852101b044..b626caca650 100644
--- a/storage/perfschema/unittest/pfs_connect_attr-t.cc
+++ b/storage/perfschema/unittest/pfs_connect_attr-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_host-oom-t.cc b/storage/perfschema/unittest/pfs_host-oom-t.cc
index ad40de1ec77..c4aeb06981f 100644
--- a/storage/perfschema/unittest/pfs_host-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_host-oom-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_instr-oom-t.cc b/storage/perfschema/unittest/pfs_instr-oom-t.cc
index 086ff15f97e..973d0d7e88a 100644
--- a/storage/perfschema/unittest/pfs_instr-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_instr-oom-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_instr-t.cc b/storage/perfschema/unittest/pfs_instr-t.cc
index 0d23555939d..be75937c262 100644
--- a/storage/perfschema/unittest/pfs_instr-t.cc
+++ b/storage/perfschema/unittest/pfs_instr-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
index 4134c36303b..807fbf6c84d 100644
--- a/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_instr_class-oom-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_instr_class-t.cc b/storage/perfschema/unittest/pfs_instr_class-t.cc
index 7a33453236a..db4dc7f2770 100644
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_misc-t.cc b/storage/perfschema/unittest/pfs_misc-t.cc
index 3654e3e2942..8e1cb267c9a 100644
--- a/storage/perfschema/unittest/pfs_misc-t.cc
+++ b/storage/perfschema/unittest/pfs_misc-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_noop-t.cc b/storage/perfschema/unittest/pfs_noop-t.cc
index 6fc84753699..079e138b349 100644
--- a/storage/perfschema/unittest/pfs_noop-t.cc
+++ b/storage/perfschema/unittest/pfs_noop-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@@ -228,6 +228,8 @@ void test_noop()
PSI_server->set_thread_THD(NULL, NULL);
+ PSI_server->set_thread_peer_port(NULL, 0);
+
ok(true, "all noop api called");
}
diff --git a/storage/perfschema/unittest/pfs_server_stubs.cc b/storage/perfschema/unittest/pfs_server_stubs.cc
index 13f4223e8d8..fb5f41813f5 100644
--- a/storage/perfschema/unittest/pfs_server_stubs.cc
+++ b/storage/perfschema/unittest/pfs_server_stubs.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. All rights
reserved.
This program is free software; you can redistribute it and/or modify
diff --git a/storage/perfschema/unittest/pfs_timer-t.cc b/storage/perfschema/unittest/pfs_timer-t.cc
index 2ba7e89ca71..b64d488b5af 100644
--- a/storage/perfschema/unittest/pfs_timer-t.cc
+++ b/storage/perfschema/unittest/pfs_timer-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/pfs_user-oom-t.cc b/storage/perfschema/unittest/pfs_user-oom-t.cc
index 422e88605eb..fe1563daa7b 100644
--- a/storage/perfschema/unittest/pfs_user-oom-t.cc
+++ b/storage/perfschema/unittest/pfs_user-oom-t.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/stub_global_status_var.h b/storage/perfschema/unittest/stub_global_status_var.h
index ac2715e9268..ddefe4de880 100644
--- a/storage/perfschema/unittest/stub_global_status_var.h
+++ b/storage/perfschema/unittest/stub_global_status_var.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2015, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/stub_pfs_defaults.h b/storage/perfschema/unittest/stub_pfs_defaults.h
index 2af79a2034e..592a30ea9a1 100644
--- a/storage/perfschema/unittest/stub_pfs_defaults.h
+++ b/storage/perfschema/unittest/stub_pfs_defaults.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/stub_pfs_global.h b/storage/perfschema/unittest/stub_pfs_global.h
index 3b28a0641cd..3ccb739ca1b 100644
--- a/storage/perfschema/unittest/stub_pfs_global.h
+++ b/storage/perfschema/unittest/stub_pfs_global.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
diff --git a/storage/perfschema/unittest/stub_print_error.h b/storage/perfschema/unittest/stub_print_error.h
index 38cdd91cfbd..ad6cc279b76 100644
--- a/storage/perfschema/unittest/stub_print_error.h
+++ b/storage/perfschema/unittest/stub_print_error.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
+/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,