Drizzled Public API Documentation

trx_struct Struct Reference

List of all members.

Public Member Functions

drizzled::Sessionsession ()
drizzled::Sessionsession () const

Public Attributes

ulint magic_n
const char * op_info
ulint conc_state
ulint isolation_level
ulint check_foreigns
unsigned check_unique_secondary
unsigned support_xa
unsigned flush_log_later
unsigned must_flush_log_later
ulint duplicates
unsigned has_search_latch
ulint deadlock_mark
trx_dict_op_t dict_operation
ulint declared_to_be_inside_innodb
ulint dict_operation_lock_mode
ulint is_purge
ulint is_recovered
ulint que_state
ulint handling_signals
time_t start_time
trx_id_t id
XID xid
trx_id_t no
ib_uint64_t commit_lsn
table_id_t table_id
drizzled::Sessionmysql_thd
const char * mysql_log_file_name
ib_int64_t mysql_log_offset
os_thread_id_t mysql_thread_id
ulint mysql_process_no
ulint mysql_n_tables_locked
ulint search_latch_timeout
ulint n_tickets_to_enter_innodb
 trx_list
 mysql_trx_list
ulint error_state
const dict_index_terror_info
ulint error_key_num
sess_tsess
que_tgraph
ulint n_active_thrs
que_tgraph_before_signal_handling
trx_sig_t sig
 signals
 reply_signals
lock_twait_lock
ibool was_chosen_as_deadlock_victim
time_t wait_started
 wait_thrs
mem_heap_tlock_heap
 trx_locks
mem_heap_tglobal_read_view_heap
read_view_tglobal_read_view
read_view_tread_view
 trx_savepoints
mutex_t undo_mutex
undo_no_t undo_no
trx_savept_t last_sql_stat_start
trx_rseg_trseg
trx_undo_tinsert_undo
trx_undo_tupdate_undo
undo_no_t roll_limit
ulint pages_undone
trx_undo_arr_tundo_no_arr
ulint n_autoinc_rows
ib_vector_tautoinc_locks
char detailed_error [256]
ibool log_commit_id

Detailed Description

Definition at line 473 of file trx0trx.h.


Member Data Documentation

ib_uint64_t trx_struct::commit_lsn

lsn at the time of the commit

Definition at line 555 of file trx0trx.h.

Referenced by trx_commit_complete_for_mysql(), and trx_commit_off_kernel().

ulint trx_struct::deadlock_mark

a mark field used in deadlock checking algorithm.

Definition at line 517 of file trx0trx.h.

char trx_struct::detailed_error[256]

detailed error message for last error, or empty.

Definition at line 717 of file trx0trx.h.

Referenced by InnobaseEngine::doStartStatement(), trx_create(), trx_set_detailed_error(), and trx_set_detailed_error_from_file().

trx_dict_op_t trx_struct::dict_operation
See also:
enum trx_dict_op

Definition at line 519 of file trx0trx.h.

Referenced by trx_create().

ulint trx_struct::duplicates

TRX_DUP_IGNORE | TRX_DUP_REPLACE

Definition at line 513 of file trx0trx.h.

Referenced by ha_innobase::doInsertRecord(), ha_innobase::doUpdateRecord(), ha_innobase::extra(), and trx_create().

const dict_index_t* trx_struct::error_info

if the error number indicates a duplicate key error, a pointer to the problematic index is stored here

Definition at line 606 of file trx0trx.h.

ulint trx_struct::error_key_num

if the index creation fails to a duplicate key error, a mysql key number of that index is stored here

Definition at line 609 of file trx0trx.h.

Referenced by ha_innobase::info(), and trx_create().

que_t* trx_struct::graph

query currently run in the session, or NULL if none; NOTE that the query belongs to the session, and it can survive over a transaction commit, if it is a stored procedure with a COMMIT WORK statement, for instance

Definition at line 613 of file trx0trx.h.

Referenced by pars_complete_graph_for_exec(), que_eval_sql(), trx_create(), trx_end_signal_handling(), trx_rollback(), and trx_sig_start_handle().

