24#ifndef SQL_CLASS_INCLUDED
25#define SQL_CLASS_INCLUDED
83#include "mysqld_error.h"
143class Dictionary_client;
146class DD_kill_immunizer;
166 const char *src_function,
const char *src_file,
169 const char *src_function,
const char *src_file,
175 const char *src_function,
const char *src_file,
181#define THD_STAGE_INFO(thd, stage) \
182 (thd)->enter_stage(&stage, NULL, __func__, __FILE__, __LINE__)
338#define THD_SENTRY_MAGIC 0xfeedd1ff
339#define THD_SENTRY_GONE 0xdeadbeef
341#define THD_CHECK_SENTRY(thd) assert(thd->dbug_sentry == THD_SENTRY_MAGIC)
423 template <
typename T>
425 void *m =
alloc(
sizeof(T));
426 return m ==
nullptr ?
nullptr :
new (m) T;
428 template <
typename T>
735#define SUB_STMT_TRIGGER 1
736#define SUB_STMT_FUNCTION 2
755#define RETURN_NAME_AS_STRING(NAME) \
775 sprintf(
buf,
"<UNKNOWN SYSTEM THREAD: %d>", thread);
778#undef RETURN_NAME_AS_STRING
891 assert(
m_thd !=
nullptr);
1330 return pointer_cast<const Protocol_classic *>(
m_protocol);
1453 const char *calling_func,
const char *calling_file,
1673 bool binlog_rows_query);
1676 const unsigned char *extra_row_info);
1678 const uchar *old_data,
1679 const unsigned char *extra_row_info);
1682 const uchar *extra_row_info);
1688 template <
class RowsEventT>
1690 TABLE *table,
uint32 serv_id,
size_t needed,
bool is_transactional,
1691 const unsigned char *extra_row_info,
uint32 source_part_id = INT_MAX);
2393#if defined(ENABLED_PROFILING)
2408#ifdef HAVE_PSI_STATEMENT_INTERFACE
2415#ifdef HAVE_PSI_TRANSACTION_INTERFACE
2422#ifdef HAVE_PSI_IDLE_INTERFACE
2573 assert(((
file ==
nullptr) && (pos == 0)) ||
2574 ((
file !=
nullptr) && (pos != 0)));
2590 (
"m_trans_log_file: %s, m_trans_fixed_log_file: %s, "
2591 "m_trans_end_pos: %llu",
2601 (
"file: %s, pos: %llu", file_var ? *file_var :
"<none>",
2602 pos_var ? *pos_var : 0));
2611 (
"file: %s, pos: %llu", file_var ? *file_var :
"<none>",
2612 pos_var ? *pos_var : 0));
2796#if defined(ENABLED_DEBUG_SYNC)
2798 struct st_debug_sync_control *debug_sync_control;
2812 explicit THD(
bool enable_plugins =
true);
2863 enum_thd_life_cycle_stages::ACTIVE};
2949 void disconnect(
bool server_shutdown =
false);
2962 size_t query_len,
bool is_trans,
bool direct,
2963 bool suppress_use,
int errcode);
2969 const char *src_function,
const char *src_file,
2970 int src_line)
override {
2980 enter_stage(stage, old_stage, src_function, src_file, src_line);
2985 const char *src_file,
int src_line)
override {
2997 enter_stage(stage,
nullptr, src_function, src_file, src_line);
3033 bool needs_thr_lock_abort)
override;
3036 bool *victimized)
override;
3165 const char *from,
size_t from_length,
3187 bool is_connected(
bool use_cached_connection_alive =
false) final;
3258 bool copy_conditions =
true) {
3276 template <
typename ProtocolClass>
3297 DBUG_PRINT(
"info", (
"change_item_tree place %p old_value %p new_value %p",
3298 place, *place, new_value));
3327 uint add_state_flags);
3439 return variables.gtid_next_list.is_non_null
3773 auto xid_state = trx->xid_state();
3788 auto xid_state = trx->xid_state();
3792#ifdef HAVE_GTID_NEXT_LIST
3817#ifdef HAVE_GTID_NEXT_LIST
3818 owned_gtid_set.
clear();
3901#ifdef HAVE_PSI_THREAD_INTERFACE
3921 return copy_db_to(
const_cast<char const **
>(p_db), p_db_length);
4041 uint code,
const char *message_text);
4110 size_t query_length_arg [[maybe_unused]]) {
4113 static_cast<uint>(query_length_arg));
4114#ifdef HAVE_PSI_THREAD_INTERFACE
4117 (query_arg,
static_cast<uint>(query_length_arg));
4142 void set_query(
const char *query_arg,
size_t query_length_arg) {
4298 bool some_non_transactional_table,
4299 bool non_transactional_tables_are_tmp);
4382 MY_ATTRIBUTE((format(printf, 2, 3)));
4389 MY_ATTRIBUTE((format(printf, 3, 4)));
4393 va_list args) MY_ATTRIBUTE((format(printf, 3, 0)));
4394 void vsyntax_error_at(const
char *pos_in_lexer_raw_buffer, const
char *format,
4395 va_list args) MY_ATTRIBUTE((format(printf, 3, 0)));
4713 const char *message =
nullptr);
4776 return thd->
variables.xa_detach_on_prepare;
app_data_ptr new_data(u_int n, char *val, cons_type consensus)
uint32_t Access_bitmask
Definition: auth_acls.h:34
int64 query_id_t
Definition: binlog.h:72
API for getting cost estimates for server operations that are not directly related to a table object.
Definition: opt_costmodel.h:52
void init()
Initialize the cost model object for a query.
Definition: opt_costmodel.cc:45
Stores status of the currently executed statement.
Definition: sql_error.h:269
bool is_error() const
Definition: sql_error.h:366
void reset_diagnostics_area()
Clear this Diagnostics Area.
Definition: sql_error.cc:356
Diagnostics_area * pop_diagnostics_area()
Pop "this" off the Diagnostics Area stack.
Definition: sql_error.cc:638
const Diagnostics_area * stacked_da() const
Returns the Diagnostics Area below the current diagnostics area on the stack.
Definition: sql_error.h:592
void push_diagnostics_area(THD *thd, Diagnostics_area *da, bool copy_conditions)
Push the given Diagnostics Area on top of the stack.
Definition: sql_error.cc:627
List of Discrete_interval objects.
Definition: discrete_interval.h:87
bool append(Discrete_interval *new_interval)
Definition: discrete_interval.h:117
void clear()
Definition: discrete_interval.h:144
An instance of the global read lock in a connection.
Definition: sql_class.h:828
bool can_acquire_protection() const
Check if this connection can acquire protection against GRL and emit error if otherwise.
Definition: sql_class.h:854
MDL_ticket * m_mdl_blocks_commits_lock
Also in order to acquire the global read lock, the connection must acquire a shared metadata lock in ...
Definition: sql_class.h:879
MDL_ticket * m_mdl_global_shared_lock
In order to acquire the global read lock, the connection must acquire shared metadata lock in GLOBAL ...
Definition: sql_class.h:873
enum_grl_state m_state
Definition: sql_class.h:867
bool is_acquired() const
Definition: sql_class.h:862
Global_read_lock()
Definition: sql_class.h:836
static bool global_read_lock_active()
Used by innodb memcached server to check if any connections have global read lock.
Definition: sql_class.h:848
enum_grl_state
Definition: sql_class.h:830
@ GRL_ACQUIRED_AND_BLOCKS_COMMIT
Definition: sql_class.h:833
@ GRL_ACQUIRED
Definition: sql_class.h:832
@ GRL_NONE
Definition: sql_class.h:831
Represents a set of GTIDs.
Definition: rpl_gtid.h:1455
void clear()
Removes all gtids from this Gtid_set.
Definition: rpl_gtid_set.cc:263
Either statement transaction or normal transaction - related thread-specific storage engine data.
Definition: transaction_info.h:402
This class represents the interface for internal error handlers.
Definition: error_handler.h:47
A registry for item tree transformations performed during query optimization.
Definition: sql_class.h:530
bool m_cancel
Definition: sql_class.h:541
Item * old_value
Definition: sql_class.h:539
Item_change_record(Item **place, Item *new_value)
Definition: sql_class.h:536
Item ** place
Definition: sql_class.h:538
Item * new_value
Definition: sql_class.h:540
Item_change_record()=default
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:853
Definition: sql_list.h:434
Tables that were locked with LOCK TABLES statement.
Definition: locked_tables_list.h:89
An interface to separate the MDL module from the THD, and the rest of the server code.
Definition: mdl.h:85
Context of the owner of metadata locks.
Definition: mdl.h:1411
void set_explicit_duration_for_all_locks()
Set explicit duration for all locks in the context.
Definition: mdl.cc:4630
Savepoint for MDL context.
Definition: mdl.h:1316
A granted metadata lock.
Definition: mdl.h:984
Table modification plan for JOIN-less statements (update/delete)
Definition: opt_explain.h:82
Storage for backup of Open_tables_state.
Definition: sql_class.h:688
MDL_savepoint mdl_system_tables_svp
When we backup the open tables state to open a system table or tables, we want to save state of metad...
Definition: sql_class.h:697
Class that holds information about tables which were opened and locked by the thread.
Definition: sql_class.h:552
MYSQL_LOCK * lock
Definition: sql_class.h:620
TABLE * open_tables
List of regular tables in use by this thread.
Definition: sql_class.h:599
MYSQL_LOCK * extra_lock
Definition: sql_class.h:627
Open_tables_state()
This constructor initializes Open_tables_state instance which can only be used as backup storage.
Definition: sql_class.h:674
uint state_flags
Definition: sql_class.h:667
void reset_open_tables_state()
Definition: sql_class.cc:614
Reprepare_observer * pop_reprepare_observer()
Definition: sql_class.h:586
void push_reprepare_observer(Reprepare_observer *o)
Definition: sql_class.h:582
enum_flags
Definition: sql_class.h:659
@ BACKUPS_AVAIL
Definition: sql_class.h:660
@ SYSTEM_TABLES
Definition: sql_class.h:661
enum enum_locked_tables_mode locked_tables_mode
Definition: sql_class.h:657
Reprepare_observer * get_reprepare_observer() const
Definition: sql_class.h:577
TABLE * temporary_tables
List of temporary tables used by this thread.
Definition: sql_class.h:605
void reset_reprepare_observers()
Definition: sql_class.h:592
void set_open_tables_state(Open_tables_state *state)
Definition: sql_class.cc:599
Prealloced_array< Reprepare_observer *, 4 > m_reprepare_observers
A stack of Reprepare_observer-instances.
Definition: sql_class.h:574
A per-session context which is always available at any point of execution, because in practice it's a...
Definition: opt_trace_context.h:90
Profiling state for a single THD; contains multiple QUERY_PROFILE objects.
Definition: sql_profile.h:226
Internal state of the parser.
Definition: sql_lexer_parser_state.h:44
Plugin array helper class.
Definition: sql_plugin_ref.h:110
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:71
Container for all prepared statements created/used in a connection.
Definition: sql_class.h:478
Prepared_statement_map()
Definition: sql_class.cc:2048
void claim_memory_ownership(bool claim)
Definition: sql_class.cc:2110
Prepared_statement * find_by_name(const LEX_CSTRING &name)
Find prepared statement by name.
Definition: sql_class.cc:2085
int insert(Prepared_statement *statement)
Insert a new statement to the thread-local prepared statement map.
Definition: sql_class.cc:2054
Prepared_statement * m_last_found_statement
Definition: sql_class.h:520
~Prepared_statement_map()
Definition: sql_class.cc:2134
void reset()
Definition: sql_class.cc:2116
void erase(Prepared_statement *statement)
Erase all prepared statements (calls Prepared_statement destructor).
Definition: sql_class.cc:2099
collation_unordered_map< std::string, Prepared_statement * > names_hash
Definition: sql_class.h:519
malloc_unordered_map< ulong, std::unique_ptr< Prepared_statement > > st_hash
Definition: sql_class.h:518
Prepared_statement * find(ulong id)
Find prepared statement by ID.
Definition: sql_class.cc:2090
Prepared_statement: a statement that can contain placeholders.
Definition: sql_prepare.h:346
Definition: protocol_classic.h:240
Definition: protocol_classic.h:52
Class used for the old (MySQL 4.0 protocol).
Definition: protocol_classic.h:218
Definition: protocol.h:33
Definition: sql_class.h:343
enum_state get_state() const
Definition: sql_class.h:406
bool is_stmt_prepare_or_first_stmt_execute() const
Definition: sql_class.h:411
T * memdup_typed(const T *mem)
Definition: sql_class.h:429
enum_state
Definition: sql_class.h:362
@ STMT_INITIALIZED
Definition: sql_class.h:363
@ STMT_ERROR
Definition: sql_class.h:368
@ STMT_REGULAR_EXECUTION
Definition: sql_class.h:366
@ STMT_PREPARED
Definition: sql_class.h:365
@ STMT_INITIALIZED_FOR_SP
Definition: sql_class.h:364
@ STMT_EXECUTED
Definition: sql_class.h:367
bool is_repreparing
To check whether a reprepare operation is active.
Definition: sql_class.h:354
bool is_stmt_prepare() const
Definition: sql_class.h:407
LEX_CSTRING strmake(LEX_CSTRING str)
Definition: sql_class.h:436
void reset_item_list()
Definition: sql_class.h:401
char * mem_strdup(const char *str)
Definition: sql_class.h:432
void free_items()
Definition: sql_class.cc:2012
Item * m_item_list
Definition: sql_class.h:349
void * alloc(size_t size)
Definition: sql_class.h:417
Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg)
Definition: sql_class.h:388
bool is_regular() const
Definition: sql_class.h:415
void set_query_arena(const Query_arena &set)
Copies memory-managing members from set.
Definition: sql_class.cc:2023
char * strmake(const char *str, size_t size) const
Definition: sql_class.h:433
enum_state state
Definition: sql_class.h:385
void set_item_list(Item *item)
Definition: sql_class.h:402
void add_item(Item *item)
Definition: sql_class.cc:2007
void * mem_calloc(size_t size)
Definition: sql_class.h:418
void swap_query_arena(const Query_arena &source, Query_arena *backup)
Copy the current arena to backup and set the current arena to match source
Definition: sql_class.cc:2029
void set_state(enum_state state_arg)
Definition: sql_class.h:405
T * alloc_typed()
Definition: sql_class.h:424
Query_arena()
Definition: sql_class.h:395
Item * item_list() const
Definition: sql_class.h:400
bool is_stmt_prepare_or_first_sp_execute() const
Definition: sql_class.h:408
void * memdup(const void *str, size_t size)
Definition: sql_class.h:442
MEM_ROOT * mem_root
Definition: sql_class.h:352
virtual ~Query_arena()=default
Definition: query_result.h:54
Definition: sql_lex.h:2507
Definition: rpl_rli.h:203
An interface that is used to take an action when the locking module notices that a table version has ...
Definition: sql_prepare.h:81
Common base class for all row-containing log events.
Definition: log_event.h:2653
Definition: rpl_context.h:415
A set of THD members describing the current authenticated user.
Definition: sql_security_ctx.h:55
Definition: sys_vars_resource_mgr.h:70
Definition: session_tracker.h:129
Sql_cmd_common_signal represents the common properties of the SIGNAL and RESIGNAL statements.
Definition: sql_signal.h:88
Sql_cmd_resignal represents a RESIGNAL statement.
Definition: sql_signal.h:168
Sql_cmd_signal represents a SIGNAL statement.
Definition: sql_signal.h:148
Representation of a SQL condition.
Definition: sql_error.h:58
enum_severity_level
Enumeration value describing the severity of the condition.
Definition: sql_error.h:63
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
Used to save context when executing a function or trigger.
Definition: sql_class.h:738
ulonglong option_bits
Definition: sql_class.h:740
bool enable_slow_log
Definition: sql_class.h:749
ulong client_capabilities
Definition: sql_class.h:747
ulonglong first_successful_insert_id_in_cur_stmt
Definition: sql_class.h:742
ha_rows examined_row_count
Definition: sql_class.h:746
SAVEPOINT * savepoints
Definition: sql_class.h:750
ulonglong current_found_rows
Definition: sql_class.h:744
ha_rows sent_row_count
Definition: sql_class.h:746
ulonglong previous_found_rows
Definition: sql_class.h:745
enum enum_check_fields check_for_truncated_fields
Definition: sql_class.h:751
Discrete_intervals_list auto_inc_intervals_forced
Definition: sql_class.h:743
ha_rows num_truncated_fields
Definition: sql_class.h:746
uint in_sub_stmt
Definition: sql_class.h:748
ulonglong first_successful_insert_id_in_prev_stmt
Definition: sql_class.h:741
A derived from THD::Attachable_trx class allows updates in the attachable transaction.
Definition: sql_class.h:2032
bool is_read_only() const override
Definition: sql_class.h:2034
Attachable_trx_rw(const Attachable_trx_rw &)
Attachable_trx_rw & operator=(const Attachable_trx_rw &)
Attachable_trx_rw(THD *thd)
Definition: sql_class.cc:530
Class representing read-only attachable transaction, encapsulates knowledge how to backup state of cu...
Definition: sql_class.h:1989
THD * m_thd
THD instance.
Definition: sql_class.h:2000
Transaction_state m_trx_state
Transaction state data.
Definition: sql_class.h:2011
virtual ~Attachable_trx()
Definition: sql_class.cc:486
Attachable_trx * m_prev_attachable_trx
Attachable_trx which was active for the THD before when this transaction was started (NULL in most ca...
Definition: sql_class.h:2008
Attachable_trx(THD *thd, Attachable_trx *prev_trx)
Definition: sql_class.cc:391
virtual bool is_read_only() const
Definition: sql_class.h:1996
enum_reset_lex m_reset_lex
Definition: sql_class.h:2002
Attachable_trx * get_prev_attachable_trx() const
Definition: sql_class.h:1993
Attachable_trx(const Attachable_trx &)
Attachable_trx & operator=(const Attachable_trx &)
Query plan for EXPLAINable commands, should be locked with LOCK_query_plan before using.
Definition: sql_class.h:1354
void set_query_plan(enum_sql_command sql_cmd, LEX *lex_arg, bool ps)
Set query plan.
Definition: sql_class.cc:2672
void assert_plan_is_locked_if_other() const
Asserts that current_thd has locked this plan, if it does not own it.
Definition: sql_class.cc:2667
bool is_single_table_plan() const
Definition: sql_class.cc:3009
THD *const thd
Definition: sql_class.h:1356
Query_plan & operator=(const Query_plan &)
not defined
Query_plan(const Query_plan &)
not defined
bool is_ps_query() const
Definition: sql_class.h:1409
LEX * lex
LEX of topmost statement.
Definition: sql_class.h:1360
bool is_ps
True if query is run in prepared statement.
Definition: sql_class.h:1364
const Modification_plan * modification_plan
Query plan for UPDATE/DELETE/INSERT/REPLACE.
Definition: sql_class.h:1362
Modification_plan const * get_modification_plan() const
Definition: sql_class.h:1405
enum_sql_command get_command() const
Definition: sql_class.h:1397
LEX * get_lex() const
Definition: sql_class.h:1401
Query_plan(THD *thd_arg)
Definition: sql_class.h:1379
enum_sql_command sql_command
Original sql_command;.
Definition: sql_class.h:1358
void set_modification_plan(Modification_plan *plan_arg)
Definition: sql_class.cc:2688
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
bool is_being_disposed() const
Check if THD is being disposed (i.e.
Definition: sql_class.cc:1318
enum_vio_type get_vio_type() const
Definition: sql_class.cc:1925
std::atomic< mysql_cond_t * > current_cond
Pointer to the condition variable the thread owning this THD is currently waiting for.
Definition: sql_class.h:1513
bool has_gtid_consistency_violation
Definition: sql_class.h:3862
friend void my_message_sql(uint, const char *, myf)
All global error messages are sent here where the first one is stored for the client.
Definition: mysqld.cc:3779
Rpl_thd_context rpl_thd_ctx
Definition: sql_class.h:3807
struct THD_timer_info * timer
Holds active timer object.
Definition: sql_class.h:1806
void notify_hton_post_release_exclusive(const MDL_key *mdl_key) override
Notify interested storage engines that we have just released exclusive lock for the key.
Definition: sql_class.cc:3036
uint fill_variables_recursion_level
Definition: sql_class.h:1611
thd_scheduler scheduler
Definition: sql_class.h:3924
ulonglong first_successful_insert_id_in_prev_stmt_for_binlog
Definition: sql_class.h:2133
mysql_mutex_t LOCK_thd_query
Protects THD::m_query_string.
Definition: sql_class.h:1199
PSI_statement_locker * m_statement_psi
Current statement instrumentation.
Definition: sql_class.h:2407
std::unique_ptr< dd::cache::Dictionary_client > m_dd_client
Definition: sql_class.h:988
void disconnect(bool server_shutdown=false)
Disconnect the associated communication endpoint.
Definition: sql_class.cc:1615
bool m_is_admin_conn
Definition: sql_class.h:1551
PSI_transaction_locker_state m_transaction_state
Current transaction instrumentation state.
Definition: sql_class.h:2417
PSI_stage_progress * m_stage_progress_psi
Current stage progress instrumentation.
Definition: sql_class.h:2398
std::atomic< bool > m_is_system_user
Flag that indicates if the user of current session has SYSTEM_USER privilege.
Definition: sql_class.h:4618
void cleanup_connection(void)
Definition: sql_class.cc:1154
Gtid owned_gtid
The GTID of the currently owned transaction.
Definition: sql_class.h:3698
sql_digest_state * m_digest
Current statement digest.
Definition: sql_class.h:2400
Diagnostics_area m_query_rewrite_plugin_da
Definition: sql_class.h:4331
void clear_binlog_local_stmt_filter()
Definition: sql_class.h:1791
struct System_status_var * initial_status_var
Definition: sql_class.h:1113
ulonglong first_successful_insert_id_in_cur_stmt
Definition: sql_class.h:2139
void store_globals()
Definition: sql_class.cc:1684
Secondary_engine_optimization m_secondary_engine_optimization
This flag tells if a secondary storage engine can be used to execute a query in this session.
Definition: sql_class.h:4611
void push_lock_usec(ulonglong &top)
Definition: sql_class.h:1579
rpl_event_coordinates binlog_next_event_pos
Definition: sql_class.h:1656
void reset_n_backup_open_tables_state(Open_tables_backup *backup, uint add_state_flags)
Definition: sql_class.cc:2178
void claim_memory_ownership(bool claim)
Claim all the memory used by the THD object.
Definition: sql_class.cc:2914
void inc_status_select_range()
Definition: sql_class.cc:2409
void set_row_count_func(longlong row_count_func)
Definition: sql_class.h:2325
std::unordered_map< unsigned int, void * > external_store_
Definition: sql_class.h:4697
bool is_a_srv_session() const
Definition: sql_class.h:4499
void set_catalog(const LEX_CSTRING &catalog)
Definition: sql_class.h:1420
void clear_binlog_table_maps()
Definition: sql_class.h:1894
void enable_low_level_commit_ordering()
Enables ordering in ha_commit_low.
Definition: sql_class.cc:2994
void unlock_query_plan()
Definition: sql_class.h:1259
void vsyntax_error_at(const YYLTYPE &location, const char *format, va_list args)
Definition: sql_class.cc:2782
void get_trans_pos(const char **file_var, my_off_t *pos_var) const
Definition: sql_class.h:2596
void rpl_detach_engine_ha_data()
When the thread is a binlog or slave applier it detaches the engine ha_data associated with it and me...
Definition: sql_class.cc:2948
uint fill_status_recursion_level
Used by fill_status() to avoid acquiring LOCK_status mutex twice when this function is called recursi...
Definition: sql_class.h:1610
longlong m_row_count_func
Stores the result of ROW_COUNT() function.
Definition: sql_class.h:2320
unsigned long bind_parameter_values_count
the number of elements in parameters
Definition: sql_class.h:4655
bool is_current_stmt_binlog_disabled() const
Determine if binlogging is currently disabled for this session.
Definition: sql_class.cc:2974
PS_PARAM * bind_parameter_values
The parameter value bindings for the current query.
Definition: sql_class.h:4653
static const int OWNED_SIDNO_GTID_SET
Definition: sql_class.h:3699
Discrete_intervals_list auto_inc_intervals_forced
Definition: sql_class.h:2185
void set_psi(PSI_thread *psi)
Save the performance schema thread instrumentation associated with this user session.
Definition: sql_class.h:3942
bool add_external(unsigned int slot, void *data)
Definition: sql_class.cc:3233
void request_persist_gtid_by_se()
Request SE to persist GTID explicitly.
Definition: sql_class.h:3758
void set_query(const char *query_arg, size_t query_length_arg)
Assign a new value to thd->m_query_string.
Definition: sql_class.h:4142
const String normalized_query()
The current query in normalized form.
Definition: sql_class.cc:3014
void reset_query_for_display()
Reset query string to be displayed in PFS.
Definition: sql_class.h:4126
PSI_thread * get_psi() const
Read the performance schema thread instrumentation associated with this user session.
Definition: sql_class.h:3949
void init_cost_model()
Initialize the optimizer cost model.
Definition: sql_class.h:4370
std::bitset< SE_GTID_MAX > Se_GTID_flagset
Definition: sql_class.h:3724
void syntax_error_at(const YYLTYPE &location)
Definition: sql_class.h:4385
ulong statement_id_counter
Definition: sql_class.h:2440
void enter_cond(mysql_cond_t *cond, mysql_mutex_t *mutex, const PSI_stage_info *stage, PSI_stage_info *old_stage, const char *src_function, const char *src_file, int src_line) override
Enter a condition wait.
Definition: sql_class.h:2967
bool is_log_reset() const
Definition: sql_class.h:3752
bool slave_thread
Definition: sql_class.h:2672
bool m_is_fatal_error
Set to true if execution of the current compound statement can not continue.
Definition: sql_class.h:2684
rpl_sid owned_sid
For convenience, this contains the SID component of the GTID stored in owned_gtid.
Definition: sql_class.h:3706
void shutdown_active_vio()
Definition: sql_class.cc:1930
std::unique_ptr< Protocol_binary > protocol_binary
Definition: sql_class.h:1303
bool is_waiting_for_disk_space() const
Returns the current waiting_for_disk_space flag value.
Definition: sql_class.h:4580
uint dbug_sentry
Definition: sql_class.h:1492
ulonglong first_successful_insert_id_in_prev_stmt
Definition: sql_class.h:2126
Diagnostics_area main_da
Definition: sql_class.h:4329
dd::cache::Dictionary_client * dd_client() const
Definition: sql_class.h:982
enum_binlog_query_type
Definition: sql_class.h:2951
@ ROW_QUERY_TYPE
Definition: sql_class.h:2953
@ QUERY_TYPE_COUNT
Definition: sql_class.h:2958
@ STMT_QUERY_TYPE
Definition: sql_class.h:2956
SSL_handle m_SSL
SSL data attached to this connection.
Definition: sql_class.h:1347
dd::DD_kill_immunizer * kill_immunizer
When operation on DD tables is in progress then THD is set to kill immune mode.
Definition: sql_class.h:2665
LEX_CSTRING m_invoker_host
Definition: sql_class.h:4354
Prealloced_array< unsigned long, 11 > audit_class_mask
Array of bits indicating which audit classes have already been added to the list of audit plugins whi...
Definition: sql_class.h:2794
bool is_applier_thread() const
Definition: sql_class.h:1906
void set_invoker(const LEX_STRING *user, const LEX_STRING *host)
Definition: sql_class.h:4304
void set_new_thread_id()
Assign a value to m_thread_id by calling Global_THD_manager::get_new_thread_id().
Definition: sql_class.cc:1138
XID debug_binlog_xid_last
Definition: sql_class.h:4550
PSI_statement_locker_state m_statement_state
Current statement instrumentation state.
Definition: sql_class.h:2410
bool notify_hton_pre_acquire_exclusive(const MDL_key *mdl_key, bool *victimized) override
Notify/get permission from interested storage engines before acquiring exclusive lock for the key.
Definition: sql_class.cc:3030
const st_plugin_int * m_plugin
Stores the plugin id it is attached to (if any).
Definition: sql_class.h:4528
void pop_diagnostics_area()
Pop the top DA off the Diagnostics Area stack.
Definition: sql_class.h:3264
bool m_binlog_invoker
It will be set TRUE if CURRENT_USER() is called in account management statements or default definer i...
Definition: sql_class.h:4345
MDL_context mdl_context
Definition: sql_class.h:946
void unpin_gtid()
Unpin and free GTID and SID.
Definition: sql_class.h:3733
mysql_cond_t COND_thr_lock
Condition variable used for waiting by the THR_LOCK.c subsystem.
Definition: sql_class.h:1517
thr_lock_type insert_lock_default
Type of lock to be used for INSERT statement if lock is not specified explicitly.
Definition: sql_class.h:1597
bool running_explain_analyze
Whether we are currently in the execution phase of an EXPLAIN ANALYZE query.
Definition: sql_class.h:2656
void clear_current_query_costs()
Clear the query costs attributes for the current query.
Definition: sql_class.h:1136
bool has_invoker() const
Definition: sql_class.h:4312
std::unique_ptr< Protocol_text > protocol_text
Definition: sql_class.h:1302
void increment_updates_counter()
Definition: sql_class.cc:2629
const char * proc_info_session(THD *invoking_thd) const
Return the m_proc_info, possibly using the string of an older server release, according to @session....
Definition: sql_class.h:1466
collation_unordered_map< std::string, unique_ptr_my_free< Table_ref > > handler_tables_hash
Definition: sql_class.h:1482
enum_tx_isolation tx_isolation
Definition: sql_class.h:2525
bool is_error() const
true if there is an error in the error stack.
Definition: sql_class.h:3209
unsigned char * m_token_array
Current statement digest token array.
Definition: sql_class.h:2402
void set_ssl(Vio *vio)
Definition: sql_class.h:2904
void save_current_query_costs()
Save the current query costs attributes in the thread session status.
Definition: sql_class.h:1151
bool is_cleanup_done()
Definition: sql_class.cc:1206
my_off_t m_trans_end_pos
Definition: sql_class.h:1874
void restore_sub_statement_state(Sub_statement_state *backup)
Definition: sql_class.cc:2291
THD * get_thd() override
Within MDL subsystem this one is only used for DEBUG_SYNC.
Definition: sql_class.h:3013
void leave_locked_tables_mode()
Leave explicit LOCK TABLES or prelocked mode and restore value of transaction sentinel in MDL subsyst...
Definition: sql_class.cc:2503
my_thread_id thread_id() const
Definition: sql_class.h:2462
resourcegroups::Resource_group_ctx * resource_group_ctx()
Get resource group context.
Definition: sql_class.h:3932
void set_trans_pos(const char *file, my_off_t pos)
Functions to set and get transaction position.
Definition: sql_class.h:2571
my_thread_t real_id
Definition: sql_class.h:2442
void push_protocol(const std::unique_ptr< ProtocolClass > &protocol)
Definition: sql_class.h:3277
void begin_attachable_rw_transaction()
Start a read-write attachable transaction.
Definition: sql_class.cc:2213
void lock_query_plan()
Locks the query plan of this THD.
Definition: sql_class.h:1258
void nocheck_register_item_tree_change(Item **place, Item *new_value)
Remember that place was updated with new_value so it can be restored by rollback_item_tree_changes().
Definition: sql_class.cc:1970
ha_rows get_examined_row_count() const
Definition: sql_class.h:2371
void get_trans_fixed_pos(const char **file_var, my_off_t *pos_var) const
Definition: sql_class.h:2606
bool copy_db_to(char **p_db, size_t *p_db_length) const
Definition: sql_class.h:3920
void set_security_context(Security_context *sctx)
Definition: sql_class.h:1286
void send_kill_message() const
Definition: sql_class.cc:2142
void inc_status_select_scan()
Definition: sql_class.cc:2425
void reset_gtid_persisted_by_se()
Reset by SE at transaction end after persisting GTID.
Definition: sql_class.h:3764
bool tx_commit_pending
Definition: sql_class.h:1054
USER_CONN * m_user_connect
Definition: sql_class.h:2351
void swap_rewritten_query(String &query_arg)
Set the rewritten query (with passwords obfuscated etc.) on the THD.
Definition: sql_class.cc:3110
Cost_model_server m_cost_model
Optimizer cost model for server operations.
Definition: sql_class.h:4362
char scramble[SCRAMBLE_LENGTH+1]
Definition: sql_class.h:2668
my_timeval query_start_timeval_trunc(uint decimals)
Definition: sql_class.cc:974
void inc_status_sort_scan()
Definition: sql_class.cc:2458
PSI_stage_key m_current_stage_key
Definition: sql_class.h:1423
union THD::@167 sys_var_tmp
Relay_log_info * rli_slave
Definition: sql_class.h:1051
uint open_options
Definition: sql_class.h:2464
double double_value
Definition: sql_class.h:2744
List< Security_context > m_view_ctx_list
Definition: sql_class.h:1287
bool is_current_stmt_binlog_enabled_and_caches_empty() const
Checks whether binlog caches are disabled (binlog does not cache data) or empty in case binloggging i...
Definition: sql_class.cc:2984
Query_arena * stmt_arena
Definition: sql_class.h:2104
enum_binlog_format current_stmt_binlog_format
Indicates the format in which the current statement will be logged.
Definition: sql_class.h:1832
void reset_query()
Definition: sql_class.h:4147
void clear_clone_vio()
Clear clone network Vio for remote clone.
Definition: sql_class.h:2926
void inc_status_created_tmp_tables()
Definition: sql_class.cc:2385
uint get_rand_seed() const override
Provide thread specific random seed for MDL_context's PRNG.
Definition: sql_class.h:3051
ha_rows m_sent_row_count
Number of rows we actually sent to the client, including "synthetic" rows in ROLLUP etc.
Definition: sql_class.h:2336
std::atomic< PSI_thread * > m_psi
Performance schema thread instrumentation for this session.
Definition: sql_class.h:3959
void raise_error_printf(uint code,...)
Raise an exception condition, with a formatted message.
Definition: sql_class.cc:924
bool m_is_low_level_commit_ordering_enabled
Flag indicating whether additional ordering in the ha_commit_low function is enabled.
Definition: sql_class.h:1542
void set_status_no_index_used()
Definition: sql_class.cc:2466
static const int OWNED_SIDNO_ANONYMOUS
Definition: sql_class.h:3700
Vio * clone_vio
Definition: sql_class.h:2065
bool is_server_upgrade_thread() const
Definition: sql_class.h:2497
void end_statement()
Definition: sql_class.cc:2035
LEX_CSTRING m_query_string
The query associated with this statement.
Definition: sql_class.h:993
const CHARSET_INFO * collation()
Definition: sql_class.h:3059
bool charset_is_collation_connection
Definition: sql_class.h:2722
LEX_CSTRING m_invoker_user
It points to the invoker in the Query_log_event.
Definition: sql_class.h:4353
bool is_extrenal_xa() const
Definition: sql_class.h:3786
void reset_binlog_local_stmt_filter()
Definition: sql_class.h:1787
mysql_mutex_t LOCK_query_plan
Protects query plan (SELECT/UPDATE/DELETE's) from being freed/changed while another thread explains i...
Definition: sql_class.h:1246
void time_out_user_resource_limits()
Definition: sql_class.cc:2652
void clear_active_vio()
Definition: sql_class.h:2910
const Protocol * get_protocol() const
Definition: sql_class.h:1305
ulonglong m_lock_usec
Time spent waiting for TABLE locks and DATA locks.
Definition: sql_class.h:1574
bool need_binlog_invoker() const
Definition: sql_class.h:4302
bool is_dd_system_thread() const
Definition: sql_class.h:2471
ulong max_client_packet_length
Definition: sql_class.h:1479
int thd_tx_priority
Definition: sql_class.h:2541
LEX_CSTRING m_db
Name of the current (default) database.
Definition: sql_class.h:1014
std::atomic< bool > m_safe_to_display
Definition: sql_class.h:995
binlog_filter_state get_binlog_local_stmt_filter() const
Definition: sql_class.h:1801
uchar * binlog_row_event_extra_data
Definition: sql_class.h:1665
THR_LOCK_INFO lock_info
Definition: sql_class.h:1185
bool derived_tables_processing
Definition: sql_class.h:2726
void record_first_successful_insert_id_in_cur_stmt(ulonglong id_arg)
Definition: sql_class.h:2222
long long_value
Definition: sql_class.h:2741
LEX_CSTRING m_catalog
Currently selected catalog.
Definition: sql_class.h:1001
Opt_trace_context opt_trace
optimizer trace of current statement
Definition: sql_class.h:3991
bool send_result_set_row(const mem_root_deque< Item * > &row_items)
Send one result set row.
Definition: sql_class.cc:2861
bool is_system_thread() const
Definition: sql_class.h:2468
void set_admin_connection(bool admin)
Definition: sql_class.h:1554
class THD::Query_plan query_plan
void reset_sub_statement_state(Sub_statement_state *backup, uint new_state)
Definition: sql_class.cc:2248
bool is_a_srv_session_thd
Variable to mark if the object is part of a Srv_session object, which aggregates THD.
Definition: sql_class.h:4525
Thd_mem_cnt m_mem_cnt
Controlled memory stats for this session.
Definition: sql_class.h:937
LEX * lex
Definition: sql_class.h:981
bool status_var_aggregated
Definition: sql_class.h:1115
ulonglong current_found_rows
Dynamic, collected and set also in subqueries.
Definition: sql_class.h:2263
void increment_questions_counter()
Definition: sql_class.cc:2635
void increment_user_connections_counter()
Definition: sql_class.cc:2610
void set_clone_vio(Vio *vio)
Set active clone network Vio for remote clone.
Definition: sql_class.h:2919
Time_zone * time_zone()
Definition: sql_class.h:3063
void set_system_user(bool system_user_flag)
Sets the system_user flag atomically for the current session.
Definition: sql_class.h:4749
const Diagnostics_area * get_stmt_da() const
Returns first Diagnostics Area for the current statement.
Definition: sql_class.h:3215
query_id_t query_id
Definition: sql_class.h:2437
void set_safe_display(bool safe)
Set if the query string to be safe to display.
Definition: sql_class.h:4136
ulonglong get_lock_usec()
Definition: sql_class.h:1577
Session_sysvar_resource_manager session_sysvar_res_mgr
Definition: sql_class.h:4378
void send_statement_status()
Definition: sql_class.cc:2878
bool is_connected(bool use_cached_connection_alive=false) final
Return false if connection to client is broken.
Definition: sql_class.cc:3150
const char * thread_stack
Definition: sql_class.h:1267
LEX_CSTRING get_invoker_user() const
Definition: sql_class.h:4310
bool fill_information_schema_tables() const
Definition: sql_class.h:3160
void set_waiting_for_disk_space(bool waiting)
Set the waiting_for_disk_space flag.
Definition: sql_class.h:4574
std::atomic< mysql_mutex_t * > current_mutex
The mutex used with current_cond.
Definition: sql_class.h:1503
void decrement_user_connections_counter()
Definition: sql_class.cc:2616
~THD() override
Definition: sql_class.cc:1415
my_thread_id m_thread_id
This counter is 32 bit because of the client protocol.
Definition: sql_class.h:2454
void set_command(enum enum_server_command command)
Definition: sql_class.cc:2480
bool is_admin_connection() const
Definition: sql_class.h:1555
Protocol * m_protocol
Definition: sql_class.h:1336
void set_current_stmt_binlog_format_row_if_mixed()
Definition: sql_class.h:3383
String m_normalized_query
Definition: sql_class.h:994
void init_query_mem_roots()
Initialize memory roots necessary for query processing and (!) pre-allocate memory for it.
Definition: sql_class.cc:1132
void fatal_error()
Mark the current error as fatal.
Definition: sql_class.h:3194
void set_connection_admin(bool connection_admin_flag)
Sets the connection_admin flag atomically for the current session.
Definition: sql_class.h:4768
const LEX_CSTRING & catalog() const
Definition: sql_class.h:1418
void clear_next_event_pos()
Definition: sql_class.cc:2569
void set_server_id(uint32 sid)
Definition: sql_class.h:1683
bool set_db(const LEX_CSTRING &new_db)
Set the current database; use deep copy of C-string.
Definition: sql_class.cc:863
void exit_cond(const PSI_stage_info *stage, const char *src_function, const char *src_file, int src_line) override
End a wait on a condition.
Definition: sql_class.h:2984
bool is_engine_ha_data_detached() const
Definition: sql_class.cc:2968
bool is_attachable_ro_transaction_active() const
Definition: sql_class.h:3360
Sql_condition * raise_condition(uint sql_errno, const char *sqlstate, Sql_condition::enum_severity_level level, const char *msg, bool fatal_error=false)
Raise a generic SQL condition.
Definition: sql_class.cc:987
PSI_transaction_locker * m_transaction_psi
Current transaction instrumentation.
Definition: sql_class.h:2414
void set_query_id(query_id_t new_query_id)
Assign a new value to thd->query_id.
Definition: sql_class.h:4195
Session_tracker session_tracker
Definition: sql_class.h:4377
const LEX_CSTRING & query() const
Definition: sql_class.h:4084
bool enable_slow_log
Definition: sql_class.h:2724
Internal_error_handler * pop_internal_handler()
Remove the error handler last pushed.
Definition: sql_class.cc:912
enum enum_mark_columns mark_used_columns
MARK_COLUMNS_NONE: Means mark_used_columns is not set and no indicator to handler of fields used is s...
Definition: sql_class.h:960
int is_killed() const final
Has the owner thread been killed?
Definition: sql_class.h:3001
struct timeval user_time
Definition: sql_class.h:1563
struct THD_timer_info * timer_cache
After resetting(cancelling) timer, current timer object is cached with timer_cache timer to reuse.
Definition: sql_class.h:1811
bool is_fatal_sub_stmt_error
true if we are in a sub-statement and the current error can not be safely recovered until we left the...
Definition: sql_class.h:2704
bool optimizer_switch_flag(ulonglong flag) const
Tells whether the given optimizer_switch flag is on.
Definition: sql_class.h:1777
Diagnostics_area * m_query_rewrite_plugin_da_ptr
Definition: sql_class.h:4332
longlong get_row_count_func() const
Definition: sql_class.h:2323
ulong rand_saved_seed2
Definition: sql_class.h:2441
enum THD::Commit_error commit_error
ulonglong previous_found_rows
Stores the result of the FOUND_ROWS() function.
Definition: sql_class.h:2257
int binlog_flush_pending_rows_event(bool stmt_end)
Definition: sql_class.h:1693
void inc_status_sort_rows(ha_rows count)
Definition: sql_class.cc:2449
enum durability_properties durability_property
Definition: sql_class.h:2634
bool waiting_for_disk_space
Definition: sql_class.h:4566
SSL_handle get_ssl() const
Definition: sql_class.h:1309
bool m_audited
Definition: sql_class.h:2810
void clear_current_stmt_binlog_format_row()
Definition: sql_class.h:3412
void set_user_connect(USER_CONN *uc)
Definition: sql_class.cc:2604
enum enum_server_command get_command() const
Definition: sql_class.h:4062
bool is_regular() const =delete
double m_current_query_cost
Current query cost.
Definition: sql_class.h:1126
bool might_have_commit_order_waiters() const final
Indicates that owner thread might have some commit order (non-MDL) waits for it which are still taken...
Definition: sql_class.h:3002
Discrete_intervals_list auto_inc_intervals_in_cur_stmt_for_binlog
Definition: sql_class.h:2183
bool tx_read_only
Definition: sql_class.h:2530
Prealloced_array< Ha_data, PREALLOC_NUM_HA > ha_data
Definition: sql_class.h:1615
const CHARSET_INFO * db_charset
Definition: sql_class.h:2392
int is_current_stmt_binlog_format_row() const
Determine the binlog format of the current statement.
Definition: sql_class.h:1707
const Gtid_set * get_gtid_next_list_const() const
Return the value of @gtid_next_list: either a Gtid_set or NULL.
Definition: sql_class.h:3445
void set_next_event_pos(const char *_filename, ulonglong _pos)
Definition: sql_class.cc:2553
bool is_mem_cnt_error()
Definition: sql_class.h:4685
void set_plugin(const st_plugin_int *plugin)
Sets the plugin id to the value provided as parameter.
Definition: sql_class.h:4511
const Protocol_classic * get_protocol_classic() const
Asserts that the protocol is of type text or binary and then returns the m_protocol casted to Protoco...
Definition: sql_class.h:1328
String packet
Definition: sql_class.h:1879
void set_tmp_table_seq_id(uint arg)
Definition: sql_class.h:4514
bool stmt_depends_on_first_successful_insert_id_in_prev_stmt
Definition: sql_class.h:2168
void push_internal_handler(Internal_error_handler *handler)
Add an internal error handler to the thread execution context.
Definition: sql_class.cc:891
void copy_status_var(System_status_var *dst_var)
Copy status variables into a structure pointed by the specified pointer and keep track of the pointer...
Definition: sql_class.h:1169
bool is_operating_gtid_table_implicitly
Definition: sql_class.h:2271
void syntax_error()
Definition: sql_class.h:4380
bool handle_condition(uint sql_errno, const char *sqlstate, Sql_condition::enum_severity_level *level, const char *msg)
Handle a sql condition.
Definition: sql_class.cc:899
void set_current_stmt_binlog_format_row()
Definition: sql_class.h:3407
Prepared_statement_map stmt_map
All prepared statements of this connection.
Definition: sql_class.h:1262
uint server_status
Definition: sql_class.h:2464
friend void push_warning(THD *thd, Sql_condition::enum_severity_level severity, uint code, const char *message_text)
Push the warning to error list if there is still room in the list.
Definition: sql_error.cc:654
bool bool_value
Definition: sql_class.h:2740
bool is_killable
Definition: sql_class.h:1494
void set_query_for_display(const char *query_arg, size_t query_length_arg)
Set query to be displayed in performance schema (threads table etc.).
Definition: sql_class.h:4109
bool is_system_user()
Returns if the user of the session has the SYSTEM_USER privilege or not.
Definition: sql_class.h:4740
bool is_current_stmt_binlog_log_replica_updates_disabled() const
Determine if binlogging is currently disabled for this session.
Definition: sql_class.cc:2979
void debug_assert_query_locked() const
For safe and protected access to the query string, the following rules should be followed: 1: Only th...
Definition: sql_class.cc:2487
void force_one_auto_inc_interval(ulonglong next_id)
Definition: sql_class.h:2248
sp_rcontext * sp_runtime_ctx
Current SP-runtime context.
Definition: sql_class.h:2731
void inc_examined_row_count(ha_rows count)
Definition: sql_class.cc:2372
bool is_strict_mode() const
Definition: sql_class.h:3055
bool skip_gtid_rollback
Definition: sql_class.h:3845
Parser_state * m_parser_state
Internal parser state.
Definition: sql_lexer_thd.h:64
void update_charset()
Definition: sql_class.cc:1875
void inc_status_select_full_join()
Definition: sql_class.cc:2393
List< char > * get_binlog_accessed_db_names() const
Definition: sql_class.h:1899
void pop_protocol()
Pops the top protocol of the Protocol stack and sets the previous one as the current protocol.
Definition: sql_class.cc:3193
void enable_mem_cnt()
Definition: sql_class.h:4678
bool m_inside_system_variable_global_update
Flag to indicate this thread is executing sys_var::update for a OPT_GLOBAL variable.
Definition: sql_class.h:4648
bool is_current_stmt_binlog_row_enabled_with_write_set_extraction() const
Determine if binloging is enabled in row format and write set extraction is enabled for this session.
Definition: sql_class.cc:2988
void set_binlog_local_stmt_filter()
Definition: sql_class.h:1796
bool is_cmd_skip_readonly() const
Definition: sql_class.h:1885
thr_lock_type update_lock_default
Type of lock to be used for all DML statements, except INSERT, in cases when lock is not specified ex...
Definition: sql_class.h:1591
enum enum_thread_type system_thread
Definition: sql_class.h:2465
void clear_copy_status_var()
Clear copy of the status variables.
Definition: sql_class.h:1160
void raise_note_printf(uint code,...)
Raise an completion condition (note), with a formatted message.
Definition: sql_class.cc:961
bool is_mem_cnt_error_issued
Definition: sql_class.h:4684
const char * current_key_name
Definition: sql_class.h:4682
ha_rows num_truncated_fields
Definition: sql_class.h:2329
partition_info * work_part_info
Definition: sql_class.h:2782
void * fetch_external(unsigned int slot)
Definition: sql_class.cc:3241
bool is_attachable_transaction_active() const
Definition: sql_class.h:3367
enum_thd_life_cycle_stages
Represents life cycle stages of THD instance.
Definition: sql_class.h:2854
@ ACTIVE_AND_CLEAN
Definition: sql_class.h:2856
@ SCHEDULED_FOR_DISPOSAL
Definition: sql_class.h:2857
@ RESOURCES_RELEASED
Definition: sql_class.h:2859
@ DISPOSED
Definition: sql_class.h:2860
@ ACTIVE
Definition: sql_class.h:2855
@ CLEANED_UP
Definition: sql_class.h:2858
System_variables variables
Definition: sql_lexer_thd.h:62
void set_log_reset()
Set when binlog reset operation is started.
Definition: sql_class.h:3746
struct rand_struct rand
Definition: sql_class.h:1107
bool is_slave_error
True if a slave error.
Definition: sql_class.h:2714
List< char > * binlog_accessed_db_names
Definition: sql_class.h:1856
void set_original_commit_timestamp_for_slave_thread()
Copies variables.original_commit_timestamp to ((Slave_worker *)rli_slave)->original_commit_timestamp,...
Definition: sql_class.cc:2577
bool is_stmt_prepare_or_first_stmt_execute() const =delete
binlog_filter_state
Definition: sql_class.h:1781
@ BINLOG_FILTER_CLEAR
Definition: sql_class.h:1783
@ BINLOG_FILTER_UNKNOWN
Definition: sql_class.h:1782
@ BINLOG_FILTER_SET
Definition: sql_class.h:1784
bool is_init_file_system_thread() const
Definition: sql_class.h:2484
ha_rows m_examined_row_count
Number of rows read and/or evaluated for a statement.
Definition: sql_class.h:2348
bool query_start_usec_used
Definition: sql_class.h:2705
time_t query_start_in_secs() const
Definition: sql_class.h:3067
THD * next_to_commit
Used by MYSQL_BIN_LOG to maintain the commit queue for binary log group commit.
Definition: sql_class.h:2553
void set_transaction(Transaction_ctx *transaction_ctx)
Changes the Transaction_ctx instance within THD-object.
Definition: sql_class.cc:856
enum_thd_life_cycle_stages m_thd_life_cycle_stage
Definition: sql_class.h:2862
mysql_mutex_t LOCK_group_replication_connection_mutex
Definition: sql_class.h:4675
void raise_warning_printf(uint code,...)
Raise a completion condition (warning), with a formatted message.
Definition: sql_class.cc:941
bool is_classic_protocol() const
Definition: sql_class.cc:3145
Prealloced_array< Binlog_user_var_event *, 2 > user_var_events
Definition: sql_class.h:2546
PSI_stage_key get_current_stage_key() const
Definition: sql_class.h:1470
bool send_result_metadata(const mem_root_deque< Item * > &list, uint flags)
Send name and type of result to client.
Definition: sql_class.cc:2822
bool is_stmt_prepare_or_first_sp_execute() const =delete
mysql_mutex_t LOCK_thd_protocol
Protects THD::m_protocol when it gets removed in x plugin.
Definition: sql_class.h:1214
bool parsing_system_view
Definition: sql_class.h:2728
Diagnostics_area * m_stmt_da
Definition: sql_class.h:4334
bool is_binlog_applier() const
The function checks whether the thread is processing queries from binlog, as automatically generated ...
Definition: sql_class.h:1062
bool skip_readonly_check
Definition: sql_class.h:1818
const String & rewritten_query() const
Get the rewritten query (with passwords obfuscated etc.) from the THD.
Definition: sql_class.h:4174
void cleanup(void)
Definition: sql_class.cc:1216
void set_is_killable(bool is_killable_arg)
Assign a new value to is_killable Protected with the LOCK_thd_data mutex.
Definition: sql_class.h:4216
void inc_status_created_tmp_disk_tables()
Definition: sql_class.cc:2377
const Transaction_ctx * get_transaction() const
Definition: sql_class.h:2047
bool is_connection_admin()
Returns if the user of the session has the CONNECTION_ADMIN privilege or not.
Definition: sql_class.h:4759
struct timeval start_time
Definition: sql_class.h:1562
binlog_filter_state m_binlog_filter_state
Indicate if the current statement should be discarded instead of written to the binlog.
Definition: sql_class.h:1826
const CHARSET_INFO * charset() const
Definition: sql_class.h:3288
void init(void)
Definition: sql_class.cc:1050
void copy_table_access_properties(THD *thd)
Copy session properties that affect table access from the parent session to the current session.
Definition: sql_class.cc:849
bool is_secondary_storage_engine_eligible() const
Checks if queries in this session can use a secondary storage engine for execution.
Definition: sql_class.cc:3084
void set_status_no_good_index_used()
Definition: sql_class.cc:2473
std::unique_ptr< LEX > main_lex
The lex to hold the parsed tree of conventional (non-prepared) queries.
Definition: sql_class.h:978
const char * where
Definition: sql_class.h:1477
LEX_CSTRING get_invoker_host() const
Definition: sql_class.h:4311
ha_rows get_sent_row_count() const
Definition: sql_class.h:2369
bool charset_is_character_set_filesystem
Definition: sql_class.h:2723
void reset_copy_status_var()
Copy status variables into a structure pointed by the specified pointer passed into copy_status_var m...
Definition: sql_class.h:1178
bool safe_to_display() const
Definition: sql_class.h:4132
void reset_first_successful_insert_id()
Definition: sql_class.h:2235
void set_time()
Definition: sql_class.cc:3200
bool is_fsp_truncate_mode() const
Definition: sql_class.h:3074
Access_bitmask want_privilege
Used by Item::check_column_privileges() to tell which privileges to check for.
Definition: sql_class.h:969
uint32 file_id
Definition: sql_class.h:1559
Internal_error_handler * m_internal_handler
The current internal error handler for this thread, or NULL.
Definition: sql_class.h:4318
void push_diagnostics_area(Diagnostics_area *da, bool copy_conditions=true)
Push the given Diagnostics Area on top of the stack, making it the new first Diagnostics Area.
Definition: sql_class.h:3257
void disable_low_level_commit_ordering()
Enables ordering in ha_commit_low.
Definition: sql_class.cc:2999
Plugin_array audit_class_plugins
Array of active audit plugins which have been used by this THD.
Definition: sql_class.h:2789
const NET * get_net() const
Definition: sql_class.h:1881
bool transaction_rollback_request
Set by a storage engine to request the entire transaction (that possibly spans multiple engines) to r...
Definition: sql_class.h:2692
void set_active_vio(Vio *vio)
Definition: sql_class.h:2898
uint16 peer_port
Definition: sql_class.h:1561
Secondary_engine_optimization secondary_engine_optimization() const
Can secondary storage engines be used for query execution in this session?
Definition: sql_class.h:4593
bool binlog_need_explicit_defaults_ts
The member is served for marking a query that CREATEs or ALTERs a table declared with a TIMESTAMP col...
Definition: sql_class.h:2562
uint in_sub_stmt
Definition: sql_class.h:1600
void inc_lock_usec(ulonglong usec)
Definition: sql_class.cc:3213
void disable_mem_cnt()
Definition: sql_class.h:4679
void rollback_item_tree_changes()
Restore locations set by calls to nocheck_register_item_tree_change().
Definition: sql_class.cc:1990
bool se_persists_gtid() const
Definition: sql_class.h:3770
char * m_trans_fixed_log_file
Definition: sql_class.h:1873
bool is_low_level_commit_ordering_enabled() const
Obtains flag indicating whether additional ordering in the ha_commit_low function is enabled.
Definition: sql_class.cc:3004
bool unioned_events_trans
Definition: sql_class.h:2764
char * strmake(const char *str, size_t size) const
Definition: sql_lexer_thd.h:50
bool copy_db_to(char const **p_db, size_t *p_db_length) const
Definition: sql_class.h:3910
void increment_con_per_hour_counter()
Definition: sql_class.cc:2623
std::atomic< bool > m_cached_is_connection_alive
Keep a cached value saying whether the connection is alive.
Definition: sql_class.h:1254
uint get_tmp_table_seq_id()
Definition: sql_class.h:4513
const Diagnostics_area * get_stacked_da() const
Returns the second Diagnostics Area for the current statement.
Definition: sql_class.h:3218
void mark_transaction_to_rollback(bool all)
Mark transaction to rollback and mark error as fatal to a sub-statement.
Definition: sql_class.cc:2543
Attachable_trx * m_attachable_trx
Definition: sql_class.h:2042
void raise_warning(uint code)
Raise a completion condition (warning).
Definition: sql_class.cc:936
enum_check_fields check_for_truncated_fields
Definition: sql_class.h:2543
uint get_binlog_table_maps() const
Definition: sql_class.h:1893
PSI_idle_locker * m_idle_psi
Idle instrumentation.
Definition: sql_class.h:2421
Diagnostics_area * get_parser_da()
Returns thread-local Diagnostics Area for parsing.
Definition: sql_class.h:3231
void set_time(const struct timeval *t)
Definition: sql_class.h:3070
collation_unordered_map< std::string, unique_ptr_with_deleter< user_var_entry > > user_vars
Hash for user variables.
Definition: sql_class.h:1106
bool sql_parser()
Call parser to transform statement into a parse tree.
Definition: sql_class.cc:3045
bool rand_used
Definition: sql_class.h:2706
NET net
Definition: sql_class.h:1878
ulonglong m_current_query_partial_plans
Current query partial plans.
Definition: sql_class.h:1131
sp_cache * sp_func_cache
Definition: sql_class.h:2733
int tx_priority
Definition: sql_class.h:2536
std::unique_ptr< Transaction_ctx > m_transaction
Definition: sql_class.h:1912
table_map table_map_for_update
Definition: sql_class.h:2110
void cleanup_after_parse_error()
Restore session state in case of parse error.
Definition: sql_class.cc:3132
mysql_mutex_t LOCK_thd_sysvar
Protects THD::variables while being updated.
Definition: sql_class.h:1205
ulong ulong_value
Definition: sql_class.h:2742
void update_previous_found_rows()
Definition: sql_class.h:3092
void raise_note(uint code)
Raise a completion condition (note), with a fixed message.
Definition: sql_class.cc:953
void awake(THD::killed_state state_to_set)
Awake a thread.
Definition: sql_class.cc:1487
void change_item_tree(Item **place, Item *new_value)
Record a transient change to a pointer to an Item within another Item.
Definition: sql_class.h:3294
void mark_plugin_fake_ddl(bool flag)
Definition: sql_class.h:4518
mysql_mutex_t LOCK_thd_data
Protects THD data accessed from other threads.
Definition: sql_class.h:1193
bool convert_string(LEX_STRING *to, const CHARSET_INFO *to_cs, const char *from, size_t from_length, const CHARSET_INFO *from_cs, bool report_error=false)
void cleanup_after_query()
Definition: sql_class.cc:1745
void restore_globals()
Definition: sql_class.cc:1715
void inc_status_sort_range()
Definition: sql_class.cc:2441
query_id_t first_query_id
Definition: sql_class.h:2770
Ha_data * get_ha_data(int slot)
Retrieve Ha_data for a given slot.
Definition: sql_class.h:1621
Vio * active_vio
Definition: sql_class.h:2062
uint tmp_table_seq_id
Sequential number of internal tmp table created in the statement.
Definition: sql_class.h:4543
MEM_ROOT * user_var_events_alloc
Definition: sql_class.h:2547
THD(bool enable_plugins=true)
Definition: sql_class.cc:624
uint32 unmasked_server_id
Definition: sql_class.h:1557
const char * m_proc_info
Definition: sql_class.h:1437
void push_protocol(Protocol *protocol)
Inserts the new protocol at the top of the protocol stack, and make it the current protocol for this ...
Definition: sql_class.cc:3185
void end_attachable_transaction()
End an active attachable transaction.
Definition: sql_class.cc:2205
const char * proc_info() const
Definition: sql_class.h:1455
bool is_attachable_rw_transaction_active() const
Definition: sql_class.h:3374
void clear_log_reset()
Cleared after flushing SE logs during binlog reset.
Definition: sql_class.h:3749
const st_plugin_int * get_plugin() const
Returns the plugin, the thd belongs to.
Definition: sql_class.h:4506
enum enum_server_command m_command
Type of current query: COM_STMT_PREPARE, COM_QUERY, etc.
Definition: sql_class.h:1548
void reset_db(const LEX_CSTRING &new_db)
Set the current database; use shallow copy of C-string.
Definition: sql_class.h:3898
Se_GTID_flagset m_se_gtid_flags
Flags for SE GTID persistence.
Definition: sql_class.h:3727
Gtid_set * get_gtid_next_list()
Return the value of @gtid_next_list: either a Gtid_set or NULL.
Definition: sql_class.h:3438
mysql_mutex_t LOCK_current_cond
Mutex protecting access to current_mutex and current_cond.
Definition: sql_class.h:1498
void set_secondary_engine_optimization(Secondary_engine_optimization state)
Enables or disables use of secondary storage engines in this session.
Definition: sql_class.h:4585
Transaction_ctx * get_transaction()
Definition: sql_class.h:2045
bool is_initialize_system_thread() const
Definition: sql_class.h:2479
ulong rand_saved_seed1
Definition: sql_class.h:2441
sp_cache * sp_proc_cache
Definition: sql_class.h:2732
Item_change_list change_list
This is used to track transient changes to items during optimization of a prepared statement/stored p...
Definition: sql_class.h:2090
bool in_active_multi_stmt_transaction() const
true if the session is in a multi-statement transaction mode (
Definition: sql_class.h:3157
bool check_clone_vio()
Check if clone network Vio is active.
Definition: sql_class.h:2933
std::unique_ptr< PROFILING > profiling
Definition: sql_class.h:2394
void reset_current_stmt_binlog_format_row()
Definition: sql_class.h:3417
bool m_disable_password_validation
Definition: sql_class.h:1300
bool in_multi_stmt_transaction_mode() const
Returns true if session is in a multi-statement transaction mode.
Definition: sql_class.h:3119
void begin_attachable_ro_transaction()
Start a read-only attachable transaction.
Definition: sql_class.cc:2201
bool do_union
Definition: sql_class.h:2753
const LEX_CSTRING & db() const
Definition: sql_class.h:3864
const Internal_error_handler * get_internal_handler() const
Definition: sql_class.h:3962
ulonglong read_first_successful_insert_id_in_prev_stmt(void)
Definition: sql_class.h:2226
uint32 binlog_unsafe_warning_flags
Bit field for the state of binlog warnings.
Definition: sql_class.h:1846
void raise_error(uint code)
Raise an exception condition.
Definition: sql_class.cc:919
std::atomic< killed_state > killed
Definition: sql_class.h:2649
ulonglong start_utime
Query start time, expressed in microseconds.
Definition: sql_class.h:1567
Security_context * m_security_ctx
Definition: sql_class.h:1283
struct THD::@168 binlog_evt_union
bool is_stmt_prepare() const =delete
void restore_ha_data(const Prealloced_array< Ha_data, PREALLOC_NUM_HA > &backup)
Restore ha_data from the provided backup copy.
Definition: sql_class.h:1640
bool unioned_events
Definition: sql_class.h:2758
bool m_is_plugin_fake_ddl
Creating or dropping plugin native table through a plugin service.
Definition: sql_class.h:4536
void set_sent_row_count(ha_rows count)
Definition: sql_class.cc:2362
uint query_name_consts
number of name_const() substitutions, see sp_head.cc:subst_spvars()
Definition: sql_class.h:2736
NET_SERVER m_net_server_extension
Additional network instrumentation for the server only.
Definition: sql_class.h:1097
ulonglong conn_mem_alloc_number
Definition: sql_class.h:4683
String m_rewritten_query
In some cases, we may want to modify the query (i.e.
Definition: sql_class.h:1045
bool m_server_idle
True if the server code is IDLE for this connection.
Definition: sql_class.h:2427
Relay_log_info * rli_fake
Definition: sql_class.h:1049
mysql_mutex_t LOCK_thd_security_ctx
Protects THD::m_security_ctx from inspection (e.g.
Definition: sql_class.h:1220
void backup_ha_data(Prealloced_array< Ha_data, PREALLOC_NUM_HA > *backup)
Copy ha_data into the provided argument.
Definition: sql_class.h:1626
uint32 server_id
Definition: sql_class.h:1558
bool is_fatal_error() const
Definition: sql_class.h:3195
Transactional_ddl_context m_transactional_ddl
Definition: sql_class.h:4633
bool duplicate_slave_id
This is only used by master dump threads.
Definition: sql_class.h:4490
bool charset_is_system_charset
is set if a statement accesses a temporary table created through CREATE TEMPORARY TABLE.
Definition: sql_class.h:2722
void reset_rewritten_query()
Reset thd->m_rewritten_query.
Definition: sql_class.h:4184
void release_resources()
Release most resources, prior to THD destruction.
Definition: sql_class.cc:1339
Security_context * security_context() const
Definition: sql_class.h:1285
void restore_backup_open_tables_state(Open_tables_backup *backup)
Definition: sql_class.cc:2187
void pop_lock_usec(ulonglong top)
Definition: sql_class.h:1583
void enter_locked_tables_mode(enum_locked_tables_mode mode_arg)
Definition: sql_class.h:4222
bool time_zone_used
Definition: sql_class.h:2706
ulonglong ulonglong_value
Definition: sql_class.h:2743
void enter_stage(const PSI_stage_info *stage, PSI_stage_info *old_stage, const char *calling_func, const char *calling_file, const unsigned int calling_line) SUPPRESS_TSAN
Definition: sql_class.cc:537
uint binlog_table_maps
Definition: sql_class.h:1852
void inc_status_select_range_check()
Definition: sql_class.cc:2417
int send_explain_fields(Query_result *result)
Definition: sql_class.cc:1887
void clear_error()
Clear the current error, if any.
Definition: sql_class.h:3177
bool is_bootstrap_system_thread() const
Definition: sql_class.h:2490
void binlog_invoker()
Definition: sql_class.h:4301
bool is_one_phase_commit()
Definition: sql_class.cc:3074
void set_gtid_persisted_by_se()
Set by SE when it guarantees GTID persistence.
Definition: sql_class.h:3755
void inc_status_sort_merge_passes()
Definition: sql_class.cc:2433
void mark_as_srv_session()
Definition: sql_class.h:4500
MEM_ROOT main_mem_root
This memory root is used for two purposes:
Definition: sql_class.h:4328
struct System_status_var status_var
Definition: sql_class.h:1109
bool m_enable_plugins
Definition: sql_class.h:2802
struct System_status_var * copy_status_var_ptr
Definition: sql_class.h:1110
void clear_owned_gtids()
Definition: sql_class.h:3809
killed_state
Definition: sql_class.h:2642
@ KILL_QUERY
Definition: sql_class.h:2645
@ KILL_CONNECTION
Definition: sql_class.h:2644
@ KILLED_NO_VALUE
Definition: sql_class.h:2647
@ KILL_TIMEOUT
Definition: sql_class.h:2646
@ NOT_KILLED
Definition: sql_class.h:2643
std::vector< char > m_connection_attributes
Session's connection attributes for the connected client.
Definition: sql_class.h:1120
Locked_tables_list locked_tables_list
Definition: sql_class.h:2780
void get_definer(LEX_USER *definer)
Definition: sql_class.cc:2526
const char * m_trans_log_file
The binary log position of the transaction.
Definition: sql_class.h:1872
bool is_commit_in_middle_of_statement
Definition: sql_class.h:3856
Diagnostics_area * get_stmt_da()
Returns first Diagnostics Area for the current statement.
Definition: sql_class.h:3212
mysql_cond_t COND_group_replication_connection_cond_var
Definition: sql_class.h:4676
std::atomic< bool > m_is_connection_admin
Flag that indicates if the user of current session has CONNECTION_ADMIN privilege.
Definition: sql_class.h:4623
void inc_status_select_full_range_join()
Definition: sql_class.cc:2401
Diagnostics_area m_parser_da
cf.
Definition: sql_class.h:4330
void notify_shared_lock(MDL_context_owner *ctx_in_use, bool needs_thr_lock_abort) override
A callback to the server internals that is used to address special cases of the locking protocol.
Definition: sql_class.cc:1657
const USER_CONN * get_user_connect() const
Definition: sql_class.h:2355
void shutdown_clone_vio()
Shutdown clone vio, if active.
Definition: sql_class.cc:1948
void pin_gtid()
Defer freeing owned GTID and SID till unpinned.
Definition: sql_class.h:3730
PSI_idle_locker_state m_idle_state
Idle instrumentation state.
Definition: sql_class.h:2424
bool is_plugin_fake_ddl() const
Definition: sql_class.h:4517
bool arg_of_last_insert_id_function
Definition: sql_class.h:2113
void set_skip_readonly_check()
Definition: sql_class.h:1883
Se_GTID_flag
SE GTID persistence flag types.
Definition: sql_class.h:3709
@ SE_GTID_PERSIST_EXPLICIT
Explicit request for SE to persist GTID for current transaction.
Definition: sql_class.h:3719
@ SE_GTID_RESET_LOG
If RESET log in progress.
Definition: sql_class.h:3717
@ SE_GTID_CLEANUP
Cleanup GTID during unpin.
Definition: sql_class.h:3713
@ SE_GTID_PERSIST
SE would persist GTID for current transaction.
Definition: sql_class.h:3715
@ SE_GTID_MAX
Max element holding the biset size.
Definition: sql_class.h:3721
@ SE_GTID_PIN
Pin owned GTID.
Definition: sql_class.h:3711
bool se_persists_gtid_explicit() const
Definition: sql_class.h:3780
bool for_debug_only_is_set_persist_options
Definition: sql_class.h:1208
void rpl_reattach_engine_ha_data()
When the thread is a binlog or slave applier it reattaches the engine ha_data associated with it and ...
Definition: sql_class.cc:2958
bool release_resources_done() const
Definition: sql_class.cc:1313
bool is_operating_substatement_implicitly
Definition: sql_class.h:2288
void update_slow_query_status()
Evaluate the current time, and if it exceeds the long-query-time setting, mark the query as slow.
Definition: sql_class.cc:3228
uint tmp_table
Definition: sql_class.h:2463
Commit_error
Definition: sql_class.h:2621
@ CE_NONE
Definition: sql_class.h:2622
@ CE_COMMIT_ERROR
Definition: sql_class.h:2626
@ CE_ERROR_COUNT
Definition: sql_class.h:2627
@ CE_SYNC_ERROR
Definition: sql_class.h:2625
@ CE_FLUSH_ERROR
Definition: sql_class.h:2623
@ CE_FLUSH_GNO_EXHAUSTED_ERROR
Definition: sql_class.h:2624
Security_context m_main_security_ctx
Definition: sql_class.h:1282
malloc_unordered_map< std::string, User_level_lock * > ull_hash
Definition: sql_class.h:1489
static const char *const DEFAULT_WHERE
Definition: sql_class.h:1094
void reset_skip_readonly_check()
Definition: sql_class.h:1887
Global_read_lock global_read_lock
Definition: sql_class.h:2060
void inc_sent_row_count(ha_rows count)
Definition: sql_class.cc:2367
bool thread_specific_used
is set if some thread specific value(s) used in a statement.
Definition: sql_class.h:2717
void set_open_tables(TABLE *open_tables_arg)
Assign a new value to open_tables.
Definition: sql_class.h:4206
bool owned_gtid_is_empty()
Definition: sql_class.h:3829
resourcegroups::Resource_group_ctx m_resource_group_ctx
Resource group context indicating the current resource group and the name of the resource group to sw...
Definition: sql_class.h:1021
enum_reset_lex
Definition: sql_class.h:1979
@ DO_NOT_RESET_LEX
Definition: sql_class.h:1979
@ RESET_LEX
Definition: sql_class.h:1979
uchar password
Definition: sql_class.h:2674
const Cost_model_server * cost_model() const
Retrieve the optimizer cost model for this connection.
Definition: sql_class.h:4375
void set_proc_info(const char *proc_info)
Definition: sql_class.h:1469
ulonglong sql_mode_t
Definition: sql_lexer_thd.h:36
void start_disposal()
Set THD in ACTIVE life stage to disposal stage.
Definition: sql_class.cc:1326
Diagnostics_area * get_query_rewrite_plugin_da()
Returns thread-local Diagnostics Area to be used by query rewrite plugins.
Definition: sql_class.h:3242
bool in_lock_tables
Definition: sql_class.h:2707
sql_digest_state m_digest_state
Top level statement digest.
Definition: sql_class.h:2404
ulonglong found_rows() const
Definition: sql_class.h:3084
Definition: sql_class.h:247
void restore_mode()
Restore original memory counter mode.
Definition: sql_class.h:279
void no_error_mode()
Set NO ERROR memory counter mode.
Definition: sql_class.h:283
ulonglong glob_mem_counter
Definition: sql_class.h:254
void set_orig_mode(uint mode_arg)
Function sets original memory counter mode.
Definition: sql_class.h:297
void set_curr_mode(uint mode_arg)
Function sets current memory counter mode.
Definition: sql_class.h:291
void flush()
Function flushes memory counters before deleting the memory counter object.
Definition: sql_class.cc:284
void free_cnt(size_t size)
Decrease memory counter at 'free' operation.
Definition: sql_class.cc:231
bool is_error() const
Check if memory counter error is issued.
Definition: sql_class.h:303
ulonglong mem_counter
Definition: sql_class.h:252
void set_thd_error_status() const
Set THD error status using memory counter diagnostics area.
Definition: sql_class.cc:349
THD * m_thd
Definition: sql_class.h:250
int reset()
Function resets current memory counter mode and adjusts global memory counter according to thread mem...
Definition: sql_class.cc:246
Diagnostics_area m_da
Definition: sql_class.h:251
bool is_error_mode() const
Check if memory counter is in error mode.
Definition: sql_class.h:313
~Thd_mem_cnt()
Definition: sql_class.h:264
ulonglong max_conn_mem
Definition: sql_class.h:253
bool m_enabled
Definition: sql_class.h:249
void alloc_cnt(size_t size)
Increase memory counter at 'alloc' operation.
Definition: sql_class.cc:165
void set_thd(THD *thd)
Definition: sql_class.h:268
uint orig_mode
Definition: sql_class.h:257
int generate_error(int err_no, ulonglong mem_limit, ulonglong mem_size)
Generate OOM error and set therad to KILL_CONNECTION state.
Definition: sql_class.cc:305
void disable()
Definition: sql_class.cc:152
uint curr_mode
Definition: sql_class.h:256
bool is_error_log_mode() const
Check if memory counter is in error log mode.
Definition: sql_class.h:319
bool is_connection_stage
Definition: sql_class.h:259
void enable()
Definition: sql_class.h:269
Thd_mem_cnt()
Definition: sql_class.h:263
This class represents abstract time zone and provides basic interface for MYSQL_TIME <-> my_time_t co...
Definition: tztime.h:49
Definition: transaction_info.h:53
This class keeps the context of transactional DDL statements.
Definition: sql_class.h:888
void post_ddl()
End the transactional context created by calling post ddl hook for engine on which table is being cre...
Definition: sql_class.cc:3303
dd::String_type m_tablename
Definition: sql_class.h:917
void init(dd::String_type db, dd::String_type tablename, const handlerton *hton)
Initialize the transactional ddl context when executing CREATE TABLE ... SELECT command with engine w...
Definition: sql_class.cc:3253
~Transactional_ddl_context()
Definition: sql_class.h:894
THD * m_thd
Definition: sql_class.h:910
Transactional_ddl_context(THD *thd)
Definition: sql_class.h:890
dd::String_type m_db
Definition: sql_class.h:916
bool inited()
Definition: sql_class.h:902
const handlerton * m_hton
Definition: sql_class.h:913
void rollback()
Remove the table share used while creating the table, if the transaction is being rolledback.
Definition: sql_class.cc:3271
@ XA_NOTR
Definition: xa.h:298
std::unordered_map, but with my_malloc and collation-aware comparison.
Definition: map_helpers.h:210
RAII class for immunizing the THD from kill operations.
Definition: dd_kill_immunizer.h:46
Definition: dictionary_client.h:149
The handler class is the interface for dynamically loadable storage engines.
Definition: handler.h:4414
Definition: sql_list.h:678
std::unordered_map, but with my_malloc, so that you can track the memory used using PSI memory keys.
Definition: map_helpers.h:148
A (partial) implementation of std::deque allocating its blocks on a MEM_ROOT.
Definition: mem_root_deque.h:110
Definition: partition_info.h:209
Definition: sp_cache.cc:42
Definition: sp_rcontext.h:77
To be used for pool-of-threads (implemented differently on various OSs)
Definition: sql_class.h:204
void * data
Definition: sql_class.h:206
thd_scheduler()
Definition: sql_class.h:208
Definition: item_func.h:2953
#define mysql_mutex_lock(M)
Definition: mysql_mutex.h:50
#define mysql_mutex_unlock(M)
Definition: mysql_mutex.h:57
#define PSI_THREAD_CALL(M)
Definition: psi_thread.h:36
#define U
Definition: ctype-tis620.cc:75
thread_local THD * current_thd
Definition: current_thd.cc:26
durability_properties
Definition: dur_prop.h:31
static bool report_error(THD *thd, int error_code, Sql_condition::enum_severity_level level, Args... args)
Definition: error_handler.cc:291
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:222
Rows_log_event * binlog_get_pending_rows_event(bool is_transactional) const
This function retrieves a pending row event from a cache which is specified through the parameter is_...
Definition: binlog.cc:9551
bool is_ddl_gtid_compatible()
Definition: binlog.cc:10620
bool is_binlog_cache_empty(bool is_transactional) const
Return true if the statement/transaction cache is currently empty, false otherwise.
Definition: binlog.cc:9294
int binlog_write_row(TABLE *table, bool is_transactional, const uchar *new_data, const unsigned char *extra_row_info)
Definition: binlog.cc:11076
int decide_logging_format(Table_ref *tables)
Decide on logging format to use for the statement and issue errors or warnings as needed.
Definition: binlog.cc:9928
int binlog_update_row(TABLE *table, bool is_transactional, const uchar *old_data, const uchar *new_data, const uchar *extra_row_info)
Definition: binlog.cc:11101
Rows_log_event * binlog_prepare_pending_rows_event(TABLE *table, uint32 serv_id, size_t needed, bool is_transactional, const unsigned char *extra_row_info, uint32 source_part_id=INT_MAX)
Definition: binlog.cc:10780
int binlog_delete_row(TABLE *table, bool is_transactional, const uchar *old_data, const unsigned char *extra_row_info)
Definition: binlog.cc:11172
bool is_dml_gtid_compatible(bool some_transactional_table, bool some_non_transactional_table, bool non_transactional_tables_are_tmp)
is_dml_gtid_compatible() and is_ddl_gtid_compatible() check if the statement that is about to be proc...
Definition: binlog.cc:10702
int binlog_query(enum_binlog_query_type qtype, const char *query, size_t query_len, bool is_trans, bool direct, bool suppress_use, int errcode)
Log the current query.
Definition: binlog.cc:11486
void add_to_binlog_accessed_dbs(const char *db)
Definition: binlog.cc:9579
void issue_unsafe_warnings()
Auxiliary method used by binlog_query() to raise warnings.
Definition: binlog.cc:11428
int binlog_write_table_map(TABLE *table, bool is_transactional, bool binlog_rows_query)
This function writes a table map to the binary log.
Definition: binlog.cc:9506
int binlog_setup_trx_data()
Definition: binlog.cc:9319
void unlock_global_read_lock(THD *thd)
Unlock global read lock.
Definition: lock.cc:1091
bool lock_global_read_lock(THD *thd)
Take global read lock, wait if there is protection against lock.
Definition: lock.cc:1047
bool make_global_read_lock_block_commit(THD *thd)
Make global read lock also block commits.
Definition: lock.cc:1121
static std::atomic< int32 > m_atomic_active_requests
Definition: sql_class.h:866
void set_explicit_lock_duration(THD *thd)
Set explicit duration for metadata locks which are used to implement GRL.
Definition: lock.cc:1149
void my_error(int nr, myf MyFlags,...)
Fill in and print a previously registered error message.
Definition: my_error.cc:216
char * strmake_root(MEM_ROOT *root, const char *str, size_t len)
Definition: my_alloc.cc:286
char * strdup_root(MEM_ROOT *root, const char *str)
Definition: my_alloc.cc:278
void * memdup_root(MEM_ROOT *root, const void *str, size_t len)
Definition: my_alloc.cc:295
MYSQL_PLUGIN_IMPORT CHARSET_INFO * default_charset_info
Definition: charset.cc:411
size_t dirname_length(const char *name)
Get the string length of the directory part of name, including the last FN_LIBCHAR.
Definition: mf_dirname.cc:62
void reset_for_next_command()
Definition: sql_parse.cc:5136
struct PSI_idle_locker PSI_idle_locker
Definition: psi_idle_bits.h:41
unsigned int PSI_stage_key
Instrumented stage key.
Definition: psi_stage_bits.h:43
struct PSI_statement_locker PSI_statement_locker
Definition: psi_statement_bits.h:98
struct PSI_thread PSI_thread
Definition: psi_thread_bits.h:82
struct PSI_transaction_locker PSI_transaction_locker
Definition: psi_transaction_bits.h:41
static constexpr unsigned PSI_INSTRUMENT_ME
Definition: psi_bits.h:43
#define mysql_mutex_assert_not_owner(M)
Wrapper, to use safe_mutex_assert_not_owner with instrumented mutexes.
Definition: mysql_mutex.h:126
#define mysql_mutex_assert_owner(M)
Wrapper, to use safe_mutex_assert_owner with instrumented mutexes.
Definition: mysql_mutex.h:112
#define MYSQL_SET_STATEMENT_TEXT(LOCKER, P1, P2)
Definition: mysql_statement.h:107
#define MYSQL_SET_STATEMENT_QUERY_ID(LOCKER, P1)
Definition: mysql_statement.h:116
static int flags[50]
Definition: hp_test1.cc:40
static int flag
Definition: hp_test1.cc:40
Instrumentation helpers for mysys threads.
struct MYSQL_LEX_CSTRING LEX_CSTRING
Definition: lex_string.h:42
enum_locked_tables_mode
Type of locked tables mode.
Definition: locked_tables_list.h:47
@ LTM_LOCK_TABLES
Definition: locked_tables_list.h:49
@ LTM_PRELOCKED_UNDER_LOCK_TABLES
Definition: locked_tables_list.h:51
@ LTM_NONE
Definition: locked_tables_list.h:48
A better implementation of the UNIX ctype(3) library.
MYSQL_PLUGIN_IMPORT CHARSET_INFO * system_charset_info
Definition: mysqld.cc:1545
MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1
Definition: ctype-latin1.cc:368
This file follows Google coding style, except for the name MEM_ROOT (which is kept for historical rea...
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1140
enum_server_command
A list of all MySQL protocol commands.
Definition: my_command.h:48
Header for compiler-dependent features.
#define SUPPRESS_TSAN
Definition: my_compiler.h:149
#define DBUG_EXECUTE_IF(keyword, a1)
Definition: my_dbug.h:171
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_TRACE
Definition: my_dbug.h:146
Some integer typedefs for easier portability.
int myf
Definition: my_inttypes.h:94
unsigned long long int ulonglong
Definition: my_inttypes.h:56
ulonglong my_off_t
Definition: my_inttypes.h:72
unsigned char uchar
Definition: my_inttypes.h:52
long long int longlong
Definition: my_inttypes.h:55
#define MYF(v)
Definition: my_inttypes.h:97
uint16_t uint16
Definition: my_inttypes.h:65
uint32_t uint32
Definition: my_inttypes.h:67
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_END
Definition: my_sqlcommand.h:207
Common header for many mysys elements.
uint64_t table_map
Definition: my_table_map.h:30
Types to make different thread packages compatible.
pthread_t my_thread_t
Definition: my_thread_bits.h:48
uint32 my_thread_id
Definition: my_thread_local.h:34
static int count
Definition: myisam_ftdump.cc:43
static bool backup
Definition: myisampack.cc:195
unsigned int STDCALL mysql_errno(MYSQL *mysql)
Definition: client.cc:9086
Common definition between mysql server & client.
@ SERVER_STATUS_IN_TRANS
Is raised when a multi-statement transaction has been started, either explicitly, by means of BEGIN o...
Definition: mysql_com.h:815
#define SCRAMBLE_LENGTH
Length of random string sent by server on handshake; this is also length of obfuscated password,...
Definition: mysql_com.h:128
Definitions private to the server, used in the networking layer to notify specific events.
Instrumentation helpers for conditions.
ABI for instrumented mutexes.
Instrumentation helpers for statements.
char * user
Definition: mysqladmin.cc:60
const char * host
Definition: mysqladmin.cc:59
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1052
Definition: buf0block_hint.cc:30
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
Char_string_template< String_type_allocator > String_type
Definition: string_type.h:51
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
bool empty(const Histogram &histogram)
Return true if 'histogram' was built on an empty table.
Definition: histogram.h:672
Provides atomic access in shared-exclusive modes.
Definition: shared_spin_lock.h:79
bool is_active(space_id_t space_id, bool get_latch=true)
Definition: trx0purge.cc:1158
std::set< Key, Compare, ut::allocator< Key > > set
Specialization of set which uses ut_allocator.
Definition: ut0new.h:2882
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2878
This contains the declaration of class Opt_trace_context, which is needed to declare THD.
Performance schema instrumentation (declarations).
Instrumentation helpers for mutexes.
Performance schema instrumentation interface.
Performance schema instrumentation interface.
PSI_memory_key key_memory_THD_handler_tables_hash
Definition: psi_memory_key.cc:88
PSI_memory_key key_memory_user_var_entry
Definition: psi_memory_key.cc:144
PSI_memory_key key_memory_User_level_lock
Definition: psi_memory_key.cc:92
Performance schema instrumentation interface.
Performance schema instrumentation interface.
Performance schema instrumentation interface.
Performance schema instrumentation interface.
#define OPTION_NOT_AUTOCOMMIT
Definition: query_options.h:74
#define OPTION_BEGIN
Definition: query_options.h:75
repeated Source source
Definition: replication_asynchronous_connection_failover.proto:42
enum_check_fields
Definition: field.h:172
enum_tx_isolation
Definition: handler.h:3029
ha_notification_type
Definition: handler.h:933
char empty_c_string[1]
Definition: sql_class.cc:127
PSI_thread * thd_get_psi(THD *thd)
Get reference to Performance Schema object for THD object.
Definition: sql_thd_api.cc:109
void my_message_sql(uint error, const char *str, myf MyFlags)
All global error messages are sent here where the first one is stored for the client.
Definition: mysqld.cc:3779
void my_eof(THD *thd)
A short cut for thd->get_stmt_da()->set_eof_status().
Definition: sql_class.cc:3319
void thd_enter_stage(void *opaque_thd, const PSI_stage_info *new_stage, PSI_stage_info *old_stage, const char *src_function, const char *src_file, int src_line)
Definition: sql_thd_internal_api.cc:210
bool is_xa_tran_detached_on_prepare(const THD *thd)
Returns true if xa transactions are detached as part of executing XA PREPARE.
Definition: sql_class.h:4775
constexpr size_t PREALLOC_NUM_HA
Definition: sql_class.h:192
void thd_exit_cond(void *opaque_thd, const PSI_stage_info *stage, const char *src_function, const char *src_file, int src_line)
Set thread leaving a condition.
Definition: sql_thd_internal_api.cc:201
bool add_item_to_list(THD *thd, Item *item)
Definition: sql_class.cc:3020
enum_mem_cnt_mode
Definition: sql_class.h:224
@ MEM_CNT_DEFAULT
Memory counter object doesn't update global memory counter and doesn't throw OOM error.
Definition: sql_class.h:229
@ MEM_CNT_GENERATE_ERROR
if MEM_CNT_GENERATE_ERROR is set, memory counter object generates OOM error if any.
Definition: sql_class.h:239
@ MEM_CNT_UPDATE_GLOBAL_COUNTER
if MEM_CNT_UPDATE_GLOBAL_COUNTER is set, memory counter object updates global memory counter.
Definition: sql_class.h:234
@ MEM_CNT_GENERATE_LOG_ERROR
if MEM_CNT_GENERATE_LOG_ERROR is set, memory counter object generates OOM error to error log if any.
Definition: sql_class.h:244
thread_local TDM expected_from_debug_flag
Definition: sql_class.h:198
Secondary_engine_optimization
Enum that represents which phase of secondary engine optimization the current statement is in.
Definition: sql_class.h:704
@ SECONDARY
The current statement should use tables from a secondary storage engine if possible.
@ PRIMARY_ONLY
The current statement should only use tables from primary storage engines.
@ PRIMARY_TENTATIVELY
The current statement should only use tables from the primary storage engine.
bool is_engine_substitution_allowed(const THD *thd)
Check if engine substitution is allowed in the current thread context.
Definition: sql_class.h:4730
void my_ok(THD *thd, ulonglong affected_rows=0, ulonglong id=0, const char *message=nullptr)
A short cut for thd->get_stmt_da()->set_ok_status().
Definition: sql_class.cc:3313
void thd_enter_cond(void *opaque_thd, mysql_cond_t *cond, mysql_mutex_t *mutex, const PSI_stage_info *stage, PSI_stage_info *old_stage, const char *src_function, const char *src_file, int src_line)
Set thread entering a condition.
Definition: sql_thd_internal_api.cc:188
char const * show_system_thread(enum_thread_type thread)
Definition: sql_class.h:754
#define RETURN_NAME_AS_STRING(NAME)
void thd_set_waiting_for_disk_space(void *opaque_thd, const bool waiting)
Definition: sql_thd_internal_api.cc:221
TDM
Definition: sql_class.h:197
unsigned int thd_get_current_thd_terminology_use_previous()
Return @session.terminology_use_previous for the current THD.
Definition: sql_thd_api.cc:713
void thd_set_psi(THD *thd, PSI_thread *psi)
Set reference to Performance Schema object for THD object.
Definition: sql_thd_api.cc:130
bool secondary_engine_lock_tables_mode(const THD &cthd)
Return lock_tables_mode for secondary engine.
Definition: sql_class.h:4706
struct rpl_event_coordinates LOG_POS_COORD
the struct aggregates two parameters that identify an event uniquely in scope of communication of a p...
I_List< Item_change_record > Item_change_list
Definition: sql_class.h:544
File containing constants that can be used throughout the server.
enum_mark_columns
Definition: sql_const.h:230
static MEM_ROOT mem
Definition: sql_servers.cc:99
Our own string classes, used pervasively throughout the executor.
case opt name
Definition: sslopt-case.h:33
Definition: m_ctype.h:385
TODO: Move this structure to libbinlogevents/include/control_events.h when we start using C++11.
Definition: rpl_gtid.h:1066
bool is_empty() const
Return true if sidno is zero (and assert that gno is zero too in this case).
Definition: rpl_gtid.h:1089
void dbug_print(const Sid_map *sid_map, const char *text="", bool need_lock=false) const
Print this Gtid to the trace file if debug is enabled; no-op otherwise.
Definition: rpl_gtid.h:1149
void clear()
Set both components to 0.
Definition: rpl_gtid.h:1073
rpl_sidno sidno
SIDNO of this Gtid.
Definition: rpl_gtid.h:1068
Storage engine specific thread local data.
Definition: sql_class.h:785
void * ha_ptr_backup
A memorizer to engine specific "native" transaction object to provide storage engine detach-re-attach...
Definition: sql_class.h:801
void * ha_ptr
Storage engine specific thread local data.
Definition: sql_class.h:790
Ha_data()
Definition: sql_class.h:820
plugin_ref lock
NULL: engine is not bound to this thread non-NULL: engine is bound to this thread,...
Definition: sql_class.h:818
Ha_trx_info ha_info[2]
0: Life time: one statement within a transaction.
Definition: sql_class.h:812
The LEX object currently serves three different purposes:
Definition: sql_lex.h:3710
Metadata lock object key.
Definition: mdl.h:365
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
void * Alloc(size_t length)
Allocate memory.
Definition: my_alloc.h:145
Definition: mysql_lex_string.h:40
const char * str
Definition: mysql_lex_string.h:41
size_t length
Definition: mysql_lex_string.h:42
Definition: mysql_lex_string.h:35
Definition: mysql_com_server.h:59
Definition: mysql_com.h:913
State data storage for start_idle_wait_v1_t.
Definition: psi_idle_bits.h:52
Stage instrument information.
Definition: psi_stage_bits.h:74
Interface for an instrumented stage progress.
Definition: psi_stage_bits.h:63
State data storage for get_thread_statement_locker_v5_t.
Definition: psi_statement_bits.h:166
State data storage for get_thread_transaction_locker_v1_t, get_thread_transaction_locker_v1_t.
Definition: psi_transaction_bits.h:53
Definition: com_data.h:54
Definition: transaction_info.h:44
Per thread status variables.
Definition: system_variables.h:511
ulonglong last_query_partial_plans
Definition: system_variables.h:584
double last_query_cost
Definition: system_variables.h:583
Definition: sql_lexer_thd.h:55
sql_mode_t sql_mode
Definition: sql_lexer_thd.h:56
const CHARSET_INFO * character_set_client
Definition: sql_lexer_thd.h:57
An utility struct for Attachable_trx.
Definition: sql_class.h:1915
bool m_in_lock_tables
THD::in_lock_tables value.
Definition: sql_class.h:1954
void backup(THD *thd)
Definition: sql_class.cc:356
ulonglong m_thd_option_bits
THD options.
Definition: sql_class.h:1945
~Transaction_state()
Definition: sql_class.cc:3028
void restore(THD *thd)
Definition: sql_class.cc:373
PSI_transaction_locker * m_transaction_psi
Current transaction instrumentation.
Definition: sql_class.h:1948
Prealloced_array< Ha_data, PREALLOC_NUM_HA > m_ha_data
Ha_data array.
Definition: sql_class.h:1936
uint m_server_status
Server status flags.
Definition: sql_class.h:1951
bool m_time_zone_used
Current time zone (i.e.
Definition: sql_class.h:1965
bool m_transaction_rollback_request
Transaction rollback request flag.
Definition: sql_class.h:1975
Transaction_ctx * m_trx
Transaction_ctx instance.
Definition: sql_class.h:1939
Open_tables_backup m_open_tables_state
Open-tables state.
Definition: sql_class.h:1927
bool m_tx_read_only
Transaction read-only state.
Definition: sql_class.h:1942
sql_mode_t m_sql_mode
SQL_MODE.
Definition: sql_class.h:1930
Transaction_state()
Definition: sql_class.cc:3024
enum_sql_command m_sql_command
SQL-command.
Definition: sql_class.h:1922
Query_tables_list * m_query_tables_list
Definition: sql_class.h:1924
enum_tx_isolation m_tx_isolation
Transaction isolation level.
Definition: sql_class.h:1933
Definition: sql_timer.cc:54
Definition: thr_lock.h:119
For locks with EXPLICIT duration, MDL returns a new ticket every time a lock is granted.
Definition: item_func.cc:5202
Definition: violite.h:318
void * ssl_arg
Definition: violite.h:414
Bison "location" class.
Definition: parse_location.h:43
This is a POD.
Definition: uuid.h:61
void clear()
Set to all zeros.
Definition: uuid.h:63
handlerton is a singleton structure - one instance per storage engine - to provide access to storage ...
Definition: handler.h:2622
Replacement of system's struct timeval to ensure we can carry 64 bit values even on a platform which ...
Definition: my_time_t.h:45
An instrumented cond structure.
Definition: mysql_cond_bits.h:50
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: mysql_com.h:1108
Definition: resource_group_basic_types.h:54
the struct aggregates two parameters that identify an event uniquely in scope of communication of a p...
Definition: sql_class.h:333
my_off_t pos
Definition: sql_class.h:335
char * file_name
Definition: sql_class.h:334
State data storage for digest_start, digest_add_token.
Definition: sql_digest_stream.h:36
Definition: sql_plugin_ref.h:45
Definition: mysqlslap.cc:217
Definition: sql_connect.h:70
struct xid_t is binary compatible with the XID structure as in the X/Open CAE Specification,...
Definition: xa.h:83
#define MODE_STRICT_TRANS_TABLES
Definition: system_variables.h:140
#define MODE_TIME_TRUNCATE_FRACTIONAL
Definition: system_variables.h:161
#define MODE_NO_ENGINE_SUBSTITUTION
Definition: system_variables.h:155
enum_binlog_format
Definition: system_variables.h:45
@ BINLOG_FORMAT_MIXED
statement if safe, otherwise row - autodetected
Definition: system_variables.h:46
@ BINLOG_FORMAT_ROW
row-based
Definition: system_variables.h:48
@ BINLOG_FORMAT_STMT
statement-based
Definition: system_variables.h:47
#define MODE_STRICT_ALL_TABLES
Definition: system_variables.h:141
thr_lock_type
Definition: thr_lock.h:51
enum_thread_type
Definition: thread_type.h:34
@ NON_SYSTEM_THREAD
Definition: thread_type.h:35
@ SYSTEM_THREAD_BACKGROUND
Definition: thread_type.h:44
@ SYSTEM_THREAD_INIT_FILE
Definition: thread_type.h:48
@ SYSTEM_THREAD_SLAVE_IO
Definition: thread_type.h:36
@ SYSTEM_THREAD_EVENT_SCHEDULER
Definition: thread_type.h:39
@ SYSTEM_THREAD_COMPRESS_GTID_TABLE
Definition: thread_type.h:43
@ SYSTEM_THREAD_SLAVE_WORKER
Definition: thread_type.h:42
@ SYSTEM_THREAD_DD_RESTART
Definition: thread_type.h:46
@ SYSTEM_THREAD_SERVER_UPGRADE
Definition: thread_type.h:49
@ SYSTEM_THREAD_SERVER_INITIALIZE
Definition: thread_type.h:47
@ SYSTEM_THREAD_SLAVE_SQL
Definition: thread_type.h:37
@ SYSTEM_THREAD_DD_INITIALIZE
Definition: thread_type.h:45
@ SYSTEM_THREAD_INFO_REPOSITORY
Definition: thread_type.h:41
@ SYSTEM_THREAD_EVENT_WORKER
Definition: thread_type.h:40
@ SYSTEM_THREAD_NDBCLUSTER_BINLOG
Definition: thread_type.h:38
Include file for Sun RPC to compile out of the box.
#define NULL
Definition: types.h:55
unsigned int uint
Definition: uca9-dump.cc:75
command
Definition: version_token.cc:280
enum_vio_type
Definition: violite.h:79
#define SSL_handle
Definition: violite.h:452
static int all(site_def const *s, node_no node)
Definition: xcom_transport.cc:871