Commit f1c1c04a authored by Sergey Vojtovich's avatar Sergey Vojtovich

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
parent e7669cf6
......@@ -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
......
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;
# 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
This diff is collapsed.
......@@ -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);
}
......
/* 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;
......
......@@ -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;
......
This diff is collapsed.
This diff is collapsed.
......@@ -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;
......
......@@ -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;
......
This diff is collapsed.
......@@ -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;
......
......@@ -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)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment