|
drizzle
C++ MySQL-protocol-compatible database server
|
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 () |
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 |
| typedef std::shared_ptr<const std::string> drizzled::Session::QueryString |
| typedef std::shared_ptr<Session> drizzled::Session::shared_ptr |
| typedef std::unordered_map<std::string, user_var_entry*, util::insensitive_hash, util::insensitive_equal_to> drizzled::Session::UserVars |
|
private |
| drizzled::Session::~Session | ( | ) |
Definition at line 418 of file session.cc.
| void drizzled::Session::add_group_to_list | ( | Item * | item, |
| bool | asc ) |
Definition at line 353 of file session.cc.
| void drizzled::Session::add_item_to_list | ( | Item * | item | ) |
Definition at line 338 of file session.cc.
| void drizzled::Session::add_order_to_list | ( | Item * | item, |
| bool | asc ) |
Definition at line 348 of file session.cc.
| void drizzled::Session::add_value_to_list | ( | Item * | value | ) |
Definition at line 343 of file session.cc.
| 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.
| void drizzled::Session::awake | ( | Session::killed_state_t | state_to_set | ) |
Definition at line 465 of file session.cc.
|
inline |
|
inline |
|
inlinestatic |
| 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.
| passwd | Scrambled password received from client |
| db | Database name to connect to, may be NULL |
Definition at line 666 of file session.cc.
| void drizzled::Session::cleanup | ( | ) |
Definition at line 395 of file session.cc.
| 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.
| void drizzled::Session::clear_error | ( | bool | full = false | ) |
Definition at line 1851 of file session.cc.
| void drizzled::Session::clearDiagnostics | ( | ) |
Definition at line 1860 of file session.cc.
| void drizzled::Session::close_cached_table | ( | Table * | table | ) |
Definition at line 1650 of file sql_table.cc.
| 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.
| 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.
| session | Thread context |
| db | Database name for the table to be closed |
| table_name | Name of the table to be closed |
Definition at line 1117 of file sql_base.cc.
| 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.
| session | Thread context |
| table | Head of the list of Table objects |
| morph_locks | true - 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_refresh | Should we awake waiters even if we didn't close any tables? |
Definition at line 1250 of file sql_base.cc.
| void drizzled::Session::close_tables_for_reopen | ( | TableList ** | tables | ) |
Prepares statement for reopening of tables and recalculation of set of prelocked tables.
| Pointer | to a pointer to a list of tables which we were trying to open and lock |
Definition at line 1760 of file session.cc.
| 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.
| str_ref drizzled::Session::copy_db_to | ( | ) | const |
Definition at line 1476 of file session.cc.
| void drizzled::Session::disconnect | ( | enum error_t | errcode = EE_OK | ) |
Disconnects the session from a client connection and updates any status variables necessary.
| errcode | Error code to print to console |
Definition at line 1532 of file session.cc.
|
inline |
| void drizzled::Session::drop_open_table | ( | Table * | table, |
| const identifier::Table & | identifier ) |
Auxiliary routine which closes and drops open table.
| session | Thread handle |
| table | Table object for table to be dropped |
| db_name | Name of database for this table |
| table_name | Name of this table |
Definition at line 639 of file sql_base.cc.
| void drizzled::Session::end_statement | ( | ) |
Cleanup statement parse state (parse tree, lex) and execution state after execution of a non-prepared SQL statement.
Move this to Statement::~Statement
Definition at line 1469 of file session.cc.
| bool drizzled::Session::endActiveTransaction | ( | ) |
Definition at line 787 of file session.cc.
| 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.
| Completion | type |
Definition at line 727 of file session.cc.
| 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.
| bool drizzled::Session::executeStatement | ( | ) |
Executes a single statement received from the client connection.
Returns true if the statement was successful, or false otherwise.
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.
| void drizzled::Session::exit_cond | ( | const char * | old_msg | ) |
Definition at line 641 of file session.cc.
| void drizzled::Session::free_items | ( | ) |
Frees all items attached to this Statement
Definition at line 358 of file session.cc.
|
inline |
| void drizzled::Session::get_xid | ( | DrizzleXid * | xid | ) | const |
Definition at line 388 of file session.cc.
|
inline |
| plugin::StorageEngine * drizzled::Session::getDefaultStorageEngine | ( | ) |
Return the default storage engine
| getDefaultStorageEngine() |
Definition at line 1896 of file session.cc.
| void ** drizzled::Session::getEngineData | ( | const plugin::MonitoredInTransaction * | monitored | ) |
Definition at line 130 of file session.cc.
| table::Singular & drizzled::Session::getInstanceTable | ( | ) |
Definition at line 1820 of file session.cc.
| 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.
| session | connection handle |
| field_list | list of column definitions |
Definition at line 1845 of file session.cc.
|
inline |
|
inline |
| session::TableMessages & drizzled::Session::getMessageCache | ( | ) |
Definition at line 318 of file session.cc.
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1906 of file session.cc.
|
inline |
|
inline |
|
inline |
| ResourceContext & drizzled::Session::getResourceContext | ( | const plugin::MonitoredInTransaction & | monitored, |
| size_t | index = 0 ) |
Definition at line 135 of file session.cc.
|
inline |
| plugin::EventObserverList * drizzled::Session::getSchemaObservers | ( | const std::string & | schema | ) |
Definition at line 1917 of file session.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| enum_sql_command drizzled::Session::getSqlCommand | ( | ) | const |
Definition at line 313 of file session.cc.
|
inline |
|
inline |
|
inline |
|
inline |
Returns a pointer to the active Transaction message for this Session being managed by the ReplicationServices component, or NULL if no active message.
| enum_tx_isolation drizzled::Session::getTxIsolation | ( | ) | const |
Definition at line 1901 of file session.cc.
|
inline |
| user_var_entry * drizzled::Session::getVariable | ( | str_ref | name, |
| bool | create_if_not_exists ) |
Definition at line 1668 of file session.cc.
|
inline |
|
inline |
| 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.
|
inline |
|
inline |
|
inline |
| 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.
| LEX & drizzled::Session::lex | ( | ) |
Definition at line 308 of file session.cc.
| const LEX & drizzled::Session::lex | ( | ) | const |
Definition at line 303 of file session.cc.
| 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.
| session | Thread context | |
| db | Name of database | |
| table_name | Name of table | |
| [out] | table | Out parameter which is either:
|
| true | Error occured (OOM) |
| false | Success. 'table' parameter set according to above rules. |
Definition at line 752 of file sql_base.cc.
| int drizzled::Session::lock_tables | ( | TableList * | tables, |
| uint32_t | count, | ||
| bool * | need_reopen ) |
Definition at line 1632 of file sql_base.cc.
| void drizzled::Session::lockOnSys | ( | ) |
Definition at line 373 of file session.cc.
| Diagnostics_area & drizzled::Session::main_da | ( | ) |
Definition at line 298 of file session.cc.
| lex_string_t * drizzled::Session::make_lex_string | ( | lex_string_t * | lex_str, |
| str_ref | str ) |
Create a lex_string_t in this connection.
| lex_str | pointer to lex_string_t object to be initialized |
| str | initializer to be copied into lex_str |
| length | length of str, in bytes |
| allocate_lex_string | if true, allocate new lex_string_t object, instead of using lex_str value |
Definition at line 854 of file session.cc.
|
static |
Definition at line 186 of file session.cc.
| void drizzled::Session::markTransactionForRollback | ( | bool | all | ) |
Mark transaction to rollback and mark error as fatal to a sub-statement.
| session | Thread handle |
| all | true <=> rollback main transaction(). |
Definition at line 1526 of file session.cc.
| void drizzled::Session::my_eof | ( | ) |
A short cut for session->main_da().set_eof_status().
Definition at line 1891 of file session.cc.
| 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.
| 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.
| Table * drizzled::Session::open_temporary_table | ( | const identifier::Table & | identifier, |
| bool | link_in_list = true ) |
Definition at line 1680 of file sql_base.cc.
Definition at line 798 of file sql_base.cc.
Definition at line 1577 of file sql_base.cc.
| bool drizzled::Session::openTablesLock | ( | TableList * | tables | ) |
Open all tables in list, locks them (all, including derived)
| Pointer | to a list of tables for open & locking |
| false | - ok |
| true | - error |
The lock will automaticaly be freed by close_thread_tables()
Definition at line 1774 of file session.cc.
| 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.
|
inline |
|
inline |
| 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.
Sets the following Session variables:
| The | packet pointer to read from |
| The | length of the query to read |
Definition at line 713 of file session.cc.
|
inline |
| void drizzled::Session::refresh_status | ( | ) |
Definition at line 1658 of file session.cc.
| bool drizzled::Session::reopen_tables | ( | ) |
Reopen all tables with closed data files.
| session | Thread context |
| get_locks | Should we get locks after reopening tables ? |
| mark_share_as_old | Mark share as old to protect from a impending global read lock. |
Definition at line 1167 of file sql_base.cc.
| 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.
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.
| void drizzled::Session::resetQueryString | ( | ) |
Definition at line 1937 of file session.cc.
|
inline |
| void drizzled::Session::run | ( | ) |
Definition at line 562 of file session.cc.
|
static |
Definition at line 579 of file session.cc.
| util::string::ptr drizzled::Session::schema | ( | ) | const |
Definition at line 1932 of file session.cc.
| void drizzled::Session::send_explain_fields | ( | select_result * | result | ) |
Definition at line 862 of file session.cc.
| void drizzled::Session::send_kill_message | ( | ) | const |
Definition at line 1507 of file session.cc.
|
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.
| void drizzled::Session::set_schema | ( | const std::string & | new_db | ) |
Set the current database; use deep copy of C-string.
| new_db | a pointer to the new database name. |
| new_db_len | length 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).
Definition at line 1514 of file session.cc.
| void drizzled::Session::setAbort | ( | bool | arg | ) |
Definition at line 368 of file session.cc.
|
inline |
| void drizzled::Session::setClient | ( | plugin::Client * | client_arg | ) |
Definition at line 459 of file session.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1911 of file session.cc.
|
inline |
|
inline |
| plugin::EventObserverList * drizzled::Session::setSchemaObservers | ( | const std::string & | schema, |
| plugin::EventObserverList * | observers ) |
Definition at line 1924 of file session.cc.
|
inline |
|
inline |
|
inline |
Sets the active statement message used by the ReplicationServices component.
| [in] | Pointer | to the message |
|
inline |
Sets the active transaction message used by the ReplicationServices component.
| [in] | Pointer | to the message |
| int drizzled::Session::setup_conds | ( | TableList * | leaves, |
| COND ** | conds ) |
Definition at line 3529 of file sql_base.cc.
|
inline |
| void drizzled::Session::setVariable | ( | const std::string & | name, |
| const std::string & | value ) |
Definition at line 1692 of file session.cc.
|
inline |
|
inline |
|
inline |
| bool drizzled::Session::startTransaction | ( | start_transaction_option_t | opt = START_TRANS_NO_OPTIONS | ) |
Definition at line 806 of file session.cc.
| const std::shared_ptr< session::State > & drizzled::Session::state | ( | ) |
Definition at line 1943 of file session.cc.
| void drizzled::Session::storeGlobals | ( | ) |
Definition at line 514 of file session.cc.
| 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).
| session | Thread context |
| key | Table cache key for name to be locked |
| key_length | Table cache key length |
Definition at line 714 of file sql_base.cc.
|
static |
Definition at line 651 of file drizzled.cc.
|
static |
Definition at line 643 of file drizzled.cc.
| void drizzled::Session::unlink_open_table | ( | Table * | find | ) |
Remove all instances of table from thread's open list and table cache.
| session | Thread context |
| find | Table to remove |
Definition at line 583 of file sql_base.cc.
|
inline |
| void drizzled::Session::wait_for_condition | ( | boost::mutex & | mutex, |
| boost::condition_variable_any & | cond ) |
Definition at line 669 of file sql_base.cc.
|
private |
|
private |
|
private |
|
private |
|
private |
| 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()
|
private |
| ha_rows drizzled::Session::cuted_fields |
|
static |
| bool drizzled::Session::derived_tables_processing |
| ha_rows drizzled::Session::examined_row_count |
| uint64_t drizzled::Session::first_successful_insert_id_in_cur_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().
| 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))
| bool drizzled::Session::got_warning |
|
private |
| 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
| 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
| uint64_t drizzled::Session::limit_found_rows |
We follow this logic:
| THR_LOCK_OWNER* drizzled::Session::lock_id |
| THR_LOCK_INFO drizzled::Session::lock_info |
| 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.
| THR_LOCK_OWNER drizzled::Session::main_lock_id |
| memory::Root& drizzled::Session::mem |
| memory::Root* drizzled::Session::mem_root |
|
private |
| bool drizzled::Session::no_warnings_for_error |
| Open_tables_state& drizzled::Session::open_tables |
|
private |
|
private |
|
private |
|
private |
| uint32_t drizzled::Session::row_count |
| int64_t drizzled::Session::row_count_func |
| plugin::Scheduler* drizzled::Session::scheduler |
|
private |
| uint32_t drizzled::Session::select_number |
| ha_rows drizzled::Session::sent_row_count |
|
private |
| void* drizzled::Session::session_marker |
|
private |
| system_status_var& drizzled::Session::status_var |
| bool drizzled::Session::substitute_null_with_insert_id |
for IS NULL => = last_insert_id() fix in remove_eq_conds()
| union { ... } drizzled::Session::sys_var_tmp |
Used by the sys_var class to store temporary values
|
private |
| char* drizzled::Session::thread_stack |
| session::Times& drizzled::Session::times |
| session::Transactions& drizzled::Session::transaction |
|
private |
Pointers to memory managed by the ReplicationServices component
| bool drizzled::Session::transaction_rollback_request |
| table_map drizzled::Session::used_tables |
|
private |
| drizzle_system_variables& drizzled::Session::variables |
| uint32_t drizzled::Session::warn_count[(uint32_t) DRIZZLE_ERROR::WARN_LEVEL_END] |
| memory::Root drizzled::Session::warn_root |