MySQL 9.1.0
Source Code Documentation
psi_statement_bits.h File Reference

Performance schema instrumentation interface. More...

#include <stddef.h>
#include <stdint.h>
#include <mysql/components/services/bits/psi_bits.h>

Go to the source code of this file.

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
 

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)
 

Detailed Description

Performance schema instrumentation interface.