MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pfs_digest.h File Reference
#include "pfs_column_types.h"
#include "lf.h"
#include "pfs_stat.h"
Include dependency graph for pfs_digest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PFS_digest_key
struct  PFS_statements_digest_stat

Macros

#define PFS_SIZE_OF_A_TOKEN   2
#define PFS_MD5_SIZE   16

Functions

int init_digest (const PFS_global_param *param)
void cleanup_digest ()
int init_digest_hash (void)
void cleanup_digest_hash (void)
PFS_statement_statfind_or_create_digest (PFS_thread *thread, PSI_digest_storage *digest_storage, const char *schema_name, uint schema_name_length)
void get_digest_text (char *digest_text, PSI_digest_storage *digest_storage)
void reset_esms_by_digest ()
struct PSI_digest_locker * pfs_digest_start_v1 (PSI_statement_locker *locker)
PSI_digest_locker * pfs_digest_add_token_v1 (PSI_digest_locker *locker, uint token, OPAQUE_LEX_YYSTYPE *yylval)
int read_token (PSI_digest_storage *digest_storage, int index, uint *tok)
void store_token (PSI_digest_storage *digest_storage, uint token)
int read_identifier (PSI_digest_storage *digest_storage, int index, char **id_string, int *id_length)
void store_token_identifier (PSI_digest_storage *digest_storage, uint token, uint id_length, const char *id_name)

Variables

bool flag_statements_digest
ulong digest_max
ulong digest_lost
PFS_statements_digest_statstatements_digest_stat_array
LF_HASH digest_hash

Detailed Description

Statement Digest data structures (implementation).

Statement Digest data structures (declarations).

Definition in file pfs_digest.h.

Function Documentation

void cleanup_digest ( void  )

Cleanup table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

Definition at line 109 of file pfs_digest.cc.

Here is the call graph for this function:

int init_digest ( const PFS_global_param param)

Initialize table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

Parameters
digest_sizing

Definition at line 80 of file pfs_digest.cc.

Here is the call graph for this function:

int init_digest_hash ( void  )

Initialize the digest hash.

Returns
0 on success

Definition at line 138 of file pfs_digest.cc.

int read_identifier ( PSI_digest_storage *  digest_storage,
int  index,
char **  id_string,
int *  id_length 
)
inline

Read an identifier from token array.

Definition at line 165 of file pfs_digest.h.

int read_token ( PSI_digest_storage *  digest_storage,
int  index,
uint *  tok 
)
inline

Read a single token from token array.

Definition at line 123 of file pfs_digest.h.

void store_token ( PSI_digest_storage *  digest_storage,
uint  token 
)
inline

Store a single token in token array.

Definition at line 144 of file pfs_digest.h.

void store_token_identifier ( PSI_digest_storage *  digest_storage,
uint  token,
uint  id_length,
const char *  id_name 
)
inline

Store an identifier in token array.

Definition at line 189 of file pfs_digest.h.

Variable Documentation

ulong digest_max

Token array : Token array is an array of bytes to store tokens recieved during parsing. Following is the way token array is formed.

...<non-id-token><non-id-token><id-token><id_len><id_text>...

For Ex: SELECT * FROM T1; <SELECT_TOKEN><*><FROM_TOKEN><ID_TOKEN><2><T1>

Definition at line 60 of file pfs_digest.cc.

bool flag_statements_digest

Consumer flag for table EVENTS_STATEMENTS_SUMMARY_BY_DIGEST.

Definition at line 66 of file pfs_digest.cc.

PFS_statements_digest_stat* statements_digest_stat_array

EVENTS_STATEMENTS_HISTORY_LONG circular buffer.

Definition at line 64 of file pfs_digest.cc.