MySQL  8.0.20
Source Code Documentation

Classes

struct  PSI_table_locker_state
 State data storage for start_table_io_wait_v1_t, start_table_lock_wait_v1_t. More...
 
struct  PSI_table_bootstrap
 Entry point for the performance schema interface. More...
 
struct  PSI_table_service_v1
 Performance Schema Transaction Interface, version 1. More...
 

Macros

#define PSI_TABLE_VERSION_1   1
 Performance Schema Table Interface number for version 1. More...
 
#define PSI_CURRENT_TABLE_VERSION   1
 Performance Schema Table Interface number for the most recent version. More...
 

Typedefs

typedef struct PSI_table_locker PSI_table_locker
 
typedef enum PSI_table_io_operation PSI_table_io_operation
 
typedef struct PSI_table_locker_state PSI_table_locker_state
 
typedef struct PSI_table_share PSI_table_share
 
typedef struct PSI_table PSI_table
 
typedef enum PSI_table_lock_operation PSI_table_lock_operation
 
typedef struct PSI_table_share *(* get_table_share_v1_t) (bool temporary, struct TABLE_SHARE *share)
 Acquire a table share instrumentation. More...
 
typedef void(* release_table_share_v1_t) (struct PSI_table_share *share)
 Release a table share. More...
 
typedef void(* drop_table_share_v1_t) (bool temporary, const char *schema_name, int schema_name_length, const char *table_name, int table_name_length)
 Drop a table share. More...
 
typedef struct PSI_table *(* open_table_v1_t) (struct PSI_table_share *share, const void *identity)
 Open an instrumentation table handle. More...
 
typedef void(* unbind_table_v1_t) (struct PSI_table *table)
 Unbind a table handle from the current thread. More...
 
typedef PSI_table *(* rebind_table_v1_t) (PSI_table_share *share, const void *identity, PSI_table *table)
 Rebind a table handle to the current thread. More...
 
typedef void(* close_table_v1_t) (struct TABLE_SHARE *server_share, struct PSI_table *table)
 Close an instrumentation table handle. More...
 
typedef struct PSI_table_locker *(* start_table_io_wait_v1_t) (struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_io_operation op, unsigned int index, const char *src_file, unsigned int src_line)
 Record a table instrumentation io wait start event. More...
 
typedef void(* end_table_io_wait_v1_t) (struct PSI_table_locker *locker, unsigned long long numrows)
 Record a table instrumentation io wait end event. More...
 
typedef struct PSI_table_locker *(* start_table_lock_wait_v1_t) (struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_lock_operation op, unsigned long flags, const char *src_file, unsigned int src_line)
 Record a table instrumentation lock wait start event. More...
 
typedef void(* end_table_lock_wait_v1_t) (struct PSI_table_locker *locker)
 Record a table instrumentation lock wait end event. More...
 
typedef void(* unlock_table_v1_t) (struct PSI_table *table)
 Record a table unlock event. More...
 
typedef struct PSI_table_bootstrap PSI_table_bootstrap
 
typedef struct PSI_table_service_v1 PSI_table_service_t
 

Enumerations

enum  PSI_table_io_operation { PSI_TABLE_FETCH_ROW = 0, PSI_TABLE_WRITE_ROW = 1, PSI_TABLE_UPDATE_ROW = 2, PSI_TABLE_DELETE_ROW = 3 }
 IO operation performed on an instrumented table. More...
 
enum  PSI_table_lock_operation { PSI_TABLE_LOCK = 0, PSI_TABLE_EXTERNAL_LOCK = 1 }
 Lock operation performed on an instrumented table. More...
 

Variables

MYSQL_PLUGIN_IMPORT PSI_table_service_tpsi_table_service
 

Detailed Description

Macro Definition Documentation

◆ PSI_CURRENT_TABLE_VERSION

#define PSI_CURRENT_TABLE_VERSION   1

Performance Schema Table Interface number for the most recent version.

The most current version is PSI_TABLE_VERSION_1

◆ PSI_TABLE_VERSION_1

#define PSI_TABLE_VERSION_1   1

Performance Schema Table Interface number for version 1.

This version is supported.

Typedef Documentation

◆ close_table_v1_t

typedef void(* close_table_v1_t) (struct TABLE_SHARE *server_share, struct PSI_table *table)

