23#ifndef PFS_PLUGIN_TABLE_SERVICE_H
24#define PFS_PLUGIN_TABLE_SERVICE_H
75#define PFS_HA_ERR_WRONG_COMMAND 131
76#define PFS_HA_ERR_RECORD_DELETED 134
77#define PFS_HA_ERR_END_OF_FILE 137
78#define PFS_HA_ERR_NO_REFERENCED_ROW 151
79#define PFS_HA_ERR_FOUND_DUPP_KEY 121
80#define PFS_HA_ERR_RECORD_FILE_FULL 135
141#define PSI_tinyint PSI_long
142#define PSI_utinyint PSI_ulong
143#define PSI_smallint PSI_long
144#define PSI_usmallint PSI_ulong
145#define PSI_mediumint PSI_long
146#define PSI_umediumint PSI_ulong
147#define PSI_int PSI_long
148#define PSI_uint PSI_ulong
149#define PSI_bigint PSI_longlong
150#define PSI_ubigint PSI_ulonglong
151#define PSI_year PSI_ulong
152#define PSI_enum PSI_ulonglong
153#define PSI_decimal PSI_double
154#define PSI_float PSI_double
301 unsigned int idx,
int find_flag);
489 unsigned int share_count));
493 unsigned int share_count));
509 (
bool record_null,
long record_value,
512 (
bool record_null,
unsigned long record_value,
529 (
bool record_null,
long record_value,
532 (
bool record_null,
unsigned long record_value,
548 (
bool record_null,
long record_value,
551 (
bool record_null,
unsigned long record_value,
567 (
bool record_null,
long record_value,
570 (
bool record_null,
unsigned long record_value,
586 (
bool record_null,
long long record_value,
589 (
bool record_null,
unsigned long long record_value,
621 (
bool record_null, const
char *record_string_value,
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1085
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:75
void read_key_unsigned(PSI_key_reader *, PSI_plugin_key_ubigint *, int) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:39
void set_unsigned(PSI_field *, PSI_ulonglong) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:30
void get(PSI_field *, PSI_longlong *) 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:42
void read_key(PSI_key_reader *, PSI_plugin_key_bigint *, int) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:36
void get_unsigned(PSI_field *, PSI_ulonglong *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:33
bool match_key_unsigned(bool, unsigned long long, PSI_plugin_key_ubigint *) noexcept
Definition: pfs_plugin_column_bigint_v1_all_empty.cc:47
void set_char_utf8mb4(PSI_field *, const char *, unsigned int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:32
void set_varchar_utf8mb4(PSI_field *, const char *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:48
void set_varchar_utf8mb4_len(PSI_field *, const char *, unsigned int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:50
bool match_key_string(bool, const char *, unsigned int, PSI_plugin_key_string *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:41
void get_char_utf8mb4(PSI_field *, char *, unsigned int *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:34
void get_varchar_utf8mb4(PSI_field *, char *, unsigned int *) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:46
void read_key_string(PSI_key_reader *, PSI_plugin_key_string *, int) noexcept
Definition: pfs_plugin_column_string_v2_all_empty.cc:37
unsigned int get_parts_found(PSI_key_reader *) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:41
int delete_tables(PFS_engine_table_share_proxy **, unsigned int) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:38
int add_tables(PFS_engine_table_share_proxy **, unsigned int) noexcept
Definition: pfs_plugin_table_v1_all_empty.cc:32
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:63
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2881
Access_control
Types of access allowed to tables.
Definition: pfs_plugin_table_service.h:434
@ READONLY
Definition: pfs_plugin_table_service.h:436
@ EDITABLE
Definition: pfs_plugin_table_service.h:442
@ UPDATABLE
Definition: pfs_plugin_table_service.h:440
@ TRUNCATABLE
Definition: pfs_plugin_table_service.h:438
int(* write_row_values_t)(PSI_table_handle *handle)
API to write a record in table.
Definition: pfs_plugin_table_service.h:348
PSI_plugin_key_uinteger PSI_plugin_key_usmallint
Definition: pfs_plugin_table_service.h:189
PSI_plugin_key_integer PSI_plugin_key_tinyint
Definition: pfs_plugin_table_service.h:170
int(* delete_row_values_t)(PSI_table_handle *handle)
API to delete record from table.
Definition: pfs_plugin_table_service.h:372
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:300
int(* update_row_values_t)(PSI_table_handle *handle)
API to write a record in table.
Definition: pfs_plugin_table_service.h:366
PSI_plugin_key_integer PSI_plugin_key_smallint
Definition: pfs_plugin_table_service.h:171
#define PSI_float
Definition: pfs_plugin_table_service.h:154
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
#define PSI_tinyint
Definition: pfs_plugin_table_service.h:141
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
PSI_plugin_key_uinteger PSI_plugin_key_utinyint
Definition: pfs_plugin_table_service.h:188
int(* rnd_next_t)(PSI_table_handle *handle)
Api to read the next record.
Definition: pfs_plugin_table_service.h:250
#define PSI_int
Definition: pfs_plugin_table_service.h:147
#define PSI_smallint
Definition: pfs_plugin_table_service.h:143
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:360
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:329
int(* index_next_t)(PSI_table_handle *handle)
API to read next record with matching index.
Definition: pfs_plugin_table_service.h:311
#define PSI_enum
Definition: pfs_plugin_table_service.h:152
PSI_plugin_key_uinteger PSI_plugin_key_umediumint
Definition: pfs_plugin_table_service.h:190
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:406
#define PSI_decimal
Definition: pfs_plugin_table_service.h:153
#define PSI_bigint
Definition: pfs_plugin_table_service.h:149
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:399
#define PSI_year
Definition: pfs_plugin_table_service.h:151
PSI_plugin_key_integer PSI_plugin_key_mediumint
Definition: pfs_plugin_table_service.h:172
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:342
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
int(* rnd_init_t)(PSI_table_handle *handle, bool scan)
API to initialize for random scan or read.
Definition: pfs_plugin_table_service.h:262
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:272
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
unsigned long long(* get_row_count_t)(void)
API to give number of rows in a table.
Definition: pfs_plugin_table_service.h:455
#define PSI_utinyint
Definition: pfs_plugin_table_service.h:142
void(* reset_position_t)(PSI_table_handle *handle)
API to reset cursor position.
Definition: pfs_plugin_table_service.h:317
#define PSI_mediumint
Definition: pfs_plugin_table_service.h:145
#define PSI_umediumint
Definition: pfs_plugin_table_service.h:146
int(* delete_all_rows_t)(void)
API to delete/truncate all the rows in a table.
Definition: pfs_plugin_table_service.h:448
#define PSI_uint
Definition: pfs_plugin_table_service.h:148
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:287
struct PSI_field PSI_field
This is an opaque structure to denote filed in plugin/component code.
Definition: pfs_plugin_table_service.h:92
#define PSI_usmallint
Definition: pfs_plugin_table_service.h:144
#define PSI_ubigint
Definition: pfs_plugin_table_service.h:150
required string key
Definition: replication_asynchronous_connection_failover.proto:59
#define DECLARE_METHOD(retval, name, args)
Declares a method as a part of the Service definition.
Definition: service.h:102
#define END_SERVICE_DEFINITION(name)
A macro to end the last Service definition started with the BEGIN_SERVICE_DEFINITION macro.
Definition: service.h:90
#define BEGIN_SERVICE_DEFINITION(name)
Declares a new Service.
Definition: service.h:85
Specifies macros to define Service Implementations.
A structure to keep callback functions to be implemented by plugin/component.
Definition: pfs_plugin_table_service.h:412
index_next_t index_next
Definition: pfs_plugin_table_service.h:418
close_table_t close_table
Definition: pfs_plugin_table_service.h:427
rnd_next_t rnd_next
Definition: pfs_plugin_table_service.h:413
reset_position_t reset_position
Definition: pfs_plugin_table_service.h:420
write_row_values_t write_row_values
Definition: pfs_plugin_table_service.h:422
rnd_pos_t rnd_pos
Definition: pfs_plugin_table_service.h:415
write_column_value_t write_column_value
Definition: pfs_plugin_table_service.h:421
read_column_value_t read_column_value
Definition: pfs_plugin_table_service.h:419
update_column_value_t update_column_value
Definition: pfs_plugin_table_service.h:423
rnd_init_t rnd_init
Definition: pfs_plugin_table_service.h:414
update_row_values_t update_row_values
Definition: pfs_plugin_table_service.h:424
index_read_t index_read
Definition: pfs_plugin_table_service.h:417
open_table_t open_table
Definition: pfs_plugin_table_service.h:426
delete_row_values_t delete_row_values
Definition: pfs_plugin_table_service.h:425
index_init_t index_init
Definition: pfs_plugin_table_service.h:416
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:461
delete_all_rows_t delete_all_rows
Definition: pfs_plugin_table_service.h:478
const char * m_table_name
Definition: pfs_plugin_table_service.h:467
const char * m_table_definition
Definition: pfs_plugin_table_service.h:472
PFS_engine_table_proxy m_proxy_engine_table
Definition: pfs_plugin_table_service.h:464
unsigned int m_table_name_length
Definition: pfs_plugin_table_service.h:469
enum Access_control m_acl
Definition: pfs_plugin_table_service.h:476
get_row_count_t get_row_count
Definition: pfs_plugin_table_service.h:479
unsigned int m_ref_length
Definition: pfs_plugin_table_service.h:473
Definition: pfs_plugin_table_service.h:83
unsigned int length
Definition: pfs_plugin_table_service.h:85
char * str
Definition: pfs_plugin_table_service.h:84
Definition: pfs_plugin_table_service.h:135
bool is_null
Definition: pfs_plugin_table_service.h:137
double val
Definition: pfs_plugin_table_service.h:136
Definition: pfs_plugin_table_service.h:111
bool is_null
Definition: pfs_plugin_table_service.h:113
long val
Definition: pfs_plugin_table_service.h:112
Definition: pfs_plugin_table_service.h:123
long long val
Definition: pfs_plugin_table_service.h:124
bool is_null
Definition: pfs_plugin_table_service.h:125
A structure to denote a key of type long long in an index.
Definition: pfs_plugin_table_service.h:195
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:199
long long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:203
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:201
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:197
A structure to denote a key of type long in an index.
Definition: pfs_plugin_table_service.h:159
const char * m_name
Definition: pfs_plugin_table_service.h:161
bool m_is_null
Definition: pfs_plugin_table_service.h:165
long m_value
Definition: pfs_plugin_table_service.h:167
int m_find_flags
Definition: pfs_plugin_table_service.h:163
A structure to denote a key of type string in an index.
Definition: pfs_plugin_table_service.h:225
unsigned int m_value_buffer_length
Definition: pfs_plugin_table_service.h:236
bool m_is_null
Definition: pfs_plugin_table_service.h:231
unsigned int m_value_buffer_capacity
Definition: pfs_plugin_table_service.h:238
int m_find_flags
Definition: pfs_plugin_table_service.h:229
const char * m_name
Definition: pfs_plugin_table_service.h:227
char * m_value_buffer
Definition: pfs_plugin_table_service.h:233
A structure to denote a key of type unsigned long long in an index.
Definition: pfs_plugin_table_service.h:210
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:214
unsigned long long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:218
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:216
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:212
A structure to denote a key of type ulong in an index.
Definition: pfs_plugin_table_service.h:177
const char * m_name
Name of the key column.
Definition: pfs_plugin_table_service.h:179
bool m_is_null
Column is NULL.
Definition: pfs_plugin_table_service.h:183
int m_find_flags
Find flags.
Definition: pfs_plugin_table_service.h:181
unsigned long m_value
Value of the key column.
Definition: pfs_plugin_table_service.h:185
Definition: pfs_plugin_table_service.h:117
bool is_null
Definition: pfs_plugin_table_service.h:119
unsigned long val
Definition: pfs_plugin_table_service.h:118
Definition: pfs_plugin_table_service.h:129
unsigned long long val
Definition: pfs_plugin_table_service.h:130
bool is_null
Definition: pfs_plugin_table_service.h:131