ulint trx_struct::is_purge

0=user transaction, 1=purge

Definition at line 537 of file trx0trx.h.

Referenced by trx_create(), trx_print(), trx_purge_sys_close(), trx_purge_sys_create(), and trx_start_low().

ulint trx_struct::is_recovered

0=normal transaction, 1=recovered, must be rolled back

Definition at line 538 of file trx0trx.h.

Referenced by trx_commit_off_kernel(), trx_create(), trx_lists_init_at_db_start(), trx_print(), and trx_rollback_or_clean_recovered().

mem_heap_t* trx_struct::lock_heap

memory heap for the locks of the transaction

Definition at line 653 of file trx0trx.h.

Referenced by lock_release_off_kernel(), trx_create(), trx_free(), and trx_print().

ibool trx_struct::log_commit_id

log the commit id to the sys file

Definition at line 720 of file trx0trx.h.

Referenced by ReplicationLog::apply(), and trx_create().

trx_struct::mysql_trx_list

list of transactions created for MySQL

Definition at line 598 of file trx0trx.h.

ulint trx_struct::n_active_thrs
ulint trx_struct::n_autoinc_rows

no. of AUTO-INC rows required for an SQL statement. This is useful for multi-row INSERTs

Definition at line 708 of file trx0trx.h.

Referenced by InnobaseEngine::doCommit(), ha_innobase::doInsertRecord(), InnobaseEngine::doRollback(), ha_innobase::get_auto_increment(), and trx_create().

trx_id_t trx_struct::no

transaction serialization number == max trx id when the transaction is moved to COMMITTED_IN_MEMORY state

Definition at line 552 of file trx0trx.h.

Referenced by read_cursor_view_create_for_mysql(), read_view_open_now(), trx_commit_off_kernel(), trx_create(), trx_lists_init_at_db_start(), trx_purge_add_update_undo_to_history(), and trx_start_low().

ulint trx_struct::pages_undone

number of undo log pages undone since the last undo log truncation

Definition at line 702 of file trx0trx.h.

Referenced by trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), and trx_rollback().

ulint trx_struct::que_state

valid when conc_state == TRX_ACTIVE: TRX_QUE_RUNNING, TRX_QUE_LOCK_WAIT, ...

Definition at line 540 of file trx0trx.h.

Referenced by lock_print_info_all_transactions(), que_thr_stop(), trx_create(), trx_end_lock_wait(), trx_finish_rollback_off_kernel(), trx_general_rollback_for_mysql(), trx_print(), trx_rollback(), and trx_sig_start_handle().

read_view_t* trx_struct::read_view

consistent read view used in the transaction or NULL, this read view if defined can be normal read view associated to a transaction (i.e. same as global_read_view) or read view associated to a cursor

Definition at line 664 of file trx0trx.h.

Referenced by lock_print_info_all_transactions(), read_cursor_set_for_mysql(), read_cursor_view_close_for_mysql(), read_view_close_for_mysql(), row_search_check_if_query_cache_permitted(), row_search_for_mysql(), trx_assign_read_view(), trx_commit_off_kernel(), trx_create(), and trx_free().

trx_struct::reply_signals

list of signals sent by the query threads of this trx for which a thread is waiting for a reply; if this trx is killed, the reply requests in the list must be canceled

Definition at line 631 of file trx0trx.h.

Referenced by trx_create(), trx_free(), trx_sig_reply(), and trx_sig_send().

undo_no_t trx_struct::roll_limit

least undo number to undo during a rollback

Definition at line 700 of file trx0trx.h.

Referenced by trx_rollback().

sess_t* trx_struct::sess

session of the trx, NULL if none

Definition at line 612 of file trx0trx.h.

Referenced by trx_create(), trx_end_signal_handling(), trx_sig_reply(), trx_sig_send(), and trx_sig_start_handle().

trx_sig_t trx_struct::sig

one signal object can be allocated in this space, avoiding mem_alloc

Definition at line 625 of file trx0trx.h.

