24#ifndef PFS_EVENTS_STATEMENTS_H
25#define PFS_EVENTS_STATEMENTS_H
173 size_t events_statements_history_long_sizing);
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
#define MYSQL_ERRMSG_SIZE
Max length of a error message.
Definition: mysql_com.h:881
#define SQLSTATE_LENGTH
Definition: mysql_com.h:75
char * user
Definition: mysqladmin.cc:66
const char * host
Definition: mysqladmin.cc:65
Data types for columns used in the performance schema tables (declarations)
enum_object_type
Enum values for the various OBJECT_TYPE columns.
Definition: pfs_column_types.h:222
Statement Digest data structures (declarations).
Events data structures (declarations).
ulong nested_statement_lost
Definition: pfs_instr.cc:50
void reset_events_statements_by_account()
Reset table EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME data.
Definition: pfs_events_statements.cc:308
void reset_events_statements_by_user()
Reset table EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME data.
Definition: pfs_events_statements.cc:317
void cleanup_events_statements_history_long()
Cleanup table EVENTS_STATEMENTS_HISTORY_LONG.
Definition: pfs_events_statements.cc:139
void insert_events_statements_history(PFS_thread *thread, PFS_events_statements *statement)
Insert a statement record in table EVENTS_STATEMENTS_HISTORY.
Definition: pfs_events_statements.cc:196
PFS_events_statements * events_statements_history_long_array
EVENTS_STATEMENTS_HISTORY_LONG circular buffer.
Definition: pfs_events_statements.cc:63
void reset_events_statements_by_thread()
Reset table EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME data.
Definition: pfs_events_statements.cc:297
void reset_events_statements_current()
Reset table EVENTS_STATEMENTS_CURRENT data.
Definition: pfs_events_statements.cc:257
bool flag_events_statements_history_long
Consumer flag for table EVENTS_STATEMENTS_HISTORY_LONG.
Definition: pfs_events_statements.cc:56
void aggregate_account_statements(PFS_account *account)
PFS_cacheline_atomic_uint32 events_statements_history_long_index
Index in EVENTS_STATEMENTS_HISTORY_LONG circular buffer.
Definition: pfs_events_statements.cc:61
bool flag_events_statements_current
Consumer flag for table EVENTS_STATEMENTS_CURRENT.
Definition: pfs_events_statements.cc:52
bool events_statements_history_long_full
True if EVENTS_STATEMENTS_HISTORY_LONG circular buffer is full.
Definition: pfs_events_statements.cc:59
int init_events_statements_history_long(size_t events_statements_history_long_sizing)
Initialize table EVENTS_STATEMENTS_HISTORY_LONG.
Definition: pfs_events_statements.cc:72
void insert_events_statements_history_long(PFS_events_statements *statement)
Insert a statement record in table EVENTS_STATEMENTS_HISTORY_LONG.
Definition: pfs_events_statements.cc:228
size_t events_statements_history_long_size
Definition: pfs_events_statements.cc:48
void aggregate_host_statements(PFS_host *host)
bool flag_events_statements_history
Consumer flag for table EVENTS_STATEMENTS_HISTORY.
Definition: pfs_events_statements.cc:54
void reset_events_statements_history()
Reset table EVENTS_STATEMENTS_HISTORY data.
Definition: pfs_events_statements.cc:273
void reset_events_statements_by_host()
Reset table EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME data.
Definition: pfs_events_statements.cc:326
void aggregate_user_statements(PFS_user *user)
void reset_events_statements_history_long()
Reset table EVENTS_STATEMENTS_HISTORY_LONG data.
Definition: pfs_events_statements.cc:278
bool flag_events_statements_cpu
Consumer flag for CPU_TIME columns.
Definition: pfs_events_statements.cc:50
void reset_events_statements_global()
Reset table EVENTS_STATEMENTS_GLOBAL_BY_EVENT_NAME data.
Definition: pfs_events_statements.cc:331
Object names (declarations).
Per account statistics.
Definition: pfs_account.h:67
An atomic uint32 variable, guaranteed to be alone in a CPU cache line.
Definition: pfs_global.h:77
A statement record.
Definition: pfs_events_statements.h:47
uint m_sql_errno
Diagnostics area, error number.
Definition: pfs_events_statements.h:68
ulonglong m_select_scan
Optimizer metric, number of select scans.
Definition: pfs_events_statements.h:95
ulonglong m_created_tmp_tables
Optimizer metric, number of temporary tables created.
Definition: pfs_events_statements.h:85
uint m_warning_count
Diagnostics area, warning count.
Definition: pfs_events_statements.h:74
ulonglong m_sort_rows
Optimizer metric, number of sort rows.
Definition: pfs_events_statements.h:101
sql_digest_storage m_digest_storage
Statement digest.
Definition: pfs_events_statements.h:145
ulonglong m_lock_time
Locked time.
Definition: pfs_events_statements.h:65
char * m_sqltext
SQL_TEXT.
Definition: pfs_events_statements.h:137
enum_object_type m_sp_type
Definition: pfs_events_statements.h:57
ulonglong m_statement_id
STATEMENT_ID, from the SQL layer QUERY_ID.
Definition: pfs_events_statements.h:55
ulonglong m_select_full_join
Optimizer metric, number of full join.
Definition: pfs_events_statements.h:87
ulonglong m_no_good_index_used
Optimizer metric, number of 'no good index used'.
Definition: pfs_events_statements.h:107
ulonglong m_rows_affected
Diagnostics area, rows affected.
Definition: pfs_events_statements.h:76
PFS_schema_name m_current_schema_name
Database name.
Definition: pfs_events_statements.h:62
char m_sqlstate[SQLSTATE_LENGTH]
Diagnostics area, SQLSTATE.
Definition: pfs_events_statements.h:70
ulonglong m_select_full_range_join
Optimizer metric, number of full range join.
Definition: pfs_events_statements.h:89
ulonglong m_rows_sent
Optimizer metric, number of rows sent.
Definition: pfs_events_statements.h:79
bool m_sqltext_truncated
True if SQL_TEXT was truncated.
Definition: pfs_events_statements.h:119
char m_message_text[MYSQL_ERRMSG_SIZE+1]
Diagnostics area, message text.
Definition: pfs_events_statements.h:153
ulonglong m_select_range
Optimizer metric, number of select range.
Definition: pfs_events_statements.h:91
ulonglong m_sort_range
Optimizer metric, number of sort ranges.
Definition: pfs_events_statements.h:99
uint m_sqltext_cs_number
Statement character set number.
Definition: pfs_events_statements.h:121
ulonglong m_max_controlled_memory
Definition: pfs_events_statements.h:115
ulonglong m_sort_merge_passes
Optimizer metric, number of sort merge passes.
Definition: pfs_events_statements.h:97
uint m_sqltext_length
Length of m_sqltext.
Definition: pfs_events_statements.h:139
ulonglong m_max_total_memory
Definition: pfs_events_statements.h:116
ulonglong m_select_range_check
Optimizer metric, number of select range checks.
Definition: pfs_events_statements.h:93
uint m_message_text_length
Length of m_message_text.
Definition: pfs_events_statements.h:151
ulonglong m_rows_examined
Optimizer metric, number of rows examined.
Definition: pfs_events_statements.h:81
ulonglong m_created_tmp_disk_tables
Optimizer metric, number of temporary tables created on disk.
Definition: pfs_events_statements.h:83
PFS_schema_name m_schema_name
Definition: pfs_events_statements.h:58
uint m_error_count
Diagnostics area, error count.
Definition: pfs_events_statements.h:72
ulonglong m_cpu_time
CPU time.
Definition: pfs_events_statements.h:113
ulonglong m_no_index_used
Optimizer metric, number of 'no index used'.
Definition: pfs_events_statements.h:105
bool m_secondary
Executed on the secondary engine.
Definition: pfs_events_statements.h:124
ulonglong m_sort_scan
Optimizer metric, number of sort scans.
Definition: pfs_events_statements.h:103
PFS_object_name m_object_name
Definition: pfs_events_statements.h:59
An event record.
Definition: pfs_events.h:38
Per host statistics.
Definition: pfs_host.h:64
Definition: pfs_name.h:338
Definition: pfs_name.h:188
Instrumented thread implementation.
Definition: pfs_instr.h:375
Per user statistics.
Definition: pfs_user.h:63
Structure to store token count/array for a statement on which digest is to be calculated.
Definition: sql_digest.h:98
Definition: mysqlslap.cc:219