![]() |
MySQL 8.0.43
Source Code Documentation
|
Implementation of setters and getters of some properties of a session. More...
#include <stddef.h>#include <stdint.h>#include <atomic>#include "lex_string.h"#include "my_thread_local.h"#include "sql/sql_class.h"#include "sql/srv_session.h"#include "violite.h"Macros | |
| #define | VALID_SESSION(s) ((s) && Srv_session::is_valid((s))) |
Functions | |
| THD * | srv_session_info_get_thd (Srv_session *session) |
| Returns the THD of a session. More... | |
| my_thread_id | srv_session_info_get_session_id (Srv_session *session) |
| Returns the ID of a session. More... | |
| uint16_t | srv_session_info_get_client_port (Srv_session *session) |
| Returns the client port of a session. More... | |
| int | srv_session_info_set_client_port (Srv_session *session, uint16_t port) |
| Sets the client port of a session. More... | |
| LEX_CSTRING | srv_session_info_get_current_db (Srv_session *session) |
| Returns the current database of a session. More... | |
| int | srv_session_info_set_connection_type (Srv_session *session, enum_vio_type type) |
| Sets the connection type of a session. More... | |
| int | srv_session_info_killed (Srv_session *session) |
| Returns whether the session was killed. More... | |
| unsigned int | srv_session_info_session_count () |
| Returns the number opened sessions in thread initialized by srv_session service. More... | |
| unsigned int | srv_session_info_thread_count (const void *plugin) |
| Returns the number opened sessions in thread initialized by srv_session service. More... | |
Implementation of setters and getters of some properties of a session.
| #define VALID_SESSION | ( | s | ) | ((s) && Srv_session::is_valid((s))) |
| uint16_t srv_session_info_get_client_port | ( | Srv_session * | session | ) |
Returns the client port of a session.
| session | Session |
| LEX_CSTRING srv_session_info_get_current_db | ( | Srv_session * | session | ) |
Returns the current database of a session.
| session | Session |
| my_thread_id srv_session_info_get_session_id | ( | Srv_session * | session | ) |
Returns the ID of a session.
The value returned from THD::thread_id()
| session | Session |
| THD * srv_session_info_get_thd | ( | Srv_session * | session | ) |
Returns the THD of a session.
| session | Session |
| int srv_session_info_killed | ( | Srv_session * | session | ) |
Returns whether the session was killed.
| session | Session |
| unsigned int srv_session_info_session_count | ( | ) |
Returns the number opened sessions in thread initialized by srv_session service.
| int srv_session_info_set_client_port | ( | Srv_session * | session, |
| uint16_t | port | ||
| ) |
Sets the client port of a session.
| session | Session |
| port | Port number |
| int srv_session_info_set_connection_type | ( | Srv_session * | session, |
| enum_vio_type | type | ||
| ) |
Sets the connection type of a session.
| unsigned int srv_session_info_thread_count | ( | const void * | plugin | ) |
Returns the number opened sessions in thread initialized by srv_session service.
| plugin | Pointer to the plugin structure, passed to the plugin over the plugin init function. |