![]() |
MySQL
8.0.12
Source Code Documentation
|
The transaction. More...
#include <list>
#include <set>
#include "ha_prototypes.h"
#include "dict0types.h"
#include "sql/handler.h"
#include "trx0types.h"
#include "ut0new.h"
#include "lock0types.h"
#include "log0log.h"
#include "mem0mem.h"
#include "que0types.h"
#include "trx0xa.h"
#include "usr0types.h"
#include "ut0vec.h"
#include "fts0fts.h"
#include "srv0srv.h"
#include "trx0trx.ic"
Go to the source code of this file.
Classes | |
struct | trx_lock_t |
Latching protocol for trx_lock_t::que_state. More... | |
struct | trx_undo_ptr_t |
The transaction handle. More... | |
struct | trx_rsegs_t |
Rollback segments assigned to a transaction for undo logging. More... | |
struct | TrxVersion |
struct | trx_t |
struct | commit_node_t |
Commit command node in a query graph. More... | |
class | TrxInInnoDB |
Track if a transaction is executing inside InnoDB code. More... | |
Macros | |
#define | trx_start_if_not_started_xa(t, rw) |
#define | trx_start_if_not_started(t, rw) |
#define | trx_start_internal(t) |
#define | trx_start_internal_read_only(t) |
#define | TRX_WEIGHT(t) ((t)->undo_no + UT_LIST_GET_LEN((t)->lock.trx_locks)) |
Calculates the "weight" of a transaction. More... | |
#define | TRX_QUE_STATE_STR_MAX_LEN 12 /* "ROLLING BACK" */ |
#define | trx_is_referenced(t) ((t)->n_ref > 0) |
Check if the transaction is being referenced. More... | |
#define | trx_lock_wait_timeout_get(t) ((t)->mysql_thd != NULL ? thd_lock_wait_timeout((t)->mysql_thd) : 0) |
Transactions that aren't started by the MySQL server don't set the trx_t::mysql_thd field. More... | |
#define | trx_is_autocommit_non_locking(t) ((t)->auto_commit && (t)->will_lock == 0) |
Determine if the transaction is a non-locking autocommit select (implied read-only). More... | |
#define | trx_is_ac_nl_ro(t) ((t)->read_only && trx_is_autocommit_non_locking((t))) |
Determine if the transaction is a non-locking autocommit select with an explicit check for the read-only status. More... | |
#define | assert_trx_in_rw_list(t) |
Assert that the transaction is in the trx_sys_t::rw_trx_list. More... | |
#define | check_trx_state(t) |
Check transaction state. More... | |
#define | assert_trx_is_free(t) |
Check if transaction is free so that it can be re-initialized. More... | |
#define | assert_trx_is_inactive(t) |
Check if transaction is in-active so that it can be freed and put back to transaction pool. More... | |
#define | assert_trx_nonlocking_or_in_list(t) |
Assert that an autocommit non-locking select cannot be in the rw_trx_list and that it is a read-only transaction. More... | |
#define | TRX_ISO_READ_UNCOMMITTED trx_t::READ_UNCOMMITTED |
#define | TRX_ISO_READ_COMMITTED trx_t::READ_COMMITTED |
#define | TRX_ISO_REPEATABLE_READ trx_t::REPEATABLE_READ |
#define | TRX_ISO_SERIALIZABLE trx_t::SERIALIZABLE |
#define | TRX_DUP_IGNORE 1 /* duplicate rows are to be updated */ |
#define | TRX_DUP_REPLACE 2 /* duplicate rows are to be replaced */ |
#define | trx_mutex_own(t) mutex_own(&t->mutex) |
Test if trx->mutex is owned. More... | |
#define | trx_mutex_enter(t) |
Acquire the trx->mutex. More... | |
#define | trx_mutex_exit(t) |
Release the trx->mutex. More... | |
Typedefs | |
typedef std::vector< ib_lock_t *, ut_allocator< ib_lock_t * > > | lock_pool_t |
typedef std::set< dict_table_t *, std::less< dict_table_t * >, ut_allocator< dict_table_t * > > | trx_mod_tables_t |
Type used to store the list of tables that are modified by a given transaction. More... | |
typedef std::list< TrxVersion, ut_allocator< TrxVersion > > | hit_list_t |
Enumerations | |
enum | trx_rseg_type_t { TRX_RSEG_TYPE_NONE = 0, TRX_RSEG_TYPE_REDO, TRX_RSEG_TYPE_NOREDO } |
enum | commit_node_state { COMMIT_NODE_SEND = 1, COMMIT_NODE_WAIT } |
Commit node states. More... | |
Functions | |
void | trx_set_flush_observer (trx_t *trx, FlushObserver *observer) |
Set flush observer for the transaction. More... | |
void | trx_set_detailed_error (trx_t *trx, const char *msg) |
Set detailed error message for the transaction. More... | |
void | trx_set_detailed_error_from_file (trx_t *trx, FILE *file) |
Set detailed error message for the transaction from a file. More... | |
UNIV_INLINE const dict_index_t * | trx_get_error_info (const trx_t *trx) |
Retrieves the error_info field from a trx. More... | |
trx_t * | trx_allocate_for_mysql (void) |
Creates a transaction object for MySQL. More... | |
trx_t * | trx_allocate_for_background (void) |
Creates a transaction object for background operations by the master thread. More... | |
void | trx_resurrect_locks () |
Resurrect table locks for resurrected transactions. More... | |
void | trx_free_resurrected (trx_t *trx) |
Free and initialize a transaction object instantiated during recovery. More... | |
void | trx_free_for_background (trx_t *trx) |
Free a transaction that was allocated by background or user threads. More... | |
void | trx_free_prepared (trx_t *trx) |
At shutdown, frees a transaction object that is in the PREPARED state. More... | |
void | trx_free_for_mysql (trx_t *trx) |
Free a transaction object for MySQL. More... | |
void | trx_disconnect_plain (trx_t *trx) |
Disconnect a transaction from MySQL. More... | |
void | trx_disconnect_prepared (trx_t *trx) |
Disconnect a prepared transaction from MySQL. More... | |
void | trx_lists_init_at_db_start (void) |
Creates trx objects for transactions and initializes the trx list of trx_sys at database start. More... | |
void | trx_start_if_not_started_xa_low (trx_t *trx, bool read_write) |
Starts the transaction if it is not yet started. More... | |
void | trx_start_if_not_started_low (trx_t *trx, bool read_write) |
Starts the transaction if it is not yet started. More... | |
void | trx_start_internal_low (trx_t *trx) |
Starts a transaction for internal processing. More... | |
void | trx_start_internal_read_only_low (trx_t *trx) |
Starts a read-only transaction for internal processing. More... | |
void | trx_commit (trx_t *trx) |
Commits a transaction. More... | |
void | trx_commit_low (trx_t *trx, mtr_t *mtr) |
Commits a transaction and a mini-transaction. More... | |
void | trx_cleanup_at_db_startup (trx_t *trx) |
Cleans up a transaction at database startup. More... | |
dberr_t | trx_commit_for_mysql (trx_t *trx) |
Does the transaction commit for MySQL. More... | |
dberr_t | trx_prepare_for_mysql (trx_t *trx) |
Does the transaction prepare for MySQL. More... | |
int | trx_recover_for_mysql (XID *xid_list, ulint len) |
This function is used to find number of prepared transactions and their transaction objects for a recovery. More... | |
trx_t * | trx_get_trx_by_xid (const XID *xid) |
This function is used to find one X/Open XA distributed transaction which is in the prepared state. More... | |
void | trx_commit_complete_for_mysql (trx_t *trx) |
If required, flushes the log to disk if we called trx_commit_for_mysql() with trx->flush_log_later == TRUE. More... | |
void | trx_mark_sql_stat_end (trx_t *trx) |
Marks the latest SQL statement ended. More... | |
ReadView * | trx_assign_read_view (trx_t *trx) |
Assigns a read view for a consistent read query. More... | |
UNIV_INLINE ReadView * | trx_get_read_view (trx_t *trx) |
UNIV_INLINE const ReadView * | trx_get_read_view (const trx_t *trx) |
void | trx_commit_or_rollback_prepare (trx_t *trx) |
Prepares a transaction for commit/rollback. More... | |
commit_node_t * | trx_commit_node_create (mem_heap_t *heap) |
Creates a commit command node struct. More... | |
que_thr_t * | trx_commit_step (que_thr_t *thr) |
Performs an execution step for a commit type node in a query graph. More... | |
void | trx_print_low (FILE *f, const trx_t *trx, ulint max_query_len, ulint n_rec_locks, ulint n_trx_locks, ulint heap_size) |
Prints info about a transaction. More... | |
void | trx_print_latched (FILE *f, const trx_t *trx, ulint max_query_len) |
Prints info about a transaction. More... | |
void | trx_print (FILE *f, const trx_t *trx, ulint max_query_len) |
Prints info about a transaction. More... | |
UNIV_INLINE enum trx_dict_op_t | trx_get_dict_operation (const trx_t *trx) |
Determine if a transaction is a dictionary operation. More... | |
UNIV_INLINE void | trx_set_dict_operation (trx_t *trx, enum trx_dict_op_t op) |
Flag a transaction a dictionary operation. More... | |
UNIV_INLINE bool | trx_state_eq (const trx_t *trx, trx_state_t state) |
Determines if a transaction is in the given state. More... | |
ibool | trx_assert_started (const trx_t *trx) |
Asserts that a transaction has been started. More... | |
ibool | trx_is_interrupted (const trx_t *trx) |
Determines if the currently running transaction has been interrupted. More... | |
ibool | trx_is_strict (trx_t *trx) |
Determines if the currently running transaction is in strict mode. More... | |
bool | trx_weight_ge (const trx_t *a, const trx_t *b) |
Compares the "weight" (or size) of two transactions. More... | |
UNIV_INLINE const char * | trx_get_que_state_str (const trx_t *trx) |
Retrieves transaction's que state in a human readable string. More... | |
UNIV_INLINE trx_id_t | trx_get_id_for_print (const trx_t *trx) |
Retreieves the transaction ID. More... | |
void | trx_assign_rseg_temp (trx_t *trx) |
Assign a temp-tablespace bound rollback-segment to a transaction. More... | |
void | trx_pool_init () |
Create the trx_t pool. More... | |
void | trx_pool_close () |
Destroy the trx_t pool. More... | |
void | trx_set_rw_mode (trx_t *trx) |
Set the transaction as a read-write transaction if it is not already tagged as such. More... | |
UNIV_INLINE trx_t * | trx_reference (trx_t *trx, bool do_ref_count) |
Increase the reference count. More... | |
UNIV_INLINE void | trx_release_reference (trx_t *trx) |
Release the transaction. More... | |
UNIV_INLINE const trx_t * | trx_arbitrate (const trx_t *requestor, const trx_t *holder) |
UNIV_INLINE bool | trx_is_high_priority (const trx_t *trx) |
void | trx_kill_blocking (trx_t *trx) |
Kill all transactions that are blocking this transaction from acquiring locks. More... | |
UNIV_INLINE bool | trx_is_rseg_updated (const trx_t *trx) |
Check if redo/noredo rseg is modified for insert/update. More... | |
bool | trx_is_started (const trx_t *trx) |
Check if transaction is started. More... | |
Variables | |
sess_t * | trx_dummy_sess |
Dummy session used currently in MySQL interface. More... | |
The transaction.
Created 3/26/1996 Heikki Tuuri
#define assert_trx_in_rw_list | ( | t | ) |
#define assert_trx_is_free | ( | t | ) |
Check if transaction is free so that it can be re-initialized.
t | transaction handle |
#define assert_trx_is_inactive | ( | t | ) |
#define assert_trx_nonlocking_or_in_list | ( | t | ) |
Assert that an autocommit non-locking select cannot be in the rw_trx_list and that it is a read-only transaction.
The tranasction must be in the mysql_trx_list.
#define check_trx_state | ( | t | ) |
Check transaction state.
#define TRX_DUP_IGNORE 1 /* duplicate rows are to be updated */ |
#define TRX_DUP_REPLACE 2 /* duplicate rows are to be replaced */ |
#define trx_is_ac_nl_ro | ( | t | ) | ((t)->read_only && trx_is_autocommit_non_locking((t))) |
Determine if the transaction is a non-locking autocommit select with an explicit check for the read-only status.
t | transaction |
Determine if the transaction is a non-locking autocommit select (implied read-only).
t | transaction |
#define TRX_ISO_READ_COMMITTED trx_t::READ_COMMITTED |
#define TRX_ISO_READ_UNCOMMITTED trx_t::READ_UNCOMMITTED |
#define TRX_ISO_REPEATABLE_READ trx_t::REPEATABLE_READ |
#define TRX_ISO_SERIALIZABLE trx_t::SERIALIZABLE |
#define trx_lock_wait_timeout_get | ( | t | ) | ((t)->mysql_thd != NULL ? thd_lock_wait_timeout((t)->mysql_thd) : 0) |
Transactions that aren't started by the MySQL server don't set the trx_t::mysql_thd field.
For such transactions we set the lock wait timeout to 0 instead of the user configured value that comes from innodb_lock_wait_timeout via trx_t::mysql_thd.
t | transaction |
#define trx_mutex_enter | ( | t | ) |
#define trx_mutex_exit | ( | t | ) |
#define TRX_QUE_STATE_STR_MAX_LEN 12 /* "ROLLING BACK" */ |
#define trx_start_if_not_started | ( | t, | |
rw | |||
) |
#define trx_start_if_not_started_xa | ( | t, | |
rw | |||
) |
#define trx_start_internal | ( | t | ) |
#define trx_start_internal_read_only | ( | t | ) |
#define TRX_WEIGHT | ( | t | ) | ((t)->undo_no + UT_LIST_GET_LEN((t)->lock.trx_locks)) |
Calculates the "weight" of a transaction.
The weight of one transaction is estimated as the number of altered rows + the number of locked rows.
t | transaction |
typedef std::list<TrxVersion, ut_allocator<TrxVersion> > hit_list_t |
typedef std::vector<ib_lock_t *, ut_allocator<ib_lock_t *> > lock_pool_t |
typedef std::set<dict_table_t *, std::less<dict_table_t *>, ut_allocator<dict_table_t *> > trx_mod_tables_t |
Type used to store the list of tables that are modified by a given transaction.
We store pointers to the table objects in memory because we know that a table object will not be destroyed while a transaction that modified it is running.
enum commit_node_state |
enum trx_rseg_type_t |
trx_t* trx_allocate_for_background | ( | void | ) |
Creates a transaction object for background operations by the master thread.
trx_t* trx_allocate_for_mysql | ( | void | ) |
Creates a transaction object for MySQL.
[in] | requestor | Transaction requesting the lock |
[in] | holder | Transaction holding the lock |
ibool trx_assert_started | ( | const trx_t * | trx | ) |
Asserts that a transaction has been started.
The caller must hold trx_sys->mutex.
trx | in: transaction |
Assigns a read view for a consistent read query.
All the consistent reads within the same transaction will get the same read view, which is created when this function is first called for a new started transaction. in: active transaction
All the consistent reads within the same transaction will get the same read view, which is created when this function is first called for a new started transaction.
trx | in/out: active transaction |
void trx_assign_rseg_temp | ( | trx_t * | trx | ) |
Assign a temp-tablespace bound rollback-segment to a transaction.
[in,out] | trx | transaction that involves write to temp-table. |
void trx_cleanup_at_db_startup | ( | trx_t * | trx | ) |
Cleans up a transaction at database startup.
The cleanup is needed if the transaction already got to the middle of a commit when the database crashed, and we cannot roll it back. in: transaction
The cleanup is needed if the transaction already got to the middle of a commit when the database crashed, and we cannot roll it back.
trx | in: transaction |
void trx_commit | ( | trx_t * | trx | ) |
Commits a transaction.
in/out: transaction
trx | in/out: transaction |
void trx_commit_complete_for_mysql | ( | trx_t * | trx | ) |
If required, flushes the log to disk if we called trx_commit_for_mysql() with trx->flush_log_later == TRUE.
in/out: transaction
trx | in/out: transaction |
Does the transaction commit for MySQL.
trx | in/out: transaction |
Commits a transaction and a mini-transaction.
in/out: mini-transaction (will be committed), or NULL if trx made no modifications
trx | in/out: transaction |
mtr | in/out: mini-transaction (will be committed), or NULL if trx made no modifications |
commit_node_t* trx_commit_node_create | ( | mem_heap_t * | heap | ) |
Creates a commit command node struct.
heap | in: mem heap where created |
void trx_commit_or_rollback_prepare | ( | trx_t * | trx | ) |
Prepares a transaction for commit/rollback.
in/out: transaction
trx | in/out: transaction |
Performs an execution step for a commit type node in a query graph.
thr | in: query thread |
|
inline |
Disconnect a transaction from MySQL.
[in,out] | trx | transaction |
void trx_disconnect_prepared | ( | trx_t * | trx | ) |
Disconnect a prepared transaction from MySQL.
[in,out] | trx | transaction |
void trx_free_for_background | ( | trx_t * | trx | ) |
Free a transaction that was allocated by background or user threads.
[in,out] | trx | transaction object to free |
void trx_free_for_mysql | ( | trx_t * | trx | ) |
Free a transaction object for MySQL.
[in,out] | trx | transaction |
void trx_free_prepared | ( | trx_t * | trx | ) |
At shutdown, frees a transaction object that is in the PREPARED state.
in, own: trx object
trx | in, own: trx object |
void trx_free_resurrected | ( | trx_t * | trx | ) |
Free and initialize a transaction object instantiated during recovery.
[in,out] | trx | transaction object to free and initialize |
UNIV_INLINE enum trx_dict_op_t trx_get_dict_operation | ( | const trx_t * | trx | ) |
Determine if a transaction is a dictionary operation.
trx | in: transaction |
UNIV_INLINE const dict_index_t* trx_get_error_info | ( | const trx_t * | trx | ) |
Retrieves the error_info field from a trx.
Retreieves the transaction ID.
In a given point in time it is guaranteed that IDs of the running transactions are unique. The values returned by this function for readonly transactions may be reused, so a subsequent RO transaction may get the same ID as a RO transaction that existed in the past. The values returned by this function should be used for printing purposes only.
[in] | trx | transaction whose id to retrieve |
UNIV_INLINE const char* trx_get_que_state_str | ( | const trx_t * | trx | ) |
Retrieves transaction's que state in a human readable string.
The string should not be free()'d or modified.
This function is used to find one X/Open XA distributed transaction which is in the prepared state.
xid | in: X/Open XA transaction identifier |
[in] | trx | Transaction to check |
ibool trx_is_interrupted | ( | const trx_t * | trx | ) |
Determines if the currently running transaction has been interrupted.
trx | in: transaction |
Check if redo/noredo rseg is modified for insert/update.
[in] | trx | Transaction to check |
Check if transaction is started.
[in] | trx | Transaction whose state we need to check |
ibool trx_is_strict | ( | trx_t * | trx | ) |
Determines if the currently running transaction is in strict mode.
trx | in: transaction |
void trx_kill_blocking | ( | trx_t * | trx | ) |
Kill all transactions that are blocking this transaction from acquiring locks.
[in,out] | trx | High priority transaction |
Kill the transactions in the lock acquisition order old -> new.
void trx_lists_init_at_db_start | ( | void | ) |
Creates trx objects for transactions and initializes the trx list of trx_sys at database start.
Rollback segment and undo log lists must already exist when this function is called, because the lists of transactions to be rolled back or cleaned up are built based on the undo log lists.
Rollback segments and undo log lists must already exist when this function is called, because the lists of transactions to be rolled back or cleaned up are built based on the undo log lists.
void trx_mark_sql_stat_end | ( | trx_t * | trx | ) |
Marks the latest SQL statement ended.
in: trx handle
trx | in: trx handle |
void trx_pool_close | ( | ) |
Destroy the trx_t pool.
void trx_pool_init | ( | ) |
Create the trx_t pool.
Does the transaction prepare for MySQL.
[in,out] | trx | Transaction instance to prepare |
void trx_print | ( | FILE * | f, |
const trx_t * | trx, | ||
ulint | max_query_len | ||
) |
Prints info about a transaction.
Acquires and releases lock_sys->mutex and trx_sys->mutex. in: max query length to print, or 0 to use the default max length
Acquires and releases lock_sys->mutex and trx_sys->mutex.
f | in: output stream |
trx | in: transaction |
max_query_len | in: max query length to print, or 0 to use the default max length |
void trx_print_latched | ( | FILE * | f, |
const trx_t * | trx, | ||
ulint | max_query_len | ||
) |
Prints info about a transaction.
The caller must hold lock_sys->mutex and trx_sys->mutex. When possible, use trx_print() instead. in: max query length to print, or 0 to use the default max length
The caller must hold lock_sys->mutex and trx_sys->mutex. When possible, use trx_print() instead.
f | in: output stream |
trx | in: transaction |
max_query_len | in: max query length to print, or 0 to use the default max length |
void trx_print_low | ( | FILE * | f, |
const trx_t * | trx, | ||
ulint | max_query_len, | ||
ulint | n_rec_locks, | ||
ulint | n_trx_locks, | ||
ulint | heap_size | ||
) |
Prints info about a transaction.
Caller must hold trx_sys->mutex. in: mem_heap_get_size(trx->lock.lock_heap)
Caller must hold trx_sys->mutex.
f | in: output stream |
trx | in: transaction |
max_query_len | in: max query length to print, or 0 to use the default max length |
n_rec_locks | in: lock_number_of_rows_locked(&trx->lock) |
n_trx_locks | in: length of trx->lock.trx_locks |
heap_size | in: mem_heap_get_size(trx->lock.lock_heap) |
int trx_recover_for_mysql | ( | XID * | xid_list, |
ulint | len | ||
) |
This function is used to find number of prepared transactions and their transaction objects for a recovery.
xid_list | in/out: prepared transactions |
len | in: number of slots in xid_list |
Increase the reference count.
If the transaction is in state TRX_STATE_COMMITTED_IN_MEMORY then the transaction is considered committed and the reference count is not incremented.
trx | Transaction that is being referenced |
do_ref_count | Increment the reference iff this is true |
UNIV_INLINE void trx_release_reference | ( | trx_t * | trx | ) |
Release the transaction.
Decrease the reference count.
trx | Transaction that is being released |
void trx_resurrect_locks | ( | ) |
Resurrect table locks for resurrected transactions.
void trx_set_detailed_error | ( | trx_t * | trx, |
const char * | msg | ||
) |
Set detailed error message for the transaction.
in: detailed error message
trx | in: transaction struct |
msg | in: detailed error message |
void trx_set_detailed_error_from_file | ( | trx_t * | trx, |
FILE * | file | ||
) |
Set detailed error message for the transaction from a file.
Note that the file is rewinded before reading from it. in: file to read message from
Note that the file is rewinded before reading from it.
trx | in: transaction struct |
file | in: file to read message from |
UNIV_INLINE void trx_set_dict_operation | ( | trx_t * | trx, |
enum trx_dict_op_t | op | ||
) |
Flag a transaction a dictionary operation.
[in,out] | trx | transaction |
[in] | op | operation, not TRX_DICT_OP_NONE |
void trx_set_flush_observer | ( | trx_t * | trx, |
FlushObserver * | observer | ||
) |
Set flush observer for the transaction.
[in,out] | trx | transaction struct |
[in] | observer | flush observer |
void trx_set_rw_mode | ( | trx_t * | trx | ) |
Set the transaction as a read-write transaction if it is not already tagged as such.
[in,out] | trx | Transaction that needs to be "upgraded" to RW from RO |
Read-only transactions that are writing to temporary tables are assigned an ID and a rollback segment but are not added to the trx read-write list because their updates should not be visible to other transactions and therefore their changes can be ignored by by MVCC.
trx | in/out: transaction that is RW |
Starts the transaction if it is not yet started.
in: true if read write transaction
trx | in: transaction |
read_write | in: true if read write transaction |
Starts the transaction if it is not yet started.
in: true if read write transaction
trx | in/out: transaction |
read_write | in: true if read write transaction |
void trx_start_internal_low | ( | trx_t * | trx | ) |
Starts a transaction for internal processing.
in/out: transaction
trx | in/out: transaction |
void trx_start_internal_read_only_low | ( | trx_t * | trx | ) |
Starts a read-only transaction for internal processing.
[in,out] | trx | transaction to be started |
UNIV_INLINE bool trx_state_eq | ( | const trx_t * | trx, |
trx_state_t | state | ||
) |
Determines if a transaction is in the given state.
The caller must hold trx_sys->mutex, or it must be the thread that is serving a running transaction. A running RW transaction must be in trx_sys->rw_trx_list.
trx | in: transaction |
state | in: state |
Compares the "weight" (or size) of two transactions.
Transactions that have edited non-transactional tables are considered heavier than ones that have not.
Transactions that have edited non-transactional tables are considered heavier than ones that have not.
a | in: transaction to be compared |
b | in: transaction to be compared |
sess_t* trx_dummy_sess |
Dummy session used currently in MySQL interface.