Public Member Functions | |
drizzled::Session * | session () |
drizzled::Session * | session () 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::Session * | mysql_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_t * | error_info |
ulint | error_key_num |
sess_t * | sess |
que_t * | graph |
ulint | n_active_thrs |
que_t * | graph_before_signal_handling |
trx_sig_t | sig |
signals | |
reply_signals | |
lock_t * | wait_lock |
ibool | was_chosen_as_deadlock_victim |
time_t | wait_started |
wait_thrs | |
mem_heap_t * | lock_heap |
trx_locks | |
mem_heap_t * | global_read_view_heap |
read_view_t * | global_read_view |
read_view_t * | read_view |
trx_savepoints | |
mutex_t | undo_mutex |
undo_no_t | undo_no |
trx_savept_t | last_sql_stat_start |
trx_rseg_t * | rseg |
trx_undo_t * | insert_undo |
trx_undo_t * | update_undo |
undo_no_t | roll_limit |
ulint | pages_undone |
trx_undo_arr_t * | undo_no_arr |
ulint | n_autoinc_rows |
ib_vector_t * | autoinc_locks |
char | detailed_error [256] |
ibool | log_commit_id |
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::conc_state |
state of the trx from the point of view of concurrency control: TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, ...
Definition at line 480 of file trx0trx.h.
Referenced by InnobaseEngine::close_connection(), InnobaseEngine::doCommit(), InnobaseEngine::doSetSavepoint(), InnobaseEngine::doXaPrepare(), innobase_commit_low(), lock_print_info_all_transactions(), read_cursor_view_create_for_mysql(), read_view_open_now(), row_search_for_mysql(), row_vers_build_for_semi_consistent_read(), trx_assign_read_view(), trx_cleanup_at_db_startup(), trx_commit_off_kernel(), trx_create(), trx_free(), trx_get_trx_by_xid(), trx_lists_init_at_db_start(), trx_mark_sql_stat_end(), trx_print(), trx_purge_sys_close(), trx_recover_for_mysql(), trx_rollback_for_mysql(), trx_rollback_last_sql_stat_for_mysql(), trx_rollback_or_clean_recovered(), trx_rollback_to_savepoint_for_mysql(), trx_sig_start_handle(), trx_start_low(), and trx_sys_init_at_db_start().
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().
0, RW_S_LATCH, or RW_X_LATCH: the latch mode trx currently holds on dict_operation_lock
Definition at line 531 of file trx0trx.h.
Referenced by dict_table_get_on_id(), row_create_table_for_mysql(), row_drop_table_for_mysql(), row_mysql_freeze_data_dictionary_func(), row_mysql_lock_data_dictionary_func(), row_mysql_unfreeze_data_dictionary(), row_mysql_unlock_data_dictionary(), row_truncate_table_for_mysql(), srv_suspend_mysql_thread(), trx_create(), and trx_free().
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().
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().
ulint trx_struct::error_state |
0 if no error, otherwise error number; NOTE That ONLY the thread doing the transaction is allowed to set this field: this is NOT protected by the kernel mutex
Definition at line 601 of file trx0trx.h.
Referenced by dict_create_index_step(), dict_create_table_step(), fetch_step(), que_eval_sql(), que_thr_stop(), que_thr_stop_for_mysql(), row_create_index_for_mysql(), row_create_table_for_mysql(), row_discard_tablespace_for_mysql(), row_ins_check_foreign_constraint(), row_ins_step(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_mysql_handle_errors(), row_rename_table_for_mysql(), row_search_for_mysql(), row_sel_step(), row_table_add_foreign_constraints(), row_truncate_table_for_mysql(), row_undo_step(), row_upd_step(), row_update_cascade_for_mysql(), row_update_for_mysql(), srv_suspend_mysql_thread(), trx_create(), and trx_general_rollback_for_mysql().
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().
transaction id
Definition at line 548 of file trx0trx.h.
Referenced by btr_cur_optimistic_update(), btr_cur_pessimistic_update(), InnobaseEngine::doCreateTable(), ha_innobase::doDeleteRecord(), InnobaseEngine::doDropTable(), ha_innobase::doInsertRecord(), InnobaseEngine::doRenameTable(), ha_innobase::doUpdateRecord(), lock_get_trx_id(), lock_rec_insert_check_and_lock(), lock_rec_print(), lock_table_print(), read_cursor_view_create_for_mysql(), read_view_open_now(), row_ins_step(), row_search_check_if_query_cache_permitted(), row_unlock_for_mysql(), row_upd_write_sys_vals_to_log(), trx_assign_read_view(), trx_create(), trx_finish_rollback_off_kernel(), trx_lists_init_at_db_start(), trx_print(), trx_recover_for_mysql(), trx_rollback_or_clean_recovered(), trx_start_low(), and trx_undo_assign_undo().
pointer to the insert undo log, or NULL if no inserts performed yet
Definition at line 696 of file trx0trx.h.
Referenced by trx_cleanup_at_db_startup(), trx_commit_off_kernel(), trx_create(), trx_free(), trx_lists_init_at_db_start(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_undo_assign_undo(), trx_undo_insert_cleanup(), and trx_undo_report_row_operation().
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().
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().
log the commit id to the sys file
Definition at line 720 of file trx0trx.h.
Referenced by ReplicationLog::apply(), and trx_create().
MySQL thread handle corresponding to this trx, or NULL
Definition at line 559 of file trx0trx.h.
Referenced by create_table_def(), dict_create_foreign_constraints(), dict_foreign_parse_drop_constraints(), innobase_trx_allocate(), innobase_trx_init(), row_search_for_mysql(), srv_conc_enter_innodb(), srv_conc_force_exit_innodb(), srv_lock_timeout_thread(), srv_suspend_mysql_thread(), trx_create(), trx_is_interrupted(), trx_is_strict(), trx_print(), trx_start(), trx_weight_ge(), and ut_print_namel().
number of active query threads
Definition at line 619 of file trx0trx.h.
Referenced by que_thr_move_to_run_state_for_mysql(), que_thr_stop_for_mysql(), que_thr_stop_for_mysql_no_error(), trx_create(), trx_purge(), and trx_sig_start_handle().
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().
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().
const char* trx_struct::op_info |
English text describing the current operation, or an empty string
Definition at line 477 of file trx0trx.h.
Referenced by ha_innobase::can_switch_engines(), ha_innobase::check(), dict_create_or_check_foreign_constraint_tables(), ha_innobase::estimate_rows_upper_bound(), ha_innobase::get_foreign_key_create_info(), ha_innobase::get_foreign_key_list(), ha_innobase::info(), ha_innobase::records_in_range(), row_create_index_for_mysql(), row_create_table_for_mysql(), row_discard_tablespace_for_mysql(), row_drop_database_for_mysql(), row_drop_table_for_mysql(), row_import_tablespace_for_mysql(), row_insert_for_mysql(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_mysql_drop_temp_tables(), row_rename_table_for_mysql(), row_search_for_mysql(), row_table_add_foreign_constraints(), row_truncate_table_for_mysql(), row_unlock_for_mysql(), row_update_for_mysql(), srv_conc_enter_innodb(), trx_commit_complete_for_mysql(), trx_commit_for_mysql(), trx_create(), trx_prepare_for_mysql(), trx_print(), trx_rollback_for_mysql(), trx_rollback_last_sql_stat_for_mysql(), trx_rollback_to_savepoint_for_mysql(), and ha_innobase::update_table_comment().
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().
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().
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().
least undo number to undo during a rollback
Definition at line 700 of file trx0trx.h.
Referenced by trx_rollback().
rollback segment assigned to the transaction, or NULL if not assigned yet
Definition at line 693 of file trx0trx.h.
Referenced by trx_cleanup_at_db_startup(), trx_commit_off_kernel(), trx_create(), trx_lists_init_at_db_start(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_start_low(), trx_undo_add_page(), trx_undo_assign_undo(), trx_undo_insert_cleanup(), trx_undo_report_row_operation(), trx_undo_truncate_end(), and trx_undo_update_cleanup().
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().
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().
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().
locks reserved by the transaction
Definition at line 656 of file trx0trx.h.
Referenced by lock_get_src_table(), lock_number_of_rows_locked(), lock_print_info_all_transactions(), lock_release_off_kernel(), srv_conc_enter_innodb(), trx_commit_off_kernel(), trx_create(), trx_free(), trx_print(), and trx_weight_ge().
savepoints set with SAVEPOINT ..., oldest first
Definition at line 672 of file trx0trx.h.
Referenced by trx_create(), trx_release_savepoint_for_mysql(), trx_roll_savepoint_free(), trx_roll_savepoints_free(), trx_rollback_to_savepoint_for_mysql(), and trx_savepoint_for_mysql().
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().
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().
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().
pointer to the update undo log, or NULL if no update performed yet
Definition at line 698 of file trx0trx.h.
Referenced by trx_commit_off_kernel(), trx_create(), trx_free(), trx_lists_init_at_db_start(), trx_purge_add_update_undo_to_history(), trx_roll_pop_top_rec_of_trx(), trx_roll_try_truncate(), trx_undo_assign_undo(), trx_undo_report_row_operation(), and trx_undo_update_cleanup().
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().
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().
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().