23#ifndef PLUGIN_PFS_TABLE_PLUGIN_POC_PLUGIN_COUNTRY_H_
24#define PLUGIN_PFS_TABLE_PLUGIN_POC_PLUGIN_COUNTRY_H_
36#define COUNTRY_MAX_ROWS 10
114 if (!pc_string_srv->match_key_string(
121 if (!pc_string_srv->match_key_string(
false,
record->continent_name,
122 record->continent_name_length,
157 unsigned int idx,
int find_flag);
Definition: pfs_example_country.h:67
void set_at(unsigned int index)
Definition: pfs_example_country.h:85
Country_POS()
Definition: pfs_example_country.h:73
unsigned int m_index
Definition: pfs_example_country.h:69
bool has_more()
Definition: pfs_example_country.h:75
void set_after(Country_POS *pos)
Definition: pfs_example_country.h:89
void set_at(Country_POS *pos)
Definition: pfs_example_country.h:87
void next()
Definition: pfs_example_country.h:79
unsigned int get_index()
Definition: pfs_example_country.h:83
void reset()
Definition: pfs_example_country.h:81
Definition: pfs_example_country.h:104
bool match(Country_record *record) override
Definition: pfs_example_country.h:112
PSI_plugin_key_string m_country_name
Definition: pfs_example_country.h:109
PSI_plugin_key_string m_continent_name
Definition: pfs_example_country.h:106
char m_country_name_buffer[COUNTRY_NAME_LEN]
Definition: pfs_example_country.h:110
char m_continent_name_buffer[CONTINENT_NAME_LEN]
Definition: pfs_example_country.h:107
Definition: pfs_example_country.h:92
Country_index()
Definition: pfs_example_country.h:94
unsigned int m_fields
Definition: pfs_example_country.h:100
virtual bool match(Country_record *record)=0
virtual ~Country_index()=default
Definition: pfs_example_country.h:46
char name[COUNTRY_NAME_LEN]
Definition: pfs_example_country.h:48
unsigned int continent_name_length
Definition: pfs_example_country.h:51
PSI_year year
Definition: pfs_example_country.h:52
bool m_exist
Definition: pfs_example_country.h:56
PSI_bigint population
Definition: pfs_example_country.h:53
PSI_double growth_factor
Definition: pfs_example_country.h:54
char continent_name[CONTINENT_NAME_LEN]
Definition: pfs_example_country.h:50
unsigned int name_length
Definition: pfs_example_country.h:49
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 CONTINENT_NAME_LEN
Definition: pfs_example_component_population.h:44
#define COUNTRY_NAME_LEN
Definition: pfs_example_component_population.h:43
int country_index_read(PSI_index_handle *index, PSI_key_reader *reader, unsigned int idx, int find_flag)
Definition: pfs_example_country.cc:171
native_mutex_t LOCK_country_records_array
Definition: pfs_example_country.cc:29
#define COUNTRY_MAX_ROWS
Definition: pfs_example_country.h:36
int country_delete_all_rows(void)
Definition: pfs_example_country.cc:405
int country_update_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:338
unsigned long long country_get_row_count(void)
Definition: pfs_example_country.cc:415
int country_rnd_next(PSI_table_handle *handle)
Definition: pfs_example_country.cc:105
int country_write_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:303
int country_read_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:230
void init_country_share(PFS_engine_table_share_proxy *share)
Definition: pfs_example_country.cc:417
int country_index_next(PSI_table_handle *handle)
Definition: pfs_example_country.cc:193
int country_rnd_init(PSI_table_handle *h, bool scan)
Definition: pfs_example_country.cc:122
int country_write_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:261
int country_delete_row_values(PSI_table_handle *handle)
Definition: pfs_example_country.cc:390
PFS_engine_table_share_proxy country_st_share
Definition: pfs_example_country.cc:28
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:70
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:86
void country_reset_position(PSI_table_handle *handle)
Definition: pfs_example_country.cc:222
int country_index_init(PSI_table_handle *handle, unsigned int idx, bool sorted, PSI_index_handle **index)
Definition: pfs_example_country.cc:138
int country_update_column_value(PSI_table_handle *handle, PSI_field *field, unsigned int index)
Definition: pfs_example_country.cc:356
Country_record country_records_array[COUNTRY_MAX_ROWS]
An array to keep rows of the tables.
Definition: pfs_example_country.cc:37
int country_rnd_pos(PSI_table_handle *handle)
Definition: pfs_example_country.cc:125
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:96
struct PSI_pos PSI_pos
This is an opaque structure to denote cursor position in plugin/component code.
Definition: pfs_plugin_table_service.h:101
#define PSI_bigint
Definition: pfs_plugin_table_service.h:149
#define PSI_year
Definition: pfs_plugin_table_service.h:151
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:105
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:109
struct PSI_field PSI_field
This is an opaque structure to denote filed in plugin/component code.
Definition: pfs_plugin_table_service.h:92
Specifies macros to define Service Implementations.
Definition: pfs_example_country.h:133
Country_POS m_pos
Definition: pfs_example_country.h:135
Country_record current_row
Definition: pfs_example_country.h:140
Country_index_by_name m_index
Definition: pfs_example_country.h:143
unsigned int index_num
Definition: pfs_example_country.h:146
Country_POS m_next_pos
Definition: pfs_example_country.h:137
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:444
Definition: pfs_plugin_table_service.h:135
A structure to denote a key of type string in an index.
Definition: pfs_plugin_table_service.h:225
Definition: mi_test3.cc:54
MySQL mutex implementation.
pthread_mutex_t native_mutex_t
Definition: thr_mutex_bits.h:54