drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::Session Class Reference
Collaboration diagram for drizzled::Session:
[legend]

Classes

class  impl_c

Public Types

enum  global_read_lock_t { NONE = 0 , GOT_GLOBAL_READ_LOCK = 1 , MADE_GLOBAL_READ_LOCK_BLOCK_COMMIT = 2 }
enum  killed_state_t {
  NOT_KILLED , KILL_BAD_DATA , KILL_CONNECTION , KILL_QUERY ,
  KILLED_NO_VALUE
}
typedef std::shared_ptr< Session > shared_ptr
typedef std::shared_ptr< const std::string > QueryString
typedef std::unordered_map< std::string, user_var_entry *, util::insensitive_hash, util::insensitive_equal_to > UserVars

Public Member Functions

void free_items ()
uint64_t getXaId () const
void setXaId (uint64_t in_xa_id)
Diagnostics_area & main_da ()
const LEX & lex () const
LEX & lex ()
enum_sql_command getSqlCommand () const
void resetQueryString ()
const std::shared_ptr< session::State > & state ()
QueryString getQueryString () const
const char * getQueryStringCopy (size_t &length)
util::string::ptr schema () const
void setClient (plugin::Client *client_arg)
plugin::Client * getClient () const
const UserVars & getUserVariables () const
enum_tx_isolation getTxIsolation () const
identifier::user::ptr user () const
void setUser (identifier::user::mptr arg)
int32_t getScoreboardIndex () const
void setScoreboardIndex (int32_t in_scoreboard_index)
bool isOriginatingServerUUIDSet () const
void setOriginatingServerUUID (std::string in_originating_server_uuid)
const std::string & getOriginatingServerUUID () const
void setOriginatingCommitID (uint64_t in_originating_commit_id)
uint64_t getOriginatingCommitID () const
bool isViewable (const identifier::User &) const
const char * where () const
void setWhere (const char *arg)
thread_ptr & getThread ()
void pushInterrupt (boost::this_thread::disable_interruption *interrupt_arg)
boost::this_thread::disable_interruption & getThreadInterupt ()
internal::st_my_thread_var * getThreadVar ()
void ** getEngineData (const plugin::MonitoredInTransaction *monitored)
ResourceContext & getResourceContext (const plugin::MonitoredInTransaction &, size_t index=0)
void setConcurrentExecute (bool arg)
bool isConcurrentExecuteAllowed () const
int64_t rowCount () const
global_read_lock_t isGlobalReadLock () const
void setGlobalReadLock (global_read_lock_t arg)
DrizzleLock * lockTables (Table **tables, uint32_t count, uint32_t flags)
bool lockGlobalReadLock ()
bool lock_table_names (TableList *table_list)
bool lock_table_names_exclusively (TableList *table_list)
bool makeGlobalReadLockBlockCommit ()
bool abortLockForThread (Table *table)
bool wait_if_global_read_lock (bool abort_on_refresh, bool is_not_commit)
int lock_table_name (TableList *table_list)
void abortLock (Table *table)
void removeLock (Table *table)
void unlockReadTables (DrizzleLock *sql_lock)
void unlockSomeTables (Table **table, uint32_t count)
void unlockTables (DrizzleLock *sql_lock)
void startWaitingGlobalReadLock ()
void unlockGlobalReadLock ()
void setKilled (killed_state_t arg)
killed_state_t getKilled () const
volatile killed_state_t * getKilledPtr ()
bool doing_tablespace_operation () const
void setDoingTablespaceOperation (bool doing)
void set_proc_info (const char *info)
const char * get_proc_info () const
void setQueryId (query_id_t in_query_id)
query_id_t getQueryId () const
void setWarningQueryId (query_id_t in_query_id)
query_id_t getWarningQueryId () const
session_id_t getSessionId () const
uint32_t getServerId () const
std::string & getServerUUID () const
void record_first_successful_insert_id_in_cur_stmt (uint64_t id_arg)
uint64_t read_first_successful_insert_id_in_prev_stmt () const
 Session (plugin::Client *, std::shared_ptr< catalog::Instance >)
void cleanup ()
void cleanup_after_query ()
void storeGlobals ()
void awake (Session::killed_state_t state_to_set)
void prepareForQueries ()
bool executeStatement ()
void readAndStoreQuery (str_ref)
bool endTransaction (enum enum_mysql_completiontype completion)
bool endActiveTransaction ()
bool startTransaction (start_transaction_option_t opt=START_TRANS_NO_OPTIONS)
void markTransactionForRollback (bool all)
bool authenticate ()
void run ()
const char * enter_cond (boost::condition_variable_any &cond, boost::mutex &mutex, const char *msg)
void exit_cond (const char *old_msg)
uint64_t found_rows () const
bool inTransaction () const
lex_string_t * make_lex_string (lex_string_t *, str_ref)
void send_explain_fields (select_result *)
void clear_error (bool full=false)
void clearDiagnostics ()
bool is_error () const
void end_statement ()
int killed_errno () const
void send_kill_message () const
bool abortOnWarning ()
void setAbortOnWarning (bool arg)
void setAbort (bool arg)
void lockOnSys ()
void set_status_var_init ()
void set_schema (const std::string &)
str_ref copy_db_to () const
void reset_for_next_command ()
void disconnect (enum error_t errcode=EE_OK)
bool checkUser (const std::string &passwd, const std::string &db)
message::Transaction * getTransactionMessage () const
message::Statement * getStatementMessage () const
message::Resultset * getResultsetMessage () const
void setTransactionMessage (message::Transaction *in_message)
void setStatementMessage (message::Statement *in_message)
void setResultsetMessage (message::Resultset *in_message)
void resetResultsetMessage ()
plugin::EventObserverList * getSessionObservers ()
void setSessionObservers (plugin::EventObserverList *observers)
plugin::EventObserverList * getSchemaObservers (const std::string &schema)
plugin::EventObserverList * setSchemaObservers (const std::string &schema, plugin::EventObserverList *)
void my_ok (ha_rows affected_rows=0, ha_rows found_rows_arg=0, uint64_t passed_id=0, const char *message=NULL)
void my_eof ()
void add_item_to_list (Item *item)
void add_value_to_list (Item *value)
void add_order_to_list (Item *item, bool asc)
void add_group_to_list (Item *item, bool asc)
void refresh_status ()
user_var_entry * getVariable (str_ref name, bool create_if_not_exists)
void setVariable (const std::string &name, const std::string &value)
void close_thread_tables ()
void close_old_data_files (bool morph_locks=false, bool send_refresh=false)
void close_data_files_and_morph_locks (const identifier::Table &)
void close_tables_for_reopen (TableList **tables)
bool openTablesLock (TableList *)
Table * open_temporary_table (const identifier::Table &identifier, bool link_in_list=true)
int open_tables_from_list (TableList **start, uint32_t *counter, uint32_t flags=0)
Table * openTableLock (TableList *table_list, thr_lock_type lock_type)
Table * openTable (TableList *table_list, bool *refresh, uint32_t flags=0)
void unlink_open_table (Table *find)
void drop_open_table (Table *table, const identifier::Table &identifier)
void close_cached_table (Table *table)
table::Placeholder & table_cache_insert_placeholder (const identifier::Table &)
Table * lock_table_name_if_not_cached (const identifier::Table &)
session::TableMessages & getMessageCache ()
bool reopen_tables ()
bool close_cached_tables (TableList *tables, bool wait_for_refresh, bool wait_for_placeholders)
void wait_for_condition (boost::mutex &mutex, boost::condition_variable_any &cond)
int setup_conds (TableList *leaves, COND **conds)
int lock_tables (TableList *tables, uint32_t count, bool *need_reopen)
template<class T>
T * getProperty (const std::string &name)
template<class T>
T setProperty (const std::string &name, T value)
plugin::StorageEngine * getDefaultStorageEngine ()
void get_xid (DrizzleXid *xid) const
table::Singular & getInstanceTable ()
table::Singular & getInstanceTable (std::list< CreateField > &)
void setUsage (bool arg)
const rusage & getUsage ()
const catalog::Instance & catalog () const
catalog::Instance & catalog ()

Static Public Member Functions

static shared_ptr make_shared (plugin::Client *client, std::shared_ptr< catalog::Instance > instance_arg)
static bool schedule (const Session::shared_ptr &)
static void unlink (session_id_t &)
static void unlink (const Session::shared_ptr &)
static const charset_info_st * charset ()

Public Attributes

enum_mark_columns mark_used_columns
Item * free_list
memory::Root & mem
memory::Root * mem_root
memory::Root warn_root
plugin::Scheduler * scheduler
drizzle_system_variables & variables
system_status_var & status_var
THR_LOCK_INFO lock_info
THR_LOCK_OWNER main_lock_id
THR_LOCK_OWNER * lock_id
char * thread_stack
enum_server_command command
thr_lock_type update_lock_default
session::Transactions & transaction
Open_tables_state & open_tables
session::Times & times
Field * dup_field
sigset_t signals
uint64_t first_successful_insert_id_in_prev_stmt
uint64_t first_successful_insert_id_in_cur_stmt
uint64_t limit_found_rows
uint64_t options
int64_t row_count_func
ha_rows cuted_fields
ha_rows sent_row_count
ha_rows examined_row_count
table_map used_tables
uint32_t warn_count [(uint32_t) DRIZZLE_ERROR::WARN_LEVEL_END]
uint32_t total_warn_count
uint32_t row_count
session_id_t thread_id
uint32_t tmp_table
uint32_t server_status
uint32_t open_options
uint32_t select_number
enum_tx_isolation session_tx_isolation
enum_check_fields count_cuted_fields
bool is_admin_connection
bool no_errors
bool is_fatal_error
bool transaction_rollback_request
bool is_fatal_sub_stmt_error
bool substitute_null_with_insert_id
bool cleanup_done
bool got_warning
bool no_warnings_for_error
bool derived_tables_processing
union { 
   bool   bool_value 
   uint32_t   uint32_t_value 
   int32_t   int32_t_value 
   uint64_t   uint64_t_value 
} sys_var_tmp
Lex_input_stream * m_lip
void * session_marker
bool arg_of_last_insert_id_function

Static Public Attributes

static const char *const DEFAULT_WHERE = "field list"

Private Types

typedef std::pair< UserVars::iterator, UserVars::iterator > UserVarsRange

Private Member Functions

int unlock_external (Table **table, uint32_t count)
int lock_external (Table **tables, uint32_t count)
bool wait_for_locked_table_names (TableList *table_list)
DrizzleLock * get_lock_data (Table **table_ptr, uint32_t count, bool should_lock, Table **write_lock_used)
drizzled::util::Storable * getProperty0 (const std::string &)
void setProperty0 (const std::string &, drizzled::util::Storable *)
bool resetUsage ()

Private Attributes

boost::scoped_ptr< impl_c > impl_
std::shared_ptr< std::string > query
UserVars user_vars
const char * _where
boost::thread::id boost_thread_id
thread_ptr _thread
boost::this_thread::disable_interruption * interrupt
internal::st_my_thread_var * mysys_var
std::vector< Ha_data > ha_data
query_id_t query_id
query_id_t warn_query_id
global_read_lock_t _global_read_lock
killed_state_t volatile _killed
std::shared_ptr< catalog::Instance > _catalog
message::Transaction * transaction_message
message::Statement * statement_message
message::Resultset * resultset
plugin::EventObserverList * session_event_observers
uint64_t xa_id
const char * proc_info
bool abort_on_warning
bool concurrent_execute_allowed
bool tablespace_op
bool use_usage
rusage usage
identifier::user::mptr security_ctx
int32_t scoreboard_index
bool originating_server_uuid_set
std::string originating_server_uuid
uint64_t originating_commit_id
plugin::Client * client

Detailed Description

Definition at line 81 of file session.h.

Member Typedef Documentation

◆ QueryString

typedef std::shared_ptr<const std::string> drizzled::Session::QueryString

query associated with this statement

Definition at line 133 of file session.h.

◆ shared_ptr

typedef std::shared_ptr<Session> drizzled::Session::shared_ptr

Definition at line 88 of file session.h.

◆ UserVars

typedef std::unordered_map<std::string, user_var_entry*, util::insensitive_hash, util::insensitive_equal_to> drizzled::Session::UserVars

Definition at line 183 of file session.h.

◆ UserVarsRange

typedef std::pair< UserVars::iterator, UserVars::iterator > drizzled::Session::UserVarsRange
private

Definition at line 186 of file session.h.

Member Enumeration Documentation

◆ global_read_lock_t

enum drizzled::Session::global_read_lock_t

Definition at line 447 of file session.h.

◆ killed_state_t

enum drizzled::Session::killed_state_t

Definition at line 499 of file session.h.

Constructor & Destructor Documentation

◆ ~Session()

drizzled::Session::~Session ( )

Definition at line 418 of file session.cc.

Member Function Documentation

◆ abortOnWarning()

bool drizzled::Session::abortOnWarning ( )
inline

Definition at line 798 of file session.h.

◆ add_group_to_list()

void drizzled::Session::add_group_to_list ( Item * item,
bool asc )

Definition at line 353 of file session.cc.

◆ add_item_to_list()

void drizzled::Session::add_item_to_list ( Item * item)

Definition at line 338 of file session.cc.

◆ add_order_to_list()

void drizzled::Session::add_order_to_list ( Item * item,
bool asc )

Definition at line 348 of file session.cc.

◆ add_value_to_list()

void drizzled::Session::add_value_to_list ( Item * value)

Definition at line 343 of file session.cc.

◆ authenticate()

bool drizzled::Session::authenticate ( )

Authenticates users, with error reporting.

Returns true on success, or false on failure.

Definition at line 656 of file session.cc.

◆ awake()

void drizzled::Session::awake ( Session::killed_state_t state_to_set)

Definition at line 465 of file session.cc.

◆ catalog() [1/2]

catalog::Instance & drizzled::Session::catalog ( )
inline

Definition at line 1071 of file session.h.

◆ catalog() [2/2]

const catalog::Instance & drizzled::Session::catalog ( ) const
inline

Definition at line 1066 of file session.h.

◆ charset()

const charset_info_st * drizzled::Session::charset ( )
inlinestatic

Definition at line 780 of file session.h.

◆ checkUser()

bool drizzled::Session::checkUser ( const std::string & passwd,
const std::string & db )

Check if user exists and the password supplied is correct.

Returns true on success, and false on failure.

Note
Host, user and passwd may point to communication buffer. Current implementation does not depend on that, but future changes should be done with this in mind;
Parameters
passwdScrambled password received from client
dbDatabase name to connect to, may be NULL

Definition at line 666 of file session.cc.

◆ cleanup()

void drizzled::Session::cleanup ( )

Definition at line 395 of file session.cc.

◆ cleanup_after_query()

void drizzled::Session::cleanup_after_query ( )

Cleans up after query.

This function is used to reset thread data to its default state.

This function is not suitable for setting thread data to some non-default values, as there is only one replication thread, so different master threads may overwrite data of each other on slave.

Definition at line 818 of file session.cc.

◆ clear_error()

void drizzled::Session::clear_error ( bool full = false)

Definition at line 1851 of file session.cc.

◆ clearDiagnostics()

void drizzled::Session::clearDiagnostics ( )

Definition at line 1860 of file session.cc.

◆ close_cached_table()

void drizzled::Session::close_cached_table ( Table * table)

Definition at line 1650 of file sql_table.cc.

◆ close_cached_tables()

bool drizzled::Session::close_cached_tables ( TableList * tables,
bool wait_for_refresh,
bool wait_for_placeholders )

Definition at line 152 of file sql_base.cc.

◆ close_data_files_and_morph_locks()

void drizzled::Session::close_data_files_and_morph_locks ( const identifier::Table & identifier)

Close all instances of a table open by this thread and replace them with exclusive name-locks.

Parameters
sessionThread context
dbDatabase name for the table to be closed
table_nameName of the table to be closed
Note
This function assumes that if we are not under LOCK TABLES, then there is only one table open and locked. This means that the function probably has to be adjusted before it can be used anywhere outside ALTER Table.
Must not use TableShare::table_name/db of the table being closed, the strings are used in a loop even after the share may be freed.

Definition at line 1117 of file sql_base.cc.

◆ close_old_data_files()

void drizzled::Session::close_old_data_files ( bool morph_locks = false,
bool send_refresh = false )

Close handlers for tables in list, but leave the Table structure intact so that we can re-open these quickly.

Parameters
sessionThread context
tableHead of the list of Table objects
morph_lockstrue - remove locks which we have on tables being closed but ensure that no DML or DDL will sneak in before we will re-open the table (i.e. temporarily morph our table-level locks into name-locks). false - otherwise
send_refreshShould we awake waiters even if we didn't close any tables?

Definition at line 1250 of file sql_base.cc.

◆ close_tables_for_reopen()

void drizzled::Session::close_tables_for_reopen ( TableList ** tables)

Prepares statement for reopening of tables and recalculation of set of prelocked tables.

Parameters
Pointerto a pointer to a list of tables which we were trying to open and lock

Definition at line 1760 of file session.cc.

◆ close_thread_tables()

void drizzled::Session::close_thread_tables ( )

Closes all tables used by the current substatement, or all tables used by this thread if we are on the upper level.

Definition at line 1721 of file session.cc.

◆ copy_db_to()

str_ref drizzled::Session::copy_db_to ( ) const

Definition at line 1476 of file session.cc.

◆ disconnect()

void drizzled::Session::disconnect ( enum error_t errcode = EE_OK)

Disconnects the session from a client connection and updates any status variables necessary.

Parameters
errcodeError code to print to console
Note
For the connection that is doing shutdown, this is called twice

Definition at line 1532 of file session.cc.

◆ doing_tablespace_operation()

bool drizzled::Session::doing_tablespace_operation ( ) const
inline

Definition at line 565 of file session.h.

◆ drop_open_table()

void drizzled::Session::drop_open_table ( Table * table,
const identifier::Table & identifier )

Auxiliary routine which closes and drops open table.

Parameters
sessionThread handle
tableTable object for table to be dropped
db_nameName of database for this table
table_nameName of this table
Note
This routine assumes that table to be closed is open only by calling thread so we needn't wait until other threads will close the table. Also unless called under implicit or explicit LOCK TABLES mode it assumes that table to be dropped is already unlocked. In the former case it will also remove lock on the table. But one should not rely on this behaviour as it may change in future. Currently, however, this function is never called for a table that was locked with LOCK TABLES.

Definition at line 639 of file sql_base.cc.

◆ end_statement()

void drizzled::Session::end_statement ( )

Cleanup statement parse state (parse tree, lex) and execution state after execution of a non-prepared SQL statement.

Todo

Move this to Statement::~Statement

Definition at line 1469 of file session.cc.

◆ endActiveTransaction()

bool drizzled::Session::endActiveTransaction ( )

Definition at line 787 of file session.cc.

◆ endTransaction()

bool drizzled::Session::endTransaction ( enum enum_mysql_completiontype completion)

Ends the current transaction and (maybe) begins the next.

Returns true if the transaction completed successfully, otherwise false.

Parameters
Completiontype

Definition at line 727 of file session.cc.

◆ enter_cond()

const char * drizzled::Session::enter_cond ( boost::condition_variable_any & cond,
boost::mutex & mutex,
const char * msg )

Definition at line 631 of file session.cc.

◆ executeStatement()

bool drizzled::Session::executeStatement ( )

Executes a single statement received from the client connection.

Returns true if the statement was successful, or false otherwise.

Note

For profiling to work, it must never be called recursively.

In MySQL, this used to be the do_command() C function whic accepted a single parameter of the THD pointer.

Definition at line 684 of file session.cc.

◆ exit_cond()

void drizzled::Session::exit_cond ( const char * old_msg)

Definition at line 641 of file session.cc.

◆ found_rows()

uint64_t drizzled::Session::found_rows ( ) const
inline

Definition at line 761 of file session.h.

◆ free_items()

void drizzled::Session::free_items ( )

Frees all items attached to this Statement

Definition at line 358 of file session.cc.

◆ get_proc_info()

const char * drizzled::Session::get_proc_info ( ) const
inline

Definition at line 609 of file session.h.

◆ get_xid()

void drizzled::Session::get_xid ( DrizzleXid * xid) const

Definition at line 388 of file session.cc.

◆ getClient()

plugin::Client * drizzled::Session::getClient ( ) const
inline

Definition at line 176 of file session.h.

◆ getDefaultStorageEngine()

plugin::StorageEngine * drizzled::Session::getDefaultStorageEngine ( )

Return the default storage engine

Parameters
getDefaultStorageEngine()
Returns
pointer to plugin::StorageEngine

Definition at line 1896 of file session.cc.

◆ getEngineData()

void ** drizzled::Session::getEngineData ( const plugin::MonitoredInTransaction * monitored)

Definition at line 130 of file session.cc.

◆ getInstanceTable() [1/2]

table::Singular & drizzled::Session::getInstanceTable ( )

Definition at line 1820 of file session.cc.

◆ getInstanceTable() [2/2]

table::Singular & drizzled::Session::getInstanceTable ( std::list< CreateField > & field_list)

Create a reduced Table object with properly set up Field list from a list of field definitions.

The created table doesn't have a table Cursor associated with it, has no keys, no group/distinct, no copy_funcs array. The sole purpose of this Table object is to use the power of Field class to read/write data to/from table->getInsertRecord(). Then one can store the record in any container (RB tree, hash, etc). The table is created in Session mem_root, so are the table's fields. Consequently, if you don't BLOB fields, you don't need to free it.

Parameters
sessionconnection handle
field_listlist of column definitions
Returns
0 if out of memory, Table object in case of success

Definition at line 1845 of file session.cc.

◆ getKilled()

killed_state_t drizzled::Session::getKilled ( ) const
inline

Definition at line 517 of file session.h.

◆ getKilledPtr()

volatile killed_state_t * drizzled::Session::getKilledPtr ( )
inline

Definition at line 522 of file session.h.

◆ getMessageCache()

session::TableMessages & drizzled::Session::getMessageCache ( )

Definition at line 318 of file session.cc.

◆ getOriginatingCommitID()

uint64_t drizzled::Session::getOriginatingCommitID ( ) const
inline

Definition at line 250 of file session.h.

◆ getOriginatingServerUUID()

const std::string & drizzled::Session::getOriginatingServerUUID ( ) const
inline

Definition at line 240 of file session.h.

◆ getProperty()

template<class T>
T * drizzled::Session::getProperty ( const std::string & name)
inline

Definition at line 1030 of file session.h.

◆ getProperty0()

drizzled::util::Storable * drizzled::Session::getProperty0 ( const std::string & arg)
private

Definition at line 1906 of file session.cc.

◆ getQueryId()

query_id_t drizzled::Session::getQueryId ( ) const
inline

Returns the current query ID

Definition at line 621 of file session.h.

◆ getQueryString()

QueryString drizzled::Session::getQueryString ( ) const
inline

Definition at line 145 of file session.h.

◆ getQueryStringCopy()

const char * drizzled::Session::getQueryStringCopy ( size_t & length)
inline

Definition at line 150 of file session.h.

◆ getResourceContext()

ResourceContext & drizzled::Session::getResourceContext ( const plugin::MonitoredInTransaction & monitored,
size_t index = 0 )

Definition at line 135 of file session.cc.

◆ getResultsetMessage()

message::Resultset * drizzled::Session::getResultsetMessage ( ) const
inline

Returns a pointer to the current Resulset message for this Session, or NULL if no active message.

Definition at line 901 of file session.h.

◆ getSchemaObservers()

plugin::EventObserverList * drizzled::Session::getSchemaObservers ( const std::string & schema)

Definition at line 1917 of file session.cc.

◆ getScoreboardIndex()

int32_t drizzled::Session::getScoreboardIndex ( ) const
inline

Definition at line 219 of file session.h.

◆ getServerId()

uint32_t drizzled::Session::getServerId ( ) const
inline

Accessor method returning the server's ID.

Definition at line 646 of file session.h.

◆ getServerUUID()

std::string & drizzled::Session::getServerUUID ( ) const
inline

Definition at line 652 of file session.h.

◆ getSessionId()

session_id_t drizzled::Session::getSessionId ( ) const
inline

Accessor method returning the session's ID.

Definition at line 640 of file session.h.

◆ getSessionObservers()

plugin::EventObserverList * drizzled::Session::getSessionObservers ( )
inline

Definition at line 947 of file session.h.

◆ getSqlCommand()

enum_sql_command drizzled::Session::getSqlCommand ( ) const

Definition at line 313 of file session.cc.

◆ getStatementMessage()

message::Statement * drizzled::Session::getStatementMessage ( ) const
inline

Returns a pointer to the active Statement message for this Session, or NULL if no active message.

Definition at line 892 of file session.h.

◆ getThread()

thread_ptr & drizzled::Session::getThread ( )
inline

Definition at line 293 of file session.h.

◆ getThreadInterupt()

boost::this_thread::disable_interruption & drizzled::Session::getThreadInterupt ( )
inline

Definition at line 303 of file session.h.

◆ getThreadVar()

internal::st_my_thread_var * drizzled::Session::getThreadVar ( )
inline

Definition at line 309 of file session.h.

◆ getTransactionMessage()

message::Transaction * drizzled::Session::getTransactionMessage ( ) const
inline

Returns a pointer to the active Transaction message for this Session being managed by the ReplicationServices component, or NULL if no active message.

Definition at line 883 of file session.h.

◆ getTxIsolation()

enum_tx_isolation drizzled::Session::getTxIsolation ( ) const

Definition at line 1901 of file session.cc.

◆ getUsage()

const rusage & drizzled::Session::getUsage ( )
inline

Definition at line 1061 of file session.h.

◆ getUserVariables()

const UserVars & drizzled::Session::getUserVariables ( ) const
inline

Definition at line 190 of file session.h.

◆ getVariable()

user_var_entry * drizzled::Session::getVariable ( str_ref name,
bool create_if_not_exists )

Definition at line 1668 of file session.cc.

◆ getWarningQueryId()

query_id_t drizzled::Session::getWarningQueryId ( ) const
inline

Returns the Session's warning query ID

Definition at line 634 of file session.h.

◆ getXaId()

uint64_t drizzled::Session::getXaId ( ) const
inline

Definition at line 116 of file session.h.

◆ inTransaction()

bool drizzled::Session::inTransaction ( ) const
inline

Returns whether the session is currently inside a transaction

Definition at line 767 of file session.h.

◆ is_error()

bool drizzled::Session::is_error ( ) const

true if there is an error in the error stack.

Please use this method instead of direct access to net.report_error.

If true, the current (sub)-statement should be aborted. The main difference between this member and is_fatal_error is that a fatal error can not be handled by a stored procedure continue handler, whereas a normal error can.

To raise this flag, use my_error().

Definition at line 1878 of file session.cc.

◆ isConcurrentExecuteAllowed()

bool drizzled::Session::isConcurrentExecuteAllowed ( ) const
inline

Definition at line 358 of file session.h.

◆ isGlobalReadLock()

global_read_lock_t drizzled::Session::isGlobalReadLock ( ) const
inline

Definition at line 458 of file session.h.

◆ isOriginatingServerUUIDSet()

bool drizzled::Session::isOriginatingServerUUIDSet ( ) const
inline

Definition at line 229 of file session.h.

◆ isViewable()

bool drizzled::Session::isViewable ( const identifier::User & user_arg) const

Is this session viewable by the current user?

Definition at line 625 of file session.cc.

◆ killed_errno()

int drizzled::Session::killed_errno ( ) const
inline

Definition at line 791 of file session.h.

◆ lex() [1/2]

LEX & drizzled::Session::lex ( )

Definition at line 308 of file session.cc.