Close an instrumentation table handle.

Note that the table handle is invalid after this call.

Parameters
tablethe table handle to close

◆ drop_table_share_v1_t

typedef void(* drop_table_share_v1_t) (bool temporary, const char *schema_name, int schema_name_length, const char *table_name, int table_name_length)

Drop a table share.

Parameters
temporaryTrue for temporary tables
schema_namethe table schema name
schema_name_lengththe table schema name length
table_namethe table name
table_name_lengththe table name length

◆ end_table_io_wait_v1_t

typedef void(* end_table_io_wait_v1_t) (struct PSI_table_locker *locker, unsigned long long numrows)

Record a table instrumentation io wait end event.

Parameters
lockera table locker for the running thread
numrowsthe number of rows involved in io

◆ end_table_lock_wait_v1_t

typedef void(* end_table_lock_wait_v1_t) (struct PSI_table_locker *locker)

Record a table instrumentation lock wait end event.

Parameters
lockera table locker for the running thread

◆ get_table_share_v1_t

typedef struct PSI_table_share*(* get_table_share_v1_t) (bool temporary, struct TABLE_SHARE *share)

Acquire a table share instrumentation.

Parameters
temporaryTrue for temporary tables
shareThe SQL layer table share
Returns
a table share instrumentation, or NULL

◆ open_table_v1_t

typedef struct PSI_table*(* open_table_v1_t) (struct PSI_table_share *share, const void *identity)

Open an instrumentation table handle.

Parameters
sharethe table to open
identitytable handle identity
Returns
a table handle, or NULL

◆ PSI_table

typedef struct PSI_table PSI_table

◆ PSI_table_bootstrap

◆ PSI_table_io_operation

◆ PSI_table_lock_operation

◆ PSI_table_locker

◆ PSI_table_locker_state

◆ PSI_table_service_t

◆ PSI_table_share

◆ rebind_table_v1_t

typedef PSI_table*(* rebind_table_v1_t) (PSI_table_share *share, const void *identity, PSI_table *table)

Rebind a table handle to the current thread.

This operation happens when a table from the open table cache is reused for a thread.

Parameters
tablethe table to unbind

◆ release_table_share_v1_t

typedef void(* release_table_share_v1_t) (struct PSI_table_share *share)

Release a table share.

Parameters
sharethe table share to release

◆ start_table_io_wait_v1_t

typedef struct PSI_table_locker*(* start_table_io_wait_v1_t) (struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_io_operation op, unsigned int index, const char *src_file, unsigned int src_line)

Record a table instrumentation io wait start event.

Parameters
statedata storage for the locker
tablethe instrumented table
opthe operation to perform
indexthe operation index
src_filethe source file name
src_linethe source line number

◆ start_table_lock_wait_v1_t

typedef struct PSI_table_locker*(* start_table_lock_wait_v1_t) (struct PSI_table_locker_state *state, struct PSI_table *table, enum PSI_table_lock_operation op, unsigned long flags, const char *src_file, unsigned int src_line)

Record a table instrumentation lock wait start event.

Parameters
statedata storage for the locker
tablethe instrumented table
opthe operation to perform
flagsthe operation flags
src_filethe source file name
src_linethe source line number

◆ unbind_table_v1_t

typedef void(* unbind_table_v1_t) (struct PSI_table *table)

Unbind a table handle from the current thread.

This operation happens when an opened table is added to the open table cache.

Parameters
tablethe table to unbind

◆ unlock_table_v1_t

typedef void(* unlock_table_v1_t) (struct PSI_table *table)

Record a table unlock event.

Parameters
tableinstrumentation for the table being unlocked

Enumeration Type Documentation

◆ PSI_table_io_operation

IO operation performed on an instrumented table.

Enumerator
PSI_TABLE_FETCH_ROW 

Row fetch.

PSI_TABLE_WRITE_ROW 

Row write.

PSI_TABLE_UPDATE_ROW 

Row update.

PSI_TABLE_DELETE_ROW 

Row delete.

◆ PSI_table_lock_operation

Lock operation performed on an instrumented table.

Enumerator
PSI_TABLE_LOCK 

Table lock, in the server layer.

PSI_TABLE_EXTERNAL_LOCK 

Table lock, in the storage engine layer.

Variable Documentation

◆ psi_table_service