24#ifndef PFS_PLUGIN_TABLE_SERVICE_H
25#define PFS_PLUGIN_TABLE_SERVICE_H
76#define PFS_HA_ERR_WRONG_COMMAND 131
77#define PFS_HA_ERR_RECORD_DELETED 134
78#define PFS_HA_ERR_END_OF_FILE 137
79#define PFS_HA_ERR_NO_REFERENCED_ROW 151
80#define PFS_HA_ERR_FOUND_DUPP_KEY 121
81#define PFS_HA_ERR_RECORD_FILE_FULL 135
142#define PSI_tinyint PSI_long
143#define PSI_utinyint PSI_ulong
144#define PSI_smallint PSI_long
145#define PSI_usmallint PSI_ulong
146#define PSI_mediumint PSI_long
147#define PSI_umediumint PSI_ulong
148#define PSI_int PSI_long
149#define PSI_uint PSI_ulong
150#define PSI_bigint PSI_longlong
151#define PSI_ubigint PSI_ulonglong
152#define PSI_year PSI_ulong
153#define PSI_enum PSI_ulonglong
154#define PSI_decimal PSI_double
155#define PSI_float PSI_double
302 unsigned int idx,
int find_flag);
490 unsigned int share_count));
494 unsigned int share_count));
510 (
bool record_null,
long record_value,
513 (
bool record_null,
unsigned long record_value,
530 (
bool record_null,
long record_value,
533 (
bool record_null,
unsigned long record_value,
549 (
bool record_null,
long record_value,
552 (
bool record_null,
unsigned long record_value,
568 (
bool record_null,
long record_value,
571 (
bool record_null,
unsigned long record_value,
587 (
bool record_null,
long long record_value,
590 (
bool record_null,
unsigned long long record_value,
622 (
bool record_null, const
char *record_string_value,
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1105
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
static mysql_service_status_t get(THD **thd) noexcept
Definition: mysql_current_thread_reader_all_empty.cc:31
void read_key_unsigned(PSI_key_reader *, PSI_plugin_key_ubigint *, int) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:40
void set_unsigned(PSI_field *, PSI_ulonglong) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:31
bool match_key(bool, long long, PSI_plugin_key_bigint *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:43
void read_key(PSI_key_reader *, PSI_plugin_key_bigint *, int) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:37
void get_unsigned(PSI_field *, PSI_ulonglong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:34
bool match_key_unsigned(bool, unsigned long long, PSI_plugin_key_ubigint *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:48
void set_char_utf8mb4(PSI_field *, const char *, unsigned int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:33
void set_varchar_utf8mb4(PSI_field *, const char *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:49
void set_varchar_utf8mb4_len(PSI_field *, const char *, unsigned int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:51
bool match_key_string(bool, const char *, unsigned int, PSI_plugin_key_string *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:42
void get_char_utf8mb4(PSI_field *, char *, unsigned int *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:35
void get_varchar_utf8mb4(PSI_field *, char *, unsigned int *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:47
void read_key_string(PSI_key_reader *, PSI_plugin_key_string *, int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:38
unsigned int get_parts_found(PSI_key_reader *) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:42
int delete_tables(PFS_engine_table_share_proxy **, unsigned int) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:39
int add_tables(PFS_engine_table_share_proxy **, unsigned int) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:33
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
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2884
Access_control
Types of access allowed to tables.
Definition: pfs_plugin_table_service.h:435
@ READONLY
Definition: pfs_plugin_table_service.h:437
@ EDITABLE
Definition: pfs_plugin_table_service.h:443
@ UPDATABLE
Definition: pfs_plugin_table_service.h:441
@ TRUNCATABLE
Definition: pfs_plugin_table_service.h:439
int(* write_row_values_t)(PSI_table_handle *handle)
API to write a record in table.
Definition: pfs_plugin_table_service.h:349
PSI_plugin_key_uinteger PSI_plugin_key_usmallint
Definition: pfs_plugin_table_service.h:190
PSI_plugin_key_integer PSI_plugin_key_tinyint
Definition: pfs_plugin_table_service.h:171
int(* delete_row_values_t)(PSI_table_handle *handle)
API to delete record from table.
Definition: pfs_plugin_table_service.h:373
int(* index_read_t)(PSI_index_handle *index, PSI_key_reader *reader, unsigned int idx, int find_flag)
API to read keys in index.
Definition: pfs_plugin_table_service.h:301
int(* update_row_values_t)(PSI_table_handle *handle)
API to write a record in table.
Definition: pfs_plugin_table_service.h:367
PSI_plugin_key_integer PSI_plugin_key_smallint
Definition: pfs_plugin_table_service.h:172
#define PSI_float
Definition: pfs_plugin_table_service.h:155
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
#define PSI_tinyint
Definition: pfs_plugin_table_service.h:142
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
PSI_plugin_key_uinteger PSI_plugin_key_utinyint
Definition: pfs_plugin_table_service.h:189
int(* rnd_next_t)(PSI_table_handle *handle)
Api to read the next record.
Definition: pfs_plugin_table_service.h:251
#define PSI_int
Definition: pfs_plugin_table_service.h:148
#define PSI_smallint
Definition: pfs_plugin_table_service.h:144
int(* update_column_value_t)(PSI_table_handle *handle, PSI_field *field, unsigned int index)
API to update a column value in table.
Definition: pfs_plugin_table_service.h:361
int(* read_column_value_t)(PSI_table_handle *handle, PSI_field *field, unsigned int index)
API to read a column value from table.
Definition: pfs_plugin_table_service.h:330
int(* index_next_t)(PSI_table_handle *handle)
API to read next record with matching index.
Definition: pfs_plugin_table_service.h:312
#define PSI_enum
Definition: pfs_plugin_table_service.h:153
PSI_plugin_key_uinteger PSI_plugin_key_umediumint
Definition: pfs_plugin_table_service.h:191
void(* close_table_t)(PSI_table_handle *handle)
API to Close a table handle in plugin/component code and reset position pointer when a table handle i...
Definition: pfs_plugin_table_service.h:407
#define PSI_decimal
Definition: pfs_plugin_table_service.h:154
#define PSI_bigint
Definition: pfs_plugin_table_service.h:150
PSI_table_handle *(* open_table_t)(PSI_pos **pos)
API to Open a table handle in plugin/component code and reset position pointer when a new table handl...
Definition: pfs_plugin_table_service.h:400
#define PSI_year
Definition: pfs_plugin_table_service.h:152
PSI_plugin_key_integer PSI_plugin_key_mediumint
Definition: pfs_plugin_table_service.h:173
int(* write_column_value_t)(PSI_table_handle *handle, PSI_field *field, unsigned int index)
API to write a column value in table.
Definition: pfs_plugin_table_service.h:343
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
int(* rnd_init_t)(PSI_table_handle *handle, bool scan)
API to initialize for random scan or read.
Definition: pfs_plugin_table_service.h:263
int(* rnd_pos_t)(PSI_table_handle *handle)
API to read row from a position which is set in table handle.
Definition: pfs_plugin_table_service.h:273
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
unsigned long long(* get_row_count_t)(void)
API to give number of rows in a table.
Definition: pfs_plugin_table_service.h:456
#define PSI_utinyint
Definition: pfs_plugin_table_service.h:143
void(* reset_position_t)(PSI_table_handle *handle)
API to reset cursor position.
Definition: pfs_plugin_table_service.h:318
#define PSI_mediumint
Definition: pfs_plugin_table_service.h:146
#define PSI_umediumint
Definition: pfs_plugin_table_service.h:147
int(* delete_all_rows_t)(void)
API to delete/truncate all the rows in a table.
Definition: pfs_plugin_table_service.h:449
#define PSI_uint
Definition: pfs_plugin_table_service.h:149
int(* index_init_t)(PSI_table_handle *handle, unsigned int idx, bool sorted, PSI_index_handle **index)
API to initialize index(es).
Definition: pfs_plugin_table_service.h:288
struct PSI_field PSI_field
This is an opaque structure to denote filed in plugin/component code.
Definition: pfs_plugin_table_service.h:93
#define PSI_usmallint
Definition: pfs_plugin_table_service.h:145
#define PSI_ubigint
Definition: pfs_plugin_table_service.h:151
required string key
Definition: replication_asynchronous_connection_failover.proto:60
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:103
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:91
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:86
Specifies macros to define Service Implementations.
A structure to keep callback functions to be implemented by plugin/component.
Definition: pfs_plugin_table_service.h:413
index_next_t index_next
Definition: pfs_plugin_table_service.h:419
close_table_t close_table
Definition: pfs_plugin_table_service.h:428
rnd_next_t rnd_next
Definition: pfs_plugin_table_service.h:414
reset_position_t reset_position
Definition: pfs_plugin_table_service.h:421
write_row_values_t write_row_values
Definition: pfs_plugin_table_service.h:423
rnd_pos_t rnd_pos
Definition: pfs_plugin_table_service.h:416
write_column_value_t write_column_value
Definition: pfs_plugin_table_service.h:422
read_column_value_t read_column_value
Definition: pfs_plugin_table_service.h:420
update_column_value_t update_column_value
Definition: pfs_plugin_table_service.h:424
rnd_init_t rnd_init
Definition: pfs_plugin_table_service.h:415
update_row_values_t update_row_values
Definition: pfs_plugin_table_service.h:425
index_read_t index_read
Definition: pfs_plugin_table_service.h:418
open_table_t open_table
Definition: pfs_plugin_table_service.h:427
delete_row_values_t delete_row_values
Definition: pfs_plugin_table_service.h:426
index_init_t index_init
Definition: pfs_plugin_table_service.h:417
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
delete_all_rows_t delete_all_rows
Definition: pfs_plugin_table_service.h:479
const char * m_table_name
Definition: pfs_plugin_table_service.h:468
const char * m_table_definition
Definition: pfs_plugin_table_service.h:473
PFS_engine_table_proxy m_proxy_engine_table
Definition: pfs_plugin_table_service.h:465
unsigned int m_table_name_length
Definition: pfs_plugin_table_service.h:470
enum Access_control m_acl
Definition: pfs_plugin_table_service.h:477
get_row_count_t get_row_count
Definition: pfs_plugin_table_service.h:480
unsigned int m_ref_length
Definition: pfs_plugin_table_service.h:474
Definition: pfs_plugin_table_service.h:84
unsigned int length
Definition: pfs_plugin_table_service.h:86
char * str
Definition: pfs_plugin_table_service.h:85
Definition: pfs_plugin_table_service.h:136
bool is_null
Definition: pfs_plugin_table_service.h:138
double val
Definition: pfs_plugin_table_service.h:137
Definition: pfs_plugin_table_service.h:112
bool is_null
Definition: pfs_plugin_table_service.h:114
long val
Definition: pfs_plugin_table_service.h:113
Definition: pfs_plugin_table_service.h:124
long long val
Definition: pfs_plugin_table_service.h:125
bool is_null
Definition: pfs_plugin_table_service.h:126
A structure to denote a key of type long long in an index.
Definition: pfs_plugin_table_service.h:196
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:200
long long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:204
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:202
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:198
A structure to denote a key of type long in an index.
Definition: pfs_plugin_table_service.h:160
const char * m_name
Definition: pfs_plugin_table_service.h:162
bool m_is_null
Definition: pfs_plugin_table_service.h:166
long m_value
Definition: pfs_plugin_table_service.h:168
int m_find_flags
Definition: pfs_plugin_table_service.h:164
A structure to denote a key of type string in an index.
Definition: pfs_plugin_table_service.h:226
unsigned int m_value_buffer_length
Definition: pfs_plugin_table_service.h:237
bool m_is_null
Definition: pfs_plugin_table_service.h:232
unsigned int m_value_buffer_capacity
Definition: pfs_plugin_table_service.h:239
int m_find_flags
Definition: pfs_plugin_table_service.h:230
const char * m_name
Definition: pfs_plugin_table_service.h:228
char * m_value_buffer
Definition: pfs_plugin_table_service.h:234
A structure to denote a key of type unsigned long long in an index.
Definition: pfs_plugin_table_service.h:211
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:215
unsigned long long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:219
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:217
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:213
A structure to denote a key of type ulong in an index.
Definition: pfs_plugin_table_service.h:178
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:180
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:184
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:182
unsigned long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:186
Definition: pfs_plugin_table_service.h:118
bool is_null
Definition: pfs_plugin_table_service.h:120
unsigned long val
Definition: pfs_plugin_table_service.h:119
Definition: pfs_plugin_table_service.h:130
unsigned long long val
Definition: pfs_plugin_table_service.h:131
bool is_null
Definition: pfs_plugin_table_service.h:132