From 7af733a5a2cb7f79ffb5ff0129cad6db6f3cc359 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 15 Feb 2020 18:25:57 +0100 Subject: [PATCH] perfschema compilation, test and misc fixes --- .gitignore | 1 + include/my_pthread.h | 2 +- include/mysql/psi/mysql_file.h | 451 +- include/mysql/psi/mysql_mdl.h | 15 + include/mysql/psi/mysql_memory.h | 16 +- include/mysql/psi/mysql_stage.h | 6 +- include/mysql/psi/mysql_thread.h | 6 + include/mysql/psi/mysql_transaction.h | 6 +- include/mysql/psi/psi.h | 21 +- include/mysql/psi/psi_abi_v1.h.pp | 1 - include/mysql/psi/psi_abi_v2.h.pp | 1 - include/mysql/psi/psi_base.h | 4 + include/mysql_com.h | 6 +- include/pfs_file_provider.h | 3 + mysql-test/include/default_mysqld.cnf | 12 + .../include/wait_for_sql_thread_read_all.inc | 2 +- mysql-test/main/mysqld--help.result | 64 +- .../funcs_1/r/processlist_priv_no_prot.result | 24 +- .../funcs_1/r/processlist_priv_ps.result | 24 +- .../funcs_1/r/processlist_val_no_prot.result | 10 +- .../suite/funcs_1/r/processlist_val_ps.result | 10 +- .../suite/multi_source/info_logs.result | 8 +- .../multi_source_slave_alias_replica.result | 8 +- mysql-test/suite/multi_source/simple.result | 8 +- mysql-test/suite/perfschema/disabled.def | 31 + .../include/memory_aggregate_setup.inc | 1 + .../include/program_nested_setup.inc | 3 +- .../perfschema/include/program_setup.inc | 5 +- .../include/show_plugin_verifier_56.inc | 29 - .../include/start_server_common.inc | 10 +- .../include/table_io_result_helper.inc | 3 +- .../transaction_nested_events_verifier.inc | 11 +- .../perfschema/include/upgrade_check.inc | 2 - .../perfschema/r/alter_table_progress.result | 35 +- .../suite/perfschema/r/bad_option.result | 4 + .../perfschema/r/batch_table_io_func.result | 33 +- .../suite/perfschema/r/connect_attrs.result | 3 - .../suite/perfschema/r/connection.result | 159 - .../suite/perfschema/r/connection_3a.result | 159 - .../perfschema/r/connection_3a_3u.result | 159 - .../suite/perfschema/r/connection_3u.result | 159 - .../r/connection_type_notwin.result | 12 +- .../perfschema/r/connection_type_win.result | 11 +- .../suite/perfschema/r/csv_table_io.result | 124 +- .../r/ddl_events_stages_current.result | 6 +- .../r/ddl_events_stages_history.result | 6 +- .../r/ddl_events_stages_history_long.result | 6 +- .../perfschema/r/ddl_global_variables.result | 2 +- .../perfschema/r/ddl_metadata_locks.result | 2 +- ...l_replication_applier_configuration.result | 2 +- .../r/ddl_replication_applier_status.result | 2 +- ...ation_applier_status_by_coordinator.result | 2 +- ...eplication_connection_configuration.result | 2 +- .../perfschema/r/ddl_session_status.result | 2 +- .../perfschema/r/ddl_session_variables.result | 2 +- .../perfschema/r/ddl_table_handles.result | 2 +- .../perfschema/r/ddl_uvar_by_thread.result | 2 +- .../r/ddl_variables_by_thread.result | 2 +- .../perfschema/r/digest_table_full.result | 7 - .../suite/perfschema/r/dml_handler.result | 320 +- .../perfschema/r/dml_setup_actors.result | 4 - .../perfschema/r/dml_setup_instruments.result | 62 - .../perfschema/r/dml_setup_objects.result | 2 - .../perfschema/r/dml_setup_timers.result | 34 +- .../suite/perfschema/r/event_aggregate.result | 5265 +++-------------- .../perfschema/r/event_aggregate_no_a.result | 3795 ++---------- .../r/event_aggregate_no_a_no_h.result | 3210 ++-------- .../r/event_aggregate_no_a_no_u.result | 2255 +------ .../r/event_aggregate_no_a_no_u_no_h.result | 1655 +----- .../perfschema/r/event_aggregate_no_h.result | 4681 ++------------- .../perfschema/r/event_aggregate_no_u.result | 3737 ++---------- .../r/event_aggregate_no_u_no_h.result | 3137 ++-------- .../perfschema/r/global_read_lock.result | 12 - ...hostcache_ipv4_addrinfo_again_allow.result | 13 - .../hostcache_ipv4_addrinfo_bad_allow.result | 13 - .../hostcache_ipv4_addrinfo_good_allow.result | 13 - ...ostcache_ipv4_addrinfo_noname_allow.result | 16 - .../r/hostcache_ipv4_blocked.result | 12 - .../r/hostcache_ipv4_max_con.result | 11 - ...hostcache_ipv4_nameinfo_again_allow.result | 16 - ...ostcache_ipv4_nameinfo_noname_allow.result | 13 - .../perfschema/r/hostcache_ipv4_ssl.result | 7 - ...hostcache_ipv6_addrinfo_again_allow.result | 13 - .../hostcache_ipv6_addrinfo_bad_allow.result | 13 - .../hostcache_ipv6_addrinfo_good_allow.result | 13 - ...ostcache_ipv6_addrinfo_noname_allow.result | 16 - .../r/hostcache_ipv6_blocked.result | 12 - .../r/hostcache_ipv6_max_con.result | 11 - ...hostcache_ipv6_nameinfo_again_allow.result | 16 - ...ostcache_ipv6_nameinfo_noname_allow.result | 13 - .../perfschema/r/hostcache_ipv6_ssl.result | 7 - .../perfschema/r/information_schema.result | 217 +- .../suite/perfschema/r/innodb_table_io.result | 124 +- mysql-test/suite/perfschema/r/io_cache.result | 5 + .../perfschema/r/max_program_zero.result | 16 +- mysql-test/suite/perfschema/r/mdl_func.result | 235 +- .../perfschema/r/memory_aggregate.result | 1362 ++--- .../r/memory_aggregate_32bit.result | 2218 +++---- .../perfschema/r/memory_aggregate_no_a.result | 1128 ++-- .../r/memory_aggregate_no_a_no_h.result | 958 +-- .../r/memory_aggregate_no_a_no_u.result | 870 +-- .../r/memory_aggregate_no_a_no_u_no_h.result | 700 +-- .../perfschema/r/memory_aggregate_no_h.result | 1192 ++-- .../perfschema/r/memory_aggregate_no_u.result | 1104 ++-- .../r/memory_aggregate_no_u_no_h.result | 934 +-- .../suite/perfschema/r/memory_table_io.result | 126 +- .../suite/perfschema/r/merge_table_io.result | 142 +- mysql-test/suite/perfschema/r/misc.result | 6 +- .../suite/perfschema/r/multi_table_io.result | 80 +- .../suite/perfschema/r/myisam_table_io.result | 124 +- mysql-test/suite/perfschema/r/nesting.result | 256 +- .../suite/perfschema/r/ortho_iter.result | 22 +- .../suite/perfschema/r/part_table_io.result | 128 +- .../perfschema/r/pfs_upgrade_event.result | 91 - .../perfschema/r/pfs_upgrade_func.result | 91 - .../perfschema/r/pfs_upgrade_proc.result | 91 - .../perfschema/r/pfs_upgrade_table.result | 91 - .../perfschema/r/pfs_upgrade_view.result | 91 - .../perfschema/r/prepared_statements.result | 21 +- .../prepared_stmts_by_stored_programs.result | 2 - .../suite/perfschema/r/privilege.result | 23 +- .../perfschema/r/privilege_table_io.result | 98 +- .../suite/perfschema/r/query_cache.result | 10 +- .../suite/perfschema/r/read_only.result | 30 +- mysql-test/suite/perfschema/r/relaylog.result | 48 +- .../perfschema/r/rollback_table_io.result | 53 +- .../suite/perfschema/r/rpl_gtid_func.result | 33 +- .../suite/perfschema/r/rpl_statements.result | 12 +- .../suite/perfschema/r/rpl_threads.result | 20 +- mysql-test/suite/perfschema/r/schema.result | 32 +- .../suite/perfschema/r/setup_actors.result | 59 +- .../perfschema/r/setup_actors_enabled.result | 35 +- .../perfschema/r/setup_actors_history.result | 22 + .../r/setup_instruments_defaults.result | 18 - .../r/setup_object_table_lock_io.result | 14 +- .../suite/perfschema/r/setup_objects.result | 10 - .../suite/perfschema/r/short_option_1.result | 15 +- .../suite/perfschema/r/short_option_2.result | 4 +- .../suite/perfschema/r/show_aggregate.result | 19 +- .../suite/perfschema/r/show_coverage.result | 32 +- .../suite/perfschema/r/show_misc.result | 36 - .../suite/perfschema/r/show_plugin.result | 370 +- .../suite/perfschema/r/show_plugin_56.result | 871 --- .../r/socket_summary_by_instance_func.result | 30 +- .../perfschema/r/stage_mdl_function.result | 54 +- .../perfschema/r/stage_mdl_global.result | 43 +- .../perfschema/r/stage_mdl_procedure.result | 51 +- .../suite/perfschema/r/stage_mdl_table.result | 32 +- .../r/start_server_disable_idle.result | 18 +- .../r/start_server_disable_stages.result | 18 +- .../r/start_server_disable_statements.result | 18 +- .../start_server_disable_transactions.result | 14 +- .../r/start_server_disable_waits.result | 18 +- .../perfschema/r/start_server_innodb.result | 18 +- .../r/start_server_low_digest.result | 7 - .../start_server_low_digest_sql_length.result | 4 +- .../r/start_server_low_index.result | 16 +- .../r/start_server_low_table_lock.result | 24 +- .../r/start_server_no_account.result | 18 +- .../r/start_server_no_cond_class.result | 16 +- .../r/start_server_no_cond_inst.result | 18 +- .../r/start_server_no_digests.result | 5 - .../r/start_server_no_file_class.result | 18 +- .../r/start_server_no_file_inst.result | 18 +- .../perfschema/r/start_server_no_host.result | 18 +- .../perfschema/r/start_server_no_index.result | 14 +- .../perfschema/r/start_server_no_mdl.result | 14 +- .../r/start_server_no_memory_class.result | 14 +- .../r/start_server_no_mutex_class.result | 18 +- .../r/start_server_no_mutex_inst.result | 18 +- ..._server_no_prepared_stmts_instances.result | 14 +- .../r/start_server_no_rwlock_class.result | 18 +- .../r/start_server_no_rwlock_inst.result | 18 +- .../r/start_server_no_setup_actors.result | 18 +- .../r/start_server_no_setup_objects.result | 18 +- .../r/start_server_no_socket_class.result | 18 +- .../r/start_server_no_socket_inst.result | 18 +- .../r/start_server_no_stage_class.result | 16 +- .../r/start_server_no_stages_history.result | 18 +- ...start_server_no_stages_history_long.result | 18 +- .../r/start_server_no_statement_class.result | 16 +- .../start_server_no_statements_history.result | 18 +- ...t_server_no_statements_history_long.result | 18 +- .../r/start_server_no_table_hdl.result | 18 +- .../r/start_server_no_table_inst.result | 18 +- .../r/start_server_no_table_lock.result | 16 +- .../r/start_server_no_thread_class.result | 18 +- .../r/start_server_no_thread_inst.result | 18 +- ...tart_server_no_transactions_history.result | 14 +- ...server_no_transactions_history_long.result | 14 +- .../perfschema/r/start_server_no_user.result | 18 +- .../r/start_server_no_waits_history.result | 18 +- .../start_server_no_waits_history_long.result | 18 +- .../perfschema/r/start_server_nothing.result | 14 +- .../perfschema/r/start_server_off.result | 114 +- .../suite/perfschema/r/start_server_on.result | 18 +- .../r/start_server_variables.result | 154 +- .../perfschema/r/statement_digest.result | 41 - .../r/statement_digest_consumers.result | 42 - .../r/statement_digest_long_query.result | 7 - .../r/statement_program_lost_inst.result | 16 +- .../r/statement_program_nested.result | 4 +- ...atement_program_nesting_event_check.result | 12 +- .../r/statement_program_non_nested.result | 22 +- .../perfschema/r/status_reprepare.result | 20 +- .../suite/perfschema/r/sxlock_func.result | 2 - .../r/table_aggregate_global_2u_2t.result | 858 +-- .../r/table_aggregate_global_2u_3t.result | 1018 +--- .../r/table_aggregate_global_4u_2t.result | 858 +-- .../r/table_aggregate_global_4u_3t.result | 1018 +--- .../r/table_aggregate_hist_2u_2t.result | 1479 +---- .../r/table_aggregate_hist_2u_3t.result | 1719 ++---- .../r/table_aggregate_hist_4u_2t.result | 1738 ++---- .../r/table_aggregate_hist_4u_3t.result | 1978 ++----- .../perfschema/r/table_aggregate_off.result | 98 +- .../r/table_aggregate_thread_2u_2t.result | 1308 +--- .../r/table_aggregate_thread_2u_3t.result | 1470 ++--- .../r/table_aggregate_thread_4u_2t.result | 1561 ++--- .../r/table_aggregate_thread_4u_3t.result | 1725 ++---- .../r/table_io_aggregate_global_2u_2t.result | 748 +-- .../r/table_io_aggregate_global_2u_3t.result | 834 +-- .../r/table_io_aggregate_global_4u_2t.result | 748 +-- .../r/table_io_aggregate_global_4u_3t.result | 834 +-- .../r/table_io_aggregate_hist_2u_2t.result | 1206 +--- .../r/table_io_aggregate_hist_2u_3t.result | 1409 +---- .../r/table_io_aggregate_hist_4u_2t.result | 1220 +--- .../r/table_io_aggregate_hist_4u_3t.result | 1423 +---- .../r/table_io_aggregate_thread_2u_2t.result | 1089 +--- .../r/table_io_aggregate_thread_2u_3t.result | 1175 +--- .../r/table_io_aggregate_thread_4u_2t.result | 1103 +--- .../r/table_io_aggregate_thread_4u_3t.result | 1189 +--- .../table_lock_aggregate_global_2u_2t.result | 98 +- .../table_lock_aggregate_global_2u_3t.result | 98 +- .../table_lock_aggregate_global_4u_2t.result | 98 +- .../table_lock_aggregate_global_4u_3t.result | 98 +- .../r/table_lock_aggregate_hist_2u_2t.result | 98 +- .../r/table_lock_aggregate_hist_2u_3t.result | 98 +- .../r/table_lock_aggregate_hist_4u_2t.result | 98 +- .../r/table_lock_aggregate_hist_4u_3t.result | 98 +- .../table_lock_aggregate_thread_2u_2t.result | 98 +- .../table_lock_aggregate_thread_2u_3t.result | 98 +- .../table_lock_aggregate_thread_4u_2t.result | 98 +- .../table_lock_aggregate_thread_4u_3t.result | 98 +- .../suite/perfschema/r/table_schema.result | 1638 ++--- .../suite/perfschema/r/temp_table_io.result | 59 +- .../suite/perfschema/r/threads_history.result | 149 +- .../suite/perfschema/r/threads_innodb.result | 16 - .../suite/perfschema/r/threads_mysql.result | 19 - .../suite/perfschema/r/transaction.result | 96 +- .../r/transaction_nested_events.result | 600 +- .../perfschema/r/trigger_table_io.result | 255 +- .../suite/perfschema/r/user_var_func.result | 3 + .../suite/perfschema/r/view_table_io.result | 130 +- .../perfschema/t/alter_table_progress.test | 3 +- mysql-test/suite/perfschema/t/bad_option.test | 24 +- .../perfschema/t/batch_table_io_func.test | 4 +- .../perfschema/t/connection_type_notwin.test | 6 +- .../perfschema/t/connection_type_win.test | 4 +- .../perfschema/t/ddl_esms_by_program.test | 2 +- .../t/ddl_prepared_statements_instances.test | 2 +- .../perfschema/t/dml_esms_by_program.test | 2 +- .../perfschema/t/dml_file_instances.test | 1 + .../t/dml_prepared_statements_instances.test | 2 +- .../t/hostcache_peer_addr-master.opt | 1 - .../perfschema/t/information_schema.test | 10 +- .../perfschema/t/memory_aggregate-master.opt | 1 - .../t/memory_aggregate_32bit-master.opt | 1 - .../t/memory_aggregate_no_a-master.opt | 1 - .../t/memory_aggregate_no_a_no_h-master.opt | 1 - .../t/memory_aggregate_no_a_no_u-master.opt | 1 - ...memory_aggregate_no_a_no_u_no_h-master.opt | 1 - .../t/memory_aggregate_no_h-master.opt | 1 - .../t/memory_aggregate_no_u-master.opt | 1 - .../t/memory_aggregate_no_u_no_h-master.opt | 1 - mysql-test/suite/perfschema/t/nesting.test | 2 +- .../suite/perfschema/t/no_threads-master.opt | 2 +- mysql-test/suite/perfschema/t/no_threads.test | 5 - mysql-test/suite/perfschema/t/read_only.test | 1 - .../suite/perfschema/t/rpl_threads-slave.opt | 1 - .../perfschema/t/show_aggregate-master.opt | 1 - .../suite/perfschema/t/show_aggregate.test | 11 +- .../suite/perfschema/t/show_coverage.test | 15 - mysql-test/suite/perfschema/t/show_misc.test | 34 - .../suite/perfschema/t/show_plugin-master.opt | 3 - .../suite/perfschema/t/show_plugin.test | 180 +- .../perfschema/t/show_plugin_56-master.opt | 3 - .../suite/perfschema/t/show_plugin_56.test | 446 -- .../t/socket_summary_by_event_name_func.test | 4 +- .../t/socket_summary_by_instance_func.test | 4 - .../t/start_server_low_index-master.opt | 2 +- .../suite/perfschema/t/start_server_off.test | 13 - .../suite/perfschema/t/status_reprepare.test | 18 +- .../suite/perfschema/t/sxlock_func.test | 1 + .../t/table_lock_aggregate_global_2u_2t.test | 2 +- .../t/table_lock_aggregate_global_2u_3t.test | 2 +- .../t/table_lock_aggregate_global_4u_2t.test | 2 +- .../t/table_lock_aggregate_global_4u_3t.test | 2 +- .../t/table_lock_aggregate_hist_2u_2t.test | 2 +- .../t/table_lock_aggregate_hist_2u_3t.test | 2 +- .../t/table_lock_aggregate_hist_4u_2t.test | 2 +- .../t/table_lock_aggregate_hist_4u_3t.test | 2 +- .../t/table_lock_aggregate_thread_2u_2t.test | 2 +- .../t/table_lock_aggregate_thread_2u_3t.test | 2 +- .../t/table_lock_aggregate_thread_4u_2t.test | 2 +- .../t/table_lock_aggregate_thread_4u_3t.test | 2 +- .../suite/perfschema/t/table_schema.test | 16 +- .../suite/perfschema/t/threads_history.test | 2 +- .../suite/perfschema/t/threads_innodb.test | 4 +- .../suite/perfschema/t/transaction.test | 13 +- .../t/transaction_nested_events.test | 4 +- .../suite/perfschema/t/view_table_io.test | 2 +- .../rpl/include/rpl_stm_relay_ign_space.inc | 2 +- mysql-test/suite/sql_sequence/rebuild.result | 145 +- mysql-test/suite/sql_sequence/rebuild.test | 2 +- .../r/sysvars_server_embedded,32bit.rdiff | 208 +- .../sys_vars/r/sysvars_server_embedded.result | 108 +- .../r/sysvars_server_notembedded,32bit.rdiff | 224 +- .../r/sysvars_server_notembedded.result | 108 +- mysys/psi_noop.c | 310 +- sql/event_data_objects.cc | 4 +- sql/event_queue.cc | 4 +- sql/events.cc | 2 +- sql/ha_partition.cc | 4 +- sql/handle_connections_win.cc | 2 +- sql/log.h | 2 - sql/mdl.cc | 2 +- sql/mysqld.cc | 222 +- sql/mysqld.h | 2 +- sql/semisync_master_ack_receiver.cc | 2 +- sql/slave.cc | 4 +- sql/sp.cc | 6 +- sql/sp_head.cc | 37 +- sql/sp_head.h | 38 - sql/sql_acl.cc | 14 +- sql/sql_acl.h | 2 - sql/sql_class.cc | 2 +- sql/sql_class.h | 4 +- sql/sql_parse.cc | 5 +- sql/sql_plugin.cc | 1 + sql/sql_trigger.cc | 12 +- sql/sys_vars.cc | 186 +- storage/innobase/buf/buf0dump.cc | 24 +- storage/innobase/fts/fts0ast.cc | 2 +- storage/innobase/include/srv0srv.h | 5 +- storage/innobase/include/univ.i | 5 +- storage/innobase/include/ut0new.h | 3 - storage/innobase/include/ut0stage.h | 18 +- storage/innobase/row/row0merge.cc | 6 +- storage/innobase/srv/srv0srv.cc | 4 +- storage/mroonga/ha_mroonga.cpp | 2 +- storage/mroonga/mrn_mysql_compat.h | 11 +- storage/mroonga/mrn_variables.hpp | 2 - storage/perfschema/CMakeLists.txt | 59 +- storage/perfschema/my_thread.h | 75 +- storage/perfschema/mysqld_thd_manager.cc | 39 + storage/perfschema/mysqld_thd_manager.h | 29 + storage/perfschema/pfs.cc | 13 +- storage/perfschema/pfs_account.cc | 4 +- storage/perfschema/pfs_buffer_container.h | 9 +- storage/perfschema/pfs_builtin_memory.cc | 2 +- storage/perfschema/pfs_column_types.h | 62 +- storage/perfschema/pfs_config.h.cmake | 4 + storage/perfschema/pfs_engine_table.cc | 22 +- storage/perfschema/pfs_engine_table.h | 4 +- storage/perfschema/pfs_events.h | 2 + storage/perfschema/pfs_events_waits.h | 4 + storage/perfschema/pfs_instr.cc | 2 + storage/perfschema/pfs_instr_class.cc | 14 +- storage/perfschema/pfs_lock.h | 14 - storage/perfschema/pfs_program.cc | 2 +- storage/perfschema/pfs_stat.h | 11 +- storage/perfschema/pfs_status.cc | 4 +- storage/perfschema/pfs_status.h | 2 +- storage/perfschema/pfs_variable.cc | 100 +- storage/perfschema/pfs_variable.h | 16 +- storage/perfschema/pfs_visitor.cc | 6 +- storage/perfschema/rpl_gtid.h | 17 + storage/perfschema/table_events_statements.cc | 12 +- .../perfschema/table_events_transactions.cc | 4 +- storage/perfschema/table_events_waits.cc | 36 +- storage/perfschema/table_global_variables.cc | 4 +- storage/perfschema/table_helper.cc | 177 +- storage/perfschema/table_helper.h | 5 +- storage/perfschema/table_md_locks.cc | 2 +- ...table_replication_applier_configuration.cc | 8 +- .../table_replication_applier_status.cc | 7 +- ...plication_applier_status_by_coordinator.cc | 11 +- ...le_replication_applier_status_by_worker.cc | 2 +- ...le_replication_connection_configuration.cc | 30 +- .../table_replication_connection_status.cc | 2 +- .../table_replication_group_member_stats.cc | 2 +- .../table_replication_group_members.cc | 2 +- storage/perfschema/table_session_variables.cc | 4 +- storage/perfschema/table_setup_actors.cc | 4 +- storage/perfschema/table_setup_objects.cc | 3 +- storage/perfschema/table_setup_timers.cc | 2 +- storage/perfschema/table_threads.cc | 32 +- storage/perfschema/table_tlws_by_table.cc | 51 +- storage/perfschema/table_uvar_by_thread.cc | 8 +- storage/perfschema/table_uvar_by_thread.h | 2 + .../perfschema/table_variables_by_thread.cc | 6 +- .../perfschema/unittest/pfs_server_stubs.cc | 1 - .../unittest/stub_global_status_var.h | 2 +- 403 files changed, 20147 insertions(+), 63173 deletions(-) delete mode 100644 mysql-test/suite/perfschema/include/show_plugin_verifier_56.inc delete mode 100644 mysql-test/suite/perfschema/r/show_plugin_56.result delete mode 100644 mysql-test/suite/perfschema/t/hostcache_peer_addr-master.opt delete mode 100644 mysql-test/suite/perfschema/t/rpl_threads-slave.opt delete mode 100644 mysql-test/suite/perfschema/t/show_aggregate-master.opt delete mode 100644 mysql-test/suite/perfschema/t/show_plugin-master.opt delete mode 100644 mysql-test/suite/perfschema/t/show_plugin_56-master.opt delete mode 100644 mysql-test/suite/perfschema/t/show_plugin_56.test create mode 100644 storage/perfschema/mysqld_thd_manager.cc create mode 100644 storage/perfschema/mysqld_thd_manager.h create mode 100644 storage/perfschema/pfs_config.h.cmake create mode 100644 storage/perfschema/rpl_gtid.h diff --git a/.gitignore b/.gitignore index d92073c0af4..3535f8cc0eb 100644 --- a/.gitignore +++ b/.gitignore @@ -221,6 +221,7 @@ storage/myisam/myisamlog storage/myisam/myisampack storage/myisam/rt_test storage/myisam/sp_test +storage/perfschema/pfs_config.h storage/rocksdb/ldb storage/rocksdb/myrocks_hotbackup storage/rocksdb/mysql_ldb diff --git a/include/my_pthread.h b/include/my_pthread.h index 41af69bb54d..0c67dc95765 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -116,7 +116,7 @@ int pthread_cancel(pthread_t thread); #define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF) #define pthread_key_delete(A) TlsFree(A) #define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V))) -#define pthread_setspecific(A,B) (!TlsSetValue((A),(B))) +#define pthread_setspecific(A,B) (!TlsSetValue((A),(LPVOID)(B))) #define pthread_getspecific(A) (TlsGetValue(A)) #define my_pthread_getspecific(T,A) ((T) TlsGetValue(A)) #define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V)) diff --git a/include/mysql/psi/mysql_file.h b/include/mysql/psi/mysql_file.h index 533c440d4f9..761482d0165 100644 --- a/include/mysql/psi/mysql_file.h +++ b/include/mysql/psi/mysql_file.h @@ -540,7 +540,7 @@ inline_mysql_file_fgets( { char *result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -568,7 +568,7 @@ inline_mysql_file_fgetc( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -596,7 +596,7 @@ inline_mysql_file_fputs( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -626,7 +626,7 @@ inline_mysql_file_fputc( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -654,7 +654,7 @@ inline_mysql_file_fprintf(MYSQL_FILE *file, const char *format, ...) int result; va_list args; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -686,7 +686,7 @@ inline_mysql_file_vfprintf( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -714,7 +714,7 @@ inline_mysql_file_fflush( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -748,18 +748,15 @@ inline_mysql_file_fstat( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, filenr, PSI_FILE_FSTAT); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_fstat(filenr, stat_area, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_fstat(filenr, stat_area, flags); + PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + return result; } #endif @@ -776,18 +773,15 @@ inline_mysql_file_stat( { MY_STAT *result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); - result= my_stat(path, stat_area, flags); - PSI_FILE_CALL(end_file_open_wait)(locker, result); - return result; - } + PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); + result= my_stat(path, stat_area, flags); + PSI_FILE_CALL(end_file_open_wait)(locker, result); + return result; } #endif @@ -804,19 +798,16 @@ inline_mysql_file_chsize( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, - src_line); - result= my_chsize(file, newlength, filler, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, + src_line); + result= my_chsize(file, newlength, filler, flags); + PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); + return result; } #endif @@ -837,24 +828,21 @@ inline_mysql_file_fopen( if (likely(that != NULL)) { #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STREAM_OPEN, + filename, that); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STREAM_OPEN, - filename, that); - if (likely(locker != NULL)) + PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); + that->m_file= my_fopen(filename, flags, myFlags); + that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file); + if (unlikely(that->m_file == NULL)) { - PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); - that->m_file= my_fopen(filename, flags, myFlags); - that->m_psi= PSI_FILE_CALL(end_file_open_wait)(locker, that->m_file); - if (unlikely(that->m_file == NULL)) - { - my_free(that); - return NULL; - } - return that; + my_free(that); + return NULL; } + return that; } #endif @@ -880,7 +868,7 @@ inline_mysql_file_fclose( if (likely(file != NULL)) { #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -912,7 +900,7 @@ inline_mysql_file_fread( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -945,7 +933,7 @@ inline_mysql_file_fwrite( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -978,7 +966,7 @@ inline_mysql_file_fseek( { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -1006,7 +994,7 @@ inline_mysql_file_ftell( { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + if (psi_likely(file->m_psi)) { struct PSI_file_locker *locker; PSI_file_locker_state state; @@ -1034,19 +1022,16 @@ inline_mysql_file_create( { File file; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, + &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, - &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); - file= my_create(filename, create_flags, access_flags, myFlags); - PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); - return file; - } + PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); + file= my_create(filename, create_flags, access_flags, myFlags); + PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); + return file; } #endif @@ -1067,7 +1052,7 @@ inline_mysql_file_create_temp( PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker) (&state, key, PSI_FILE_CREATE, NULL, &locker); - if (likely(locker != NULL)) + if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); /* The file name is generated by create_temp_file(). */ @@ -1090,19 +1075,16 @@ inline_mysql_file_open( { File file; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, + &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, - &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); - file= my_open(filename, flags, myFlags); - PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); - return file; - } + PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); + file= my_open(filename, flags, myFlags); + PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); + return file; } #endif @@ -1119,18 +1101,15 @@ inline_mysql_file_close( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CLOSE); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); - result= my_close(file, flags); - PSI_FILE_CALL(end_file_close_wait)(locker, result); - return result; - } + PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); + result= my_close(file, flags); + PSI_FILE_CALL(end_file_close_wait)(locker, result); + return result; } #endif @@ -1147,23 +1126,20 @@ inline_mysql_file_read( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + size_t bytes_read; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - size_t bytes_read; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); - result= my_read(file, buffer, count, flags); - if (flags & (MY_NABP | MY_FNABP)) - bytes_read= (result == 0) ? count : 0; - else - bytes_read= (result != MY_FILE_ERROR) ? result : 0; - PSI_FILE_CALL(end_file_wait)(locker, bytes_read); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); + result= my_read(file, buffer, count, flags); + if (flags & (MY_NABP | MY_FNABP)) + bytes_read= (result == 0) ? count : 0; + else + bytes_read= (result != MY_FILE_ERROR) ? result : 0; + PSI_FILE_CALL(end_file_wait)(locker, bytes_read); + return result; } #endif @@ -1180,23 +1156,20 @@ inline_mysql_file_write( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + size_t bytes_written; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - size_t bytes_written; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); - result= my_write(file, buffer, count, flags); - if (flags & (MY_NABP | MY_FNABP)) - bytes_written= (result == 0) ? count : 0; - else - bytes_written= (result != MY_FILE_ERROR) ? result : 0; - PSI_FILE_CALL(end_file_wait)(locker, bytes_written); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); + result= my_write(file, buffer, count, flags); + if (flags & (MY_NABP | MY_FNABP)) + bytes_written= (result == 0) ? count : 0; + else + bytes_written= (result != MY_FILE_ERROR) ? result : 0; + PSI_FILE_CALL(end_file_wait)(locker, bytes_written); + return result; } #endif @@ -1213,23 +1186,20 @@ inline_mysql_file_pread( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + size_t bytes_read; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - size_t bytes_read; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); - result= my_pread(file, buffer, count, offset, flags); - if (flags & (MY_NABP | MY_FNABP)) - bytes_read= (result == 0) ? count : 0; - else - bytes_read= (result != MY_FILE_ERROR) ? result : 0; - PSI_FILE_CALL(end_file_wait)(locker, bytes_read); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); + result= my_pread(file, buffer, count, offset, flags); + if (flags & (MY_NABP | MY_FNABP)) + bytes_read= (result == 0) ? count : 0; + else + bytes_read= (result != MY_FILE_ERROR) ? result : 0; + PSI_FILE_CALL(end_file_wait)(locker, bytes_read); + return result; } #endif @@ -1246,23 +1216,20 @@ inline_mysql_file_pwrite( { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + size_t bytes_written; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - size_t bytes_written; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); - result= my_pwrite(file, buffer, count, offset, flags); - if (flags & (MY_NABP | MY_FNABP)) - bytes_written= (result == 0) ? count : 0; - else - bytes_written= (result != MY_FILE_ERROR) ? result : 0; - PSI_FILE_CALL(end_file_wait)(locker, bytes_written); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); + result= my_pwrite(file, buffer, count, offset, flags); + if (flags & (MY_NABP | MY_FNABP)) + bytes_written= (result == 0) ? count : 0; + else + bytes_written= (result != MY_FILE_ERROR) ? result : 0; + PSI_FILE_CALL(end_file_wait)(locker, bytes_written); + return result; } #endif @@ -1279,18 +1246,15 @@ inline_mysql_file_seek( { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_SEEK); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_seek(file, pos, whence, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_seek(file, pos, whence, flags); + PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + return result; } #endif @@ -1307,18 +1271,15 @@ inline_mysql_file_tell( { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_tell(file, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_tell(file, flags); + PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + return result; } #endif @@ -1335,18 +1296,15 @@ inline_mysql_file_delete( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); - result= my_delete(name, flags); - PSI_FILE_CALL(end_file_close_wait)(locker, result); - return result; - } + PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); + result= my_delete(name, flags); + PSI_FILE_CALL(end_file_close_wait)(locker, result); + return result; } #endif @@ -1363,19 +1321,16 @@ inline_mysql_file_rename( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker) + (&state, key, PSI_FILE_RENAME, from, &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker) - (&state, key, PSI_FILE_RENAME, from, &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_rename(from, to, flags); - PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_rename(from, to, flags); + PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); + return result; } #endif @@ -1394,20 +1349,17 @@ inline_mysql_file_create_with_symlink( { File file; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, + &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, - &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); - file= my_create_with_symlink(linkname, filename, create_flags, access_flags, - flags); - PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); - return file; - } + PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); + file= my_create_with_symlink(linkname, filename, create_flags, access_flags, + flags); + PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); + return file; } #endif @@ -1428,19 +1380,16 @@ inline_mysql_file_delete_with_symlink( char buf[FN_REFLEN]; char *fullname= fn_format(buf, name, "", ext, MY_UNPACK_FILENAME | MY_APPEND_EXT); #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname, + &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname, - &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); - result= my_handler_delete_with_symlink(fullname, flags); - PSI_FILE_CALL(end_file_close_wait)(locker, result); - return result; - } + PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line); + result= my_handler_delete_with_symlink(fullname, flags); + PSI_FILE_CALL(end_file_close_wait)(locker, result); + return result; } #endif @@ -1458,19 +1407,16 @@ inline_mysql_file_rename_with_symlink( { int result; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_name_locker) + (&state, key, PSI_FILE_RENAME, from, &locker); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_name_locker) - (&state, key, PSI_FILE_RENAME, from, &locker); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_rename_with_symlink(from, to, flags); - PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_rename_with_symlink(from, to, flags); + PSI_FILE_CALL(end_file_rename_wait)(locker, from, to, result); + return result; } #endif @@ -1487,18 +1433,15 @@ inline_mysql_file_sync( { int result= 0; #ifdef HAVE_PSI_FILE_INTERFACE - if (psi_likely(pfs_enabled)) + struct PSI_file_locker *locker; + PSI_file_locker_state state; + locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); + if (psi_likely(locker != NULL)) { - struct PSI_file_locker *locker; - PSI_file_locker_state state; - locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, fd, PSI_FILE_SYNC); - if (likely(locker != NULL)) - { - PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); - result= my_sync(fd, flags); - PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); - return result; - } + PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); + result= my_sync(fd, flags); + PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); + return result; } #endif diff --git a/include/mysql/psi/mysql_mdl.h b/include/mysql/psi/mysql_mdl.h index 0db0160c77d..20d6c94c57c 100644 --- a/include/mysql/psi/mysql_mdl.h +++ b/include/mysql/psi/mysql_mdl.h @@ -30,10 +30,25 @@ #include "mysql/psi/psi.h" +#ifdef HAVE_PSI_METADATA_INTERFACE + #ifndef PSI_METADATA_CALL #define PSI_METADATA_CALL(M) PSI_DYNAMIC_CALL(M) #endif +#define PSI_CALL_start_metadata_wait(A,B,C,D) PSI_METADATA_CALL(start_metadata_wait)(A,B,C,D) +#define PSI_CALL_end_metadata_wait(A,B) PSI_METADATA_CALL(end_metadata_wait)(A,B) +#define PSI_CALL_create_metadata_lock(A,B,C,D,E,F,G) PSI_METADATA_CALL(create_metadata_lock)(A,B,C,D,E,F,G) +#define PSI_CALL_set_metadata_lock_status(A,B) PSI_METADATA_CALL(set_metadata_lock_status)(A,B) +#define PSI_CALL_destroy_metadata_lock(A) PSI_METADATA_CALL(destroy_metadata_lock)(A) +#else +#define PSI_CALL_start_metadata_wait(A,B,C,D) 0 +#define PSI_CALL_end_metadata_wait(A,B) do { } while(0) +#define PSI_CALL_create_metadata_lock(A,B,C,D,E,F,G) 0 +#define PSI_CALL_set_metadata_lock_status(A,B) do {} while(0) +#define PSI_CALL_destroy_metadata_lock(A) do {} while(0) +#endif + /** @defgroup Thread_instrumentation Metadata Instrumentation @ingroup Instrumentation_interface diff --git a/include/mysql/psi/mysql_memory.h b/include/mysql/psi/mysql_memory.h index c491ef4570c..a79579c2e56 100644 --- a/include/mysql/psi/mysql_memory.h +++ b/include/mysql/psi/mysql_memory.h @@ -30,6 +30,18 @@ #include "mysql/psi/psi.h" +#ifdef HAVE_PSI_MEMORY_INTERFACE +#define PSI_CALL_memory_alloc(A1,A2,A3) PSI_MEMORY_CALL(memory_alloc)(A1,A2,A3) +#define PSI_CALL_memory_free(A1,A2,A3) PSI_MEMORY_CALL(memory_free)(A1,A2,A3) +#define PSI_CALL_memory_realloc(A1,A2,A3,A4) PSI_MEMORY_CALL(memory_realloc)(A1,A2,A3,A4) +#define PSI_CALL_register_memory(A1,A2,A3) PSI_MEMORY_CALL(register_memory)(A1,A2,A3) +#else +#define PSI_CALL_memory_alloc(A1,A2,A3) 0 +#define PSI_CALL_memory_free(A1,A2,A3) do { } while(0) +#define PSI_CALL_memory_realloc(A1,A2,A3,A4) 0 +#define PSI_CALL_register_memory(A1,A2,A3) do { } while(0) +#endif + #ifndef PSI_MEMORY_CALL #define PSI_MEMORY_CALL(M) PSI_DYNAMIC_CALL(M) #endif @@ -58,9 +70,7 @@ static inline void inline_mysql_memory_register( int count __attribute__((unused))) #endif { -#ifdef HAVE_PSI_MEMORY_INTERFACE - PSI_MEMORY_CALL(register_memory)(category, info, count); -#endif + PSI_CALL_register_memory(category, info, count); } /** @} (end of group Memory_instrumentation) */ diff --git a/include/mysql/psi/mysql_stage.h b/include/mysql/psi/mysql_stage.h index 9af5a7110df..732df6bd357 100644 --- a/include/mysql/psi/mysql_stage.h +++ b/include/mysql/psi/mysql_stage.h @@ -89,10 +89,10 @@ End the last stage */ #ifdef HAVE_PSI_STAGE_INTERFACE - #define mysql_end_stage \ - inline_mysql_end_stage + #define mysql_end_stage() \ + inline_mysql_end_stage() #else - #define mysql_end_stage \ + #define mysql_end_stage() \ do {} while (0) #endif diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index 071ea66e656..711520dba78 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -96,26 +96,32 @@ #define PSI_CALL_new_thread PSI_THREAD_CALL(new_thread) #define PSI_CALL_register_thread PSI_THREAD_CALL(register_thread) #define PSI_CALL_set_thread PSI_THREAD_CALL(set_thread) +#define PSI_CALL_set_thread_THD PSI_THREAD_CALL(set_thread_THD) #define PSI_CALL_set_thread_connect_attrs PSI_THREAD_CALL(set_thread_connect_attrs) #define PSI_CALL_set_thread_db PSI_THREAD_CALL(set_thread_db) #define PSI_CALL_set_thread_id PSI_THREAD_CALL(set_thread_id) +#define PSI_CALL_set_thread_os_id PSI_THREAD_CALL(set_thread_os_id) #define PSI_CALL_set_thread_info PSI_THREAD_CALL(set_thread_info) #define PSI_CALL_set_thread_start_time PSI_THREAD_CALL(set_thread_start_time) #define PSI_CALL_set_thread_account PSI_THREAD_CALL(set_thread_account) #define PSI_CALL_spawn_thread PSI_THREAD_CALL(spawn_thread) +#define PSI_CALL_set_connection_type PSI_THREAD_CALL(set_connection_type) #else #define PSI_CALL_delete_current_thread() do { } while(0) #define PSI_CALL_get_thread() NULL #define PSI_CALL_new_thread(A1,A2,A3) NULL #define PSI_CALL_register_thread(A1,A2,A3) do { } while(0) #define PSI_CALL_set_thread(A1) do { } while(0) +#define PSI_CALL_set_thread_THD(A1,A2) do { } while(0) #define PSI_CALL_set_thread_connect_attrs(A1,A2,A3) 0 #define PSI_CALL_set_thread_db(A1,A2) do { } while(0) #define PSI_CALL_set_thread_id(A1,A2) do { } while(0) +#define PSI_CALL_set_thread_os_id(A1) do { } while(0) #define PSI_CALL_set_thread_info(A1, A2) do { } while(0) #define PSI_CALL_set_thread_start_time(A1) do { } while(0) #define PSI_CALL_set_thread_account(A1, A2, A3, A4) do { } while(0) #define PSI_CALL_spawn_thread(A1, A2, A3, A4, A5) 0 +#define PSI_CALL_set_connection_type(A) do { } while(0) #endif diff --git a/include/mysql/psi/mysql_transaction.h b/include/mysql/psi/mysql_transaction.h index 41629395ee0..dab9cfee14f 100644 --- a/include/mysql/psi/mysql_transaction.h +++ b/include/mysql/psi/mysql_transaction.h @@ -45,7 +45,7 @@ inline_mysql_start_transaction(STATE, XID, TRXID, ISO, RO, AC, __FILE__, __LINE__) #else #define MYSQL_START_TRANSACTION(STATE, XID, TRXID, ISO, RO, AC) \ - do {} while (0) + 0 #endif #ifdef HAVE_PSI_TRANSACTION_INTERFACE @@ -109,7 +109,7 @@ inline_mysql_rollback_transaction(LOCKER) #else #define MYSQL_ROLLBACK_TRANSACTION(LOCKER) \ - NULL + do { } while(0) #endif #ifdef HAVE_PSI_TRANSACTION_INTERFACE @@ -117,7 +117,7 @@ inline_mysql_commit_transaction(LOCKER) #else #define MYSQL_COMMIT_TRANSACTION(LOCKER) \ - NULL + do { } while(0) #endif #ifdef HAVE_PSI_TRANSACTION_INTERFACE diff --git a/include/mysql/psi/psi.h b/include/mysql/psi/psi.h index 9400bebe5b0..3cc392fef67 100644 --- a/include/mysql/psi/psi.h +++ b/include/mysql/psi/psi.h @@ -23,10 +23,6 @@ #ifndef MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H #define MYSQL_PERFORMANCE_SCHEMA_INTERFACE_H -#ifdef EMBEDDED_LIBRARY -#define DISABLE_ALL_PSI -#endif /* EMBEDDED_LIBRARY */ - #ifndef MY_GLOBAL_INCLUDED /* Make sure a .c or .cc file contains an include to my_global.h first. @@ -55,6 +51,12 @@ #include "psi_base.h" #include "psi_memory.h" +#ifdef _WIN32 +typedef struct thread_attr pthread_attr_t; +typedef DWORD pthread_t; +typedef DWORD pthread_key_t; +#endif + /* MAINTAINER: The following pattern: @@ -783,6 +785,7 @@ enum PSI_socket_operation }; typedef enum PSI_socket_operation PSI_socket_operation; +#endif /** Instrumented mutex key. To instrument a mutex, a mutex key must be obtained using @c register_mutex. @@ -819,10 +822,7 @@ typedef unsigned int PSI_thread_key; To instrument a file, a file key must be obtained using @c register_file. Using a zero key always disable the instrumentation. */ -#ifndef PSI_FILE_KEY_DEFINED typedef unsigned int PSI_file_key; -#define PSI_FILE_KEY_DEFINED -#endif /** Instrumented stage key. @@ -2967,7 +2967,7 @@ typedef struct PSI_sp_locker_state_v2 PSI_sp_locker_state; typedef struct PSI_metadata_locker_state_v2 PSI_metadata_locker_state; #endif -#else /* HAVE_PSI_INTERFACE */ +#ifndef HAVE_PSI_INTERFACE /** Dummy structure, used to declare PSI_server when no instrumentation @@ -3004,10 +3004,13 @@ struct PSI_stage_info_none with HAVE_PSI_INTERFACE. */ typedef struct PSI_stage_info_none PSI_stage_info; +typedef struct PSI_stage_info_none PSI_statement_info; +typedef struct PSI_stage_info_none PSI_sp_locker_state; +typedef struct PSI_stage_info_none PSI_metadata_locker_state; +typedef struct PSI_stage_info_none PSI_metadata_locker; #endif /* HAVE_PSI_INTERFACE */ -extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled; extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; /* diff --git a/include/mysql/psi/psi_abi_v1.h.pp b/include/mysql/psi/psi_abi_v1.h.pp index 3d562b794f4..ec47f0d5253 100644 --- a/include/mysql/psi/psi_abi_v1.h.pp +++ b/include/mysql/psi/psi_abi_v1.h.pp @@ -851,6 +851,5 @@ typedef struct PSI_transaction_locker_state_v1 PSI_transaction_locker_state; typedef struct PSI_socket_locker_state_v1 PSI_socket_locker_state; typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state; typedef struct PSI_metadata_locker_state_v1 PSI_metadata_locker_state; -extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled; extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; C_MODE_END diff --git a/include/mysql/psi/psi_abi_v2.h.pp b/include/mysql/psi/psi_abi_v2.h.pp index 47e81a2c6bc..a670e53a8b7 100644 --- a/include/mysql/psi/psi_abi_v2.h.pp +++ b/include/mysql/psi/psi_abi_v2.h.pp @@ -275,6 +275,5 @@ typedef struct PSI_transaction_locker_state_v2 PSI_transaction_locker_state; typedef struct PSI_socket_locker_state_v2 PSI_socket_locker_state; typedef struct PSI_sp_locker_state_v2 PSI_sp_locker_state; typedef struct PSI_metadata_locker_state_v2 PSI_metadata_locker_state; -extern MYSQL_PLUGIN_IMPORT my_bool pfs_enabled; extern MYSQL_PLUGIN_IMPORT PSI *PSI_server; C_MODE_END diff --git a/include/mysql/psi/psi_base.h b/include/mysql/psi/psi_base.h index 95f8d2101f0..f365e2625ee 100644 --- a/include/mysql/psi/psi_base.h +++ b/include/mysql/psi/psi_base.h @@ -28,6 +28,10 @@ #ifndef MYSQL_PSI_BASE_H #define MYSQL_PSI_BASE_H +#ifdef EMBEDDED_LIBRARY +#define DISABLE_ALL_PSI +#endif /* EMBEDDED_LIBRARY */ + #ifdef __cplusplus extern "C" { #endif diff --git a/include/mysql_com.h b/include/mysql_com.h index 2bfacdeec20..de9eb938f69 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -25,8 +25,10 @@ #define HOSTNAME_LENGTH 60 #define SYSTEM_CHARSET_MBMAXLEN 3 -#define NAME_CHAR_LEN 64U /* Field/table name length */ -#define USERNAME_CHAR_LENGTH 128U +#define NAME_CHAR_LEN 64 /* Field/table name length */ +#define USERNAME_CHAR_LENGTH 128 +#define USERNAME_CHAR_LENGTH_STR STRINGIFY_ARG(USERNAME_CHAR_LENGTH) + #define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) #define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) #define DEFINER_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 1) diff --git a/include/pfs_file_provider.h b/include/pfs_file_provider.h index eae10e9c39e..3df999894fd 100644 --- a/include/pfs_file_provider.h +++ b/include/pfs_file_provider.h @@ -78,6 +78,9 @@ void pfs_start_file_close_wait_v1(PSI_file_locker *locker, void pfs_end_file_close_wait_v1(PSI_file_locker *locker, int rc); +void pfs_end_file_rename_wait_v1(PSI_file_locker *locker, const char *old_name, + const char *new_name, int rc); + C_MODE_END #endif /* EMBEDDED_LIBRARY */ diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index e85f3ffbde3..cccf72591cc 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -76,7 +76,13 @@ loose-performance-schema-max-cond-instances=1000 loose-performance-schema-max-file-instances=10000 loose-performance-schema-max-socket-instances=1000 loose-performance-schema-max-table-instances=500 +loose-performance-schema-max-table-lock-stat=500 +loose-performance-schema-max-index-stat=5000 loose-performance-schema-max-table-handles=1000 +loose-performance-schema-max-prepared-statements-instances=100 +loose-performance-schema-max-program-instances=5000 +loose-performance-schema-setup-actors-size=100 +loose-performance-schema-setup-objects-size=100 loose-performance-schema-events-waits-history-size=10 loose-performance-schema-events-waits-history-long-size=10000 @@ -84,8 +90,11 @@ loose-performance-schema-events-stages-history-size=10 loose-performance-schema-events-stages-history-long-size=1000 loose-performance-schema-events-statements-history-size=10 loose-performance-schema-events-statements-history-long-size=1000 +loose-performance-schema-events-transactions-history-size=10 +loose-performance-schema-events-transactions-history-long-size=1000 loose-performance-schema-max-thread-instances=200 loose-performance-schema-session-connect-attrs-size=2048 +loose-performance-schema-max-metadata-locks=10000 # Enable everything, for maximun code exposure during testing @@ -97,6 +106,9 @@ loose-performance-schema-consumer-events-stages-history-long=ON loose-performance-schema-consumer-events-statements-current=ON loose-performance-schema-consumer-events-statements-history=ON loose-performance-schema-consumer-events-statements-history-long=ON +loose-performance-schema-consumer-events-transactions-current=ON +loose-performance-schema-consumer-events-transactions-history=ON +loose-performance-schema-consumer-events-transactions-history-long=ON loose-performance-schema-consumer-events-waits-current=ON loose-performance-schema-consumer-events-waits-history=ON loose-performance-schema-consumer-events-waits-history-long=ON diff --git a/mysql-test/include/wait_for_sql_thread_read_all.inc b/mysql-test/include/wait_for_sql_thread_read_all.inc index ec5ecd0cb17..1bbb006f3a8 100644 --- a/mysql-test/include/wait_for_sql_thread_read_all.inc +++ b/mysql-test/include/wait_for_sql_thread_read_all.inc @@ -1,6 +1,6 @@ --let $show_statement = show all slaves status --let $field = Slave_SQL_State ---let $condition = = 'Slave has read all relay log; waiting for the slave I/O thread to update it' +--let $condition = = 'Slave has read all relay log; waiting for more updates' --let $wait_for_all = 1 --source include/wait_show_condition.inc diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result index 20f40b94337..9c9b62662db 100644 --- a/mysql-test/main/mysqld--help.result +++ b/mysql-test/main/mysqld--help.result @@ -756,13 +756,21 @@ The following specify which files/extra groups are read (specified before remain --performance-schema-consumer-events-statements-current Default startup value for the events_statements_current consumer. - (Defaults to on; use --skip-performance-schema-consumer-events-statements-current to disable.) --performance-schema-consumer-events-statements-history Default startup value for the events_statements_history consumer. --performance-schema-consumer-events-statements-history-long Default startup value for the events_statements_history_long consumer. + --performance-schema-consumer-events-transactions-current + Default startup value for the events_transactions_current + consumer. + --performance-schema-consumer-events-transactions-history + Default startup value for the events_transactions_history + consumer. + --performance-schema-consumer-events-transactions-history-long + Default startup value for the + events_transactions_history_long consumer. --performance-schema-consumer-events-waits-current Default startup value for the events_waits_current consumer. @@ -798,6 +806,12 @@ The following specify which files/extra groups are read (specified before remain --performance-schema-events-statements-history-size=# Number of rows per thread in EVENTS_STATEMENTS_HISTORY. Use 0 to disable, -1 for automated sizing. + --performance-schema-events-transactions-history-long-size=# + Number of rows in EVENTS_TRANSACTIONS_HISTORY_LONG. Use 0 + to disable, -1 for automated sizing. + --performance-schema-events-transactions-history-size=# + Number of rows per thread in EVENTS_TRANSACTIONS_HISTORY. + Use 0 to disable, -1 for automated sizing. --performance-schema-events-waits-history-long-size=# Number of rows in EVENTS_WAITS_HISTORY_LONG. Use 0 to disable, -1 for automated sizing. @@ -825,11 +839,25 @@ The following specify which files/extra groups are read (specified before remain --performance-schema-max-file-instances=# Maximum number of instrumented files. Use 0 to disable, -1 for automated sizing. + --performance-schema-max-index-stat=# + Maximum number of index statistics for instrumented + tables. Use 0 to disable, -1 for automated scaling. + --performance-schema-max-memory-classes=# + Maximum number of memory pool instruments. + --performance-schema-max-metadata-locks=# + Maximum number of metadata locks. Use 0 to disable, -1 + for automated scaling. --performance-schema-max-mutex-classes=# Maximum number of mutex instruments. --performance-schema-max-mutex-instances=# Maximum number of instrumented MUTEX objects. Use 0 to disable, -1 for automated sizing. + --performance-schema-max-prepared-statements-instances=# + Maximum number of instrumented prepared statements. Use 0 + to disable, -1 for automated scaling. + --performance-schema-max-program-instances=# + Maximum number of instrumented programs. Use 0 to + disable, -1 for automated scaling. --performance-schema-max-rwlock-classes=# Maximum number of rwlock instruments. --performance-schema-max-rwlock-instances=# @@ -840,16 +868,23 @@ The following specify which files/extra groups are read (specified before remain --performance-schema-max-socket-instances=# Maximum number of opened instrumented sockets. Use 0 to disable, -1 for automated sizing. + --performance-schema-max-sql-text-length=# + Maximum length of displayed sql text. --performance-schema-max-stage-classes=# Maximum number of stage instruments. --performance-schema-max-statement-classes=# Maximum number of statement instruments. + --performance-schema-max-statement-stack=# + Number of rows per thread in EVENTS_STATEMENTS_CURRENT. --performance-schema-max-table-handles=# Maximum number of opened instrumented tables. Use 0 to disable, -1 for automated sizing. --performance-schema-max-table-instances=# Maximum number of instrumented tables. Use 0 to disable, -1 for automated sizing. + --performance-schema-max-table-lock-stat=# + Maximum number of lock statistics for instrumented + tables. Use 0 to disable, -1 for automated scaling. --performance-schema-max-thread-classes=# Maximum number of thread instruments. --performance-schema-max-thread-instances=# @@ -1613,9 +1648,12 @@ performance-schema-accounts-size -1 performance-schema-consumer-events-stages-current FALSE performance-schema-consumer-events-stages-history FALSE performance-schema-consumer-events-stages-history-long FALSE -performance-schema-consumer-events-statements-current TRUE +performance-schema-consumer-events-statements-current FALSE performance-schema-consumer-events-statements-history FALSE performance-schema-consumer-events-statements-history-long FALSE +performance-schema-consumer-events-transactions-current FALSE +performance-schema-consumer-events-transactions-history FALSE +performance-schema-consumer-events-transactions-history-long FALSE performance-schema-consumer-events-waits-current FALSE performance-schema-consumer-events-waits-history FALSE performance-schema-consumer-events-waits-history-long FALSE @@ -1627,6 +1665,8 @@ performance-schema-events-stages-history-long-size -1 performance-schema-events-stages-history-size -1 performance-schema-events-statements-history-long-size -1 performance-schema-events-statements-history-size -1 +performance-schema-events-transactions-history-long-size -1 +performance-schema-events-transactions-history-size -1 performance-schema-events-waits-history-long-size -1 performance-schema-events-waits-history-size -1 performance-schema-hosts-size -1 @@ -1634,24 +1674,32 @@ performance-schema-instrument performance-schema-max-cond-classes 90 performance-schema-max-cond-instances -1 performance-schema-max-digest-length 1024 -performance-schema-max-file-classes 50 +performance-schema-max-file-classes 80 performance-schema-max-file-handles 32768 performance-schema-max-file-instances -1 -performance-schema-max-mutex-classes 200 +performance-schema-max-index-stat -1 +performance-schema-max-memory-classes 320 +performance-schema-max-metadata-locks -1 +performance-schema-max-mutex-classes 210 performance-schema-max-mutex-instances -1 -performance-schema-max-rwlock-classes 40 +performance-schema-max-prepared-statements-instances -1 +performance-schema-max-program-instances -1 +performance-schema-max-rwlock-classes 50 performance-schema-max-rwlock-instances -1 performance-schema-max-socket-classes 10 performance-schema-max-socket-instances -1 +performance-schema-max-sql-text-length 1024 performance-schema-max-stage-classes 160 -performance-schema-max-statement-classes 202 +performance-schema-max-statement-classes 222 +performance-schema-max-statement-stack 10 performance-schema-max-table-handles -1 performance-schema-max-table-instances -1 +performance-schema-max-table-lock-stat -1 performance-schema-max-thread-classes 50 performance-schema-max-thread-instances -1 performance-schema-session-connect-attrs-size -1 -performance-schema-setup-actors-size 100 -performance-schema-setup-objects-size 100 +performance-schema-setup-actors-size -1 +performance-schema-setup-objects-size -1 performance-schema-users-size -1 port 3306 port-open-timeout 0 diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result index f3f561fd479..c3fbc3a9137 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result @@ -45,7 +45,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress -ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID @@ -125,7 +125,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID @@ -190,7 +190,7 @@ Grants for ddicttestuser1@localhost GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -206,7 +206,7 @@ SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -233,7 +233,7 @@ Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -259,7 +259,7 @@ SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -303,7 +303,7 @@ Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -331,7 +331,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -390,7 +390,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -421,7 +421,7 @@ GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser2 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -452,7 +452,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -490,7 +490,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Query TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result index a68e62e4642..c23665cb2de 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result @@ -45,7 +45,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress -ID root HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID root HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID @@ -125,7 +125,7 @@ PROCESSLIST CREATE TEMPORARY TABLE `PROCESSLIST` ( ) DEFAULT CHARSET=utf8 SHOW processlist; Id User Host db Command Time State Info Progress -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM processlist ORDER BY id TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM processlist ORDER BY id TID @@ -190,7 +190,7 @@ Grants for ddicttestuser1@localhost GRANT PROCESS ON *.* TO `ddicttestuser1`@`localhost` IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' SHOW processlist; Id User Host db Command Time State Info Progress -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -206,7 +206,7 @@ SHOW processlist; Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -233,7 +233,7 @@ Id User Host db Command Time State Info Progress ID root HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -259,7 +259,7 @@ SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -303,7 +303,7 @@ Id User Host db Command Time State Info Progress ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -331,7 +331,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -390,7 +390,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -421,7 +421,7 @@ GRANT USAGE ON *.* TO `ddicttestuser2`@`localhost` IDENTIFIED BY PASSWORD '*22DA SHOW processlist; Id User Host db Command Time State Info Progress ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser2 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser2 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser2 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -452,7 +452,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID @@ -490,7 +490,7 @@ ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL TIME_MS -ID ddicttestuser1 HOST_NAME information_schema Query TIME Init SHOW processlist TIME_MS +ID ddicttestuser1 HOST_NAME information_schema Query TIME starting SHOW processlist TIME_MS SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_USED MAX_MEMORY_USED EXAMINED_ROWS QUERY_ID INFO_BINARY TID ID ddicttestuser1 HOST_NAME information_schema Execute TIME Filling schema table SELECT * FROM information_schema.processlist TIME_MS 0 0 0.000 MEMORY MAX_MEMORY ROWS QUERY_ID SELECT * FROM information_schema.processlist TID diff --git a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result index ad109501f98..f99edef092f 100644 --- a/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_val_no_prot.result @@ -39,7 +39,7 @@ ID USER HOST DB COMMAND TIME STATE INFO TIME_MS STAGE MAX_STAGE PROGRESS MEMORY_ root test Query