MySQL 9.1.0
Source Code Documentation
|
Header file for the Server session service. More...
Go to the source code of this file.
Classes | |
struct | srv_session_service_st |
Functions | |
int | srv_session_init_thread (const void *plugin) |
Initializes the current physical thread to use with session service. More... | |
void | srv_session_deinit_thread () |
Deinitializes the current physical thread to use with session service. More... | |
MYSQL_SESSION | srv_session_open (srv_session_error_cb error_cb, void *plugin_ctx) |
Opens a server session. More... | |
int | srv_session_detach (MYSQL_SESSION session) |
Detaches a session from current physical thread. More... | |
int | srv_session_close (MYSQL_SESSION session) |
Closes a previously opened session. More... | |
int | srv_session_server_is_available () |
Returns if the server is available (not booting or shutting down) More... | |
int | srv_session_attach (MYSQL_SESSION session, MYSQL_THD *ret_previous_thd) |
Attaches a session to current physical thread. More... | |
Variables | |
struct srv_session_service_st * | srv_session_service |
Header file for the Server session service.
This service is to provide of creating sessions with the server. These sessions can be furtherly used together with the Command service to execute commands in the server.
int srv_session_attach | ( | MYSQL_SESSION | session, |
MYSQL_THD * | ret_previous_thd | ||
) |
Attaches a session to current physical thread.
Previously attached THD is detached and returned through ret_previous_thd. THD associated with session is attached.
session | Session to attach |
ret_previous_thd | Previously attached THD |
Attaches a session to current physical thread.
int srv_session_close | ( | MYSQL_SESSION | session | ) |
Closes a previously opened session.
session | Session to close |
void srv_session_deinit_thread | ( | ) |
Deinitializes the current physical thread to use with session service.
Call this function ONLY in physical threads which were initialized using srv_session_init_thread().
Deinitializes the current physical thread to use with session service.
int srv_session_detach | ( | MYSQL_SESSION | session | ) |
Detaches a session from current physical thread.
Detaches a previously session. Which can only occur when the MYSQL_SESSION was manually attached by "srv_session_attach". Other srv_session calls automatically attached/detached the THD when the MYSQL_SESSION is used (for example command_service_run_command()).
session | Session to detach |
int srv_session_init_thread | ( | const void * | plugin | ) |
Initializes the current physical thread to use with session service.
Call this function ONLY in physical threads which are not initialized in any way by the server.
plugin | Pointer to the plugin structure, passed to the plugin over the plugin init function. |
Initializes the current physical thread to use with session service.
MYSQL_SESSION srv_session_open | ( | srv_session_error_cb | error_cb, |
void * | plugin_ctx | ||
) |
Opens a server session.
In a thread not initialized by the server itself, this function should be called only after srv_session_init_thread() has already been called.
error_cb | session error callback |
plugin_ctx | Plugin's context, opaque pointer that would be provided to callbacks. Might be NULL. |
Opens a server session.
int srv_session_server_is_available | ( | ) |
Returns if the server is available (not booting or shutting down)
struct srv_session_service_st * srv_session_service |