Referenced by trx_sig_remove(), and trx_sig_send().

trx_struct::signals

queue of processed or pending signals to the trx

Definition at line 628 of file trx0trx.h.

Referenced by que_thr_stop(), trx_create(), trx_finish_rollback_off_kernel(), trx_free(), trx_sig_remove(), trx_sig_send(), and trx_sig_start_handle().

time_t trx_struct::start_time

time the trx object was created or the state last time became TRX_ACTIVE

Definition at line 545 of file trx0trx.h.

Referenced by trx_create(), trx_print(), and trx_start_low().

unsigned trx_struct::support_xa

normally we do the XA two-phase commit steps, but by setting this to FALSE, one can save CPU time and about 150 bytes in the undo log size as then we skip XA steps

Definition at line 496 of file trx0trx.h.

Referenced by InnobaseEngine::doXaPrepare(), trx_create(), and trx_start().

table_id_t trx_struct::table_id

Table to drop iff dict_operation is TRUE, or 0.

Definition at line 556 of file trx0trx.h.

Referenced by row_drop_table_for_mysql(), row_truncate_table_for_mysql(), trx_create(), and trx_lists_init_at_db_start().

trx_struct::trx_list

list of transactions

Definition at line 596 of file trx0trx.h.

trx_struct::trx_savepoints
mutex_t trx_struct::undo_mutex

mutex protecting the fields in this section (down to undo_no_arr), EXCEPT last_sql_stat_start, which can be accessed only when we know that there cannot be any activity in the undo logs!

Definition at line 675 of file trx0trx.h.

Referenced by trx_create(), trx_free(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_undo_add_page(), trx_undo_assign_undo(), trx_undo_rec_release(), trx_undo_rec_reserve(), trx_undo_report_row_operation(), and trx_undo_truncate_end().

undo_no_t trx_struct::undo_no

next undo log record number to assign; since the undo log is private for a transaction, this is a simple ascending sequence with no gaps; thus it represents the number of modified/inserted rows in a transaction

Definition at line 681 of file trx0trx.h.

Referenced by InnobaseEngine::close_connection(), lock_release_off_kernel(), read_cursor_view_create_for_mysql(), trx_cleanup_at_db_startup(), trx_commit_off_kernel(), trx_create(), trx_lists_init_at_db_start(), trx_mark_sql_stat_end(), trx_print(), trx_recover_for_mysql(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_rollback(), trx_savept_take(), trx_sys_init_at_db_start(), trx_undo_report_row_operation(), and trx_weight_ge().

trx_undo_arr_t* trx_struct::undo_no_arr

array of undo numbers of undo log records which are currently processed by a rollback operation

Definition at line 704 of file trx0trx.h.

Referenced by trx_create(), trx_finish_rollback_off_kernel(), trx_free(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_rollback(), and trx_undo_rec_release().

lock_t* trx_struct::wait_lock

if trx execution state is TRX_QUE_LOCK_WAIT, this points to the lock request, otherwise this is NULL

Definition at line 637 of file trx0trx.h.

Referenced by lock_print_info_all_transactions(), row_search_for_mysql(), srv_lock_timeout_thread(), trx_create(), and trx_free().

time_t trx_struct::wait_started

lock wait started at this time

Definition at line 647 of file trx0trx.h.

Referenced by lock_print_info_all_transactions().

trx_struct::wait_thrs

query threads belonging to this trx that are in the QUE_THR_LOCK_WAIT state

Definition at line 649 of file trx0trx.h.

Referenced by que_thr_stop(), trx_commit_off_kernel(), trx_create(), trx_end_lock_wait(), and trx_free().

XID trx_struct::xid

X/Open XA transaction identification to identify a transaction branch

Definition at line 549 of file trx0trx.h.

Referenced by InnobaseEngine::doXaPrepare(), trx_create(), trx_get_trx_by_xid(), trx_lists_init_at_db_start(), trx_recover_for_mysql(), trx_undo_assign_undo(), and trx_undo_set_state_at_prepare().


The documentation for this struct was generated from the following file: