24#ifndef MYSQL_COMMAND_SERVICES_IMP_H
25#define MYSQL_COMMAND_SERVICES_IMP_H
36#define MYSQL_SESSION_USER "mysql.session"
37#define MYSQL_SYS_HOST "localhost"
78#define MYSQL_COMMAND_SERVICE_EXTN(H) \
79 reinterpret_cast<struct mysql_command_service_extn *>( \
80 MYSQL_EXTENSION_PTR(H)->mcs_extn)
135 (
MYSQL_H mysql_h,
char **sqlstate_errmsg));
156 SERVICE_TYPE(mysql_text_consumer_client_capabilities_v1) *
#define MYSQL_THD
Definition: backup_page_tracker.h:38
This is a wrapper class of all the mysql_text_consumer services refs.
Definition: mysql_command_services_imp.h:143
const mysql_service_mysql_text_consumer_get_string_v1_t * get_string_srv
Definition: mysql_command_services_imp.h:155
const mysql_service_mysql_text_consumer_factory_v1_t * factory_srv
Definition: mysql_command_services_imp.h:145
const mysql_service_mysql_text_consumer_error_v1_t * error_srv
Definition: mysql_command_services_imp.h:148
const mysql_service_mysql_text_consumer_client_capabilities_v1_t * client_capabilities_srv
Definition: mysql_command_services_imp.h:157
const mysql_service_mysql_text_consumer_get_null_v1_t * get_null_srv
Definition: mysql_command_services_imp.h:149
const mysql_service_mysql_text_consumer_metadata_v1_t * metadata_srv
Definition: mysql_command_services_imp.h:146
const mysql_service_mysql_text_consumer_row_factory_v1_t * row_factory_srv
Definition: mysql_command_services_imp.h:147
const mysql_service_mysql_text_consumer_get_integer_v1_t * get_integer_srv
Definition: mysql_command_services_imp.h:150
const mysql_service_mysql_text_consumer_get_decimal_v1_t * get_decimal_srv
Definition: mysql_command_services_imp.h:152
const mysql_service_mysql_text_consumer_get_date_time_v1_t * get_date_time_srv
Definition: mysql_command_services_imp.h:154
const mysql_service_mysql_text_consumer_get_longlong_v1_t * get_longlong_srv
Definition: mysql_command_services_imp.h:151
const mysql_service_mysql_text_consumer_get_double_v1_t * get_double_srv
Definition: mysql_command_services_imp.h:153
An implementation of mysql command services apis.
Definition: mysql_command_services_imp.h:85
static mysql_service_status_t use_result(MYSQL_H mysql, MYSQL_RES_H *mysql_res) noexcept
static int next_result(MYSQL_H mysql) noexcept
Calls mysql_next_result api to returns/initiates the next result in multiple-result executions.
Definition: mysql_command_services_imp.cc:903
static mysql_service_status_t result_metadata(MYSQL_RES_H res_h) noexcept
Calls mysql_result_metadata api to check whether a result set has metadata.
Definition: mysql_command_services_imp.cc:929
static mysql_service_status_t fetch_field(MYSQL_RES_H res_h, MYSQL_FIELD_H *field_h) noexcept
Calls mysql_fetch_field api to returns the type of next table field.
Definition: mysql_command_services_imp.cc:1005
static mysql_service_status_t autocommit(MYSQL_H mysql_h, bool mode) noexcept
Calls mysql_autocommit api to toggles autocommit mode on/off.
Definition: mysql_command_services_imp.cc:314
static mysql_service_status_t rollback(MYSQL_H mysql_h) noexcept
Calls mysql_rollback api to rolls back the transaction.
Definition: mysql_command_services_imp.cc:334
static mysql_service_status_t connect(MYSQL_H mysql_h) noexcept
Calls mysql_real_connect api to connect to a MySQL server.
Definition: mysql_command_services_imp.cc:111
static mysql_service_status_t close(MYSQL_H mysql_h) noexcept
Calls mysql_close api to closes a server connection.
Definition: mysql_command_services_imp.cc:246
static mysql_service_status_t num_fields(MYSQL_RES_H res_h, unsigned int *num_fields) noexcept
Calls mysql_num_fields api to returns the number of columns in a result set.
Definition: mysql_command_services_imp.cc:1029
static mysql_service_status_t more_results(MYSQL_H mysql) noexcept
Calls mysql_more_results api to checks whether any more results exist.
Definition: mysql_command_services_imp.cc:881
static void end(void) noexcept
Calls session deinit_thread() to deinitialize a physical thread that has been using the session servi...
Definition: mysql_command_services_imp.cc:99
static mysql_service_status_t query(MYSQL_H mysql, const char *stmt_str, unsigned long length) noexcept
Calls mysql_real_query api to executes an SQL query specified as a counted string.
Definition: mysql_command_services_imp.cc:777
static mysql_service_status_t affected_rows(MYSQL_H mysql, uint64_t *rows) noexcept
Calls mysql_affected_rows api to return the number of rows changed/deleted/inserted by the last UPDAT...
Definition: mysql_command_services_imp.cc:800
static mysql_service_status_t init(void) noexcept
Calls session init_thread() to initialize a physical thread to use the session service.
Definition: mysql_command_services_imp.cc:91
static mysql_service_status_t free_result(MYSQL_RES_H mysql_res) noexcept
Calls mysql_free_result api to frees memory used by a result set.
Definition: mysql_command_services_imp.cc:858
static mysql_service_status_t field_count(MYSQL_H mysql_h, unsigned int *num_fields) noexcept
Calls mysql_field_count api to returns the number of columns for the most resent statement.
Definition: mysql_command_services_imp.cc:1077
static mysql_service_status_t store_result(MYSQL_H mysql, MYSQL_RES_H *mysql_res) noexcept
Calls mysql_store_result api to retrieves a complete result set.
Definition: mysql_command_services_imp.cc:825
static mysql_service_status_t get(MYSQL_H mysql, int option, const void *arg) noexcept
Calls mysql_get_option api to returns the value of a mysql_options() option.
Definition: mysql_command_services_imp.cc:741
static mysql_service_status_t fetch_fields(MYSQL_RES_H res_h, MYSQL_FIELD_H **fields_h) noexcept
Calls mysql_fetch_fields api to returns an array of all field structures.
Definition: mysql_command_services_imp.cc:1052
static mysql_service_status_t fetch_row(MYSQL_RES_H res_h, char ***row) noexcept
Calls mysql_fetch_row api to fetches the next row from the result set.
Definition: mysql_command_services_imp.cc:953
static mysql_service_status_t reset(MYSQL_H mysql_h) noexcept
Calls mysql_reset_connection api to resets the connection to clear session state.
Definition: mysql_command_services_imp.cc:151
static mysql_service_status_t field_metadata_get(MYSQL_FIELD_H field_h, int metadata, void *data) noexcept
Definition: mysql_command_services_imp.cc:1161
static mysql_service_status_t set(MYSQL_H mysql, int option, const void *arg) noexcept
Calls mysql_options api to sets connect options for connection-establishment functions such as real_c...
Definition: mysql_command_services_imp.cc:395
static mysql_service_status_t commit(MYSQL_H mysql_h) noexcept
Calls mysql_commit api to commits the transaction.
Definition: mysql_command_services_imp.cc:291
static mysql_service_status_t sql_state(MYSQL_H mysql_h, char **sqlstate_errmsg) noexcept
Calls mysql_sqlstate api to return the SQLSTATE error code for the last error.
Definition: mysql_command_services_imp.cc:1148
static mysql_service_status_t sql_errno(MYSQL_H mysql_h, unsigned int *err_no) noexcept
Calls mysql_errno api to return the number of most recently invoked mysql function.
Definition: mysql_command_services_imp.cc:1099
static mysql_service_status_t sql_error(MYSQL_H mysql_h, char **errmsg) noexcept
Calls mysql_error api to return the error message of most recently invoked mysql function.
Definition: mysql_command_services_imp.cc:1121
static mysql_service_status_t fetch_lengths(MYSQL_RES_H res_h, ulong **length) noexcept
Calls mysql_fetch_lengths api to Returns the lengths of all columns in the current row.
Definition: mysql_command_services_imp.cc:979
Some integer typedefs for easier portability.
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
struct SRV_CTX_H_imp * SRV_CTX_H
Definition: mysql_command_consumer.h:31
struct MYSQL_H_imp * MYSQL_H
Definition: mysql_command_services.h:33
struct MYSQL_RES_H_imp * MYSQL_RES_H
Definition: mysql_command_services.h:34
struct MYSQL_FIELD_H_imp * MYSQL_FIELD_H
Definition: mysql_command_services.h:35
#define MYSQL_ROW_H
Definition: mysql_command_services.h:37
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
Definition: instrumented_condition_variable.h:32
mode
Definition: file_handle.h:61
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76
Specifies macros to define Service Implementations.
#define DEFINE_BOOL_METHOD(name, args)
A short macro to define method that returns bool, which is the most common case.
Definition: service_implementation.h:88
#define DEFINE_METHOD(retval, name, args)
A macro to ensure method implementation has required properties, that is it does not throw exceptions...
Definition: service_implementation.h:79
These are the common definitions between the plugin service for sessions and the component service ex...
class Srv_session * MYSQL_SESSION
Definition: service_srv_session_bits.h:37
Definition: mysql_command_services_imp.h:39
Definition: mysql_command_services_imp.h:43
MYSQL_RES * mysql_res
Definition: mysql_command_services_imp.h:44
This structure is used by mysql command service.
Definition: mysql_command_services_imp.h:60
bool is_thd_associated
Definition: mysql_command_services_imp.h:62
void * command_consumer_services
Definition: mysql_command_services_imp.h:65
const char * mcs_user_name
Definition: mysql_command_services_imp.h:69
MYSQL_SESSION session_svc
Definition: mysql_command_services_imp.h:61
const char * mcs_protocol
Definition: mysql_command_services_imp.h:68
bool no_lock_registry
Definition: mysql_command_services_imp.h:75
SRV_CTX_H * consumer_srv_data
Definition: mysql_command_services_imp.h:66
const char * mcs_password
Definition: mysql_command_services_imp.h:71
uint32_t mcs_client_flag
Definition: mysql_command_services_imp.h:74
int mcs_tcpip_port
Definition: mysql_command_services_imp.h:72
MYSQL_THD mcs_thd
Definition: mysql_command_services_imp.h:67
MYSQL_DATA * data
Definition: mysql_command_services_imp.h:64
const char * mcs_host_name
Definition: mysql_command_services_imp.h:70
const char * mcs_db
Definition: mysql_command_services_imp.h:73