◆ lex() [2/2]

const LEX & drizzled::Session::lex ( ) const

Definition at line 303 of file session.cc.

◆ lock_table_name_if_not_cached()

Table * drizzled::Session::lock_table_name_if_not_cached ( const identifier::Table & identifier)

Obtain an exclusive name lock on the table if it is not cached in the table cache.

Parameters
sessionThread context
dbName of database
table_nameName of table
[out]tableOut parameter which is either:
  • set to NULL if table cache contains record for the table or
  • set to point to the Table instance used for name-locking.
Note
This function takes into account all records for table in table cache, even placeholders used for name-locking. This means that 'table' parameter can be set to NULL for some situations when table does not really exist.
Return values
trueError occured (OOM)
falseSuccess. 'table' parameter set according to above rules.

Definition at line 752 of file sql_base.cc.

◆ lock_tables()

int drizzled::Session::lock_tables ( TableList * tables,
uint32_t count,
bool * need_reopen )

Definition at line 1632 of file sql_base.cc.

◆ lockOnSys()

void drizzled::Session::lockOnSys ( )

Definition at line 373 of file session.cc.

◆ main_da()

Diagnostics_area & drizzled::Session::main_da ( )

Definition at line 298 of file session.cc.

◆ make_lex_string()

lex_string_t * drizzled::Session::make_lex_string ( lex_string_t * lex_str,
str_ref str )

Create a lex_string_t in this connection.

Parameters
lex_strpointer to lex_string_t object to be initialized
strinitializer to be copied into lex_str
lengthlength of str, in bytes
allocate_lex_stringif true, allocate new lex_string_t object, instead of using lex_str value
Returns
NULL on failure, or pointer to the lex_string_t object

Definition at line 854 of file session.cc.

◆ make_shared()

Session::shared_ptr drizzled::Session::make_shared ( plugin::Client * client,
std::shared_ptr< catalog::Instance > instance_arg )
static

Definition at line 186 of file session.cc.

◆ markTransactionForRollback()

void drizzled::Session::markTransactionForRollback ( bool all)

Mark transaction to rollback and mark error as fatal to a sub-statement.

Parameters
sessionThread handle
alltrue <=> rollback main transaction().

Definition at line 1526 of file session.cc.

◆ my_eof()

void drizzled::Session::my_eof ( )

A short cut for session->main_da().set_eof_status().

Definition at line 1891 of file session.cc.

◆ my_ok()

void drizzled::Session::my_ok ( ha_rows affected_rows = 0,
ha_rows found_rows_arg = 0,
uint64_t passed_id = 0,
const char * message = NULL )

A short cut for session->main_da().set_ok_status().

Definition at line 1884 of file session.cc.

◆ open_tables_from_list()

int drizzled::Session::open_tables_from_list ( TableList ** start,
uint32_t * counter,
uint32_t flags = 0 )

Definition at line 1446 of file sql_base.cc.

◆ open_temporary_table()

Table * drizzled::Session::open_temporary_table ( const identifier::Table & identifier,
bool link_in_list = true )

Definition at line 1680 of file sql_base.cc.

◆ openTable()

Table * drizzled::Session::openTable ( TableList * table_list,
bool * refresh,
uint32_t flags = 0 )

Definition at line 798 of file sql_base.cc.

◆ openTableLock()

Table * drizzled::Session::openTableLock ( TableList * table_list,
thr_lock_type lock_type )

Definition at line 1577 of file sql_base.cc.

◆ openTablesLock()

bool drizzled::Session::openTablesLock ( TableList * tables)

Open all tables in list, locks them (all, including derived)

Parameters
Pointerto a list of tables for open & locking
Return values
false- ok
true- error
Note

The lock will automaticaly be freed by close_thread_tables()

Definition at line 1774 of file session.cc.

◆ prepareForQueries()

void drizzled::Session::prepareForQueries ( )

Initialize memory roots necessary for query processing and (!) pre-allocate memory for it. We can't do that in Session constructor because there are use cases where it's vital to not allocate excessive and not used memory.

Definition at line 545 of file session.cc.

◆ pushInterrupt()

void drizzled::Session::pushInterrupt ( boost::this_thread::disable_interruption * interrupt_arg)
inline

Definition at line 298 of file session.h.

◆ read_first_successful_insert_id_in_prev_stmt()

uint64_t drizzled::Session::read_first_successful_insert_id_in_prev_stmt ( ) const
inline

Definition at line 662 of file session.h.

◆ readAndStoreQuery()

void drizzled::Session::readAndStoreQuery ( str_ref v)

Reads a query from packet and stores it.

Returns true if query is read and allocated successfully, false otherwise. On a return of false, Session::fatal_error is set.

Note
Used in COM_QUERY and COM_STMT_PREPARE.

Sets the following Session variables:

  • query
  • query_length
Parameters
Thepacket pointer to read from
Thelength of the query to read

Definition at line 713 of file session.cc.

◆ record_first_successful_insert_id_in_cur_stmt()

void drizzled::Session::record_first_successful_insert_id_in_cur_stmt ( uint64_t id_arg)
inline

Definition at line 657 of file session.h.

◆ refresh_status()

void drizzled::Session::refresh_status ( )

Definition at line 1658 of file session.cc.

◆ reopen_tables()

bool drizzled::Session::reopen_tables ( )

Reopen all tables with closed data files.

Parameters
sessionThread context
get_locksShould we get locks after reopening tables ?
mark_share_as_oldMark share as old to protect from a impending global read lock.
Note
Since this function can't properly handle prelocking and create placeholders it should be used in very special situations like FLUSH TABLES or ALTER Table. In general case one should just repeat open_tables()/lock_tables() combination when one needs tables to be reopened (for example see openTablesLock()).
One should have lock on table::Cache::mutex() when calling this.
Returns
false in case of success, true - otherwise.

Definition at line 1167 of file sql_base.cc.

◆ reset_for_next_command()

void drizzled::Session::reset_for_next_command ( )

Resets Session part responsible for command processing state.

This needs to be called before execution of every statement (prepared or conventional). It is not called by substatements of routines.

Todo

Make it a method of Session and align its name with the rest of reset/end/start/init methods.

Call it after we use Session for queries, not before.

Definition at line 1569 of file session.cc.

◆ resetQueryString()

void drizzled::Session::resetQueryString ( )

Definition at line 1937 of file session.cc.

◆ resetResultsetMessage()

void drizzled::Session::resetResultsetMessage ( )
inline

reset the active Resultset message used by the Query Cache plugin.

Definition at line 942 of file session.h.

◆ resetUsage()

bool drizzled::Session::resetUsage ( )
inlineprivate

Definition at line 1081 of file session.h.

◆ rowCount()

int64_t drizzled::Session::rowCount ( ) const
inline

Definition at line 399 of file session.h.

◆ run()

void drizzled::Session::run ( )

Definition at line 562 of file session.cc.

◆ schedule()

bool drizzled::Session::schedule ( const Session::shared_ptr & arg)
static

Definition at line 579 of file session.cc.

◆ schema()

