95 void reset_data(
unsigned char *token_array,
size_t token_array_length,
96 char *query_sample_array);
102 const ulonglong age = m_last_seen - m_query_sample_seen;
108 m_query_sample_timer_wait.store(
wait_time);
117 return (uint)m_query_sample_refs.fetch_add(1);
123 return (uint)m_query_sample_refs.fetch_sub(1);
134 const char *schema_name, uint schema_name_length);
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
static int wait_time
Definition: mysql.cc:215
Common definition between mysql server & client.
Data types for columns used in the performance schema tables (declarations)
int init_digest(const PFS_global_param *param)
Initialize table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.
Definition: pfs_digest.cc:77
bool flag_statements_digest
Consumer flag for table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.
Definition: pfs_digest.cc:62
int init_digest_hash(const PFS_global_param *param)
Initialize the digest hash.
Definition: pfs_digest.cc:226
PFS_statements_digest_stat * statements_digest_stat_array
EVENTS_STATEMENTS_SUMMARY_BY_DIGEST buffer.
Definition: pfs_digest.cc:58
LF_HASH digest_hash
Definition: pfs_digest.cc:70
void cleanup_digest_hash()
Definition: pfs_digest.cc:237
void cleanup_digest()
Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.
Definition: pfs_digest.cc:147
ulong digest_lost
Definition: pfs_digest.cc:55
PFS_statements_digest_stat * find_or_create_digest(PFS_thread *thread, const sql_digest_storage *digest_storage, const char *schema_name, uint schema_name_length)
Definition: pfs_digest.cc:254
void reset_esms_by_digest()
Definition: pfs_digest.cc:427
size_t digest_max
Definition: pfs_digest.cc:54
void reset_histogram_by_digest()
Definition: pfs_digest.cc:459
#define PFS_ALIGNED
Definition: pfs_global.h:57
Performance schema internal locks (declarations).
Object names (declarations).
Statistics (declarations).
#define DIGEST_HASH_SIZE
DIGEST hash size, in bytes.
Definition: sql_digest.h:90
Structure to store a hash value (digest) for a statement.
Definition: pfs_digest.h:53
PFS_schema_name m_schema_name
Definition: pfs_digest.h:54
unsigned char m_hash[DIGEST_HASH_SIZE]
Definition: pfs_digest.h:55
Performance schema global sizing parameters.
Definition: pfs_server.h:119
Definition: pfs_histogram.h:38
Definition: pfs_name.h:188
Statistics for statement usage.
Definition: pfs_stat.h:376
A statement digest stat record.
Definition: pfs_digest.h:59
sql_digest_storage m_digest_storage
Digest Storage.
Definition: pfs_digest.h:67
ulonglong m_query_sample_seen
Query sample seen timestamp.
Definition: pfs_digest.h:81
ulonglong get_sample_timer_wait()
Get the query sample wait time.
Definition: pfs_digest.h:112
std::atomic< std::uint32_t > m_query_sample_refs
Query sample reference count.
Definition: pfs_digest.h:85
uint m_query_sample_cs_number
Statement character set number.
Definition: pfs_digest.h:79
ulonglong m_last_seen
Definition: pfs_digest.h:89
ulonglong get_sample_age() const
Get the age in micro seconds of the last query sample.
Definition: pfs_digest.h:101
PFS_digest_key m_digest_key
Digest Schema + Digest Hash.
Definition: pfs_digest.h:64
uint dec_sample_ref()
Decrement the query sample reference count.
Definition: pfs_digest.h:121
char * m_query_sample
Query sample SQL text.
Definition: pfs_digest.h:73
uint inc_sample_ref()
Increment the query sample reference count.
Definition: pfs_digest.h:115
PFS_statement_stat m_stat
Statement stat.
Definition: pfs_digest.h:70
std::atomic< std::uint64_t > m_query_sample_timer_wait
Query sample timer wait.
Definition: pfs_digest.h:83
void set_sample_timer_wait(ulonglong wait_time)
Set the query sample wait time.
Definition: pfs_digest.h:107
pfs_lock m_lock
Internal lock.
Definition: pfs_digest.h:61
size_t m_query_sample_length
Length of m_query_sample.
Definition: pfs_digest.h:75
bool m_query_sample_truncated
True if m_query_sample was truncated.
Definition: pfs_digest.h:77
PFS_histogram m_histogram
Definition: pfs_digest.h:92
ulonglong m_first_seen
First and last seen timestamps.
Definition: pfs_digest.h:88
Instrumented thread implementation.
Definition: pfs_instr.h:375
A 'lock' protecting performance schema internal buffers.
Definition: pfs_lock.h:154
Structure to store token count/array for a statement on which digest is to be calculated.
Definition: sql_digest.h:98