MySQL 8.0.39
Source Code Documentation
pfs_digest.h File Reference

Statement Digest data structures (declarations). More...

#include <sys/types.h>
#include <atomic>
#include "lf.h"
#include "my_inttypes.h"
#include "mysql_com.h"
#include "sql/sql_digest.h"
#include "storage/perfschema/pfs_column_types.h"
#include "storage/perfschema/pfs_histogram.h"
#include "storage/perfschema/pfs_lock.h"
#include "storage/perfschema/pfs_name.h"
#include "storage/perfschema/pfs_stat.h"

Go to the source code of this file.

Classes

struct  PFS_digest_key
 Structure to store a hash value (digest) for a statement. More...
 
struct  PFS_statements_digest_stat
 A statement digest stat record. More...
 

Functions

int init_digest (const PFS_global_param *param)
 Initialize table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST. More...
 
void cleanup_digest ()
 Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST. More...
 
int init_digest_hash (const PFS_global_param *param)
 Initialize the digest hash. More...
 
void cleanup_digest_hash ()
 
PFS_statements_digest_statfind_or_create_digest (PFS_thread *thread, const sql_digest_storage *digest_storage, const char *schema_name, uint schema_name_length)
 
void reset_esms_by_digest ()
 
void reset_histogram_by_digest ()
 

Variables

bool flag_statements_digest
 Consumer flag for table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST. More...
 
size_t digest_max
 
ulong digest_lost
 
PFS_statements_digest_statstatements_digest_stat_array
 EVENTS_STATEMENTS_SUMMARY_BY_DIGEST buffer. More...
 
LF_HASH digest_hash
 

Detailed Description

Statement Digest data structures (declarations).

Function Documentation

◆ cleanup_digest()

void cleanup_digest ( )

Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

◆ cleanup_digest_hash()

void cleanup_digest_hash ( )

◆ find_or_create_digest()

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 
)

◆ init_digest()

int init_digest ( const PFS_global_param param)

Initialize table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

Parameters
paramperformance schema sizing

◆ init_digest_hash()

int init_digest_hash ( const PFS_global_param param)

Initialize the digest hash.

Returns
0 on success

◆ reset_esms_by_digest()

void reset_esms_by_digest ( )

◆ reset_histogram_by_digest()

void reset_histogram_by_digest ( )

Variable Documentation

◆ digest_hash

LF_HASH digest_hash
extern

◆ digest_lost

ulong digest_lost
extern

◆ digest_max

size_t digest_max
extern

◆ flag_statements_digest

bool flag_statements_digest
extern

Consumer flag for table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

◆ statements_digest_stat_array

PFS_statements_digest_stat* statements_digest_stat_array
extern

EVENTS_STATEMENTS_SUMMARY_BY_DIGEST buffer.