MySQL 8.4.2
Source Code Documentation
pfs_example_machine.h File Reference

Go to the source code of this file.

Classes

struct  Machine_Record
 
class  Machine_POS
 
struct  Machine_Table_Handle
 

Macros

#define MACHINE_MADE_LEN   20 * 4
 

Enumerations

enum  machine_type_enum { LAPTOP = 1 , DESKTOP = 2 , MOBILE = 3 , TYPE_END = 4 }
 

Functions

PSI_table_handlemachine_open_table (PSI_pos **pos)
 Instantiate Machine_Table_Handle at plugin code when corresponding table in performance schema is opened. More...
 
void machine_close_table (PSI_table_handle *handle)
 Destroy the Machine_Table_Handle at plugin code when corresponding table in performance schema is closed. More...
 
int machine_rnd_next (PSI_table_handle *handle)
 
int machine_rnd_init (PSI_table_handle *h, bool scan)
 
int machine_rnd_pos (PSI_table_handle *handle)
 
int machine_index_init (PSI_table_handle *handle, uint idx, bool sorted, PSI_index_handle **index)
 
int machine_index_read (PSI_index_handle *index, PSI_key_reader *reader, unsigned int idx, int find_flag)
 
int machine_index_next (PSI_table_handle *handle)
 
void machine_reset_position (PSI_table_handle *handle)
 
int machine_read_column_value (PSI_table_handle *handle, PSI_field *field, uint index)
 
int machine_write_row_values (PSI_table_handle *handle)
 
int machine_write_column_value (PSI_table_handle *handle, PSI_field *field, unsigned int index)
 
int machine_update_row_values (PSI_table_handle *handle)
 
int machine_update_column_value (PSI_table_handle *handle, PSI_field *field, unsigned int index)
 
int machine_delete_row_values (PSI_table_handle *handle)
 
int machine_delete_all_rows (void)
 
unsigned long long machine_get_row_count (void)
 
void init_machine_share (PFS_engine_table_share_proxy *share)
 

Variables

const mysql_service_pfs_plugin_column_integer_v1_tcol_int_svc
 
const mysql_service_pfs_plugin_column_enum_v1_tcol_enum_svc
 
const mysql_service_pfs_plugin_column_string_v2_tcol_string_svc
 
PFS_engine_table_share_proxy machine_st_share
 
mysql_mutex_t LOCK_machine_records_array
 
std::vector< Machine_Recordmachine_records_vector
 An array to keep rows of the tables. More...
 

Macro Definition Documentation

◆ MACHINE_MADE_LEN

#define MACHINE_MADE_LEN   20 * 4

Enumeration Type Documentation

◆ machine_type_enum

Enumerator
LAPTOP 
DESKTOP 
MOBILE 
TYPE_END 

Function Documentation

◆ init_machine_share()

void init_machine_share ( PFS_engine_table_share_proxy share)

◆ machine_close_table()

void machine_close_table ( PSI_table_handle handle)

Destroy the Machine_Table_Handle at plugin code when corresponding table in performance schema is closed.

◆ machine_delete_all_rows()

int machine_delete_all_rows ( void  )

◆ machine_delete_row_values()

int machine_delete_row_values ( PSI_table_handle handle)

◆ machine_get_row_count()

unsigned long long machine_get_row_count ( void  )

◆ machine_index_init()

int machine_index_init ( PSI_table_handle handle,
uint  idx,
bool  sorted,
PSI_index_handle **  index 
)

◆ machine_index_next()

int machine_index_next ( PSI_table_handle handle)

◆ machine_index_read()

int machine_index_read ( PSI_index_handle index,
PSI_key_reader reader,
unsigned int  idx,
int  find_flag 
)

◆ machine_open_table()

PSI_table_handle * machine_open_table ( PSI_pos **  pos)

Instantiate Machine_Table_Handle at plugin code when corresponding table in performance schema is opened.

◆ machine_read_column_value()

int machine_read_column_value ( PSI_table_handle handle,
PSI_field field,
uint  index 
)

◆ machine_reset_position()

void machine_reset_position ( PSI_table_handle handle)

◆ machine_rnd_init()

int machine_rnd_init ( PSI_table_handle h,
bool  scan 
)

◆ machine_rnd_next()

int machine_rnd_next ( PSI_table_handle handle)

◆ machine_rnd_pos()

int machine_rnd_pos ( PSI_table_handle handle)

◆ machine_update_column_value()

int machine_update_column_value ( PSI_table_handle handle,
PSI_field field,
unsigned int  index 
)

◆ machine_update_row_values()

int machine_update_row_values ( PSI_table_handle handle)

◆ machine_write_column_value()

int machine_write_column_value ( PSI_table_handle handle,
PSI_field field,
unsigned int  index 
)

◆ machine_write_row_values()

int machine_write_row_values ( PSI_table_handle handle)

Variable Documentation

◆ col_enum_svc

const mysql_service_pfs_plugin_column_enum_v1_t* col_enum_svc
extern

◆ col_int_svc

◆ col_string_svc

const mysql_service_pfs_plugin_column_string_v2_t* col_string_svc
extern

◆ LOCK_machine_records_array

mysql_mutex_t LOCK_machine_records_array
extern

◆ machine_records_vector

std::vector<Machine_Record> machine_records_vector
extern

An array to keep rows of the tables.

When a row is inserted in plugin table, it will be stored here. When a row is queried from plugin table, it will be fetched from here.

◆ machine_st_share

PFS_engine_table_share_proxy machine_st_share
extern