util::string::ptr drizzled::Session::schema ( ) const

Definition at line 1932 of file session.cc.

◆ send_explain_fields()

void drizzled::Session::send_explain_fields ( select_result * result)

Definition at line 862 of file session.cc.

◆ send_kill_message()

void drizzled::Session::send_kill_message ( ) const

Definition at line 1507 of file session.cc.

◆ set_proc_info()

void drizzled::Session::set_proc_info ( const char * info)
inline

Points to info-string that we show in SHOW PROCESSLIST You are supposed to call Session_SET_PROC_INFO only if you have coded a time-consuming piece that MySQL can get stuck in for a long time.

Set it using the session_proc_info(Session *thread, const char *message) macro/function.

Definition at line 605 of file session.h.

◆ set_schema()

void drizzled::Session::set_schema ( const std::string & new_db)

Set the current database; use deep copy of C-string.

Parameters
new_dba pointer to the new database name.
new_db_lenlength of the new database name.

Initialize the current database from a NULL-terminated string with length. If we run out of memory, we free the current database and return true. This way the user will notice the error as there will be no current database selected (in addition to the error message set by malloc).

Note
This operation just sets {db, db_length}. Switching the current database usually involves other actions, like switching other database attributes including security context. In the future, this operation will be made private and more convenient interface will be provided.

Definition at line 1514 of file session.cc.

◆ setAbort()

void drizzled::Session::setAbort ( bool arg)

Definition at line 368 of file session.cc.

◆ setAbortOnWarning()

void drizzled::Session::setAbortOnWarning ( bool arg)
inline

Definition at line 803 of file session.h.

◆ setClient()

void drizzled::Session::setClient ( plugin::Client * client_arg)

Definition at line 459 of file session.cc.

◆ setConcurrentExecute()

void drizzled::Session::setConcurrentExecute ( bool arg)
inline

Definition at line 353 of file session.h.

◆ setDoingTablespaceOperation()

void drizzled::Session::setDoingTablespaceOperation ( bool doing)
inline

Definition at line 570 of file session.h.

◆ setGlobalReadLock()

void drizzled::Session::setGlobalReadLock ( global_read_lock_t arg)
inline

Definition at line 463 of file session.h.

◆ setKilled()

void drizzled::Session::setKilled ( killed_state_t arg)
inline

Definition at line 512 of file session.h.

◆ setOriginatingCommitID()

void drizzled::Session::setOriginatingCommitID ( uint64_t in_originating_commit_id)
inline

Definition at line 245 of file session.h.

◆ setOriginatingServerUUID()

void drizzled::Session::setOriginatingServerUUID ( std::string in_originating_server_uuid)
inline

Definition at line 234 of file session.h.

◆ setProperty()

template<class T>
T drizzled::Session::setProperty ( const std::string & name,
T value )
inline

Definition at line 1036 of file session.h.

◆ setProperty0()

void drizzled::Session::setProperty0 ( const std::string & arg,
drizzled::util::Storable * value )
private

Definition at line 1911 of file session.cc.

◆ setQueryId()

void drizzled::Session::setQueryId ( query_id_t in_query_id)
inline

Sets this Session's current query ID

Definition at line 615 of file session.h.

◆ setResultsetMessage()

void drizzled::Session::setResultsetMessage ( message::Resultset * in_message)
inline

Sets the active Resultset message used by the Query Cache plugin.

Parameters
[in]Pointerto the message

Definition at line 933 of file session.h.

◆ setSchemaObservers()

plugin::EventObserverList * drizzled::Session::setSchemaObservers ( const std::string & schema,
plugin::EventObserverList * observers )

Definition at line 1924 of file session.cc.

◆ setScoreboardIndex()

void drizzled::Session::setScoreboardIndex ( int32_t in_scoreboard_index)
inline

Definition at line 224 of file session.h.

◆ setSessionObservers()

void drizzled::Session::setSessionObservers ( plugin::EventObserverList * observers)
inline

Definition at line 952 of file session.h.

◆ setStatementMessage()

void drizzled::Session::setStatementMessage ( message::Statement * in_message)
inline

Sets the active statement message used by the ReplicationServices component.

Parameters
[in]Pointerto the message

Definition at line 922 of file session.h.

◆ setTransactionMessage()

void drizzled::Session::setTransactionMessage ( message::Transaction * in_message)
inline

Sets the active transaction message used by the ReplicationServices component.

Parameters
[in]Pointerto the message

Definition at line 911 of file session.h.

◆ setup_conds()

int drizzled::Session::setup_conds ( TableList * leaves,
COND ** conds )

Definition at line 3529 of file sql_base.cc.

◆ setUsage()

void drizzled::Session::setUsage ( bool arg)
inline

Definition at line 1056 of file session.h.

◆ setUser()

void drizzled::Session::setUser ( identifier::user::mptr arg)
inline

Definition at line 214 of file session.h.

◆ setVariable()

void drizzled::Session::setVariable ( const std::string & name,
const std::string & value )

Definition at line 1692 of file session.cc.

◆ setWarningQueryId()

void drizzled::Session::setWarningQueryId ( query_id_t in_query_id)
inline

Sets this Session's warning query ID

Definition at line 628 of file session.h.

◆ setWhere()

void drizzled::Session::setWhere ( const char * arg)
inline

Definition at line 274 of file session.h.

◆ setXaId()

void drizzled::Session::setXaId ( uint64_t in_xa_id)
inline

Definition at line 121 of file session.h.

◆ startTransaction()

bool drizzled::Session::startTransaction ( start_transaction_option_t opt = START_TRANS_NO_OPTIONS)

Definition at line 806 of file session.cc.

◆ state()

const std::shared_ptr< session::State > & drizzled::Session::state ( )

Definition at line 1943 of file session.cc.

◆ storeGlobals()

void drizzled::Session::storeGlobals ( )

Definition at line 514 of file session.cc.

◆ table_cache_insert_placeholder()

table::Placeholder & drizzled::Session::table_cache_insert_placeholder ( const identifier::Table & arg)

Create and insert into table cache placeholder for table which will prevent its opening (or creation) (a.k.a lock table name).

Parameters
sessionThread context
keyTable cache key for name to be locked
key_lengthTable cache key length
Returns
Pointer to Table object used for name locking or 0 in case of failure.

Definition at line 714 of file sql_base.cc.

◆ unlink() [1/2]

void drizzled::Session::unlink ( const Session::shared_ptr & session)
static

Definition at line 651 of file drizzled.cc.

◆ unlink() [2/2]

void drizzled::Session::unlink ( session_id_t & session_id)
static

Definition at line 643 of file drizzled.cc.

◆ unlink_open_table()

void drizzled::Session::unlink_open_table ( Table * find)

Remove all instances of table from thread's open list and table cache.

Parameters
sessionThread context
findTable to remove
Note
because we risk the chance of deleting the share, we can't assume that it will exist past, this should be modified once we can use a TableShare::shared_ptr here.

Definition at line 583 of file sql_base.cc.

◆ user()

identifier::user::ptr drizzled::Session::user ( ) const
inline

Definition at line 209 of file session.h.

