24#ifndef STORING_AUTO_THD_H
25#define STORING_AUTO_THD_H
std::unique_ptr< T, std::function< void(T *)> > Sctx_ptr
Definition: auth_common.h:963
Stores status of the currently executed statement.
Definition: sql_error.h:269
void set_error_status(THD *thd, uint mysql_errno)
Set ERROR status in the Diagnostics Area.
Definition: sql_error.cc:418
bool is_error() const
Definition: sql_error.h:366
const char * message_text() const
Definition: sql_error.h:376
uint mysql_errno() const
Definition: sql_error.h:386
void copy_sql_conditions_from_da(THD *thd, const Diagnostics_area *src_da)
Copy all SQL-conditions from src_da to this DA.
Definition: sql_error.cc:531
const char * returned_sqlstate() const
Definition: sql_error.h:391
A version of Auto_THD that:
Definition: storing_auto_thd.h:41
Storing_auto_THD()
Definition: storing_auto_thd.h:46
THD * get_THD()
Definition: storing_auto_thd.h:75
THD * m_previous_thd
Definition: storing_auto_thd.h:42
~Storing_auto_THD()
Definition: storing_auto_thd.h:55
THD * thd
Definition: storing_auto_thd.h:42
Sctx_ptr< Security_context > ctx
Definition: storing_auto_thd.h:43
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
void store_globals()
Definition: sql_class.cc:1684
Diagnostics_area * get_stmt_da()
Returns first Diagnostics Area for the current statement.
Definition: sql_class.h:3212
thread_local THD * current_thd
Definition: current_thd.cc:26
bool my_thread_init()
Allocate thread specific memory for the thread, used by mysys and dbug.
Definition: my_thr_init.cc:269
void my_thread_end()
Deallocate memory used by the thread for book-keeping.
Definition: my_thr_init.cc:304
THD * create_internal_thd_ctx(Sctx_ptr< Security_context > &ctx)
Wrapper of create_internal_thd() function, creating a temporary THD with the following differences co...
Definition: storing_auto_thd.cc:36
void destroy_internal_thd_ctx(THD *thd, Sctx_ptr< Security_context > &ctx)
Wrapper of destroy_internal_thd() function, safely destroying a temporary THD and its associated secu...
Definition: storing_auto_thd.cc:74