MySQL 8.0.40
Source Code Documentation
|
#include "sql/sql_digest.h"
#include <assert.h>
#include "lex_string.h"
#include "m_ctype.h"
#include "my_inttypes.h"
#include "my_macros.h"
#include "my_sys.h"
#include "mysql_com.h"
#include "sha2.h"
#include "sql/lexer_yystype.h"
#include "sql/sql_digest_stream.h"
#include "sql/sql_yacc.h"
#include "sql_string.h"
#include "sql/lex_token.h"
Macros | |
#define | LEX_TOKEN_WITH_DEFINITION |
#define | SIZE_OF_A_TOKEN 2 |
Functions | |
ulong | get_max_digest_length () |
uint | read_token (const sql_digest_storage *digest_storage, uint index, uint *tok) |
Read a single token from token array. More... | |
void | store_token (sql_digest_storage *digest_storage, uint token) |
Store a single token in token array. More... | |
uint | read_identifier (const sql_digest_storage *digest_storage, uint index, const char **id_string, int *id_length) |
Read an identifier from token array. More... | |
void | store_token_identifier (sql_digest_storage *digest_storage, uint token, size_t id_length, const char *id_name) |
Store an identifier in token array. More... | |
void | compute_digest_hash (const sql_digest_storage *digest_storage, unsigned char *hash) |
Compute a digest hash. More... | |
void | compute_digest_text (const sql_digest_storage *digest_storage, String *digest_text) |
Compute a digest text. More... | |
static uint | peek_token (const sql_digest_storage *digest, uint index) |
static void | peek_last_two_tokens (const sql_digest_storage *digest_storage, uint last_id_index, uint *t1, uint *t2) |
Function to read last two tokens from token array. More... | |
static void | peek_last_three_tokens (const sql_digest_storage *digest_storage, uint last_id_index, uint *t1, uint *t2, uint *t3) |
Function to read last three tokens from token array. More... | |
sql_digest_state * | digest_add_token (sql_digest_state *state, uint token, Lexer_yystype *yylval) |
sql_digest_state * | digest_reduce_token (sql_digest_state *state, uint token_left, uint token_right) |
Variables | |
ulong | max_digest_length = 0 |
#define LEX_TOKEN_WITH_DEFINITION |
#define SIZE_OF_A_TOKEN 2 |
void compute_digest_hash | ( | const sql_digest_storage * | digest_storage, |
unsigned char * | hash | ||
) |
Compute a digest hash.
digest_storage | The digest | |
[out] | hash | The computed digest hash. This parameter is a buffer of size DIGEST_HASH_SIZE . |
void compute_digest_text | ( | const sql_digest_storage * | digest_storage, |
String * | digest_text | ||
) |
Compute a digest text.
A 'digest text' is a textual representation of a query, where:
digest_storage | The digest | |
[out] | digest_text | The digest text |
sql_digest_state * digest_add_token | ( | sql_digest_state * | state, |
uint | token, | ||
Lexer_yystype * | yylval | ||
) |
sql_digest_state * digest_reduce_token | ( | sql_digest_state * | state, |
uint | token_left, | ||
uint | token_right | ||
) |
ulong get_max_digest_length | ( | ) |
|
inlinestatic |
Function to read last three tokens from token array.
If an identifier is found, do not look for token before that.
|
inlinestatic |
Function to read last two tokens from token array.
If an identifier is found, do not look for token before that.
|
inlinestatic |
|
inline |
Read an identifier from token array.
|
inline |
Read a single token from token array.
|
inline |
Store a single token in token array.
|
inline |
Store an identifier in token array.
ulong max_digest_length = 0 |