52#ifdef HAVE_PSI_STATEMENT_INTERFACE
244 void *callbacks_context);
Stores status of the currently executed statement.
Definition: sql_error.h:269
Definition: protocol_callback.h:53
Definition: srv_session.h:381
THD * backup_thd
Definition: srv_session.h:401
Session_backup_and_attach(Srv_session *sess, bool is_in_close_session)
Constructs a session state object.
Definition: srv_session.cc:460
~Session_backup_and_attach()
Destructs the session state object.
Definition: srv_session.cc:494
bool in_close_session
Definition: srv_session.h:402
Srv_session * session
Definition: srv_session.h:399
bool attach_error
Definition: srv_session.h:405
Srv_session * old_session
Definition: srv_session.h:400
Definition: srv_session.h:56
~Srv_session()
Definition: srv_session.cc:833
srv_session_state
Enum for the state of the session.
Definition: srv_session.h:138
@ SRV_SESSION_CLOSED
Definition: srv_session.h:152
@ SRV_SESSION_OPENED
Definition: srv_session.h:140
@ SRV_SESSION_ASSOCIATE
Definition: srv_session.h:148
@ SRV_SESSION_CREATED
Definition: srv_session.h:139
@ SRV_SESSION_DISASSOCIATED
Definition: srv_session.h:150
@ SRV_SESSION_ATTACHED
Definition: srv_session.h:141
@ SRV_SESSION_ASSOCIATED
Definition: srv_session.h:149
@ SRV_SESSION_DETACHED
Definition: srv_session.h:142
static bool module_deinit()
Deinitializes the module.
Definition: srv_session.cc:754
void set_detached()
Changes the state of a session to detached.
Definition: srv_session.cc:1115
int execute_command(enum enum_server_command command, const union COM_DATA *data, const CHARSET_INFO *client_cs, const struct st_command_service_cbs *command_callbacks, enum cs_text_or_binary text_or_binary, void *callbacks_context)
Executes a server command.
Definition: srv_session.cc:1120
bool detach()
Detaches the session from current physical thread.
Definition: srv_session.cc:988
void set_client_port(uint16_t port)
Sets the client port.
Definition: srv_session.cc:1264
Srv_session(srv_session_error_cb err_cb, void *err_cb_ctx)
Constructs a server session.
Definition: srv_session.cc:800
enum_vio_type m_vio_type
Definition: srv_session.h:377
bool close()
Closes the session.
Definition: srv_session.cc:1034
bool is_associated() const
Check if the session state is associated.
Definition: srv_session.cc:1218
bool is_attached() const
Returns if the session is in attached state.
Definition: srv_session.h:222
bool disassociate()
Uninstall the thd pointed by the session object as the current_thd.
Definition: srv_session.cc:1233
bool attach()
Attaches the session to the current physical thread.
Definition: srv_session.cc:914
static void check_for_stale_threads(const st_plugin_int *plugin)
Checks if a plugin has left threads and sessions.
Definition: srv_session.cc:711
static unsigned int thread_count(const void *plugin_name)
Returns the number currently running threads initialized by this class.
Definition: srv_session.cc:1279
LEX_CSTRING get_current_database() const
Returns the current database of a session.
Definition: srv_session.h:285
uint16_t get_client_port() const
Returns the client port.
Definition: srv_session.h:264
THD * get_thd()
Returns the internal THD object.
Definition: srv_session.h:249
bool is_associate() const
Check is the session state is associate.
Definition: srv_session.cc:1214
srv_session_state m_state
Definition: srv_session.h:376
bool set_connection_type(enum_vio_type type)
Sets the connection type.
Definition: srv_session.cc:1200
static bool init_thread(const void *plugin)
Initializes the current physical thread for use with this class.
Definition: srv_session.cc:627
bool open()
Opens a server session.
Definition: srv_session.cc:851
my_thread_id get_session_id() const
Returns the ID of a session.
Definition: srv_session.h:256
static bool module_init()
Initializes the module.
Definition: srv_session.cc:734
const bool m_free_resources
Definition: srv_session.h:379
Diagnostics_area m_da
Definition: srv_session.h:372
static bool is_valid(const Srv_session *session)
Checks if the session is valid.
Definition: srv_session.cc:780
void set_attached(const char *stack)
Sets session's state to attached.
Definition: srv_session.cc:1107
Protocol_callback m_protocol_error
Definition: srv_session.h:374
void set_associate()
Changes the state of a session to associate.
Definition: srv_session.cc:1210
THD * m_thd
Definition: srv_session.h:378
static unsigned int session_count()
Returns the number opened sessions in thread initialized by this class.
Definition: srv_session.cc:1274
static bool is_srv_session_thread()
Check if current physical thread was created to be used with this class.
Definition: srv_session.cc:1286
bool associate()
Installs the thd pointed by the session object as the current_thd.
Definition: srv_session.cc:1222
st_err_protocol_ctx m_err_protocol_ctx
Definition: srv_session.h:373
void set_disassociate()
Changes the state of a session to disassociate.
Definition: srv_session.cc:1212
static void deinit_thread()
Deinitializes the current physical thread for use with session service.
Definition: srv_session.cc:686
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
my_thread_id thread_id() const
Definition: sql_class.h:2534
uint16 peer_port
Definition: sql_class.h:1611
const LEX_CSTRING & db() const
Definition: sql_class.h:3937
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4573
A better implementation of the UNIX ctype(3) library.
enum_server_command
A list of all MySQL protocol commands.
Definition: my_command.h:48
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
uint32 my_thread_id
Definition: my_thread_local.h:34
static void free_resources()
Definition: mysql_secure_installation.cc:128
Interface of the Protocol_callback class, which is used by the Command service as proxy protocol.
Performance schema instrumentation interface.
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
required string type
Definition: replication_group_member_actions.proto:34
Header file for the Command service.
cs_text_or_binary
Definition: service_command.h:389
Header file for the Server session service.
void(* srv_session_error_cb)(void *ctx, unsigned int sql_errno, const char *err_msg)
Definition: service_srv_session_bits.h:43
LEX_CSTRING * plugin_name(st_plugin_int **ref)
Definition: sql_plugin_ref.h:95
PSI_statement_info stmt_info_new_packet
Definition: init_net_server_extension.cc:50
Definition: m_ctype.h:423
Definition: mysql_lex_string.h:40
Statement instrument information.
Definition: psi_statement_bits.h:133
Definition: srv_session.h:300
srv_session_error_cb handler
Definition: srv_session.h:304
st_err_protocol_ctx(srv_session_error_cb h, void *h_ctx)
Definition: srv_session.h:301
void * handler_context
Definition: srv_session.h:305
Definition: service_command.h:328
Definition: sql_plugin_ref.h:45
task_env * stack
Definition: task.cc:892
Definition: com_data.h:104
command
Definition: version_token.cc:280
enum_vio_type
Definition: violite.h:79