24#ifndef PLUGIN_PFS_TABLE_PLUGIN_POC_PLUGIN_COUNTRY_H_
25#define PLUGIN_PFS_TABLE_PLUGIN_POC_PLUGIN_COUNTRY_H_
37#define COUNTRY_MAX_ROWS 10
125 record->continent_name_length,
160 unsigned int idx,
int find_flag);
Definition: pfs_example_country.h:70
void set_at(unsigned int index)
Definition: pfs_example_country.h:88
Country_POS()
Definition: pfs_example_country.h:76
unsigned int m_index
Definition: pfs_example_country.h:72
bool has_more()
Definition: pfs_example_country.h:78
void set_after(Country_POS *pos)
Definition: pfs_example_country.h:92
void set_at(Country_POS *pos)
Definition: pfs_example_country.h:90
void next()
Definition: pfs_example_country.h:82
unsigned int get_index()
Definition: pfs_example_country.h:86
void reset()
Definition: pfs_example_country.h:84
Definition: pfs_example_country.h:107
bool match(Country_record *record) override
Definition: pfs_example_country.h:115
PSI_plugin_key_string m_country_name
Definition: pfs_example_country.h:112
PSI_plugin_key_string m_continent_name
Definition: pfs_example_country.h:109
char m_country_name_buffer[COUNTRY_NAME_LEN]
Definition: pfs_example_country.h:113
char m_continent_name_buffer[CONTINENT_NAME_LEN]
Definition: pfs_example_country.h:110
Definition: pfs_example_country.h:95
Country_index()
Definition: pfs_example_country.h:97
unsigned int m_fields
Definition: pfs_example_country.h:103
virtual bool match(Country_record *record)=0
virtual ~Country_index()=default
Definition: pfs_example_country.h:47
char country_code[COUNTRY_CODE_LEN]
Definition: pfs_example_country.h:53
char name[COUNTRY_NAME_LEN]
Definition: pfs_example_country.h:49
unsigned int continent_name_length
Definition: pfs_example_country.h:52
PSI_year year
Definition: pfs_example_country.h:55
bool m_exist
Definition: pfs_example_country.h:59
PSI_bigint population
Definition: pfs_example_country.h:56
unsigned int country_code_length
Definition: pfs_example_country.h:54
PSI_double growth_factor
Definition: pfs_example_country.h:57
char continent_name[CONTINENT_NAME_LEN]
Definition: pfs_example_country.h:51
unsigned int name_length
Definition: pfs_example_country.h:50
static int record
Definition: mysqltest.cc:193
const mysql_service_pfs_plugin_column_string_v2_t * pc_string_srv
Definition: pfs.cc:44
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:64
#define COUNTRY_CODE_LEN
Definition: pfs_example_component_population.h:47
#define CONTINENT_NAME_LEN
Definition: pfs_example_component_population.h:46
#define COUNTRY_NAME_LEN
Definition: pfs_example_component_population.h:45
int country_index_read(PSI_index_handle *index, PSI_key_reader *reader, unsigned int idx, int find_flag)
Definition: pfs_example_country.cc:175
native_mutex_t LOCK_country_records_array
Definition: pfs_example_country.cc:30
#define COUNTRY_MAX_ROWS
Definition: pfs_example_country.h:37
int country_delete_all_rows(void)
Definition: pfs_example_country.cc:423
int country_update_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:351
unsigned long long country_get_row_count(void)
Definition: pfs_example_country.cc:433
int country_rnd_next(PSI_table_handle *handle)
Definition: pfs_example_country.cc:109
int country_write_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:311
int country_read_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:234
void init_country_share(PFS_engine_table_share_proxy *share)
Definition: pfs_example_country.cc:435
int country_index_next(PSI_table_handle *handle)
Definition: pfs_example_country.cc:197
int country_rnd_init(PSI_table_handle *h, bool scan)
Definition: pfs_example_country.cc:126
int country_write_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:269
int country_delete_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:408
PFS_engine_table_share_proxy country_st_share
Definition: pfs_example_country.cc:29
PSI_table_handle * country_open_table(PSI_pos **pos)
Instantiate Country_Table_Handle at plugin code when corresponding table in performance schema is ope...
Definition: pfs_example_country.cc:71
void country_close_table(PSI_table_handle *handle)
Destroy the Country_Table_Handle at plugin code when corresponding table in performance schema is clo...
Definition: pfs_example_country.cc:88
void country_reset_position(PSI_table_handle *handle)
Definition: pfs_example_country.cc:226
int country_index_init(PSI_table_handle *handle, unsigned int idx, bool sorted, PSI_index_handle **index)
Definition: pfs_example_country.cc:142
int country_update_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:369
Country_record country_records_array[COUNTRY_MAX_ROWS]
An array to keep rows of the tables.
Definition: pfs_example_country.cc:38
int country_rnd_pos(PSI_table_handle *handle)
Definition: pfs_example_country.cc:129
struct PSI_table_handle PSI_table_handle
This is an opaque structure to denote table handle in plugin/component code.
Definition: pfs_plugin_table_service.h:97
struct PSI_pos PSI_pos
This is an opaque structure to denote cursor position in plugin/component code.
Definition: pfs_plugin_table_service.h:102
#define PSI_bigint
Definition: pfs_plugin_table_service.h:150
#define PSI_year
Definition: pfs_plugin_table_service.h:152
struct PSI_key_reader PSI_key_reader
This is an opaque structure to denote Key Reader in plugin/component code.
Definition: pfs_plugin_table_service.h:106
struct PSI_index_handle PSI_index_handle
This is an opaque structure to denote Index Handle in plugin/component code.
Definition: pfs_plugin_table_service.h:110
struct PSI_field PSI_field
This is an opaque structure to denote filed in plugin/component code.
Definition: pfs_plugin_table_service.h:93
Specifies macros to define Service Implementations.
Definition: pfs_example_country.h:136
Country_POS m_pos
Definition: pfs_example_country.h:138
Country_record current_row
Definition: pfs_example_country.h:143
Country_index_by_name m_index
Definition: pfs_example_country.h:146
unsigned int index_num
Definition: pfs_example_country.h:149
Country_POS m_next_pos
Definition: pfs_example_country.h:140
A share to be initialized by plugin/component code and to be provided to add_table() service method o...
Definition: pfs_plugin_table_service.h:462
Definition: pfs_plugin_table_service.h:136
A structure to denote a key of type string in an index.
Definition: pfs_plugin_table_service.h:226
bool(* match_key_string)(bool record_null, const char *record_string_value, unsigned int record_string_length, PSI_plugin_key_string *key)
Definition: pfs_plugin_table_service.h:623
MySQL mutex implementation.
pthread_mutex_t native_mutex_t
Definition: thr_mutex_bits.h:55