mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-4262 - P_S discovery
Discover P_S tables automatically. Most of this patch is code clean-up: - removed tests and code responsible for P_S tables correctness verification - always return error from ha_perfschema::create() - install/upgrade scripts won't create P_S tables anymore
This commit is contained in:
parent
e7669cf607
commit
f1c1c04a34
107 changed files with 889 additions and 6317 deletions
|
@ -3,11 +3,10 @@
|
|||
#
|
||||
|
||||
--source include/count_sessions.inc
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose --force > $out_file 2> $err_file
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
# Verify that mysql_upgrade does not complain about the performance_schema
|
||||
|
||||
--replace_regex /at line [0-9]+/at line ###/
|
||||
--cat_file $err_file
|
||||
|
|
|
@ -3,59 +3,6 @@ drop event if exists test.user_event;
|
|||
create event test.user_event on schedule every 1 day do
|
||||
select "not supposed to be here";
|
||||
update mysql.event set db='performance_schema' where name='user_event';
|
||||
ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'threads' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'users' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
|
||||
FATAL ERROR: Upgrade failed
|
||||
select name from mysql.event where db='performance_schema';
|
||||
name
|
||||
user_event
|
||||
|
|
|
@ -3,59 +3,6 @@ drop function if exists test.user_func;
|
|||
create function test.user_func() returns integer
|
||||
return 0;
|
||||
update mysql.proc set db='performance_schema' where name='user_func';
|
||||
ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'threads' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'users' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
|
||||
FATAL ERROR: Upgrade failed
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
name
|
||||
user_func
|
||||
|
|
|
@ -3,59 +3,6 @@ drop procedure if exists test.user_proc;
|
|||
create procedure test.user_proc()
|
||||
select "Not supposed to be here";
|
||||
update mysql.proc set db='performance_schema' where name='user_proc';
|
||||
ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'threads' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'users' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
|
||||
FATAL ERROR: Upgrade failed
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
name
|
||||
user_proc
|
||||
|
|
|
@ -5,59 +5,6 @@ use performance_schema;
|
|||
show tables like "user_table";
|
||||
Tables_in_performance_schema (user_table)
|
||||
user_table
|
||||
ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'threads' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'users' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
|
||||
FATAL ERROR: Upgrade failed
|
||||
show tables like "user_table";
|
||||
Tables_in_performance_schema (user_table)
|
||||
user_table
|
||||
|
|
|
@ -5,59 +5,6 @@ use performance_schema;
|
|||
show tables like "user_view";
|
||||
Tables_in_performance_schema (user_view)
|
||||
user_view
|
||||
ERROR 1050 (42S01) at line ###: Table 'cond_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_waits_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'file_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_instance' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'socket_summary_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'host_cache' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'mutex_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'objects_summary_global_by_type' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'performance_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'rwlock_instances' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_actors' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_consumers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_instruments' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_objects' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'setup_timers' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_index_usage' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_io_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'table_lock_waits_summary_by_table' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'threads' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_stages_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_current' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_history_long' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_thread_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_host_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_user_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_account_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_global_by_event_name' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'hosts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'users' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'accounts' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'events_statements_summary_by_digest' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_connect_attrs' already exists
|
||||
ERROR 1050 (42S01) at line ###: Table 'session_account_connect_attrs' already exists
|
||||
FATAL ERROR: Upgrade failed
|
||||
show tables like "user_view";
|
||||
Tables_in_performance_schema (user_view)
|
||||
user_view
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
call mtr.add_suppression(
|
||||
"Column count of performance_schema.setup_instruments is wrong. "
|
||||
"Expected 4, found 3. The table is probably corrupted");
|
||||
select * from performance_schema.setup_instruments limit 1;
|
||||
ERROR HY000: Native table 'performance_schema'.'setup_instruments' has the wrong structure
|
||||
select * from performance_schema.setup_consumers limit 1;
|
|
@ -1 +0,0 @@
|
|||
--loose-debug=+d,tampered_perfschema_table1
|
|
@ -1,25 +0,0 @@
|
|||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
# This test uses error injection,
|
||||
# see PFS_engine_table_share::check_all_tables()
|
||||
|
||||
# Verify that the server starts even when a performance schema table
|
||||
# is corrupted, with an incompatible change.
|
||||
# Verify that using that table nicely fails.
|
||||
# Verify that other tables are not affected.
|
||||
|
||||
--source include/have_debug.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
call mtr.add_suppression(
|
||||
"Column count of performance_schema.setup_instruments is wrong. "
|
||||
"Expected 4, found 3. The table is probably corrupted");
|
||||
|
||||
--error ER_WRONG_NATIVE_TABLE_STRUCTURE
|
||||
select * from performance_schema.setup_instruments limit 1;
|
||||
|
||||
--disable_result_log
|
||||
select * from performance_schema.setup_consumers limit 1;
|
||||
--enable_result_log
|
||||
|
File diff suppressed because it is too large
Load diff
|
@ -5452,14 +5452,6 @@ int mysqld_main(int argc, char **argv)
|
|||
|
||||
#ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
|
||||
initialize_performance_schema_acl(opt_bootstrap);
|
||||
/*
|
||||
Do not check the structure of the performance schema tables
|
||||
during bootstrap:
|
||||
- the tables are not supposed to exist yet, bootstrap will create them
|
||||
- a check would print spurious error messages
|
||||
*/
|
||||
if (! opt_bootstrap)
|
||||
check_performance_schema();
|
||||
#endif
|
||||
|
||||
initialize_information_schema_acl();
|
||||
|
|
|
@ -131,7 +131,6 @@ pfs.cc
|
|||
pfs_account.cc
|
||||
pfs_atomic.cc
|
||||
pfs_autosize.cc
|
||||
pfs_check.cc
|
||||
pfs_column_values.cc
|
||||
pfs_con_slice.cc
|
||||
pfs_defaults.cc
|
||||
|
|
|
@ -71,6 +71,23 @@ find_table_share(const char *db, const char *name)
|
|||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
static int pfs_discover_table(handlerton *hton, THD *thd, TABLE_SHARE *share)
|
||||
{
|
||||
const PFS_engine_table_share *pfs_share;
|
||||
|
||||
if ((pfs_share= find_table_share(share->db.str, share->table_name.str)))
|
||||
return share->init_from_sql_statement_string(thd, false,
|
||||
pfs_share->sql.str,
|
||||
pfs_share->sql.length);
|
||||
return HA_ERR_NO_SUCH_TABLE;
|
||||
}
|
||||
|
||||
static int pfs_discover_table_existence(handlerton *hton, const char *db,
|
||||
const char *table_name)
|
||||
{
|
||||
return MY_TEST(find_table_share(db, table_name));
|
||||
}
|
||||
|
||||
static int pfs_init_func(void *p)
|
||||
{
|
||||
DBUG_ENTER("pfs_init_func");
|
||||
|
@ -99,6 +116,9 @@ static int pfs_init_func(void *p)
|
|||
the performance schema. See Bug#43039.
|
||||
*/
|
||||
pfs_hton->db_type= DB_TYPE_PERFORMANCE_SCHEMA;
|
||||
pfs_hton->discover_table= pfs_discover_table;
|
||||
pfs_hton->discover_table_existence= pfs_discover_table_existence;
|
||||
pfs_hton->discover_table_names= pfs_discover_table_names;
|
||||
|
||||
PFS_engine_table_share::init_all_locks();
|
||||
|
||||
|
@ -438,25 +458,10 @@ int ha_perfschema::create(const char *name, TABLE *table_arg,
|
|||
HA_CREATE_INFO *create_info)
|
||||
{
|
||||
DBUG_ENTER("ha_perfschema::create");
|
||||
DBUG_ASSERT(table_arg);
|
||||
DBUG_ASSERT(table_arg->s);
|
||||
if (find_table_share(table_arg->s->db.str,
|
||||
table_arg->s->table_name.str))
|
||||
{
|
||||
/*
|
||||
Attempting to create a known performance schema table.
|
||||
Allowing the create, to create .FRM files,
|
||||
for the initial database install, and mysql_upgrade.
|
||||
This should fail once .FRM are removed.
|
||||
*/
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
/*
|
||||
This is not a general purpose engine.
|
||||
Failure to CREATE TABLE is the expected result.
|
||||
*/
|
||||
DBUG_PRINT("error", ("unknown table: %s.%s", table_arg->s->db.str,
|
||||
table_arg->s->table_name.str));
|
||||
DBUG_RETURN(HA_ERR_WRONG_COMMAND);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
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 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,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
/**
|
||||
@file storage/perfschema/pfs_check.cc
|
||||
Check the performance schema table structure.
|
||||
The code in this file is implemented in pfs_check.cc
|
||||
instead of pfs_server.cc, to separate dependencies to server
|
||||
structures (THD, ...) in a dedicated file.
|
||||
This code organization helps a lot maintenance of the unit tests.
|
||||
*/
|
||||
|
||||
#include "my_global.h"
|
||||
#include "pfs_server.h"
|
||||
#include "pfs_engine_table.h"
|
||||
|
||||
/*
|
||||
*/
|
||||
|
||||
/**
|
||||
Check that the performance schema tables
|
||||
have the expected structure.
|
||||
Discrepancies are written in the server log,
|
||||
but are not considered fatal, so this function does not
|
||||
return an error code:
|
||||
- some differences are compatible, and should not cause a failure
|
||||
- some differences are not compatible, but then the DBA needs an operational
|
||||
server to be able to DROP+CREATE the tables with the proper structure,
|
||||
as part of the initial server installation or during an upgrade.
|
||||
In case of discrepancies, later attempt to perform DML against
|
||||
the performance schema will be rejected with an error.
|
||||
*/
|
||||
void check_performance_schema()
|
||||
{
|
||||
DBUG_ENTER("check_performance_schema");
|
||||
|
||||
THD *thd= new THD();
|
||||
if (thd == NULL)
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
thd->thread_stack= (char*) &thd;
|
||||
thd->store_globals();
|
||||
|
||||
PFS_engine_table_share::check_all_tables(thd);
|
||||
|
||||
thd->reset_globals();
|
||||
delete thd;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
|
@ -151,91 +151,6 @@ static PFS_engine_table_share *all_shares[]=
|
|||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
Check all the tables structure.
|
||||
@param thd current thread
|
||||
*/
|
||||
void PFS_engine_table_share::check_all_tables(THD *thd)
|
||||
{
|
||||
PFS_engine_table_share **current;
|
||||
|
||||
DBUG_EXECUTE_IF("tampered_perfschema_table1",
|
||||
{
|
||||
/* Hack SETUP_INSTRUMENT, incompatible change. */
|
||||
all_shares[20]->m_field_def->count++;
|
||||
});
|
||||
|
||||
for (current= &all_shares[0]; (*current) != NULL; current++)
|
||||
(*current)->check_one_table(thd);
|
||||
}
|
||||
|
||||
/** Error reporting for schema integrity checks. */
|
||||
class PFS_check_intact : public Table_check_intact
|
||||
{
|
||||
protected:
|
||||
virtual void report_error(uint code, const char *fmt, ...);
|
||||
|
||||
public:
|
||||
PFS_check_intact()
|
||||
{}
|
||||
|
||||
~PFS_check_intact()
|
||||
{}
|
||||
};
|
||||
|
||||
void PFS_check_intact::report_error(uint code, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
char buff[MYSQL_ERRMSG_SIZE];
|
||||
|
||||
va_start(args, fmt);
|
||||
my_vsnprintf(buff, sizeof(buff), fmt, args);
|
||||
va_end(args);
|
||||
|
||||
/*
|
||||
This is an install/upgrade issue:
|
||||
- do not report it in the user connection, there is none in main(),
|
||||
- report it in the server error log.
|
||||
*/
|
||||
sql_print_error("%s", buff);
|
||||
}
|
||||
|
||||
/**
|
||||
Check integrity of the actual table schema.
|
||||
The actual table schema (.frm) is compared to the expected schema.
|
||||
@param thd current thread
|
||||
*/
|
||||
void PFS_engine_table_share::check_one_table(THD *thd)
|
||||
{
|
||||
TABLE_LIST tables;
|
||||
|
||||
tables.init_one_table(PERFORMANCE_SCHEMA_str.str,
|
||||
PERFORMANCE_SCHEMA_str.length,
|
||||
m_name.str, m_name.length,
|
||||
m_name.str, TL_READ);
|
||||
|
||||
/* Work around until Bug#32115 is backported. */
|
||||
LEX dummy_lex;
|
||||
LEX *old_lex= thd->lex;
|
||||
thd->lex= &dummy_lex;
|
||||
lex_start(thd);
|
||||
|
||||
if (! open_and_lock_tables(thd, &tables, FALSE, MYSQL_LOCK_IGNORE_TIMEOUT))
|
||||
{
|
||||
PFS_check_intact checker;
|
||||
|
||||
if (!checker.check(tables.table, m_field_def))
|
||||
m_checked= true;
|
||||
close_thread_tables(thd);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
/** Initialize all the table share locks. */
|
||||
void PFS_engine_table_share::init_all_locks(void)
|
||||
{
|
||||
|
@ -268,15 +183,6 @@ int PFS_engine_table_share::write_row(TABLE *table, unsigned char *buf,
|
|||
{
|
||||
my_bitmap_map *org_bitmap;
|
||||
|
||||
/*
|
||||
Make sure the table structure is as expected before mapping
|
||||
hard wired columns in m_write_row.
|
||||
*/
|
||||
if (! m_checked)
|
||||
{
|
||||
return HA_ERR_TABLE_NEEDS_UPGRADE;
|
||||
}
|
||||
|
||||
if (m_write_row == NULL)
|
||||
{
|
||||
return HA_ERR_WRONG_COMMAND;
|
||||
|
@ -347,15 +253,6 @@ int PFS_engine_table::read_row(TABLE *table,
|
|||
Field *f;
|
||||
Field **fields_reset;
|
||||
|
||||
/*
|
||||
Make sure the table structure is as expected before mapping
|
||||
hard wired columns in read_row_values.
|
||||
*/
|
||||
if (! m_share_ptr->m_checked)
|
||||
{
|
||||
return HA_ERR_TABLE_NEEDS_UPGRADE;
|
||||
}
|
||||
|
||||
/* We must read all columns in case a table is opened for update */
|
||||
bool read_all= !bitmap_is_clear_all(table->write_set);
|
||||
|
||||
|
@ -392,15 +289,6 @@ int PFS_engine_table::update_row(TABLE *table,
|
|||
{
|
||||
my_bitmap_map *org_bitmap;
|
||||
|
||||
/*
|
||||
Make sure the table structure is as expected before mapping
|
||||
hard wired columns in update_row_values.
|
||||
*/
|
||||
if (! m_share_ptr->m_checked)
|
||||
{
|
||||
return HA_ERR_TABLE_NEEDS_UPGRADE;
|
||||
}
|
||||
|
||||
/* We internally read from Fields to support the write interface */
|
||||
org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
|
||||
int result= update_row_values(table, old_buf, new_buf, fields);
|
||||
|
@ -415,15 +303,6 @@ int PFS_engine_table::delete_row(TABLE *table,
|
|||
{
|
||||
my_bitmap_map *org_bitmap;
|
||||
|
||||
/*
|
||||
Make sure the table structure is as expected before mapping
|
||||
hard wired columns in delete_row_values.
|
||||
*/
|
||||
if (! m_share_ptr->m_checked)
|
||||
{
|
||||
return HA_ERR_TABLE_NEEDS_UPGRADE;
|
||||
}
|
||||
|
||||
/* We internally read from Fields to support the delete interface */
|
||||
org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
|
||||
int result= delete_row_values(table, buf, fields);
|
||||
|
@ -1440,5 +1319,18 @@ end:
|
|||
DBUG_RETURN(false);
|
||||
}
|
||||
|
||||
int pfs_discover_table_names(handlerton *hton __attribute__((unused)),
|
||||
LEX_STRING *db,
|
||||
MY_DIR *dir __attribute__((unused)),
|
||||
handlerton::discovered_list *result)
|
||||
{
|
||||
if (compare_table_names(db->str, PERFORMANCE_SCHEMA_str.str))
|
||||
return 0;
|
||||
for (size_t i= 0; i < array_elements(all_shares) - 1; i++)
|
||||
result->add_table(all_shares[i]->m_name.str,
|
||||
all_shares[i]->m_name.length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
|
|
@ -212,8 +212,6 @@ typedef ha_rows (*pfs_get_row_count_t)(void);
|
|||
*/
|
||||
struct PFS_engine_table_share
|
||||
{
|
||||
static void check_all_tables(THD *thd);
|
||||
void check_one_table(THD *thd);
|
||||
static void init_all_locks(void);
|
||||
static void delete_all_locks(void);
|
||||
/** Get the row count. */
|
||||
|
@ -244,10 +242,8 @@ struct PFS_engine_table_share
|
|||
uint m_ref_length;
|
||||
/** The lock, stored on behalf of the SQL layer. */
|
||||
THR_LOCK *m_thr_lock_ptr;
|
||||
/** Table fields definition. */
|
||||
TABLE_FIELD_DEF *m_field_def;
|
||||
/** Schema integrity flag. */
|
||||
bool m_checked;
|
||||
/** Table definition. */
|
||||
LEX_STRING sql;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -461,5 +457,9 @@ struct PFS_triple_index
|
|||
bool pfs_show_status(handlerton *hton, THD *thd,
|
||||
stat_print_fn *print, enum ha_stat_type stat);
|
||||
|
||||
int pfs_discover_table_names(handlerton *hton, LEX_STRING *db,
|
||||
MY_DIR *dir,
|
||||
handlerton::discovered_list *result);
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
|
|
|
@ -231,8 +231,6 @@ void pfs_automated_sizing(PFS_global_param *param);
|
|||
*/
|
||||
void initialize_performance_schema_acl(bool bootstrap);
|
||||
|
||||
void check_performance_schema();
|
||||
|
||||
/**
|
||||
Initialize the dynamic array holding individual instrument settings collected
|
||||
from the server configuration options.
|
||||
|
|
|
@ -23,34 +23,6 @@
|
|||
|
||||
THR_LOCK table_accounts::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("CURRENT_CONNECTIONS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TOTAL_CONNECTIONS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_accounts::m_field_def=
|
||||
{ 4, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_accounts::m_share=
|
||||
{
|
||||
|
@ -63,8 +35,11 @@ table_accounts::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE accounts("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"CURRENT_CONNECTIONS bigint not null,"
|
||||
"TOTAL_CONNECTIONS bigint not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_accounts::create()
|
||||
|
|
|
@ -67,8 +67,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_accounts m_row;
|
||||
|
|
|
@ -29,54 +29,6 @@
|
|||
|
||||
THR_LOCK table_esgs_by_account_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esgs_by_account_by_event_name::m_field_def=
|
||||
{ 8, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esgs_by_account_by_event_name::m_share=
|
||||
{
|
||||
|
@ -89,8 +41,15 @@ table_esgs_by_account_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esgs_by_account_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_account_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -108,8 +108,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esgs_by_account_by_event_name m_row;
|
||||
|
|
|
@ -30,49 +30,6 @@
|
|||
|
||||
THR_LOCK table_esgs_by_host_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esgs_by_host_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esgs_by_host_by_event_name::m_share=
|
||||
{
|
||||
|
@ -85,8 +42,14 @@ table_esgs_by_host_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esgs_by_host_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_host_by_event_name("
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -108,8 +108,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esgs_by_host_by_event_name m_row;
|
||||
|
|
|
@ -29,49 +29,6 @@
|
|||
|
||||
THR_LOCK table_esgs_by_thread_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esgs_by_thread_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esgs_by_thread_by_event_name::m_share=
|
||||
{
|
||||
|
@ -84,8 +41,14 @@ table_esgs_by_thread_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esgs_by_thread_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_thread_by_event_name("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -112,8 +112,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esgs_by_thread_by_event_name m_row;
|
||||
|
|
|
@ -30,49 +30,6 @@
|
|||
|
||||
THR_LOCK table_esgs_by_user_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esgs_by_user_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esgs_by_user_by_event_name::m_share=
|
||||
{
|
||||
|
@ -85,8 +42,14 @@ table_esgs_by_user_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esgs_by_user_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_by_user_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -113,8 +113,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esgs_by_user_by_event_name m_row;
|
||||
|
|
|
@ -31,44 +31,6 @@
|
|||
|
||||
THR_LOCK table_esgs_global_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esgs_global_by_event_name::m_field_def=
|
||||
{ 6, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esgs_global_by_event_name::m_share=
|
||||
{
|
||||
|
@ -81,8 +43,13 @@ table_esgs_global_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_summary_global_by_event_name("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -76,8 +76,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esgs_global_by_event_name m_row;
|
||||
|
|
|
@ -29,149 +29,6 @@
|
|||
|
||||
THR_LOCK table_esms_by_account_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_by_account_by_event_name::m_field_def=
|
||||
{ 27, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_by_account_by_event_name::m_share=
|
||||
{
|
||||
|
@ -184,8 +41,34 @@ table_esms_by_account_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esms_by_account_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_account_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -108,8 +108,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_by_account_by_event_name m_row;
|
||||
|
|
|
@ -33,159 +33,6 @@
|
|||
|
||||
THR_LOCK table_esms_by_digest::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SCHEMA_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("DIGEST") },
|
||||
{ C_STRING_WITH_LEN("varchar(32)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("DIGEST_TEXT") },
|
||||
{ C_STRING_WITH_LEN("longtext") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FIRST_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("LAST_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_by_digest::m_field_def=
|
||||
{ 29, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_by_digest::m_share=
|
||||
{
|
||||
|
@ -198,8 +45,36 @@ table_esms_by_digest::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_digest("
|
||||
"SCHEMA_NAME VARCHAR(64),"
|
||||
"DIGEST VARCHAR(32),"
|
||||
"DIGEST_TEXT LONGTEXT,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null,"
|
||||
"FIRST_SEEN TIMESTAMP(0) NOT NULL default 0,"
|
||||
"LAST_SEEN TIMESTAMP(0) NOT NULL default 0)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -78,8 +78,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_by_digest m_row;
|
||||
|
|
|
@ -30,144 +30,6 @@
|
|||
|
||||
THR_LOCK table_esms_by_host_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_by_host_by_event_name::m_field_def=
|
||||
{ 26, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_by_host_by_event_name::m_share=
|
||||
{
|
||||
|
@ -180,8 +42,33 @@ table_esms_by_host_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esms_by_host_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_host_by_event_name("
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -108,8 +108,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_by_host_by_event_name m_row;
|
||||
|
|
|
@ -29,144 +29,6 @@
|
|||
|
||||
THR_LOCK table_esms_by_thread_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_by_thread_by_event_name::m_field_def=
|
||||
{ 26, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_by_thread_by_event_name::m_share=
|
||||
{
|
||||
|
@ -179,8 +41,33 @@ table_esms_by_thread_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esms_by_thread_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_thread_by_event_name("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -112,8 +112,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_by_thread_by_event_name m_row;
|
||||
|
|
|
@ -30,144 +30,6 @@
|
|||
|
||||
THR_LOCK table_esms_by_user_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_by_user_by_event_name::m_field_def=
|
||||
{ 26, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_by_user_by_event_name::m_share=
|
||||
{
|
||||
|
@ -180,8 +42,33 @@ table_esms_by_user_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_esms_by_user_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_by_user_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -108,8 +108,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_by_user_by_event_name m_row;
|
||||
|
|
|
@ -31,139 +31,6 @@
|
|||
|
||||
THR_LOCK table_esms_global_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_esms_global_by_event_name::m_field_def=
|
||||
{ 25, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_esms_global_by_event_name::m_share=
|
||||
{
|
||||
|
@ -176,8 +43,32 @@ table_esms_global_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_summary_global_by_event_name("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"SUM_LOCK_TIME BIGINT unsigned not null,"
|
||||
"SUM_ERRORS BIGINT unsigned not null,"
|
||||
"SUM_WARNINGS BIGINT unsigned not null,"
|
||||
"SUM_ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"SUM_ROWS_SENT BIGINT unsigned not null,"
|
||||
"SUM_ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"SUM_CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SUM_SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SUM_SORT_RANGE BIGINT unsigned not null,"
|
||||
"SUM_SORT_ROWS BIGINT unsigned not null,"
|
||||
"SUM_SORT_SCAN BIGINT unsigned not null,"
|
||||
"SUM_NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"SUM_NO_GOOD_INDEX_USED BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -76,8 +76,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_esms_global_by_event_name m_row;
|
||||
|
|
|
@ -28,64 +28,6 @@
|
|||
|
||||
THR_LOCK table_events_stages_current::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("END_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SOURCE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_START") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_END") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("enum(\'STATEMENT\',\'STAGE\',\'WAIT\'") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_stages_current::m_field_def=
|
||||
{10 , field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_stages_current::m_share=
|
||||
{
|
||||
|
@ -98,8 +40,17 @@ table_events_stages_current::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_current("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_stages_history::m_table_lock;
|
||||
|
@ -116,8 +67,17 @@ table_events_stages_history::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_events_stages_history), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_stages_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_history("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_stages_history_long::m_table_lock;
|
||||
|
@ -134,8 +94,17 @@ table_events_stages_history_long::m_share=
|
|||
10000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_stages_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_stages_history_long("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
table_events_stages_common::table_events_stages_common
|
||||
|
|
|
@ -133,12 +133,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/**
|
||||
Fields definition.
|
||||
Also used by table_events_stages_history
|
||||
and table_events_stages_history_long.
|
||||
*/
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current position. */
|
||||
PFS_simple_index m_pos;
|
||||
|
|
|
@ -31,214 +31,6 @@
|
|||
|
||||
THR_LOCK table_events_statements_current::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("END_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SOURCE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_START") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_END") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("LOCK_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SQL_TEXT") },
|
||||
{ C_STRING_WITH_LEN("longtext") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("DIGEST") },
|
||||
{ C_STRING_WITH_LEN("varchar(32)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("DIGEST_TEXT") },
|
||||
{ C_STRING_WITH_LEN("longtext") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("CURRENT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MYSQL_ERRNO") },
|
||||
{ C_STRING_WITH_LEN("int(11)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("RETURNED_SQLSTATE") },
|
||||
{ C_STRING_WITH_LEN("varchar(5)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MESSAGE_TEXT") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("WARNINGS") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ROWS_AFFECTED") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ROWS_SENT") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ROWS_EXAMINED") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("CREATED_TMP_DISK_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("CREATED_TMP_TABLES") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SELECT_FULL_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SELECT_FULL_RANGE_JOIN") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SELECT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SELECT_RANGE_CHECK") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SELECT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SORT_MERGE_PASSES") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SORT_RANGE") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SORT_ROWS") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SORT_SCAN") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NO_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NO_GOOD_INDEX_USED") },
|
||||
{ C_STRING_WITH_LEN("bigint") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("enum(\'STATEMENT\',\'STAGE\',\'WAIT\'") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_statements_current::m_field_def=
|
||||
{40 , field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_statements_current::m_share=
|
||||
{
|
||||
|
@ -251,8 +43,47 @@ table_events_statements_current::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_current("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"LOCK_TIME bigint unsigned not null,"
|
||||
"SQL_TEXT LONGTEXT,"
|
||||
"DIGEST VARCHAR(32),"
|
||||
"DIGEST_TEXT LONGTEXT,"
|
||||
"CURRENT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned,"
|
||||
"MYSQL_ERRNO INTEGER,"
|
||||
"RETURNED_SQLSTATE VARCHAR(5),"
|
||||
"MESSAGE_TEXT VARCHAR(128),"
|
||||
"ERRORS BIGINT unsigned not null,"
|
||||
"WARNINGS BIGINT unsigned not null,"
|
||||
"ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"ROWS_SENT BIGINT unsigned not null,"
|
||||
"ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SORT_RANGE BIGINT unsigned not null,"
|
||||
"SORT_ROWS BIGINT unsigned not null,"
|
||||
"SORT_SCAN BIGINT unsigned not null,"
|
||||
"NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"NO_GOOD_INDEX_USED BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_statements_history::m_table_lock;
|
||||
|
@ -269,8 +100,47 @@ table_events_statements_history::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_events_statements_history), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_statements_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_history("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"LOCK_TIME bigint unsigned not null,"
|
||||
"SQL_TEXT LONGTEXT,"
|
||||
"DIGEST VARCHAR(32),"
|
||||
"DIGEST_TEXT LONGTEXT,"
|
||||
"CURRENT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned,"
|
||||
"MYSQL_ERRNO INTEGER,"
|
||||
"RETURNED_SQLSTATE VARCHAR(5),"
|
||||
"MESSAGE_TEXT VARCHAR(128),"
|
||||
"ERRORS BIGINT unsigned not null,"
|
||||
"WARNINGS BIGINT unsigned not null,"
|
||||
"ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"ROWS_SENT BIGINT unsigned not null,"
|
||||
"ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SORT_RANGE BIGINT unsigned not null,"
|
||||
"SORT_ROWS BIGINT unsigned not null,"
|
||||
"SORT_SCAN BIGINT unsigned not null,"
|
||||
"NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"NO_GOOD_INDEX_USED BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_statements_history_long::m_table_lock;
|
||||
|
@ -287,8 +157,47 @@ table_events_statements_history_long::m_share=
|
|||
10000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_statements_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_statements_history_long("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"LOCK_TIME bigint unsigned not null,"
|
||||
"SQL_TEXT LONGTEXT,"
|
||||
"DIGEST VARCHAR(32),"
|
||||
"DIGEST_TEXT LONGTEXT,"
|
||||
"CURRENT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned,"
|
||||
"MYSQL_ERRNO INTEGER,"
|
||||
"RETURNED_SQLSTATE VARCHAR(5),"
|
||||
"MESSAGE_TEXT VARCHAR(128),"
|
||||
"ERRORS BIGINT unsigned not null,"
|
||||
"WARNINGS BIGINT unsigned not null,"
|
||||
"ROWS_AFFECTED BIGINT unsigned not null,"
|
||||
"ROWS_SENT BIGINT unsigned not null,"
|
||||
"ROWS_EXAMINED BIGINT unsigned not null,"
|
||||
"CREATED_TMP_DISK_TABLES BIGINT unsigned not null,"
|
||||
"CREATED_TMP_TABLES BIGINT unsigned not null,"
|
||||
"SELECT_FULL_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_FULL_RANGE_JOIN BIGINT unsigned not null,"
|
||||
"SELECT_RANGE BIGINT unsigned not null,"
|
||||
"SELECT_RANGE_CHECK BIGINT unsigned not null,"
|
||||
"SELECT_SCAN BIGINT unsigned not null,"
|
||||
"SORT_MERGE_PASSES BIGINT unsigned not null,"
|
||||
"SORT_RANGE BIGINT unsigned not null,"
|
||||
"SORT_ROWS BIGINT unsigned not null,"
|
||||
"SORT_SCAN BIGINT unsigned not null,"
|
||||
"NO_INDEX_USED BIGINT unsigned not null,"
|
||||
"NO_GOOD_INDEX_USED BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'))") }
|
||||
};
|
||||
|
||||
table_events_statements_common::table_events_statements_common
|
||||
|
|
|
@ -212,12 +212,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/**
|
||||
Fields definition.
|
||||
Also used by table_events_statements_history
|
||||
and table_events_statements_history_long.
|
||||
*/
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
void make_row(PFS_thread* pfs_thread, PFS_events_statements *statement);
|
||||
|
||||
|
|
|
@ -30,109 +30,6 @@
|
|||
|
||||
THR_LOCK table_events_waits_current::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("END_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SOURCE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_START") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_END") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SPINS") },
|
||||
{ C_STRING_WITH_LEN("int(10)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(512)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("INDEX_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NESTING_EVENT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("enum(\'STATEMENT\',\'STAGE\',\'WAIT\'") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OPERATION") },
|
||||
{ C_STRING_WITH_LEN("varchar(32)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NUMBER_OF_BYTES") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FLAGS") },
|
||||
{ C_STRING_WITH_LEN("int(10)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_current::m_field_def=
|
||||
{ 19, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_current::m_share=
|
||||
{
|
||||
|
@ -145,8 +42,26 @@ table_events_waits_current::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_events_waits_current), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_current("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"SPINS INTEGER unsigned,"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(512),"
|
||||
"INDEX_NAME VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'),"
|
||||
"OPERATION VARCHAR(32) not null,"
|
||||
"NUMBER_OF_BYTES BIGINT,"
|
||||
"FLAGS INTEGER unsigned)") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_waits_history::m_table_lock;
|
||||
|
@ -163,8 +78,26 @@ table_events_waits_history::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_events_waits_history), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_waits_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_history("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"SPINS INTEGER unsigned,"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(512),"
|
||||
"INDEX_NAME VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'),"
|
||||
"OPERATION VARCHAR(32) not null,"
|
||||
"NUMBER_OF_BYTES BIGINT,"
|
||||
"FLAGS INTEGER unsigned)") }
|
||||
};
|
||||
|
||||
THR_LOCK table_events_waits_history_long::m_table_lock;
|
||||
|
@ -181,8 +114,26 @@ table_events_waits_history_long::m_share=
|
|||
10000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&table_events_waits_current::m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_history_long("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_ID BIGINT unsigned not null,"
|
||||
"END_EVENT_ID BIGINT unsigned,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"SOURCE VARCHAR(64),"
|
||||
"TIMER_START BIGINT unsigned,"
|
||||
"TIMER_END BIGINT unsigned,"
|
||||
"TIMER_WAIT BIGINT unsigned,"
|
||||
"SPINS INTEGER unsigned,"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(512),"
|
||||
"INDEX_NAME VARCHAR(64),"
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"NESTING_EVENT_ID BIGINT unsigned,"
|
||||
"NESTING_EVENT_TYPE ENUM('STATEMENT', 'STAGE', 'WAIT'),"
|
||||
"OPERATION VARCHAR(32) not null,"
|
||||
"NUMBER_OF_BYTES BIGINT,"
|
||||
"FLAGS INTEGER unsigned)") }
|
||||
};
|
||||
|
||||
table_events_waits_common::table_events_waits_common
|
||||
|
|
|
@ -182,12 +182,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/**
|
||||
Fields definition.
|
||||
Also used by table_events_waits_history
|
||||
and table_events_waits_history_long.
|
||||
*/
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current position. */
|
||||
pos_events_waits_current m_pos;
|
||||
|
|
|
@ -28,49 +28,6 @@
|
|||
|
||||
THR_LOCK table_events_waits_summary_by_instance::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE ews_by_instance_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_events_waits_summary_by_instance::m_field_def=
|
||||
{ 7, ews_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_events_waits_summary_by_instance::m_share=
|
||||
{
|
||||
|
@ -83,8 +40,14 @@ table_events_waits_summary_by_instance::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_all_instr),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_instance("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_events_waits_summary_by_instance::create(void)
|
||||
|
|
|
@ -79,8 +79,6 @@ public:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_events_waits_summary_by_instance m_row;
|
||||
|
|
|
@ -29,54 +29,6 @@
|
|||
|
||||
THR_LOCK table_ews_by_account_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_by_account_by_event_name::m_field_def=
|
||||
{ 8, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_by_account_by_event_name::m_share=
|
||||
{
|
||||
|
@ -89,8 +41,15 @@ table_ews_by_account_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_ews_by_account_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_account_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -119,8 +119,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_ews_by_account_by_event_name m_row;
|
||||
|
|
|
@ -30,49 +30,6 @@
|
|||
|
||||
THR_LOCK table_ews_by_host_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_by_host_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_by_host_by_event_name::m_share=
|
||||
{
|
||||
|
@ -85,8 +42,14 @@ table_ews_by_host_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_ews_by_host_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_host_by_event_name("
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -119,8 +119,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_ews_by_host_by_event_name m_row;
|
||||
|
|
|
@ -29,49 +29,6 @@
|
|||
|
||||
THR_LOCK table_ews_by_thread_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_by_thread_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_by_thread_by_event_name::m_share=
|
||||
{
|
||||
|
@ -84,8 +41,14 @@ table_ews_by_thread_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_ews_by_thread_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_thread_by_event_name("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -118,8 +118,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_ews_by_thread_by_event_name m_row;
|
||||
|
|
|
@ -30,49 +30,6 @@
|
|||
|
||||
THR_LOCK table_ews_by_user_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_by_user_by_event_name::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_by_user_by_event_name::m_share=
|
||||
{
|
||||
|
@ -85,8 +42,14 @@ table_ews_by_user_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_ews_by_user_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_by_user_by_event_name("
|
||||
"USER CHAR(16) collate utf8_bin default null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -119,8 +119,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_ews_by_user_by_event_name m_row;
|
||||
|
|
|
@ -31,44 +31,6 @@
|
|||
|
||||
THR_LOCK table_ews_global_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_ews_global_by_event_name::m_field_def=
|
||||
{ 6, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_ews_global_by_event_name::m_share=
|
||||
{
|
||||
|
@ -81,8 +43,13 @@ table_ews_global_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_ews_global_by_event_name),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE events_waits_summary_global_by_event_name("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -111,8 +111,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_ews_global_by_event_name m_row;
|
||||
|
|
|
@ -28,29 +28,6 @@
|
|||
|
||||
THR_LOCK table_file_instances::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FILE_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(512)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OPEN_COUNT") },
|
||||
{ C_STRING_WITH_LEN("int(10)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_instances::m_field_def=
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_instances::m_share=
|
||||
{
|
||||
|
@ -63,8 +40,10 @@ table_file_instances::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE file_instances("
|
||||
"FILE_NAME VARCHAR(512) not null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"OPEN_COUNT INTEGER unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_file_instances::create(void)
|
||||
|
|
|
@ -73,8 +73,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_file_instances m_row;
|
||||
|
|
|
@ -1,372 +0,0 @@
|
|||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
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 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,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
/**
|
||||
@file storage/perfschema/table_file_summary.cc
|
||||
Table FILE_SUMMARY_BY_xxx (implementation).
|
||||
*/
|
||||
|
||||
#include "my_global.h"
|
||||
#include "my_pthread.h"
|
||||
#include "pfs_instr_class.h"
|
||||
#include "pfs_column_types.h"
|
||||
#include "pfs_column_values.h"
|
||||
#include "table_file_summary.h"
|
||||
#include "pfs_global.h"
|
||||
|
||||
THR_LOCK table_file_summary_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE fs_by_event_name_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_event_name::m_field_def=
|
||||
{ 5, fs_by_event_name_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_event_name::m_share=
|
||||
{
|
||||
{ C_STRING_WITH_LEN("file_summary_by_event_name") },
|
||||
&pfs_truncatable_acl,
|
||||
&table_file_summary_by_event_name::create,
|
||||
NULL, /* write_row */
|
||||
table_file_summary_by_event_name::delete_all_rows,
|
||||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
};
|
||||
|
||||
PFS_engine_table* table_file_summary_by_event_name::create(void)
|
||||
{
|
||||
return new table_file_summary_by_event_name();
|
||||
}
|
||||
|
||||
int table_file_summary_by_event_name::delete_all_rows(void)
|
||||
{
|
||||
reset_file_class_io();
|
||||
return 0;
|
||||
}
|
||||
|
||||
table_file_summary_by_event_name::table_file_summary_by_event_name()
|
||||
: PFS_engine_table(&m_share, &m_pos),
|
||||
m_pos(1), m_next_pos(1)
|
||||
{}
|
||||
|
||||
void table_file_summary_by_event_name::reset_position(void)
|
||||
{
|
||||
m_pos.m_index= 1;
|
||||
m_next_pos.m_index= 1;
|
||||
}
|
||||
|
||||
int table_file_summary_by_event_name::rnd_next(void)
|
||||
{
|
||||
PFS_file_class *file_class;
|
||||
|
||||
m_pos.set_at(&m_next_pos);
|
||||
|
||||
file_class= find_file_class(m_pos.m_index);
|
||||
if (file_class)
|
||||
{
|
||||
make_row(file_class);
|
||||
m_next_pos.set_after(&m_pos);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return HA_ERR_END_OF_FILE;
|
||||
}
|
||||
|
||||
int table_file_summary_by_event_name::rnd_pos(const void *pos)
|
||||
{
|
||||
PFS_file_class *file_class;
|
||||
|
||||
set_position(pos);
|
||||
|
||||
file_class= find_file_class(m_pos.m_index);
|
||||
if (file_class)
|
||||
{
|
||||
make_row(file_class);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return HA_ERR_RECORD_DELETED;
|
||||
}
|
||||
|
||||
/**
|
||||
Build a row.
|
||||
@param klass the file class the cursor is reading
|
||||
*/
|
||||
void table_file_summary_by_event_name::make_row(PFS_file_class *klass)
|
||||
{
|
||||
m_row.m_name= &klass->m_name[0];
|
||||
m_row.m_name_length= klass->m_name_length;
|
||||
m_row.m_file_stat= klass->m_file_stat;
|
||||
}
|
||||
|
||||
int table_file_summary_by_event_name::read_row_values(TABLE *table,
|
||||
unsigned char *,
|
||||
Field **fields,
|
||||
bool read_all)
|
||||
{
|
||||
Field *f;
|
||||
|
||||
/* Set the null bits */
|
||||
DBUG_ASSERT(table->s->null_bytes == 0);
|
||||
|
||||
/* The row always exists for classes */
|
||||
|
||||
for (; (f= *fields) ; fields++)
|
||||
{
|
||||
if (read_all || bitmap_is_set(table->read_set, f->field_index))
|
||||
{
|
||||
switch(f->field_index)
|
||||
{
|
||||
case 0: /* NAME */
|
||||
set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length);
|
||||
break;
|
||||
case 1: /* COUNT_READ */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_count_read);
|
||||
break;
|
||||
case 2: /* COUNT_WRITE */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_count_write);
|
||||
break;
|
||||
case 3: /* READ_BYTES */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_read_bytes);
|
||||
break;
|
||||
case 4: /* WRITE_BYTES */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_write_bytes);
|
||||
break;
|
||||
default:
|
||||
DBUG_ASSERT(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
THR_LOCK table_file_summary_by_instance::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE fs_by_instance_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FILE_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(512)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_instance::m_field_def=
|
||||
{ 6, fs_by_instance_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_instance::m_share=
|
||||
{
|
||||
{ C_STRING_WITH_LEN("file_summary_by_instance") },
|
||||
&pfs_truncatable_acl,
|
||||
&table_file_summary_by_instance::create,
|
||||
NULL, /* write_row */
|
||||
table_file_summary_by_instance::delete_all_rows,
|
||||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
};
|
||||
|
||||
PFS_engine_table* table_file_summary_by_instance::create(void)
|
||||
{
|
||||
return new table_file_summary_by_instance();
|
||||
}
|
||||
|
||||
int table_file_summary_by_instance::delete_all_rows(void)
|
||||
{
|
||||
reset_file_instance_io();
|
||||
return 0;
|
||||
}
|
||||
|
||||
table_file_summary_by_instance::table_file_summary_by_instance()
|
||||
: PFS_engine_table(&m_share, &m_pos),
|
||||
m_row_exists(false), m_pos(0), m_next_pos(0)
|
||||
{}
|
||||
|
||||
void table_file_summary_by_instance::reset_position(void)
|
||||
{
|
||||
m_pos.m_index= 0;
|
||||
m_next_pos.m_index= 0;
|
||||
}
|
||||
|
||||
int table_file_summary_by_instance::rnd_next(void)
|
||||
{
|
||||
PFS_file *pfs;
|
||||
|
||||
for (m_pos.set_at(&m_next_pos);
|
||||
m_pos.m_index < file_max;
|
||||
m_pos.next())
|
||||
{
|
||||
pfs= &file_array[m_pos.m_index];
|
||||
if (pfs->m_lock.is_populated())
|
||||
{
|
||||
make_row(pfs);
|
||||
m_next_pos.set_after(&m_pos);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return HA_ERR_END_OF_FILE;
|
||||
}
|
||||
|
||||
int table_file_summary_by_instance::rnd_pos(const void *pos)
|
||||
{
|
||||
PFS_file *pfs;
|
||||
|
||||
set_position(pos);
|
||||
DBUG_ASSERT(m_pos.m_index < file_max);
|
||||
pfs= &file_array[m_pos.m_index];
|
||||
|
||||
if (! pfs->m_lock.is_populated())
|
||||
return HA_ERR_RECORD_DELETED;
|
||||
|
||||
make_row(pfs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
Build a row.
|
||||
@param pfs the file the cursor is reading
|
||||
*/
|
||||
void table_file_summary_by_instance::make_row(PFS_file *pfs)
|
||||
{
|
||||
pfs_lock lock;
|
||||
PFS_file_class *safe_class;
|
||||
|
||||
m_row_exists= false;
|
||||
|
||||
/* Protect this reader against a file delete */
|
||||
pfs->m_lock.begin_optimistic_lock(&lock);
|
||||
|
||||
safe_class= sanitize_file_class(pfs->m_class);
|
||||
if (unlikely(safe_class == NULL))
|
||||
return;
|
||||
|
||||
m_row.m_filename= pfs->m_filename;
|
||||
m_row.m_filename_length= pfs->m_filename_length;
|
||||
m_row.m_name= safe_class->m_name;
|
||||
m_row.m_name_length= safe_class->m_name_length;
|
||||
m_row.m_file_stat= pfs->m_file_stat;
|
||||
|
||||
if (pfs->m_lock.end_optimistic_lock(&lock))
|
||||
m_row_exists= true;
|
||||
}
|
||||
|
||||
int table_file_summary_by_instance::read_row_values(TABLE *table,
|
||||
unsigned char *,
|
||||
Field **fields,
|
||||
bool read_all)
|
||||
{
|
||||
Field *f;
|
||||
|
||||
if (unlikely(! m_row_exists))
|
||||
return HA_ERR_RECORD_DELETED;
|
||||
|
||||
/* Set the null bits */
|
||||
DBUG_ASSERT(table->s->null_bytes == 0);
|
||||
|
||||
for (; (f= *fields) ; fields++)
|
||||
{
|
||||
if (read_all || bitmap_is_set(table->read_set, f->field_index))
|
||||
{
|
||||
switch(f->field_index)
|
||||
{
|
||||
case 0: /* FILENAME */
|
||||
set_field_varchar_utf8(f, m_row.m_filename, m_row.m_filename_length);
|
||||
break;
|
||||
case 1: /* NAME */
|
||||
set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length);
|
||||
break;
|
||||
case 2: /* COUNT_READ */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_count_read);
|
||||
break;
|
||||
case 3: /* COUNT_WRITE */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_count_write);
|
||||
break;
|
||||
case 4: /* READ_BYTES */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_read_bytes);
|
||||
break;
|
||||
case 5: /* WRITE_BYTES */
|
||||
set_field_ulonglong(f, m_row.m_file_stat.m_write_bytes);
|
||||
break;
|
||||
default:
|
||||
DBUG_ASSERT(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,151 +0,0 @@
|
|||
/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
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 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,
|
||||
51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
|
||||
|
||||
#ifndef TABLE_FILE_SUMMARY_H
|
||||
#define TABLE_FILE_SUMMARY_H
|
||||
|
||||
/**
|
||||
@file storage/perfschema/table_file_summary.h
|
||||
Table FILE_SUMMARY_BY_xxx (declarations).
|
||||
*/
|
||||
|
||||
#include "pfs_column_types.h"
|
||||
#include "pfs_engine_table.h"
|
||||
#include "pfs_instr_class.h"
|
||||
#include "pfs_instr.h"
|
||||
|
||||
/**
|
||||
@addtogroup Performance_schema_tables
|
||||
@{
|
||||
*/
|
||||
|
||||
/** A row of PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME. */
|
||||
struct row_file_summary_by_event_name
|
||||
{
|
||||
/** Column EVENT_NAME. */
|
||||
const char *m_name;
|
||||
/** Length in bytes of @c m_name. */
|
||||
uint m_name_length;
|
||||
/**
|
||||
Columns COUNT_READ, COUNT_WRITE,
|
||||
SUM_NUMBER_OF_BYTES_READ, SUM_NUMBER_OF_BYTES_WRITE.
|
||||
*/
|
||||
PFS_file_stat m_file_stat;
|
||||
};
|
||||
|
||||
/** Table PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_EVENT_NAME. */
|
||||
class table_file_summary_by_event_name : public PFS_engine_table
|
||||
{
|
||||
public:
|
||||
/** Table share */
|
||||
static PFS_engine_table_share m_share;
|
||||
static PFS_engine_table* create();
|
||||
static int delete_all_rows();
|
||||
|
||||
virtual int rnd_next();
|
||||
virtual int rnd_pos(const void *pos);
|
||||
virtual void reset_position(void);
|
||||
|
||||
protected:
|
||||
void make_row(PFS_file_class *klass);
|
||||
|
||||
virtual int read_row_values(TABLE *table,
|
||||
unsigned char *buf,
|
||||
Field **fields,
|
||||
bool read_all);
|
||||
|
||||
table_file_summary_by_event_name();
|
||||
|
||||
public:
|
||||
~table_file_summary_by_event_name()
|
||||
{}
|
||||
|
||||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_file_summary_by_event_name m_row;
|
||||
/** Current position. */
|
||||
PFS_simple_index m_pos;
|
||||
/** Next position. */
|
||||
PFS_simple_index m_next_pos;
|
||||
};
|
||||
|
||||
/** A row of PERFORMANCE_SCHEMA.FILE_SUMMARY_BY_INSTANCE. */
|
||||
struct row_file_summary_by_instance
|
||||
{
|
||||
/** Column FILE_NAME. */
|
||||
const char *m_filename;
|
||||
/** Length in bytes of @c m_filename. */
|
||||
uint m_filename_length;
|
||||
/** Column EVENT_NAME. */
|
||||
const char *m_name;
|
||||
/** Length in bytes of @c m_name. */
|
||||
uint m_name_length;
|
||||
/**
|
||||
Columns COUNT_READ, COUNT_WRITE,
|
||||
SUM_NUMBER_OF_BYTES_READ, SUM_NUMBER_OF_BYTES_WRITE.
|
||||
*/
|
||||
PFS_file_stat m_file_stat;
|
||||
};
|
||||
|
||||
/** Table PERFORMANCE_SCHEMA.FILE_UMMARY_BY_INSTANCE. */
|
||||
class table_file_summary_by_instance : public PFS_engine_table
|
||||
{
|
||||
public:
|
||||
/** Table share */
|
||||
static PFS_engine_table_share m_share;
|
||||
static PFS_engine_table* create();
|
||||
static int delete_all_rows();
|
||||
|
||||
virtual int rnd_next();
|
||||
virtual int rnd_pos(const void *pos);
|
||||
virtual void reset_position(void);
|
||||
|
||||
protected:
|
||||
void make_row(PFS_file *pfs);
|
||||
|
||||
virtual int read_row_values(TABLE *table,
|
||||
unsigned char *buf,
|
||||
Field **fields,
|
||||
bool read_all);
|
||||
|
||||
table_file_summary_by_instance();
|
||||
|
||||
public:
|
||||
~table_file_summary_by_instance()
|
||||
{}
|
||||
|
||||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_file_summary_by_instance m_row;
|
||||
/** True is the current row exists. */
|
||||
bool m_row_exists;
|
||||
/** Current position. */
|
||||
PFS_simple_index m_pos;
|
||||
/** Next position. */
|
||||
PFS_simple_index m_next_pos;
|
||||
};
|
||||
|
||||
/** @} */
|
||||
#endif
|
|
@ -29,135 +29,6 @@
|
|||
|
||||
THR_LOCK table_file_summary_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Read */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Write */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Misc */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_event_name::m_field_def=
|
||||
{ 23, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_event_name::m_share=
|
||||
{
|
||||
|
@ -170,8 +41,30 @@ table_file_summary_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE file_summary_by_event_name("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"COUNT_READ BIGINT unsigned not null,"
|
||||
"SUM_TIMER_READ BIGINT unsigned not null,"
|
||||
"MIN_TIMER_READ BIGINT unsigned not null,"
|
||||
"AVG_TIMER_READ BIGINT unsigned not null,"
|
||||
"MAX_TIMER_READ BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_READ BIGINT not null,"
|
||||
"COUNT_WRITE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_WRITE BIGINT not null,"
|
||||
"COUNT_MISC BIGINT unsigned not null,"
|
||||
"SUM_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MIN_TIMER_MISC BIGINT unsigned not null,"
|
||||
"AVG_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MAX_TIMER_MISC BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_file_summary_by_event_name::create(void)
|
||||
|
|
|
@ -74,8 +74,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_file_summary_by_event_name m_row;
|
||||
|
|
|
@ -28,145 +28,6 @@
|
|||
|
||||
THR_LOCK table_file_summary_by_instance::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FILE_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(512)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Read */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Write */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Misc */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_file_summary_by_instance::m_field_def=
|
||||
{ 25, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_file_summary_by_instance::m_share=
|
||||
{
|
||||
|
@ -179,8 +40,32 @@ table_file_summary_by_instance::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE file_summary_by_instance("
|
||||
"FILE_NAME VARCHAR(512) not null,"
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"COUNT_READ BIGINT unsigned not null,"
|
||||
"SUM_TIMER_READ BIGINT unsigned not null,"
|
||||
"MIN_TIMER_READ BIGINT unsigned not null,"
|
||||
"AVG_TIMER_READ BIGINT unsigned not null,"
|
||||
"MAX_TIMER_READ BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_READ BIGINT not null,"
|
||||
"COUNT_WRITE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_WRITE BIGINT not null,"
|
||||
"COUNT_MISC BIGINT unsigned not null,"
|
||||
"SUM_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MIN_TIMER_MISC BIGINT unsigned not null,"
|
||||
"AVG_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MAX_TIMER_MISC BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_file_summary_by_instance::create(void)
|
||||
|
|
|
@ -82,8 +82,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_file_summary_by_instance m_row;
|
||||
|
|
|
@ -25,159 +25,6 @@
|
|||
|
||||
THR_LOCK table_host_cache::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("IP") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("varchar(255)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST_VALIDATED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_CONNECT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_HOST_BLOCKED_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_NAMEINFO_TRANSIENT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_NAMEINFO_PERMANENT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_FORMAT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_ADDRINFO_TRANSIENT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_ADDRINFO_PERMANENT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_FCRDNS_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_HOST_ACL_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_NO_AUTH_PLUGIN_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_AUTH_PLUGIN_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_HANDSHAKE_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_PROXY_USER_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_PROXY_USER_ACL_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_AUTHENTICATION_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_SSL_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MAX_USER_CONNECTIONS_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_DEFAULT_DATABASE_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_INIT_CONNECT_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_LOCAL_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_UNKNOWN_ERRORS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FIRST_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("LAST_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("FIRST_ERROR_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("LAST_ERROR_SEEN") },
|
||||
{ C_STRING_WITH_LEN("timestamp") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_host_cache::m_field_def=
|
||||
{ 29, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_host_cache::m_share=
|
||||
{
|
||||
|
@ -190,8 +37,36 @@ table_host_cache::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE host_cache("
|
||||
"IP VARCHAR(64) not null,"
|
||||
"HOST VARCHAR(255) collate utf8_bin,"
|
||||
"HOST_VALIDATED ENUM ('YES', 'NO') not null,"
|
||||
"SUM_CONNECT_ERRORS BIGINT not null,"
|
||||
"COUNT_HOST_BLOCKED_ERRORS BIGINT not null,"
|
||||
"COUNT_NAMEINFO_TRANSIENT_ERRORS BIGINT not null,"
|
||||
"COUNT_NAMEINFO_PERMANENT_ERRORS BIGINT not null,"
|
||||
"COUNT_FORMAT_ERRORS BIGINT not null,"
|
||||
"COUNT_ADDRINFO_TRANSIENT_ERRORS BIGINT not null,"
|
||||
"COUNT_ADDRINFO_PERMANENT_ERRORS BIGINT not null,"
|
||||
"COUNT_FCRDNS_ERRORS BIGINT not null,"
|
||||
"COUNT_HOST_ACL_ERRORS BIGINT not null,"
|
||||
"COUNT_NO_AUTH_PLUGIN_ERRORS BIGINT not null,"
|
||||
"COUNT_AUTH_PLUGIN_ERRORS BIGINT not null,"
|
||||
"COUNT_HANDSHAKE_ERRORS BIGINT not null,"
|
||||
"COUNT_PROXY_USER_ERRORS BIGINT not null,"
|
||||
"COUNT_PROXY_USER_ACL_ERRORS BIGINT not null,"
|
||||
"COUNT_AUTHENTICATION_ERRORS BIGINT not null,"
|
||||
"COUNT_SSL_ERRORS BIGINT not null,"
|
||||
"COUNT_MAX_USER_CONNECTIONS_ERRORS BIGINT not null,"
|
||||
"COUNT_MAX_USER_CONNECTIONS_PER_HOUR_ERRORS BIGINT not null,"
|
||||
"COUNT_DEFAULT_DATABASE_ERRORS BIGINT not null,"
|
||||
"COUNT_INIT_CONNECT_ERRORS BIGINT not null,"
|
||||
"COUNT_LOCAL_ERRORS BIGINT not null,"
|
||||
"COUNT_UNKNOWN_ERRORS BIGINT not null,"
|
||||
"FIRST_SEEN TIMESTAMP(0) NOT NULL default 0,"
|
||||
"LAST_SEEN TIMESTAMP(0) NOT NULL default 0,"
|
||||
"FIRST_ERROR_SEEN TIMESTAMP(0) null default 0,"
|
||||
"LAST_ERROR_SEEN TIMESTAMP(0) null default 0)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_host_cache::create(void)
|
||||
|
|
|
@ -127,8 +127,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
row_host_cache *m_all_rows;
|
||||
uint m_row_count;
|
||||
|
|
|
@ -24,29 +24,6 @@
|
|||
|
||||
THR_LOCK table_hosts::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("CURRENT_CONNECTIONS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TOTAL_CONNECTIONS") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_hosts::m_field_def=
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_hosts::m_share=
|
||||
{
|
||||
|
@ -59,8 +36,10 @@ table_hosts::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE hosts("
|
||||
"HOST CHAR(60) collate utf8_bin default null,"
|
||||
"CURRENT_CONNECTIONS bigint not null,"
|
||||
"TOTAL_CONNECTIONS bigint not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_hosts::create()
|
||||
|
|
|
@ -67,8 +67,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_hosts m_row;
|
||||
|
|
|
@ -28,54 +28,6 @@
|
|||
|
||||
THR_LOCK table_os_global_by_type::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_os_global_by_type::m_field_def=
|
||||
{ 8, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_os_global_by_type::m_share=
|
||||
{
|
||||
|
@ -88,8 +40,15 @@ table_os_global_by_type::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_os_global_by_type),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE objects_summary_global_by_type("
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(64),"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
|
@ -112,8 +112,6 @@ protected:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_os_global_by_type m_row;
|
||||
|
|
|
@ -26,35 +26,6 @@
|
|||
|
||||
THR_LOCK table_performance_timers::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_NAME") },
|
||||
{ C_STRING_WITH_LEN("enum(\'CYCLE\',\'NANOSECOND\',\'MICROSECOND\',"
|
||||
"\'MILLISECOND\',\'TICK\')") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_FREQUENCY") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_RESOLUTION") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_OVERHEAD") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_performance_timers::m_field_def=
|
||||
{ 4, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_performance_timers::m_share=
|
||||
{
|
||||
|
@ -67,8 +38,11 @@ table_performance_timers::m_share=
|
|||
COUNT_TIMER_NAME, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE performance_timers("
|
||||
"TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null,"
|
||||
"TIMER_FREQUENCY BIGINT,"
|
||||
"TIMER_RESOLUTION BIGINT,"
|
||||
"TIMER_OVERHEAD BIGINT)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_performance_timers::create(void)
|
||||
|
|
|
@ -70,8 +70,6 @@ public:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_performance_timers *m_row;
|
||||
|
|
|
@ -29,8 +29,12 @@ table_session_account_connect_attrs::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_connect_attr_by_thread_by_attr), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE session_account_connect_attrs("
|
||||
"PROCESSLIST_ID INT NOT NULL,"
|
||||
"ATTR_NAME VARCHAR(32) NOT NULL,"
|
||||
"ATTR_VALUE VARCHAR(1024),"
|
||||
"ORDINAL_POSITION INT"
|
||||
") CHARACTER SET utf8 COLLATE utf8_bin") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_session_account_connect_attrs::create()
|
||||
|
|
|
@ -15,33 +15,6 @@
|
|||
|
||||
#include "table_session_connect.h"
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_ID") },
|
||||
{ C_STRING_WITH_LEN("int(11)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ATTR_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(32)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ATTR_VALUE") },
|
||||
{ C_STRING_WITH_LEN("varchar(1024)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ORDINAL_POSITION") },
|
||||
{ C_STRING_WITH_LEN("int(11)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF table_session_connect::m_field_def=
|
||||
{ 4, field_types, 0, (uint*) 0 };
|
||||
|
||||
table_session_connect::table_session_connect(const PFS_engine_table_share *share)
|
||||
: cursor_by_thread_connect_attr(share)
|
||||
{
|
||||
|
|
|
@ -66,8 +66,6 @@ protected:
|
|||
virtual int read_row_values(TABLE *table, unsigned char *buf,
|
||||
Field **fields, bool read_all);
|
||||
protected:
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
/** Current row. */
|
||||
row_session_connect_attrs m_row;
|
||||
/** Safe copy of @c PFS_thread::m_session_connect_attrs. */
|
||||
|
|
|
@ -29,8 +29,12 @@ table_session_connect_attrs::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_connect_attr_by_thread_by_attr), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE session_connect_attrs("
|
||||
"PROCESSLIST_ID INT NOT NULL,"
|
||||
"ATTR_NAME VARCHAR(32) NOT NULL,"
|
||||
"ATTR_VALUE VARCHAR(1024),"
|
||||
"ORDINAL_POSITION INT"
|
||||
") CHARACTER SET utf8 COLLATE utf8_bin") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_session_connect_attrs::create()
|
||||
|
|
|
@ -29,29 +29,6 @@
|
|||
|
||||
THR_LOCK table_setup_actors::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("HOST") },
|
||||
{ C_STRING_WITH_LEN("char(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("USER") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ROLE") },
|
||||
{ C_STRING_WITH_LEN("char(16)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_actors::m_field_def=
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_actors::m_share=
|
||||
{
|
||||
|
@ -64,8 +41,10 @@ table_setup_actors::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE setup_actors("
|
||||
"HOST CHAR(60) collate utf8_bin default '%' not null,"
|
||||
"USER CHAR(16) collate utf8_bin default '%' not null,"
|
||||
"ROLE CHAR(16) collate utf8_bin default '%' not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_setup_actors::create()
|
||||
|
|
|
@ -89,8 +89,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_setup_actors m_row;
|
||||
|
|
|
@ -92,24 +92,6 @@ static row_setup_consumers all_setup_consumers_data[COUNT_SETUP_CONSUMERS]=
|
|||
|
||||
THR_LOCK table_setup_consumers::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ENABLED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_consumers::m_field_def=
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_consumers::m_share=
|
||||
{
|
||||
|
@ -122,8 +104,9 @@ table_setup_consumers::m_share=
|
|||
COUNT_SETUP_CONSUMERS, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE setup_consumers("
|
||||
"NAME VARCHAR(64) not null,"
|
||||
"ENABLED ENUM ('YES', 'NO') not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_setup_consumers::create(void)
|
||||
|
|
|
@ -72,8 +72,6 @@ public:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_setup_consumers *m_row;
|
||||
|
|
|
@ -30,29 +30,6 @@
|
|||
|
||||
THR_LOCK table_setup_instruments::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ENABLED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_instruments::m_field_def=
|
||||
{ 3, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_instruments::m_share=
|
||||
{
|
||||
|
@ -65,8 +42,10 @@ table_setup_instruments::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_setup_instruments),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE setup_instruments("
|
||||
"NAME VARCHAR(128) not null,"
|
||||
"ENABLED ENUM ('YES', 'NO') not null,"
|
||||
"TIMED ENUM ('YES', 'NO') not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_setup_instruments::create(void)
|
||||
|
|
|
@ -106,8 +106,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_setup_instruments m_row;
|
||||
|
|
|
@ -30,39 +30,6 @@
|
|||
|
||||
THR_LOCK table_setup_objects::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("enum(\'TABLE\')") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ENABLED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_objects::m_field_def=
|
||||
{ 5, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_objects::m_share=
|
||||
{
|
||||
|
@ -75,8 +42,12 @@ table_setup_objects::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE setup_objects("
|
||||
"OBJECT_TYPE ENUM ('TABLE') not null default 'TABLE',"
|
||||
"OBJECT_SCHEMA VARCHAR(64) default '%',"
|
||||
"OBJECT_NAME VARCHAR(64) not null default '%',"
|
||||
"ENABLED ENUM ('YES', 'NO') not null default 'YES',"
|
||||
"TIMED ENUM ('YES', 'NO') not null default 'YES')") }
|
||||
};
|
||||
|
||||
int update_derived_flags()
|
||||
|
|
|
@ -92,8 +92,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_setup_objects m_row;
|
||||
|
|
|
@ -48,25 +48,6 @@ static row_setup_timers all_setup_timers_data[COUNT_SETUP_TIMERS]=
|
|||
|
||||
THR_LOCK table_setup_timers::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TIMER_NAME") },
|
||||
{ C_STRING_WITH_LEN("enum(\'CYCLE\',\'NANOSECOND\',\'MICROSECOND\',"
|
||||
"\'MILLISECOND\',\'TICK\')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_setup_timers::m_field_def=
|
||||
{ 2, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_setup_timers::m_share=
|
||||
{
|
||||
|
@ -79,8 +60,9 @@ table_setup_timers::m_share=
|
|||
COUNT_SETUP_TIMERS,
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE setup_timers("
|
||||
"NAME VARCHAR(64) not null,"
|
||||
"TIMER_NAME ENUM ('CYCLE', 'NANOSECOND', 'MICROSECOND', 'MILLISECOND', 'TICK') not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_setup_timers::create(void)
|
||||
|
|
|
@ -70,8 +70,6 @@ public:
|
|||
private:
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_setup_timers *m_row;
|
||||
|
|
|
@ -28,49 +28,6 @@
|
|||
|
||||
THR_LOCK table_socket_instances::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SOCKET_ID") },
|
||||
{ C_STRING_WITH_LEN("int(11)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("IP") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PORT") },
|
||||
{ C_STRING_WITH_LEN("int(11)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("STATE") },
|
||||
{ C_STRING_WITH_LEN("enum('IDLE','ACTIVE')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_socket_instances::m_field_def=
|
||||
{ 7, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_socket_instances::m_share=
|
||||
{
|
||||
|
@ -83,8 +40,14 @@ table_socket_instances::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE socket_instances("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"THREAD_ID BIGINT unsigned,"
|
||||
"SOCKET_ID INTEGER not null,"
|
||||
"IP VARCHAR(64) not null,"
|
||||
"PORT INTEGER not null,"
|
||||
"STATE ENUM('IDLE','ACTIVE') not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_socket_instances::create(void)
|
||||
|
|
|
@ -85,8 +85,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_socket_instances m_row;
|
||||
|
|
|
@ -29,135 +29,6 @@
|
|||
|
||||
THR_LOCK table_socket_summary_by_event_name::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Read */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Write */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Misc */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_socket_summary_by_event_name::m_field_def=
|
||||
{ 23, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_socket_summary_by_event_name::m_share=
|
||||
{
|
||||
|
@ -170,8 +41,30 @@ table_socket_summary_by_event_name::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE socket_summary_by_event_name("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"COUNT_READ BIGINT unsigned not null,"
|
||||
"SUM_TIMER_READ BIGINT unsigned not null,"
|
||||
"MIN_TIMER_READ BIGINT unsigned not null,"
|
||||
"AVG_TIMER_READ BIGINT unsigned not null,"
|
||||
"MAX_TIMER_READ BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
|
||||
"COUNT_WRITE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
|
||||
"COUNT_MISC BIGINT unsigned not null,"
|
||||
"SUM_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MIN_TIMER_MISC BIGINT unsigned not null,"
|
||||
"AVG_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MAX_TIMER_MISC BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_socket_summary_by_event_name::create(void)
|
||||
|
|
|
@ -75,8 +75,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_socket_summary_by_event_name m_row;
|
||||
|
|
|
@ -28,140 +28,6 @@
|
|||
|
||||
THR_LOCK table_socket_summary_by_instance::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("EVENT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Read */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Write */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_NUMBER_OF_BYTES_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
|
||||
/** Misc */
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_MISC") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_socket_summary_by_instance::m_field_def=
|
||||
{ 24, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_socket_summary_by_instance::m_share=
|
||||
{
|
||||
|
@ -174,8 +40,31 @@ table_socket_summary_by_instance::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE socket_summary_by_instance("
|
||||
"EVENT_NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"COUNT_READ BIGINT unsigned not null,"
|
||||
"SUM_TIMER_READ BIGINT unsigned not null,"
|
||||
"MIN_TIMER_READ BIGINT unsigned not null,"
|
||||
"AVG_TIMER_READ BIGINT unsigned not null,"
|
||||
"MAX_TIMER_READ BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_READ BIGINT unsigned not null,"
|
||||
"COUNT_WRITE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"SUM_NUMBER_OF_BYTES_WRITE BIGINT unsigned not null,"
|
||||
"COUNT_MISC BIGINT unsigned not null,"
|
||||
"SUM_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MIN_TIMER_MISC BIGINT unsigned not null,"
|
||||
"AVG_TIMER_MISC BIGINT unsigned not null,"
|
||||
"MAX_TIMER_MISC BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_socket_summary_by_instance::create(void)
|
||||
|
|
|
@ -78,8 +78,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_socket_summary_by_instance m_row;
|
||||
|
|
|
@ -29,29 +29,6 @@
|
|||
|
||||
THR_LOCK table_mutex_instances::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE mutex_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("LOCKED_BY_THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_mutex_instances::m_field_def=
|
||||
{ 3, mutex_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_mutex_instances::m_share=
|
||||
{
|
||||
|
@ -64,8 +41,10 @@ table_mutex_instances::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE mutex_instances("
|
||||
"NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"LOCKED_BY_THREAD_ID BIGINT unsigned)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_mutex_instances::create(void)
|
||||
|
@ -193,34 +172,6 @@ int table_mutex_instances::read_row_values(TABLE *table,
|
|||
|
||||
THR_LOCK table_rwlock_instances::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE rwlock_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("WRITE_LOCKED_BY_THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("READ_LOCKED_BY_COUNT") },
|
||||
{ C_STRING_WITH_LEN("int(10)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_rwlock_instances::m_field_def=
|
||||
{ 4, rwlock_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_rwlock_instances::m_share=
|
||||
{
|
||||
|
@ -233,8 +184,11 @@ table_rwlock_instances::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE rwlock_instances("
|
||||
"NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null,"
|
||||
"WRITE_LOCKED_BY_THREAD_ID BIGINT unsigned,"
|
||||
"READ_LOCKED_BY_COUNT INTEGER unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_rwlock_instances::create(void)
|
||||
|
@ -369,24 +323,6 @@ int table_rwlock_instances::read_row_values(TABLE *table,
|
|||
|
||||
THR_LOCK table_cond_instances::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE cond_field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_INSTANCE_BEGIN") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_cond_instances::m_field_def=
|
||||
{ 2, cond_field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_cond_instances::m_share=
|
||||
{
|
||||
|
@ -399,8 +335,9 @@ table_cond_instances::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE cond_instances("
|
||||
"NAME VARCHAR(128) not null,"
|
||||
"OBJECT_INSTANCE_BEGIN BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_cond_instances::create(void)
|
||||
|
|
|
@ -77,8 +77,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_mutex_instances m_row;
|
||||
|
@ -136,8 +134,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_rwlock_instances m_row;
|
||||
|
@ -189,8 +185,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_cond_instances m_row;
|
||||
|
|
|
@ -22,84 +22,6 @@
|
|||
|
||||
THR_LOCK table_threads::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(128)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("TYPE") },
|
||||
{ C_STRING_WITH_LEN("varchar(10)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_USER") },
|
||||
{ C_STRING_WITH_LEN("varchar(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_HOST") },
|
||||
{ C_STRING_WITH_LEN("varchar(60)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_DB") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_COMMAND") },
|
||||
{ C_STRING_WITH_LEN("varchar(16)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_TIME") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_STATE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PROCESSLIST_INFO") },
|
||||
{ C_STRING_WITH_LEN("longtext") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("PARENT_THREAD_ID") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("ROLE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("INSTRUMENTED") },
|
||||
{ C_STRING_WITH_LEN("enum(\'YES\',\'NO\')") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_threads::m_field_def=
|
||||
{ 14, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_threads::m_share=
|
||||
{
|
||||
|
@ -112,8 +34,21 @@ table_threads::m_share=
|
|||
1000, /* records */
|
||||
sizeof(PFS_simple_index), /* ref length */
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE threads("
|
||||
"THREAD_ID BIGINT unsigned not null,"
|
||||
"NAME VARCHAR(128) not null,"
|
||||
"TYPE VARCHAR(10) not null,"
|
||||
"PROCESSLIST_ID BIGINT unsigned,"
|
||||
"PROCESSLIST_USER VARCHAR(16),"
|
||||
"PROCESSLIST_HOST VARCHAR(60),"
|
||||
"PROCESSLIST_DB VARCHAR(64),"
|
||||
"PROCESSLIST_COMMAND VARCHAR(16),"
|
||||
"PROCESSLIST_TIME BIGINT,"
|
||||
"PROCESSLIST_STATE VARCHAR(64),"
|
||||
"PROCESSLIST_INFO LONGTEXT,"
|
||||
"PARENT_THREAD_ID BIGINT unsigned,"
|
||||
"ROLE VARCHAR(64),"
|
||||
"INSTRUMENTED ENUM ('YES', 'NO') not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table* table_threads::create()
|
||||
|
|
|
@ -102,8 +102,6 @@ private:
|
|||
|
||||
/** Table share lock. */
|
||||
static THR_LOCK m_table_lock;
|
||||
/** Fields definition. */
|
||||
static TABLE_FIELD_DEF m_field_def;
|
||||
|
||||
/** Current row. */
|
||||
row_threads m_row;
|
||||
|
|
|
@ -29,209 +29,6 @@
|
|||
|
||||
THR_LOCK table_tiws_by_index_usage::m_table_lock;
|
||||
|
||||
static const TABLE_FIELD_TYPE field_types[]=
|
||||
{
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_TYPE") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_SCHEMA") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("OBJECT_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("INDEX_NAME") },
|
||||
{ C_STRING_WITH_LEN("varchar(64)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_STAR") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WAIT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_READ") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_WRITE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_FETCH") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_FETCH") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_FETCH") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_FETCH") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_FETCH") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_INSERT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_INSERT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_INSERT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_INSERT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_INSERT") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_UPDATE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_UPDATE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_UPDATE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_UPDATE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_UPDATE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("COUNT_DELETE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("SUM_TIMER_DELETE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MIN_TIMER_DELETE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("AVG_TIMER_DELETE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
},
|
||||
{
|
||||
{ C_STRING_WITH_LEN("MAX_TIMER_DELETE") },
|
||||
{ C_STRING_WITH_LEN("bigint(20)") },
|
||||
{ NULL, 0}
|
||||
}
|
||||
};
|
||||
|
||||
TABLE_FIELD_DEF
|
||||
table_tiws_by_index_usage::m_field_def=
|
||||
{ 39, field_types, 0, (uint*) 0 };
|
||||
|
||||
PFS_engine_table_share
|
||||
table_tiws_by_index_usage::m_share=
|
||||
{
|
||||
|
@ -244,8 +41,46 @@ table_tiws_by_index_usage::m_share=
|
|||
1000, /* records */
|
||||
sizeof(pos_tiws_by_index_usage),
|
||||
&m_table_lock,
|
||||
&m_field_def,
|
||||
false /* checked */
|
||||
{ C_STRING_WITH_LEN("CREATE TABLE table_io_waits_summary_by_index_usage("
|
||||
"OBJECT_TYPE VARCHAR(64),"
|
||||
"OBJECT_SCHEMA VARCHAR(64),"
|
||||
"OBJECT_NAME VARCHAR(64),"
|
||||
"INDEX_NAME VARCHAR(64),"
|
||||
"COUNT_STAR BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WAIT BIGINT unsigned not null,"
|
||||
"COUNT_READ BIGINT unsigned not null,"
|
||||
"SUM_TIMER_READ BIGINT unsigned not null,"
|
||||
"MIN_TIMER_READ BIGINT unsigned not null,"
|
||||
"AVG_TIMER_READ BIGINT unsigned not null,"
|
||||
"MAX_TIMER_READ BIGINT unsigned not null,"
|
||||
"COUNT_WRITE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_WRITE BIGINT unsigned not null,"
|
||||
"COUNT_FETCH BIGINT unsigned not null,"
|
||||
"SUM_TIMER_FETCH BIGINT unsigned not null,"
|
||||
"MIN_TIMER_FETCH BIGINT unsigned not null,"
|
||||
"AVG_TIMER_FETCH BIGINT unsigned not null,"
|
||||
"MAX_TIMER_FETCH BIGINT unsigned not null,"
|
||||
"COUNT_INSERT BIGINT unsigned not null,"
|
||||
"SUM_TIMER_INSERT BIGINT unsigned not null,"
|
||||
"MIN_TIMER_INSERT BIGINT unsigned not null,"
|
||||
"AVG_TIMER_INSERT BIGINT unsigned not null,"
|
||||
"MAX_TIMER_INSERT BIGINT unsigned not null,"
|
||||
"COUNT_UPDATE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_UPDATE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_UPDATE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_UPDATE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_UPDATE BIGINT unsigned not null,"
|
||||
"COUNT_DELETE BIGINT unsigned not null,"
|
||||
"SUM_TIMER_DELETE BIGINT unsigned not null,"
|
||||
"MIN_TIMER_DELETE BIGINT unsigned not null,"
|
||||
"AVG_TIMER_DELETE BIGINT unsigned not null,"
|
||||
"MAX_TIMER_DELETE BIGINT unsigned not null)") }
|
||||
};
|
||||
|
||||
PFS_engine_table*
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue