MySQL 8.4.3
Source Code Documentation
|
Classes | |
struct | PSI_statement_info_v1 |
Statement instrument information. More... | |
struct | PSI_statement_locker_state_v5 |
State data storage for get_thread_statement_locker_v5_t . More... | |
struct | PSI_sp_locker_state_v1 |
struct | PSI_statement_bootstrap |
Entry point for the performance schema interface. More... | |
struct | PSI_statement_service_v1 |
Performance Schema Statement Interface, version 1. More... | |
struct | PSI_statement_service_v2 |
Performance Schema Statement Interface, version 2. More... | |
struct | PSI_statement_service_v3 |
Performance Schema Statement Interface, version 3. More... | |
struct | PSI_statement_service_v4 |
Performance Schema Statement Interface, version 4. More... | |
struct | PSI_statement_service_v5 |
Performance Schema Statement Interface, version 5. More... | |
Macros | |
#define | PSI_STATEMENT_VERSION_1 1 |
Performance Schema Statement Interface number for version 1. More... | |
#define | PSI_STATEMENT_VERSION_2 2 |
Performance Schema Statement Interface number for version 2. More... | |
#define | PSI_STATEMENT_VERSION_3 3 |
Performance Schema Statement Interface number for version 3. More... | |
#define | PSI_STATEMENT_VERSION_4 4 |
Performance Schema Statement Interface number for version 4. More... | |
#define | PSI_STATEMENT_VERSION_5 5 |
Performance Schema Statement Interface number for version 5. More... | |
#define | PSI_CURRENT_STATEMENT_VERSION 5 |
Performance Schema Statement Interface number for the most recent version. More... | |
#define | PSI_SCHEMA_NAME_LEN (64 * 3) |
Typedefs | |
typedef unsigned int | PSI_statement_key |
Instrumented statement key. More... | |
typedef struct PSI_statement_locker | PSI_statement_locker |
typedef struct PSI_prepared_stmt | PSI_prepared_stmt |
typedef struct PSI_digest_locker | PSI_digest_locker |
typedef struct PSI_sp_share | PSI_sp_share |
typedef struct PSI_sp_locker | PSI_sp_locker |
typedef struct PSI_statement_info_v1 | PSI_statement_info_v1 |
typedef struct PSI_statement_locker_state_v5 | PSI_statement_locker_state_v5 |
typedef struct PSI_sp_locker_state_v1 | PSI_sp_locker_state_v1 |
typedef void(* | register_statement_v1_t) (const char *category, struct PSI_statement_info_v1 *info, int count) |
Statement registration API. More... | |
typedef struct PSI_statement_locker *(* | get_thread_statement_locker_v5_t) (struct PSI_statement_locker_state_v5 *state, PSI_statement_key key, const void *charset, PSI_sp_share *sp_share) |
Get a statement instrumentation locker. More... | |
typedef struct PSI_statement_locker *(* | refine_statement_v1_t) (struct PSI_statement_locker *locker, PSI_statement_key key) |
Refine a statement locker to a more specific key. More... | |
typedef void(* | start_statement_v1_t) (struct PSI_statement_locker *locker, const char *db, unsigned int db_length, const char *src_file, unsigned int src_line) |
Start a new statement event. More... | |
typedef void(* | set_statement_text_v1_t) (struct PSI_statement_locker *locker, const char *text, unsigned int text_len) |
Set the statement text for a statement event. More... | |
typedef void(* | set_statement_query_id_t) (struct PSI_statement_locker *locker, unsigned long long query_id) |
Set a statement query id. More... | |
typedef void(* | set_statement_lock_time_t) (struct PSI_statement_locker *locker, unsigned long long lock_time) |
Set a statement event lock time. More... | |
typedef void(* | set_statement_rows_sent_t) (struct PSI_statement_locker *locker, unsigned long long count) |
Set a statement event rows sent metric. More... | |
typedef void(* | set_statement_rows_examined_t) (struct PSI_statement_locker *locker, unsigned long long count) |
Set a statement event rows examined metric. More... | |
typedef void(* | inc_statement_created_tmp_disk_tables_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "created tmp disk tables" metric. More... | |
typedef void(* | inc_statement_created_tmp_tables_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "created tmp tables" metric. More... | |
typedef void(* | inc_statement_select_full_join_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select full join" metric. More... | |
typedef void(* | inc_statement_select_full_range_join_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select full range join" metric. More... | |
typedef void(* | inc_statement_select_range_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select range join" metric. More... | |
typedef void(* | inc_statement_select_range_check_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select range check" metric. More... | |
typedef void(* | inc_statement_select_scan_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select scan" metric. More... | |
typedef void(* | inc_statement_sort_merge_passes_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort merge passes" metric. More... | |
typedef void(* | inc_statement_sort_range_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort range" metric. More... | |
typedef void(* | inc_statement_sort_rows_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort rows" metric. More... | |
typedef void(* | inc_statement_sort_scan_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort scan" metric. More... | |
typedef void(* | set_statement_no_index_used_t) (struct PSI_statement_locker *locker) |
Set a statement event "no index used" metric. More... | |
typedef void(* | set_statement_no_good_index_used_t) (struct PSI_statement_locker *locker) |
Set a statement event "no good index used" metric. More... | |
typedef void(* | set_statement_secondary_engine_v3_t) (struct PSI_statement_locker *locker, bool secondary) |
Set a statement EXECUTION_ENGINE attribute. More... | |
typedef void(* | end_statement_v1_t) (struct PSI_statement_locker *locker, void *stmt_da) |
End a statement event. More... | |
typedef PSI_prepared_stmt *(* | create_prepared_stmt_v1_t) (void *identity, unsigned int stmt_id, PSI_statement_locker *locker, const char *stmt_name, size_t stmt_name_length, const char *sql_text, size_t sql_text_length) |
Get a prepare statement. More... | |
typedef void(* | destroy_prepared_stmt_v1_t) (PSI_prepared_stmt *prepared_stmt) |
destroy a prepare statement. More... | |
typedef void(* | reprepare_prepared_stmt_v1_t) (PSI_prepared_stmt *prepared_stmt) |
reprepare a prepare statement. More... | |
typedef void(* | execute_prepared_stmt_v1_t) (PSI_statement_locker *locker, PSI_prepared_stmt *prepared_stmt) |
Record a prepare statement instrumentation execute event. More... | |
typedef void(* | set_prepared_stmt_text_v1_t) (PSI_prepared_stmt *prepared_stmt, const char *text, unsigned int text_len) |
Set the statement text for a prepared statement event. More... | |
typedef void(* | set_prepared_stmt_secondary_engine_v3_t) (PSI_prepared_stmt *prepared_stmt, bool secondary) |
Set a prepared statement EXECUTION_ENGINE attribute. More... | |
typedef struct PSI_digest_locker *(* | digest_start_v1_t) (struct PSI_statement_locker *locker) |
Get a digest locker for the current statement. More... | |
typedef void(* | digest_end_v1_t) (struct PSI_digest_locker *locker, const struct sql_digest_storage *digest) |
Add a computed digest to the current digest instrumentation. More... | |
typedef struct PSI_sp_share *(* | get_sp_share_v1_t) (unsigned int object_type, const char *schema_name, unsigned int schema_name_length, const char *object_name, unsigned int object_name_length) |
Acquire a sp share instrumentation. More... | |
typedef void(* | release_sp_share_v1_t) (struct PSI_sp_share *share) |
Release a stored program share. More... | |
typedef PSI_sp_locker *(* | start_sp_v1_t) (struct PSI_sp_locker_state_v1 *state, struct PSI_sp_share *sp_share) |
typedef void(* | end_sp_v1_t) (struct PSI_sp_locker *locker) |
typedef void(* | drop_sp_v1_t) (unsigned int object_type, const char *schema_name, unsigned int schema_name_length, const char *object_name, unsigned int object_name_length) |
typedef struct PSI_statement_info_v1 | PSI_statement_info |
typedef struct PSI_statement_locker_state_v5 | PSI_statement_locker_state |
typedef struct PSI_sp_locker_state_v1 | PSI_sp_locker_state |
typedef void(* | notify_statement_query_attributes_v5_t) (struct PSI_statement_locker *locker, bool with_query_attributes) |
typedef void(* | statement_abort_telemetry_v5_t) (PSI_statement_locker *locker) |
typedef struct PSI_statement_bootstrap | PSI_statement_bootstrap |
typedef struct PSI_statement_service_v5 | PSI_statement_service_t |
Variables | |
MYSQL_PLUGIN_IMPORT PSI_statement_service_t * | psi_statement_service |
#define PSI_CURRENT_STATEMENT_VERSION 5 |
Performance Schema Statement Interface number for the most recent version.
The most current version is PSI_STATEMENT_VERSION_5
#define PSI_SCHEMA_NAME_LEN (64 * 3) |
#define PSI_STATEMENT_VERSION_1 1 |
Performance Schema Statement Interface number for version 1.
This version is obsolete.
#define PSI_STATEMENT_VERSION_2 2 |
Performance Schema Statement Interface number for version 2.
This version is obsolete.
#define PSI_STATEMENT_VERSION_3 3 |
Performance Schema Statement Interface number for version 3.
This version is obsolete.
#define PSI_STATEMENT_VERSION_4 4 |
Performance Schema Statement Interface number for version 4.
This version is obsolete.
#define PSI_STATEMENT_VERSION_5 5 |
Performance Schema Statement Interface number for version 5.
This version is supported.
typedef PSI_prepared_stmt *(* create_prepared_stmt_v1_t) (void *identity, unsigned int stmt_id, PSI_statement_locker *locker, const char *stmt_name, size_t stmt_name_length, const char *sql_text, size_t sql_text_length) |
Get a prepare statement.
identity | Prepared statement identity, typically a memory address. |
stmt_id | Prepared statement identifier. |
locker | A statement locker for the running thread. |
stmt_name | Prepared statement name. |
stmt_name_length | Prepared statement name length. |
sql_text | Query text. |
sql_text_length | Query text length. |
typedef void(* destroy_prepared_stmt_v1_t) (PSI_prepared_stmt *prepared_stmt) |
destroy a prepare statement.
prepared_stmt | prepared statement. |
typedef void(* digest_end_v1_t) (struct PSI_digest_locker *locker, const struct sql_digest_storage *digest) |
Add a computed digest to the current digest instrumentation.
locker | a digest locker for the current statement |
digest | the computed digest |
typedef struct PSI_digest_locker *(* digest_start_v1_t) (struct PSI_statement_locker *locker) |
Get a digest locker for the current statement.
locker | a statement locker for the running thread |
typedef void(* drop_sp_v1_t) (unsigned int object_type, const char *schema_name, unsigned int schema_name_length, const char *object_name, unsigned int object_name_length) |
typedef void(* end_sp_v1_t) (struct PSI_sp_locker *locker) |
typedef void(* end_statement_v1_t) (struct PSI_statement_locker *locker, void *stmt_da) |
End a statement event.
locker | the statement locker |
stmt_da | the statement diagnostics area. |
typedef void(* execute_prepared_stmt_v1_t) (PSI_statement_locker *locker, PSI_prepared_stmt *prepared_stmt) |
Record a prepare statement instrumentation execute event.
locker | a statement locker for the running thread. |
prepared_stmt | prepared statement. |
typedef struct PSI_sp_share *(* get_sp_share_v1_t) (unsigned int object_type, const char *schema_name, unsigned int schema_name_length, const char *object_name, unsigned int object_name_length) |
Acquire a sp share instrumentation.
object_type | type of stored program |
schema_name | schema name of stored program |
schema_name_length | length of schema_name |
object_name | object name of stored program |
object_name_length | length of object_name |
typedef struct PSI_statement_locker *(* get_thread_statement_locker_v5_t) (struct PSI_statement_locker_state_v5 *state, PSI_statement_key key, const void *charset, PSI_sp_share *sp_share) |
Get a statement instrumentation locker.
state | data storage for the locker |
key | the statement instrumentation key |
charset | client character set |
sp_share | Parent stored procedure share, if any. |
typedef void(* inc_statement_created_tmp_disk_tables_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "created tmp disk tables" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_created_tmp_tables_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "created tmp tables" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_select_full_join_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select full join" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_select_full_range_join_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select full range join" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_select_range_check_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select range check" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_select_range_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select range join" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_select_scan_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "select scan" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_sort_merge_passes_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort merge passes" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_sort_range_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort range" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_sort_rows_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort rows" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* inc_statement_sort_scan_t) (struct PSI_statement_locker *locker, unsigned long count) |
Increment a statement event "sort scan" metric.
locker | the statement locker |
count | the metric increment value |
typedef void(* notify_statement_query_attributes_v5_t) (struct PSI_statement_locker *locker, bool with_query_attributes) |
typedef struct PSI_digest_locker PSI_digest_locker |
typedef struct PSI_prepared_stmt PSI_prepared_stmt |
typedef struct PSI_sp_locker PSI_sp_locker |
typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state |
typedef struct PSI_sp_locker_state_v1 PSI_sp_locker_state_v1 |
typedef struct PSI_sp_share PSI_sp_share |
typedef struct PSI_statement_bootstrap PSI_statement_bootstrap |
typedef struct PSI_statement_info_v1 PSI_statement_info |
typedef struct PSI_statement_info_v1 PSI_statement_info_v1 |
typedef unsigned int PSI_statement_key |
Instrumented statement key.
To instrument a statement, a statement key must be obtained using register_statement
. Using a zero key always disable the instrumentation.
typedef struct PSI_statement_locker PSI_statement_locker |
typedef struct PSI_statement_locker_state_v5 PSI_statement_locker_state |
typedef struct PSI_statement_locker_state_v5 PSI_statement_locker_state_v5 |
typedef struct PSI_statement_service_v5 PSI_statement_service_t |
typedef struct PSI_statement_locker *(* refine_statement_v1_t) (struct PSI_statement_locker *locker, PSI_statement_key key) |
Refine a statement locker to a more specific key.
Note that only events declared mutable can be refined.
locker | the statement locker for the current event |
key | the new key for the event |
typedef void(* register_statement_v1_t) (const char *category, struct PSI_statement_info_v1 *info, int count) |
Statement registration API.
category | a category name |
info | an array of statement info to register |
count | the size of the info array |
typedef void(* release_sp_share_v1_t) (struct PSI_sp_share *share) |
Release a stored program share.
share | the stored program share to release |
typedef void(* reprepare_prepared_stmt_v1_t) (PSI_prepared_stmt *prepared_stmt) |
reprepare a prepare statement.
prepared_stmt | prepared statement. |
typedef void(* set_prepared_stmt_secondary_engine_v3_t) (PSI_prepared_stmt *prepared_stmt, bool secondary) |
Set a prepared statement EXECUTION_ENGINE attribute.
prepared_stmt | prepared statement. |
secondary | True for SECONDARY, false for PRIMARY. |
typedef void(* set_prepared_stmt_text_v1_t) (PSI_prepared_stmt *prepared_stmt, const char *text, unsigned int text_len) |
Set the statement text for a prepared statement event.
prepared_stmt | prepared statement. |
text | the prepared statement text |
text_len | the prepared statement text length |
typedef void(* set_statement_lock_time_t) (struct PSI_statement_locker *locker, unsigned long long lock_time) |
Set a statement event lock time.
locker | the statement locker |
lock_time | the locked time, in microseconds |
typedef void(* set_statement_no_good_index_used_t) (struct PSI_statement_locker *locker) |
Set a statement event "no good index used" metric.
locker | the statement locker |
typedef void(* set_statement_no_index_used_t) (struct PSI_statement_locker *locker) |
Set a statement event "no index used" metric.
locker | the statement locker |
typedef void(* set_statement_query_id_t) (struct PSI_statement_locker *locker, unsigned long long query_id) |
Set a statement query id.
Introduced in MySQL 8.0.14
locker | the statement locker |
query_id | the query id |
typedef void(* set_statement_rows_examined_t) (struct PSI_statement_locker *locker, unsigned long long count) |
Set a statement event rows examined metric.
locker | the statement locker |
count | the number of rows examined |
typedef void(* set_statement_rows_sent_t) (struct PSI_statement_locker *locker, unsigned long long count) |
Set a statement event rows sent metric.
locker | the statement locker |
count | the number of rows sent |
typedef void(* set_statement_secondary_engine_v3_t) (struct PSI_statement_locker *locker, bool secondary) |
Set a statement EXECUTION_ENGINE attribute.
locker | the statement locker |
secondary | True for SECONDARY, false for PRIMARY. |
typedef void(* set_statement_text_v1_t) (struct PSI_statement_locker *locker, const char *text, unsigned int text_len) |
Set the statement text for a statement event.
Note that the statement text pointer must remain valid until end statement is called.
locker | the current statement locker |
text | the statement text |
text_len | the statement text length |
typedef PSI_sp_locker *(* start_sp_v1_t) (struct PSI_sp_locker_state_v1 *state, struct PSI_sp_share *sp_share) |
typedef void(* start_statement_v1_t) (struct PSI_statement_locker *locker, const char *db, unsigned int db_length, const char *src_file, unsigned int src_line) |
Start a new statement event.
locker | the statement locker for this event |
db | the active database name for this statement |
db_length | the active database name length for this statement |
src_file | source file name |
src_line | source line number |
typedef void(* statement_abort_telemetry_v5_t) (PSI_statement_locker *locker) |
|
extern |