MySQL  8.0.19
Source Code Documentation
Component Services Inventory

This is a group of all component service APIs. More...

Classes

struct  s_mysql_component_sys_variable_register
 
struct  s_mysql_component_sys_variable_unregister
 
struct  s_mysql_group_replication_message_service_send
 
struct  s_mysql_host_application_signal
 
struct  s_mysql_mysql_keyring_iterator
 
struct  s_mysql_mysql_admin_session
 
struct  s_mysql_mysql_current_thread_reader
 
struct  s_mysql_mysql_keyring_native_key_id
 

Typedefs

typedef struct s_mysql_component_sys_variable_register mysql_service_component_sys_variable_register_t
 
typedef struct s_mysql_component_sys_variable_unregister mysql_service_component_sys_variable_unregister_t
 
typedef struct s_mysql_group_replication_message_service_send mysql_service_group_replication_message_service_send_t
 
typedef struct s_mysql_host_application_signal mysql_service_host_application_signal_t
 
typedef struct s_mysql_mysql_keyring_iterator mysql_service_mysql_keyring_iterator_t
 
typedef struct s_mysql_mysql_admin_session mysql_service_mysql_admin_session_t
 
typedef struct s_mysql_mysql_current_thread_reader mysql_service_mysql_current_thread_reader_t
 
typedef struct s_mysql_mysql_keyring_native_key_id mysql_service_mysql_keyring_native_key_id_t
 

Variables

const typedef char * my_h_connection_attributes_iterator
 

Detailed Description

This is a group of all component service APIs.

See A Service and a Service Implementation for explanation of what a component service is

Typedef Documentation

◆ mysql_service_component_sys_variable_register_t

Service to register variable and get variable value

See also
mysql_component_sys_variable_imp

◆ mysql_service_component_sys_variable_unregister_t

Service to unregister variable

Make sure to call this for each variable registered.

See also
mysql_service_component_sys_variable_unregister_t

◆ mysql_service_group_replication_message_service_send_t

A service that sends content agnostic messages from a member to the group.

This only works if the component is on a server with group replication running and the member state is ONLINE. If server isn't ONLINE message won't be deliver.

After message sent to all members of the group, all components that have registered group_replication_message_service_recv service will be notified.

SERVICE_TYPE(registry) *plugin_registry = mysql_plugin_registry_acquire();
my_service<SERVICE_TYPE(group_replication_message_service_send)> svc(
"group_replication_message_service_send", plugin_registry);
if (svc.is_valid()) {
bool error = svc->send("tag", "payload", sizeof("payload"));
}

◆ mysql_service_host_application_signal_t

A service to deliver a signal to host application.

Typically there'll be just one implementation of this by the main application.

Other parties interested in listening to shutdown may override the default implementation with a broadcast one and have multiple implementations receiving the shutdown signal. Or do message queueing to a set of background threads etc.

See also
mysql_component_host_application_signal_imp

◆ mysql_service_mysql_admin_session_t

A service to create an "admin" session that's not a subject to max connection count limits.

This service is an extension to the sessions plugin service suite. The MYSQL_SESSION references are compatible with the plugin service.

See also
mysql_component_mysql_admin_session_imp

◆ mysql_service_mysql_current_thread_reader_t

A service to fetch the current thread id

Use in conjuntion with all the related services that operate on thread ids

See also
mysql_component_mysql_current_thread_reader_imp

◆ mysql_service_mysql_keyring_iterator_t

Keyring iterator component service definition, which enables to iterate over items stored within currently used keyring.

my_service<SERVICE_TYPE(mysql_keyring_iterator)> service(
"mysql_keyring_iterator.mysql_server", m_reg_srv);
if (!service.is_valid()) {
return;
}
my_h_keyring_iterator iterator = nullptr;
if (service->init(&iterator)) {
return;
}
char key_id[64];
char user_id[64];
while (iterator != nullptr && service->get(iterator, key_id, sizeof(key_id)
user_id, sizeof(user_id))
== 0) {
// Do something with key and user_id values.
}
service->deinit(iterator);

◆ mysql_service_mysql_keyring_native_key_id_t

A service to read native keybackend id

Typically there'll be just one implementation of this by the main application.

Variable Documentation

◆ my_h_connection_attributes_iterator

const typedef char* my_h_connection_attributes_iterator

A service to read the connection attributes from the current session It provides a read-only iterator over the attributes. This is some example code to use the iterator:

// at init time. try to reuse the service handles as much as possible
my_service<SERVICE_TYPE(mysql_current_thread_reader)> thd_reader(
"mysql_current_thread_reader", m_reg_srv);
my_service<SERVICE_TYPE(mysql_connection_attributes_iterator)> service(
"mysql_connection_attributes_iterator", m_reg_srv);
if (!service.is_valid() || !thd_reader.is_valid) {
return; //error
}
...
// at parse time
MYSQL_THD thd;
if (thd_reader->get(&thd))
return; //error
const char *charset_string;
const CHARSET_INFO *charset = nullptr;
if (service->init(thd, &iterator)) return; // error
while (!service->get(thd, &iterator, &name.str, &name.length, &value.str,
&value.length, &charset_string)) {
// Do something with name and value
}
service->deinit(iterator);
my_service
Wraps my_h_service struct conforming ABI into RAII C++ object with ability to cast to desired service...
Definition: my_service.h:34
mysql_plugin_registry_acquire
const mysql_service_registry_t * mysql_plugin_registry_acquire()
Returns a new reference to the "registry" service.
Definition: plugin_registry_service.cc:46
MYSQL_LEX_CSTRING
Definition: mysql_lex_string.h:39
CHARSET_INFO
Definition: m_ctype.h:354
value
const string value("\"Value\"")
SERVICE_TYPE
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:75
name
const string name("\"Name\"")
my_h_connection_attributes_iterator
const typedef char * my_h_connection_attributes_iterator
Definition: mysql_connection_attributes_iterator.h:78
error
Log error(cerr, "ERROR")
my_h_keyring_iterator
struct my_h_keyring_iterator_imp * my_h_keyring_iterator
Definition: keyring_iterator_service.h:29
udf_ext::consts::charset
const std::string charset("charset")