◆ wait_for_condition()

void drizzled::Session::wait_for_condition ( boost::mutex & mutex,
boost::condition_variable_any & cond )

Definition at line 669 of file sql_base.cc.

◆ where()

const char * drizzled::Session::where ( ) const
inline

Definition at line 269 of file session.h.

Member Data Documentation

◆ _catalog

std::shared_ptr<catalog::Instance> drizzled::Session::_catalog
private

Definition at line 1086 of file session.h.

◆ _global_read_lock

global_read_lock_t drizzled::Session::_global_read_lock
private

Definition at line 454 of file session.h.

◆ _killed

killed_state_t volatile drizzled::Session::_killed
private

Definition at line 508 of file session.h.

◆ _thread

thread_ptr drizzled::Session::_thread
private

Definition at line 287 of file session.h.

◆ _where

const char* drizzled::Session::_where
private

Used in error messages to tell user in what part of MySQL we found an error. E. g. when where= "having clause", if fix_fields() fails, user will know that the error was in having clause.

Definition at line 266 of file session.h.

◆ abort_on_warning

bool drizzled::Session::abort_on_warning
private

Definition at line 1097 of file session.h.

◆ arg_of_last_insert_id_function

bool drizzled::Session::arg_of_last_insert_id_function

Definition at line 1076 of file session.h.

◆ bool_value

bool drizzled::Session::bool_value

Definition at line 579 of file session.h.

◆ boost_thread_id

boost::thread::id drizzled::Session::boost_thread_id
private

Definition at line 286 of file session.h.

◆ cleanup_done

bool drizzled::Session::cleanup_done

Definition at line 557 of file session.h.

◆ client

plugin::Client* drizzled::Session::client
private

Definition at line 1107 of file session.h.

◆ command

enum_server_command drizzled::Session::command

Type of current query: COM_STMT_PREPARE, COM_QUERY, etc. Set from first byte of the packet in executeStatement()

Definition at line 318 of file session.h.

◆ concurrent_execute_allowed

bool drizzled::Session::concurrent_execute_allowed
private

Definition at line 1098 of file session.h.

◆ count_cuted_fields

enum_check_fields drizzled::Session::count_cuted_fields

Definition at line 497 of file session.h.

◆ cuted_fields

ha_rows drizzled::Session::cuted_fields

Count of "cut" or truncated fields.

Todo
Kill this friggin thing.

Definition at line 404 of file session.h.

◆ DEFAULT_WHERE

const char *const drizzled::Session::DEFAULT_WHERE = "field list"
static

Constant for Session::where initialization in the beginning of every query.

It's needed because we do not save/restore Session::where normally during primary (non subselect) query execution.

Definition at line 170 of file session.h.

◆ derived_tables_processing

bool drizzled::Session::derived_tables_processing

set during loop of derived table processing

Definition at line 563 of file session.h.

◆ dup_field

Field* drizzled::Session::dup_field

Definition at line 348 of file session.h.

◆ examined_row_count

ha_rows drizzled::Session::examined_row_count

Number of rows we read, sent or not, including in create_sort_index()

Definition at line 415 of file session.h.

◆ first_successful_insert_id_in_cur_stmt

uint64_t drizzled::Session::first_successful_insert_id_in_cur_stmt

This is the first autogenerated insert id which was successfully inserted by the current statement. It is maintained only to set first_successful_insert_id_in_prev_stmt when statement ends.

Definition at line 381 of file session.h.

◆ first_successful_insert_id_in_prev_stmt

uint64_t drizzled::Session::first_successful_insert_id_in_prev_stmt

This is the first autogenerated insert id which was successfully inserted by the previous statement (exactly, if the previous statement didn't successfully insert an autogenerated insert id, then it's the one of the statement before, etc). It can also be set by SET LAST_INSERT_ID=# or SELECT LAST_INSERT_ID(#). It is returned by LAST_INSERT_ID().

Definition at line 375 of file session.h.

◆ free_list

Item* drizzled::Session::free_list

List of items created in the parser for this query. Every item puts itself to the list on creation (see Item::Item() for details))

Definition at line 112 of file session.h.

◆ got_warning

bool drizzled::Session::got_warning

Set on call to push_warning()

Definition at line 560 of file session.h.

◆ ha_data

std::vector<Ha_data> drizzled::Session::ha_data
private

Definition at line 328 of file session.h.

◆ impl_

boost::scoped_ptr<impl_c> drizzled::Session::impl_
private

Definition at line 86 of file session.h.

◆ int32_t_value

int32_t drizzled::Session::int32_t_value

Definition at line 581 of file session.h.

◆ interrupt

boost::this_thread::disable_interruption* drizzled::Session::interrupt
private

Definition at line 288 of file session.h.

◆ is_admin_connection

bool drizzled::Session::is_admin_connection

Definition at line 527 of file session.h.

◆ is_fatal_error

bool drizzled::Session::is_fatal_error

Set to true if execution of the current compound statement can not continue. In particular, disables activation of CONTINUE or EXIT handlers of stored routines. Reset in the end of processing of the current user request, in

See also
reset_session_for_next_command().

Definition at line 536 of file session.h.

◆ is_fatal_sub_stmt_error

bool drizzled::Session::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 sub-statement mode. In particular, disables activation of CONTINUE and EXIT handlers inside sub-statements. E.g. if it is a deadlock error and requires a transaction-wide rollback, this flag is raised (traditionally, MySQL first has to close all the reads via

See also
handler::ha_index_or_rnd_end() and only then perform the rollback). Reset to false when we leave the sub-statement mode.

Definition at line 554 of file session.h.

◆ limit_found_rows

uint64_t drizzled::Session::limit_found_rows

We follow this logic:

  • when stmt starts, first_successful_insert_id_in_prev_stmt contains the first insert id successfully inserted by the previous stmt.
  • as stmt makes progress, handler::insert_id_for_cur_row changes; every time get_auto_increment() is called,
  • at first successful insertion of an autogenerated value, first_successful_insert_id_in_cur_stmt is set to handler::insert_id_for_cur_row.
  • when stmt ends, first_successful_insert_id_in_prev_stmt is set to first_successful_insert_id_in_cur_stmt.

Definition at line 395 of file session.h.

◆ lock_id

THR_LOCK_OWNER* drizzled::Session::lock_id

If not main_lock_id, points to the lock_id of a cursor.

Definition at line 201 of file session.h.

◆ lock_info

THR_LOCK_INFO drizzled::Session::lock_info

Locking information for this session

Definition at line 199 of file session.h.

◆ m_lip

Lex_input_stream* drizzled::Session::m_lip

Character input stream consumed by the lexical analyser, used during parsing. Note that since the parser is not re-entrant, we keep only one input stream here. This member is valid only when executing code during parsing, and may point to invalid memory after that.

Definition at line 592 of file session.h.

◆ main_lock_id

THR_LOCK_OWNER drizzled::Session::main_lock_id

To use for conventional queries

Definition at line 200 of file session.h.

◆ mark_used_columns

enum_mark_columns drizzled::Session::mark_used_columns

