23#ifndef MYSQL_SRV_SESSION_SERVICE_INCLUDED
24#define MYSQL_SRV_SESSION_SERVICE_INCLUDED
38#ifndef MYSQL_ABI_CHECK
59#ifdef MYSQL_DYNAMIC_PLUGIN
61#define srv_session_init_thread(plugin) \
62 srv_session_service->init_session_thread((plugin))
64#define srv_session_deinit_thread() srv_session_service->deinit_session_thread()
66#define srv_session_open(cb, ctx) srv_session_service->open_session((cb), (ctx))
68#define srv_session_detach(session) \
69 srv_session_service->detach_session((session))
71#define srv_session_close(session) srv_session_service->close_session((session))
73#define srv_session_server_is_available() \
74 srv_session_service->server_is_available()
76#define srv_session_attach(session, thd) \
77 srv_session_service->attach_session((session), (thd))
#define MYSQL_THD
Definition: backup_page_tracker.h:38
int srv_session_init_thread(const void *plugin)
Initializes the current physical thread to use with session service.
Definition: srv_session_service.cc:60
struct srv_session_service_st * srv_session_service
int srv_session_attach(MYSQL_SESSION session, MYSQL_THD *ret_previous_thd)
Attaches a session to current physical thread.
Definition: srv_session_service.cc:232
void srv_session_deinit_thread()
Deinitializes the current physical thread to use with session service.
Definition: srv_session_service.cc:67
int srv_session_server_is_available()
Returns if the server is available (not booting or shutting down)
Definition: srv_session_service.cc:221
int srv_session_close(MYSQL_SESSION session)
Closes a previously opened session.
MYSQL_SESSION srv_session_open(srv_session_error_cb error_cb, void *plugin_ctx)
Opens a server session.
Definition: srv_session_service.cc:145
int srv_session_detach(MYSQL_SESSION session)
Detaches a session from current physical thread.
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
void(* srv_session_error_cb)(void *ctx, unsigned int sql_errno, const char *err_msg)
Definition: service_srv_session_bits.h:43
Definition: service_srv_session.h:42
srv_session_error_cb void * plugix_ctx
Definition: service_srv_session.h:48
srv_session_error_cb error_cb
Definition: service_srv_session.h:48
int(* attach_session)(MYSQL_SESSION session, MYSQL_THD *ret_previous_thd)
Definition: service_srv_session.h:56
int(* server_is_available)()
Definition: service_srv_session.h:54
void(* deinit_session_thread)()
Definition: service_srv_session.h:45
int(* init_session_thread)(const void *plugin)
Definition: service_srv_session.h:43
int(* close_session)(MYSQL_SESSION session)
Definition: service_srv_session.h:52
int(* detach_session)(MYSQL_SESSION session)
Definition: service_srv_session.h:50