Definition at line 103 of file session.h.

◆ mem

memory::Root& drizzled::Session::mem

Definition at line 113 of file session.h.

◆ mem_root

memory::Root* drizzled::Session::mem_root

Pointer to current memroot

Definition at line 114 of file session.h.

◆ mysys_var

internal::st_my_thread_var* drizzled::Session::mysys_var
private

Definition at line 290 of file session.h.

◆ no_errors

bool drizzled::Session::no_errors

Definition at line 528 of file session.h.

◆ no_warnings_for_error

bool drizzled::Session::no_warnings_for_error

no warnings on call to my_error()

Definition at line 561 of file session.h.

◆ open_options

uint32_t drizzled::Session::open_options

Definition at line 493 of file session.h.

◆ open_tables

Open_tables_state& drizzled::Session::open_tables

Definition at line 345 of file session.h.

◆ options

uint64_t drizzled::Session::options

Bitmap of options

Definition at line 396 of file session.h.

◆ originating_commit_id

uint64_t drizzled::Session::originating_commit_id
private

Definition at line 1106 of file session.h.

◆ originating_server_uuid

std::string drizzled::Session::originating_server_uuid
private

Definition at line 1105 of file session.h.

◆ originating_server_uuid_set

bool drizzled::Session::originating_server_uuid_set
private

Definition at line 1104 of file session.h.

◆ proc_info

const char* drizzled::Session::proc_info
private

Definition at line 1096 of file session.h.

◆ query

std::shared_ptr<std::string> drizzled::Session::query
private

Definition at line 136 of file session.h.

◆ query_id

query_id_t drizzled::Session::query_id
private

Definition at line 337 of file session.h.

◆ resultset

message::Resultset* drizzled::Session::resultset
private

Definition at line 1092 of file session.h.

◆ row_count

uint32_t drizzled::Session::row_count

Row counter, mainly for errors and warnings. Not increased in create_sort_index(); may differ from examined_row_count.

Definition at line 443 of file session.h.

◆ row_count_func

int64_t drizzled::Session::row_count_func

For the ROW_COUNT() function

Definition at line 397 of file session.h.

◆ scheduler

plugin::Scheduler* drizzled::Session::scheduler

Pointer to scheduler object

Definition at line 181 of file session.h.

◆ scoreboard_index

int32_t drizzled::Session::scoreboard_index
private

Definition at line 1103 of file session.h.

◆ security_ctx

identifier::user::mptr drizzled::Session::security_ctx
private

Definition at line 1102 of file session.h.

◆ select_number

uint32_t drizzled::Session::select_number

number of select (used for EXPLAIN)

Definition at line 494 of file session.h.

◆ sent_row_count

ha_rows drizzled::Session::sent_row_count

Number of rows we actually sent to the client, including "synthetic" rows in ROLLUP etc.

Definition at line 410 of file session.h.

◆ server_status

uint32_t drizzled::Session::server_status

Definition at line 492 of file session.h.

◆ session_event_observers

plugin::EventObserverList* drizzled::Session::session_event_observers
private

Definition at line 1093 of file session.h.

◆ session_marker

void* drizzled::Session::session_marker

Place to store various things

Definition at line 595 of file session.h.

◆ session_tx_isolation

enum_tx_isolation drizzled::Session::session_tx_isolation

Definition at line 496 of file session.h.

◆ signals

sigset_t drizzled::Session::signals

Definition at line 349 of file session.h.

◆ statement_message

message::Statement* drizzled::Session::statement_message
private

Definition at line 1090 of file session.h.

◆ status_var

system_status_var& drizzled::Session::status_var

Definition at line 197 of file session.h.

◆ substitute_null_with_insert_id

bool drizzled::Session::substitute_null_with_insert_id

for IS NULL => = last_insert_id() fix in remove_eq_conds()

Definition at line 556 of file session.h.

◆ [union]

union { ... } drizzled::Session::sys_var_tmp

Used by the sys_var class to store temporary values

◆ tablespace_op

bool drizzled::Session::tablespace_op
private

This is true in DISCARD/IMPORT TABLESPACE

Definition at line 1099 of file session.h.

◆ thread_id

session_id_t drizzled::Session::thread_id

Definition at line 445 of file session.h.

◆ thread_stack

char* drizzled::Session::thread_stack

A pointer to the stack frame of the scheduler thread which is called first in the thread for handling a client

Definition at line 207 of file session.h.

◆ times

session::Times& drizzled::Session::times

Definition at line 346 of file session.h.

◆ tmp_table

uint32_t drizzled::Session::tmp_table

Definition at line 446 of file session.h.

◆ total_warn_count

uint32_t drizzled::Session::total_warn_count

Definition at line 437 of file session.h.

◆ transaction

session::Transactions& drizzled::Session::transaction

Definition at line 344 of file session.h.

◆ transaction_message

message::Transaction* drizzled::Session::transaction_message
private

Pointers to memory managed by the ReplicationServices component

Definition at line 1089 of file session.h.

◆ transaction_rollback_request

bool drizzled::Session::transaction_rollback_request

Set by a storage engine to request the entire transaction (that possibly spans multiple engines) to rollback. Reset in ha_rollback.

Definition at line 542 of file session.h.

◆ uint32_t_value

uint32_t drizzled::Session::uint32_t_value

Definition at line 580 of file session.h.

◆ uint64_t_value

uint64_t drizzled::Session::uint64_t_value

Definition at line 582 of file session.h.

◆ update_lock_default

thr_lock_type drizzled::Session::update_lock_default

Definition at line 320 of file session.h.

◆ usage

rusage drizzled::Session::usage
private

Definition at line 1101 of file session.h.

◆ use_usage

bool drizzled::Session::use_usage
private

Definition at line 1100 of file session.h.

◆ used_tables

table_map drizzled::Session::used_tables

The set of those tables whose fields are referenced in all subqueries of the query.

Todo

Possibly this it is incorrect to have used tables in Session because with more than one subquery, it is not clear what does the field mean.

Definition at line 426 of file session.h.

◆ user_vars

UserVars drizzled::Session::user_vars
private

Hash of user variables defined during the session's lifetime

Definition at line 187 of file session.h.

◆ variables

drizzle_system_variables& drizzled::Session::variables

Mutable local variables local to the session

Definition at line 195 of file session.h.

◆ warn_count

uint32_t drizzled::Session::warn_count[(uint32_t) DRIZZLE_ERROR::WARN_LEVEL_END]
Todo

This, and some other variables like 'count_cuted_fields' maybe should be statement/cursor local, that is, moved to Statement class. With current implementation warnings produced in each prepared statement/cursor settle here.

Definition at line 436 of file session.h.

◆ warn_query_id

query_id_t drizzled::Session::warn_query_id
private

Definition at line 338 of file session.h.

◆ warn_root

memory::Root drizzled::Session::warn_root

Allocation area for warnings and errors

Definition at line 172 of file session.h.

◆ xa_id

uint64_t drizzled::Session::xa_id
private

Definition at line 1095 of file session.h.


The documentation for this class was generated from the following files: