CUBRID Engine
latest
|
#include <inttypes.h>
#include "config.h"
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include <limits.h>
#include <sys/stat.h>
#include <assert.h>
#include "dbtran_def.h"
#include "log_impl.h"
#include "log_lsa.hpp"
#include "log_manager.h"
#include "log_system_tran.hpp"
#include "memory_private_allocator.hpp"
#include "object_representation.h"
#include "error_manager.h"
#include "system_parameter.h"
#include "xserver_interface.h"
#include "file_manager.h"
#include "query_manager.h"
#include "query_monitoring.hpp"
#include "partition_sr.h"
#include "btree_load.h"
#include "serial.h"
#include "show_scan.h"
#include "boot_sr.h"
#include "tz_support.h"
#include "db_date.h"
#include "dbtype.h"
#include "string_buffer.hpp"
#include "thread_entry.hpp"
#include "thread_manager.hpp"
#include "xasl.h"
#include "xasl_cache.h"
Go to the source code of this file.
Macros | |
#define | __STDC_FORMAT_MACROS |
#define | RMUTEX_NAME_TDES_TOPOP "TDES_TOPOP" |
#define | NUM_ASSIGNED_TRAN_INDICES log_Gl.trantable.num_assigned_indices |
#define | NUM_TOTAL_TRAN_INDICES log_Gl.trantable.num_total_indices |
#define | pthread_mutex_init(a, b) |
#define | pthread_mutex_destroy(a) |
#define | pthread_mutex_lock(a) 0 |
#define | pthread_mutex_trylock(a) 0 |
#define | pthread_mutex_unlock(a) |
Variables | |
static const int | LOG_MAX_NUM_CONTIGUOUS_TDES = INT_MAX / sizeof (LOG_TDES) |
static const float | LOG_EXPAND_TRANTABLE_RATIO = 1.25 |
static const int | LOG_TOPOPS_STACK_INCREMENT = 3 |
static BOOT_CLIENT_CREDENTIAL | log_Client_credential |
static const unsigned int | LOGTB_RETRY_SLAM_MAX_TIMES = 10 |
#define __STDC_FORMAT_MACROS |
Definition at line 27 of file log_tran_table.c.
#define NUM_ASSIGNED_TRAN_INDICES log_Gl.trantable.num_assigned_indices |
Definition at line 83 of file log_tran_table.c.
Referenced by logtb_allocate_tran_index(), logtb_get_number_assigned_tran_indices(), and logtb_set_number_of_total_tran_indices().
#define NUM_TOTAL_TRAN_INDICES log_Gl.trantable.num_total_indices |
Definition at line 84 of file log_tran_table.c.
Referenced by log_find_unilaterally_largest_undo_lsa(), logtb_allocate_tdes_area(), logtb_allocate_tran_index(), logtb_collect_local_clients(), logtb_create_unique_stats_from_repr(), logtb_descriptors_start_scan(), logtb_expand_trantable(), logtb_find_smallest_and_largest_active_pages(), logtb_find_smallest_lsa(), logtb_find_tran_index(), logtb_free_tran_index(), logtb_free_tran_index_with_undo_lsa(), logtb_is_active(), logtb_istran_finished(), logtb_set_num_loose_end_trans(), logtb_undefine_trantable(), xlogtb_does_active_user_exist(), xlogtb_dump_trantable(), and xlogtb_get_pack_tran_table().
#define pthread_mutex_destroy | ( | a | ) |
Definition at line 88 of file log_tran_table.c.
Referenced by logtb_global_unique_stat_free().
#define pthread_mutex_init | ( | a, | |
b | |||
) |
Definition at line 87 of file log_tran_table.c.
Referenced by logtb_global_unique_stat_alloc().
#define pthread_mutex_lock | ( | a | ) | 0 |
Definition at line 89 of file log_tran_table.c.
#define pthread_mutex_trylock | ( | a | ) | 0 |
Definition at line 90 of file log_tran_table.c.
#define pthread_mutex_unlock | ( | a | ) |
Definition at line 91 of file log_tran_table.c.
Referenced by logtb_get_global_unique_stats(), logtb_reflect_global_unique_stats_to_btree(), logtb_rv_update_global_unique_stats_by_abs(), and logtb_update_global_unique_stats_by_delta().
#define RMUTEX_NAME_TDES_TOPOP "TDES_TOPOP" |
Definition at line 81 of file log_tran_table.c.
Referenced by logtb_initialize_tdes().
void log_find_unilaterally_largest_undo_lsa | ( | THREAD_ENTRY * | thread_p, |
LOG_LSA & | max_undo_lsa | ||
) |
Definition at line 4170 of file log_tran_table.c.
References trantable::all_tdes, i, log_Gl, LOG_SYSTEM_TRAN_INDEX, LSA_LT(), LSA_SET_NULL(), log_system_tdes::map_all_tdes(), NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, log_tdes::state, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, TRAN_UNACTIVE_ABORTED, TRAN_UNACTIVE_UNILATERALLY_ABORTED, log_global::trantable, log_tdes::trid, and log_tdes::undo_nxlsa.
Referenced by log_recovery_undo().
|
static |
Definition at line 198 of file log_tran_table.c.
References trantable::all_tdes, trantable::area, ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, log_Gl, logtb_initialize_tdes(), log_addr_tdesarea::next, NULL, NUM_TOTAL_TRAN_INDICES, log_addr_tdesarea::tdesarea, and log_global::trantable.
Referenced by logtb_expand_trantable().
|
static |
Definition at line 919 of file log_tran_table.c.
References trantable::all_tdes, ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_LOG_UNKNOWN_TRANINDEX, er_set(), ER_TM_TOO_MANY_CLIENTS, trantable::hint_free_index, i, LOG_EXPAND_TRANTABLE_RATIO, LOG_FIND_TDES(), log_Gl, LOG_RESTARTED, LOG_SET_CURRENT_TRAN_INDEX, logtb_clear_tdes(), logtb_expand_trantable(), logtb_get_new_tran_id(), logtb_increment_number_of_assigned_tran_indices(), logtb_set_tdes(), NO_ERROR, NULL, NULL_TRAN_INDEX, NULL_TRANID, NUM_ASSIGNED_TRAN_INDICES, NUM_TOTAL_TRAN_INDICES, log_global::rcv_phase, log_tdes::state, thread_get_thread_entry_info(), log_tdes::tran_abort_reason, TRAN_ACTIVE, log_tdes::tran_index, TRAN_NORMAL, log_global::trantable, and log_tdes::trid.
Referenced by logtb_assign_tran_index(), and logtb_rv_find_allocate_tran_index().
bool logtb_am_i_dba_client | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 751 of file log_tran_table.c.
References logtb_find_current_client_name(), and NULL.
Referenced by logtb_check_kill_tran_auth(), and net_server_request().
|
static |
Definition at line 4554 of file log_tran_table.c.
References assert, mvcc_info::id, MVCCID_IS_VALID, NULL, and mvcc_info::sub_ids.
Referenced by logtb_get_new_subtransaction_mvccid().
int logtb_assign_tran_index | ( | THREAD_ENTRY * | thread_p, |
TRANID | trid, | ||
TRAN_STATE | state, | ||
const BOOT_CLIENT_CREDENTIAL * | client_credential, | ||
TRAN_STATE * | current_state, | ||
int | wait_msecs, | ||
TRAN_ISOLATION | isolation | ||
) |
Definition at line 792 of file log_tran_table.c.
References LOG_SET_CURRENT_TRAN_INDEX, LOG_SYSTEM_TRAN_INDEX, logtb_allocate_tran_index(), NULL, NULL_TRAN_INDEX, thread_get_thread_entry_info(), TR_TABLE_CS_ENTER, and TR_TABLE_CS_EXIT.
Referenced by boot_create_all_volumes(), boot_restart_server(), cubload::load_task::execute(), log_complete_for_2pc(), and xboot_register_client().
Definition at line 5645 of file log_tran_table.c.
References assert, NULL, OID_CACHE_DB_ROOT_CLASS_ID, OID_CACHE_TRIGGER_CLASS_ID, OID_CACHE_USER_CLASS_ID, oid_check_cached_class_oid(), and OID_ISNULL.
Referenced by locator_lock_and_get_object_internal().
|
static |
Definition at line 5677 of file log_tran_table.c.
References assert, ER_CSS_KILL_UNKNOWN_TRANSACTION, logtb_am_i_dba_client(), logtb_find_client_name(), logtb_find_current_client_name(), NO_ERROR, and NULL.
Referenced by xlogtb_kill_or_interrupt_tran().
void logtb_clear_tdes | ( | THREAD_ENTRY * | thread_p, |
LOG_TDES * | tdes | ||
) |
Definition at line 1484 of file log_tran_table.c.
References log_rcv_tdes::analysis_last_aborted_sysop_lsa, log_rcv_tdes::analysis_last_aborted_sysop_start_lsa, log_tdes::append_repl_recidx, assert, log_rcv_tdes::atomic_sysop_start_lsa, log_tdes::bind_history, BOOT_WRITE_ON_STANDY_CLIENT_TYPE, tx_transient_class_registry::clear(), multi_index_unique_stats::clear(), log_tdes::client, clientids::client_type, log_tdes::coord, log_tdes::cur_repl_record, db_change_private_heap(), db_Disable_modifications, db_private_free_and_init, db_value_clear(), log_tdes::disable_modifications, log_tdes::first_save_entry, log_tdes::fl_mark_repl_recidx, free_and_init, log_tdes::gtrid, log_tdes::gtrinfo, log_tdes::has_deadlock_priority, log_tdes::head_lsa, i, mvcc_info::id, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, log_tdes::interrupt, log_tdes::isloose_end, log_topops_stack::last, log_2pc_free_coord_info(), LOG_2PC_NULL_GTRID, log_Gl, log_tdes::log_upd_stats, logtb_tran_clear_update_stats(), LSA_SET_NULL(), log_tdes::m_log_postpone_cache, log_tdes::m_modified_classes, log_tdes::m_multiupd_stats, MAX_NUM_EXEC_QUERY_HISTORY, MVCCID_NULL, log_tdes::mvccinfo, NULL, log_tdes::num_exec_queries, trantable::num_interrupts, log_tdes::num_log_records_written, log_tdes::posp_nxlsa, log_tdes::query_start_time, log_tdes::query_timeout, log_tdes::rcv, log_tdes::repl_insert_lsa, log_tdes::repl_records, log_tdes::repl_update_lsa, log_postpone_cache::reset(), log_tdes::savept_lsa, db_value_array::size, log_tdes::state, log_tdes::suppress_replication, log_rcv_tdes::sysop_start_postpone_lsa, log_tdes::tail_lsa, log_tdes::tail_topresult_lsa, log_tdes::topop_lsa, log_tdes::topops, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_tdes::tran_abort_reason, TRAN_ACTIVE, TRAN_NORMAL, log_rcv_tdes::tran_start_postpone_lsa, log_tdes::tran_start_time, log_global::trantable, log_tdes::undo_nxlsa, db_value_array::vals, log_tdes::waiting_for_res, log_tdes::xasl_id, and XASL_ID_SET_NULL.
Referenced by log_complete(), log_complete_for_2pc(), log_rv_analysis_end_checkpoint(), logpb_checkpoint(), logtb_allocate_tran_index(), logtb_finalize_tdes(), logtb_free_tran_index(), logtb_get_new_tran_id(), logtb_initialize_system_tdes(), and systdes_retire_tdes().
int logtb_collect_local_clients | ( | int ** | local_clients_pids | ) |
Definition at line 5135 of file log_tran_table.c.
References trantable::all_tdes, boot_Host_name, log_tdes::client, ER_FAILED, clientids::get_host_name(), clientids::host_name, i, log_Gl, NULL, NUM_TOTAL_TRAN_INDICES, clientids::process_id, and log_global::trantable.
Referenced by abort_handler().
void logtb_complete_mvcc | ( | THREAD_ENTRY * | thread_p, |
LOG_TDES * | tdes, | ||
bool | committed | ||
) |
Definition at line 3978 of file log_tran_table.c.
References assert, BTID_INITIALIZER, BTID_IS_NULL, mvcctable::complete_mvcc(), mvcc_info::id, LOG_FIND_THREAD_TRAN_INDEX, log_Gl, log_tdes::log_upd_stats, logtb_tran_clear_update_stats(), logtb_tran_find_btid_stats(), logtb_tran_reset_count_optim_state(), logtb_tran_update_all_global_unique_stats(), logtb_update_global_unique_stats_by_delta(), log_global::mvcc_table, MVCCID_IS_VALID, MVCCID_NULL, log_tdes::mvccinfo, NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, perfmon_add_stat(), perfmon_is_perf_tracking(), PSTAT_LOG_TRAN_COMPLETE_TIME_COUNTERS, mvcc_info::recent_snapshot_lowest_active_mvccid, mvcc_info::reset(), mvcctable::reset_transaction_lowest_active(), mvcc_info::snapshot, log_tran_btid_unique_stats::tran_stats, tsc_elapsed_time_usec(), tsc_getticks(), and mvcc_snapshot::valid.
Referenced by log_abort_local(), log_commit_local(), and test_new_mvcc_complete().
void logtb_complete_sub_mvcc | ( | THREAD_ENTRY * | thread_p, |
LOG_TDES * | tdes | ||
) |
Definition at line 4569 of file log_tran_table.c.
References assert, mvcctable::complete_sub_mvcc(), mvcc_snapshot::highest_completed_mvccid, log_Gl, mvcc_snapshot::m_active_mvccs, log_global::mvcc_table, MVCCID_FORWARD, log_tdes::mvccinfo, NULL, mvcc_active_tran::set_inactive_mvccid(), mvcc_info::snapshot, mvcc_info::sub_ids, and mvcc_snapshot::valid.
Referenced by qexec_execute_selupd_list().
int logtb_count_clients | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 1933 of file log_tran_table.c.
References trantable::all_tdes, BOOT_NORMAL_CLIENT_TYPE, log_tdes::client, clientids::client_type, cubregex::count(), i, log_Gl, NULL, NULL_TRANID, trantable::num_total_indices, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by css_change_ha_server_state(), and css_check_ha_server_state_for_client().
int logtb_count_not_allowed_clients_in_maintenance_mode | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 1963 of file log_tran_table.c.
References trantable::all_tdes, boot_Host_name, BOOT_IS_ALLOWED_CLIENT_TYPE_IN_MT_MODE, log_tdes::client, clientids::client_type, cubregex::count(), clientids::get_host_name(), i, log_Gl, NULL, NULL_TRANID, trantable::num_total_indices, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by css_change_ha_server_state().
|
static |
Definition at line 4365 of file log_tran_table.c.
References trantable::all_tdes, or_index::btid, log_tran_btid_unique_stats::btid, btree_is_unique_type(), er_errid(), ER_FAILED, log_tran_btid_unique_stats::global_stats, heap_classrepr_free_and_init, heap_classrepr_get(), i, or_classrep::indexes, log_Gl, LOG_SYSTEM_TRAN_INDEX, logtb_get_global_unique_stats(), logtb_tran_find_btid_stats(), LSA_GT(), LSA_ISNULL(), or_classrep::n_indexes, NO_ERROR, NULL, NULL_REPRID, NULL_TRANID, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, NUM_TOTAL_TRAN_INDICES, log_tdes::tail_lsa, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, log_tdes::trid, and or_index::type.
Referenced by logtb_tran_load_global_stats_func().
|
static |
Definition at line 676 of file log_tran_table.c.
References log_Gl, trantable::num_assigned_indices, and log_global::trantable.
Referenced by logtb_free_tran_index().
void logtb_define_trantable | ( | THREAD_ENTRY * | thread_p, |
int | num_expected_tran_indices, | ||
int | num_expected_locks | ||
) |
Definition at line 362 of file log_tran_table.c.
References LOG_CS_ENTER(), LOG_CS_EXIT(), LOG_SET_CURRENT_TRAN_INDEX, LOG_SYSTEM_TRAN_INDEX, logpb_finalize_pool(), logpb_is_pool_initialized(), logtb_define_trantable_log_latch(), TR_TABLE_CS_ENTER, and TR_TABLE_CS_EXIT.
Referenced by boot_remove_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
int logtb_define_trantable_log_latch | ( | THREAD_ENTRY * | thread_p, |
int | num_expected_tran_indices | ||
) |
Definition at line 396 of file log_tran_table.c.
References trantable::area, ARG_FILE_LINE, assert, ER_FATAL_ERROR_SEVERITY, ER_LOG_UNKNOWN_TRANINDEX, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), file_manager_init(), mvcctable::initialize(), lock_initialize(), LOG_CS_OWN_WRITE_MODE(), LOG_ESTIMATE_NACTIVE_TRANS, log_Gl, LOG_RESTARTED, LOG_SET_CURRENT_TRAN_INDEX, LOG_SYSTEM_TRAN_INDEX, logpb_fatal_error(), logtb_expand_trantable(), logtb_initialize_system_tdes(), logtb_initialize_trantable(), logtb_set_number_of_assigned_tran_indices(), logtb_undefine_trantable(), MAX_NTRANS, log_global::mvcc_table, NO_ERROR, NULL, pgbuf_initialize(), log_global::rcv_phase, and log_global::trantable.
Referenced by log_get_io_page_size(), log_initialize_internal(), logpb_delete(), logpb_find_header_parameters(), logpb_restore(), and logtb_define_trantable().
int logtb_delete_global_unique_stats | ( | THREAD_ENTRY * | thread_p, |
BTID * | btid | ||
) |
Definition at line 5025 of file log_tran_table.c.
References assert, BTID_IS_NULL, error(), lf_hash_delete(), log_Gl, NO_ERROR, NULL, vpid::pageid, pgbuf_is_page_fixed_by_thread(), btid::root_pageid, thread_get_tran_entry(), THREAD_TS_GLOBAL_UNIQUE_STATS, global_unique_stats_table::unique_stats_hash, log_global::unique_stats_table, btid::vfid, vpid::volid, and vfid::volid.
Referenced by btree_rv_remove_unique_stats(), and xbtree_load_index().
int logtb_descriptors_start_scan | ( | THREAD_ENTRY * | thread_p, |
int | type, | ||
DB_VALUE ** | arg_values, | ||
int | arg_cnt, | ||
void ** | ptr | ||
) |
Definition at line 5178 of file log_tran_table.c.
References trantable::all_tdes, log_tdes::append_repl_recidx, assert, boot_client_type_to_string(), CACHE_TIME_AS_ARGS, log_tdes::client, log_tdes::client_id, clientids::client_type, log_tdes::cur_repl_record, db_localdatetime_msec(), db_make_datetime(), db_make_int(), db_make_null(), db_make_string(), db_make_string_copy(), log_tdes::disable_modifications, tx_transient_class_registry::empty(), multi_index_unique_stats::empty(), er_errid(), error(), file_get_tran_num_temp_files(), log_tdes::first_save_entry, log_tdes::fl_mark_repl_recidx, clientids::get_client_info(), clientids::get_db_user(), clientids::get_host_name(), clientids::get_login_name(), clientids::get_program_name(), log_tdes::has_deadlock_priority, log_tdes::head_lsa, i, log_tdes::interrupt, log_tdes::isloose_end, log_tdes::isolation, log_topops_stack::last, log_Gl, log_isolation_string(), log_state_short_string(), lsa_to_string(), log_tdes::m_modified_classes, log_tdes::m_multiupd_stats, log_tdes::max_unique_btrees, db_value::need_clear, NO_ERROR, NULL, NULL_TRANID, log_tdes::num_repl_records, NUM_TOTAL_TRAN_INDICES, log_tdes::num_transient_classnames, log_tdes::num_unique_btrees, log_tdes::posp_nxlsa, cubmem::PRIVATE_BLOCK_ALLOCATOR, clientids::process_id, log_tdes::query_start_time, log_tdes::query_timeout, string_buffer::release_ptr(), log_tdes::repl_insert_lsa, log_tdes::repl_records, log_tdes::repl_update_lsa, log_tdes::savept_lsa, xasl_id::sha1, SHA1_AS_ARGS, showstmt_alloc_array_context(), showstmt_alloc_tuple_in_context(), showstmt_free_array_context(), log_tdes::state, log_tdes::suppress_replication, log_tdes::tail_lsa, log_tdes::tail_topresult_lsa, xasl_id::time_stored, tx_transient_class_registry::to_string(), multi_index_unique_stats::to_string(), log_tdes::topop_lsa, log_tdes::topops, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_tdes::tran_abort_reason, tran_abort_reason_to_string(), log_tdes::tran_index, log_tdes::tran_start_time, log_global::trantable, log_tdes::trid, log_tdes::undo_nxlsa, log_tdes::wait_msecs, log_tdes::waiting_for_res, log_tdes::xasl_id, XASL_ID_COPY, and XASL_ID_IS_NULL.
Referenced by showstmt_scan_init().
void logtb_disable_update | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3131 of file log_tran_table.c.
References ARG_FILE_LINE, db_Disable_modifications, and er_log_debug.
Referenced by boot_restart_server(), css_change_ha_server_state(), css_check_ha_server_state_for_client(), and css_notify_ha_log_applier_state().
|
static |
Definition at line 1313 of file log_tran_table.c.
References log_tdes::client, clientids::client_type, log_tdes::coord, clientids::get_db_user(), clientids::get_host_name(), clientids::get_login_name(), clientids::get_program_name(), log_tdes::gtrid, log_tdes::head_lsa, log_tdes::isloose_end, log_tdes::isolation, log_topops_stack::last, LOG_2PC_NULL_GTRID, log_isolation_string(), log_state_string(), logtb_dump_tdes_distribute_transaction(), logtb_dump_top_operations(), log_topops_stack::max, NULL, log_lsa::offset, log_lsa::pageid, log_tdes::posp_nxlsa, clientids::process_id, log_tdes::savept_lsa, log_tdes::state, log_tdes::tail_lsa, log_tdes::topops, log_tdes::tran_index, log_tdes::trid, log_tdes::undo_nxlsa, and log_tdes::wait_msecs.
Referenced by xlogtb_dump_trantable().
|
static |
Definition at line 1371 of file log_tran_table.c.
References log_2pc_coordinator::ack_received, log_2pc_coordinator::block_particps_ids, i, log_2pc_sprintf_particp(), NULL, log_2pc_coordinator::num_particps, and log_2pc_coordinator::particp_id_length.
Referenced by logtb_dump_tdes().
|
static |
Definition at line 1349 of file log_tran_table.c.
References i, log_topops_stack::last, log_topops_addresses::lastparent_lsa, LSA_AS_ARGS, log_topops_addresses::posp_lsa, and log_topops_stack::stack.
Referenced by logtb_dump_tdes().
void logtb_enable_update | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3142 of file log_tran_table.c.
References ARG_FILE_LINE, db_Disable_modifications, er_log_debug, prm_get_bool_value(), and PRM_ID_READ_ONLY_MODE.
Referenced by css_change_ha_server_state(), and css_notify_ha_log_applier_state().
|
static |
Definition at line 247 of file log_tran_table.c.
References trantable::all_tdes, mvcctable::alloc_transaction_lowest_active(), trantable::area, ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, trantable::hint_free_index, i, log_Gl, LOG_MAX_NUM_CONTIGUOUS_TDES, LOG_RESTARTED, logtb_allocate_tdes_area(), logtb_set_number_of_total_tran_indices(), MAX_NTRANS, log_global::mvcc_table, NO_ERROR, NULL, NUM_TOTAL_TRAN_INDICES, qmgr_allocate_tran_entries(), log_global::rcv_phase, log_addr_tdesarea::tdesarea, and log_global::trantable.
Referenced by logtb_allocate_tran_index(), and logtb_define_trantable_log_latch().
void logtb_finalize_global_unique_stats_table | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4745 of file log_tran_table.c.
References global_unique_stats_table::initialized, lf_freelist_destroy(), lf_hash_destroy(), log_Gl, global_unique_stats_table::unique_stats_freelist, global_unique_stats_table::unique_stats_hash, and log_global::unique_stats_table.
Referenced by boot_restart_server(), and boot_server_all_finalize().
void logtb_finalize_tdes | ( | THREAD_ENTRY * | thread_p, |
LOG_TDES * | tdes | ||
) |
Definition at line 1696 of file log_tran_table.c.
References assert, free_and_init, log_topops_stack::last, log_tdes::log_upd_stats, logtb_clear_tdes(), logtb_free_tran_mvcc_info(), logtb_tran_free_update_stats(), log_topops_stack::max, NO_ERROR, rmutex_finalize, log_tdes::rmutex_topop, log_topops_stack::stack, and log_tdes::topops.
Referenced by log_system_tdes::destroy_system_transactions(), logtb_undefine_trantable(), and log_system_tdes::~log_system_tdes().
const char* logtb_find_client_hostname | ( | int | tran_index | ) |
Definition at line 2088 of file log_tran_table.c.
References log_tdes::client, clientids::get_host_name(), LOG_FIND_TDES(), NULL, NULL_TRANID, and log_tdes::trid.
Referenced by logtb_find_current_client_hostname().
const char* logtb_find_client_name | ( | int | tran_index | ) |
Definition at line 2015 of file log_tran_table.c.
References log_tdes::client, clientids::get_db_user(), LOG_FIND_TDES(), NULL, NULL_TRANID, and log_tdes::trid.
Referenced by logtb_check_kill_tran_auth(), and logtb_find_current_client_name().
int logtb_find_client_name_host_pid | ( | int | tran_index, |
const char ** | client_prog_name, | ||
const char ** | client_user_name, | ||
const char ** | client_host_name, | ||
int * | client_pid | ||
) |
Definition at line 2119 of file log_tran_table.c.
References log_tdes::client, ER_FAILED, clientids::get_db_user(), clientids::get_host_name(), clientids::get_program_name(), LOG_FIND_TDES(), logtb_get_current_tran_index(), NO_ERROR, NULL, NULL_TRANID, clientids::process_id, log_tdes::trid, and clientids::UNKNOWN_ID.
Referenced by css_default_server_timeout_fn(), event_log_print_client_info(), lock_demote_class_lock(), pgbuf_block_bcb(), pgbuf_latch_bcb_upon_fix(), xlock_dump(), xlogtb_kill_tran_index(), and xtran_server_abort().
int logtb_find_client_type | ( | int | tran_index | ) |
Definition at line 1995 of file log_tran_table.c.
References log_tdes::client, clientids::client_type, LOG_FIND_TDES(), NULL, NULL_TRANID, and log_tdes::trid.
Referenced by logtb_find_current_client_type(), and net_server_request().
const char* logtb_find_current_client_hostname | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2440 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_find_client_hostname().
Referenced by xtran_lock_rep_read().
const char* logtb_find_current_client_name | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2429 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_find_client_name().
Referenced by logtb_am_i_dba_client(), and logtb_check_kill_tran_auth().
int logtb_find_current_client_type | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2418 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_find_client_type().
Referenced by xtran_lock_rep_read().
TRAN_ISOLATION logtb_find_current_isolation | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2667 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_find_isolation().
Referenced by btree_key_lock_and_append_object_unique(), locator_lock_and_get_object_internal(), qexec_execute_query(), scan_next_index_scan(), and xbtree_find_unique().
MVCCID logtb_find_current_mvccid | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3850 of file log_tran_table.c.
References mvcc_info::id, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, MVCCID_NULL, log_tdes::mvccinfo, NULL, and mvcc_info::sub_ids.
Referenced by btree_key_delete_remove_object(), and locator_update_force().
LOG_LSA* logtb_find_current_tran_lsa | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2451 of file log_tran_table.c.
References LOG_FIND_CURRENT_TDES(), NULL, and log_tdes::tail_lsa.
Referenced by heap_log_delete_physical(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
TRANID logtb_find_current_tranid | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 1892 of file log_tran_table.c.
References trantable::all_tdes, log_tdes::client, clientids::client_type, cubregex::count(), i, LOG_FIND_THREAD_TRAN_INDEX, log_Gl, logtb_find_tranid(), NULL, NULL_TRANID, trantable::num_total_indices, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by fetch_peek_arith(), spage_check_slot_owner(), spage_free_saved_spaces(), spage_get_saved_spaces(), spage_has_enough_total_space(), spage_insert_data(), spage_save_space(), and xtran_get_local_transaction_id().
int logtb_find_interrupt | ( | int | tran_index, |
bool * | interrupt | ||
) |
Definition at line 2552 of file log_tran_table.c.
References assert, ER_FAILED, log_tdes::interrupt, LOG_FIND_TDES(), NO_ERROR, NULL, NULL_TRANID, and log_tdes::trid.
Referenced by xlogtb_kill_or_interrupt_tran().
TRAN_ISOLATION logtb_find_isolation | ( | int | tran_index | ) |
Definition at line 2643 of file log_tran_table.c.
References log_tdes::isolation, LOG_FIND_TDES(), NULL, and TRAN_UNKNOWN_ISOLATION.
Referenced by lock_classes_lock_hint(), lock_notify_isolation_incons(), lock_object(), lock_scan(), lock_subclass(), lock_unlock_classes_lock_hint(), lock_unlock_object(), lock_unlock_objects_lock_set(), logtb_find_current_isolation(), qfile_update_list_cache_entry(), scan_next_heap_scan(), scan_next_index_lookup_heap(), and xlock_dump().
int logtb_find_log_records_count | ( | int | tran_index | ) |
Definition at line 2579 of file log_tran_table.c.
References LOG_FIND_TDES(), NULL, and log_tdes::num_log_records_written.
Referenced by lock_demote_class_lock().
void logtb_find_smallest_and_largest_active_pages | ( | THREAD_ENTRY * | thread_p, |
LOG_PAGEID * | smallest, | ||
LOG_PAGEID * | largest | ||
) |
Definition at line 4457 of file log_tran_table.c.
References trantable::all_tdes, log_tdes::head_lsa, i, log_Gl, LOG_SYSTEM_TRAN_INDEX, LSA_ISNULL(), NULL, NULL_PAGEID, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, log_lsa::pageid, log_tdes::posp_nxlsa, log_tdes::tail_lsa, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
void logtb_find_smallest_lsa | ( | THREAD_ENTRY * | thread_p, |
LOG_LSA * | lsa | ||
) |
Definition at line 4217 of file log_tran_table.c.
References trantable::all_tdes, log_tdes::head_lsa, i, log_Gl, LOG_SYSTEM_TRAN_INDEX, LSA_COPY(), LSA_ISNULL(), LSA_LT(), LSA_SET_NULL(), NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by logpb_checkpoint(), and logpb_is_smallest_lsa_in_archive().
TRAN_STATE logtb_find_state | ( | int | tran_index | ) |
Definition at line 2467 of file log_tran_table.c.
References LOG_FIND_TDES(), NULL, log_tdes::state, and TRAN_UNACTIVE_UNKNOWN.
Referenced by lock_demote_class_lock(), and xlock_dump().
THREAD_ENTRY* logtb_find_thread_by_tran_index | ( | int | tran_index | ) |
Definition at line 5914 of file log_tran_table.c.
References logtb_find_thread_entry_mapfunc(), cubthread::manager::map_entries(), NULL, and thread_get_manager().
THREAD_ENTRY* logtb_find_thread_by_tran_index_except_me | ( | int | tran_index | ) |
Definition at line 5928 of file log_tran_table.c.
References logtb_find_thread_entry_mapfunc(), cubthread::manager::map_entries(), NULL, thread_get_manager(), and thread_wakeup().
Referenced by net_server_conn_down().
|
static |
Definition at line 5889 of file log_tran_table.c.
Referenced by logtb_find_thread_by_tran_index(), and logtb_find_thread_by_tran_index_except_me().
int logtb_find_tran_index | ( | THREAD_ENTRY * | thread_p, |
TRANID | trid | ||
) |
Definition at line 1789 of file log_tran_table.c.
References trantable::all_tdes, assert, log_tdes::client, clientids::get_host_name(), i, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, NULL, NULL_TRAN_INDEX, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, clientids::process_id, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by log_recovery_analysis(), log_recovery_needs_skip_logical_redo(), log_recovery_redo(), log_recovery_undo(), log_rv_analysis_complete(), and logtb_rv_find_allocate_tran_index().
TRANID logtb_find_tranid | ( | int | tran_index | ) |
Definition at line 1873 of file log_tran_table.c.
References LOG_FIND_TDES(), NULL, NULL_TRANID, and log_tdes::trid.
Referenced by lock_demote_class_lock(), lock_detect_local_deadlock(), and logtb_find_current_tranid().
int logtb_find_wait_msecs | ( | int | tran_index | ) |
Definition at line 2526 of file log_tran_table.c.
References assert, LOG_FIND_TDES(), NULL, and log_tdes::wait_msecs.
Referenced by lock_classes_lock_hint(), lock_demote_class_lock(), lock_detect_local_deadlock(), lock_initialize_composite_lock(), lock_object(), lock_rep_read_tran(), lock_scan(), lock_subclass(), pgbuf_latch_bcb_upon_fix(), and xlock_dump().
void logtb_free_tran_index | ( | THREAD_ENTRY * | thread_p, |
int | tran_index | ||
) |
Definition at line 1198 of file log_tran_table.c.
References ARG_FILE_LINE, log_tdes::client_id, er_log_debug, free_and_init, trantable::hint_free_index, log_topops_stack::last, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, LOG_ISRESTARTED, LOG_SET_CURRENT_TRAN_INDEX, LOG_SYSTEM_TRAN_INDEX, logtb_clear_tdes(), logtb_decrement_number_of_assigned_tran_indices(), log_topops_stack::max, NULL, NULL_TRAN_INDEX, NULL_TRANID, log_tdes::num_repl_records, NUM_TOTAL_TRAN_INDICES, log_tdes::repl_records, log_topops_stack::stack, thread_get_thread_entry_info(), log_tdes::topops, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by boot_restart_server(), log_2pc_attach_client(), log_complete_for_2pc(), log_recovery_finish_postpone(), log_recovery_redo(), log_recovery_undo(), log_rv_analysis_complete(), logtb_free_tran_index_with_undo_lsa(), logtb_release_tran_index(), and cubload::session::notify_batch_done_and_register_tran_end().
void logtb_free_tran_index_with_undo_lsa | ( | THREAD_ENTRY * | thread_p, |
const LOG_LSA * | undo_lsa | ||
) |
Definition at line 1277 of file log_tran_table.c.
References trantable::all_tdes, i, log_Gl, LOG_SYSTEM_TRAN_INDEX, logtb_free_tran_index(), LSA_EQ(), LSA_ISNULL(), NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, log_tdes::state, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, TRAN_UNACTIVE_UNILATERALLY_ABORTED, log_global::trantable, log_tdes::trid, and log_tdes::undo_nxlsa.
Referenced by log_recovery_undo().
|
static |
Definition at line 1468 of file log_tran_table.c.
References mvcc_active_tran::finalize(), mvcc_snapshot::m_active_mvccs, log_tdes::mvccinfo, mvcc_info::snapshot, and mvcc_info::sub_ids.
Referenced by logtb_finalize_tdes().
bool logtb_get_check_interrupt | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 6017 of file log_tran_table.c.
References BO_IS_SERVER_RESTARTED, NULL, thread_get_thread_entry_info(), and tran_get_check_interrupt().
Referenced by disk_extend(), fileio_initialize_pages(), logpb_backup(), pgbuf_fix_debug(), qmgr_free_list_temp_file(), qmgr_get_old_page(), and vacuum_process_log_block().
int logtb_get_client_ids | ( | int | tran_index, |
CLIENTIDS * | client_info | ||
) |
Definition at line 2167 of file log_tran_table.c.
References log_tdes::client, ER_FAILED, LOG_FIND_TDES(), NO_ERROR, NULL, NULL_TRANID, and log_tdes::trid.
Referenced by logwr_log_ha_filestat_to_string().
MVCCID logtb_get_current_mvccid | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3880 of file log_tran_table.c.
References assert, mvcctable::get_new_mvccid(), mvcc_info::id, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, log_global::mvcc_table, MVCCID_IS_VALID, log_tdes::mvccinfo, NULL, and mvcc_info::sub_ids.
Referenced by btree_build_nleafs(), btree_construct_leafs(), btree_physical_delete(), btree_rv_save_keyval_for_undo(), file_create(), file_tracker_item_reuse_heap(), heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_insert_adjust_recdes_header(), heap_log_update_physical(), heap_mvcc_log_delete(), heap_mvcc_log_home_change_on_delete(), heap_mvcc_log_home_no_change(), heap_mvcc_log_insert(), heap_mvcc_log_redistribute(), heap_update_adjust_recdes_header(), locator_add_or_remove_index_internal(), locator_update_index(), log_sysop_end_logical_undo(), test_new_mvcc_complete(), and xbtree_add_index().
int logtb_get_current_tran_index | ( | void | ) |
Definition at line 5961 of file log_tran_table.c.
References assert, NULL, and thread_get_thread_entry_info().
Referenced by cubmonitor::transaction_sheet_manager::end_watch(), file_get_tempcache_entry_index(), cubmonitor::transaction_sheet_manager::get_sheet(), lock_get_class_lock(), lock_get_object_lock(), lock_has_lock_on_object(), logtb_find_client_name_host_pid(), and cubmonitor::transaction_sheet_manager::start_watch().
int logtb_get_global_unique_stats | ( | THREAD_ENTRY * | thread_p, |
BTID * | btid, | ||
int * | num_oids, | ||
int * | num_nulls, | ||
int * | num_keys | ||
) |
Definition at line 4840 of file log_tran_table.c.
References assert, ER_FAILED, logtb_get_global_unique_stats_entry(), global_unique_stats::mutex, NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, pthread_mutex_unlock, and global_unique_stats::unique_stats.
Referenced by btree_online_index_check_unique_constraint(), btree_scan_for_show_index_header(), locator_check_unique_btree_entries(), logtb_create_unique_stats_from_repr(), and xbtree_test_unique().
|
static |
Definition at line 4776 of file log_tran_table.c.
References assert, btree_get_unique_statistics(), lf_hash_find(), lf_hash_find_or_insert(), log_Gl, NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, vpid::pageid, pgbuf_is_page_fixed_by_thread(), btid::root_pageid, thread_get_tran_entry(), THREAD_TS_GLOBAL_UNIQUE_STATS, global_unique_stats::unique_stats, global_unique_stats_table::unique_stats_hash, log_global::unique_stats_table, btid::vfid, vpid::volid, and vfid::volid.
Referenced by logtb_get_global_unique_stats(), logtb_rv_update_global_unique_stats_by_abs(), and logtb_update_global_unique_stats_by_delta().
MVCC_SNAPSHOT* logtb_get_mvcc_snapshot | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3947 of file log_tran_table.c.
References assert, mvcctable::build_mvcc_info(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, log_global::mvcc_table, log_tdes::mvccinfo, NULL, mvcc_info::snapshot, and mvcc_snapshot::valid.
Referenced by btree_get_stats_with_fullscan(), btree_key_lock_and_append_object_unique(), btree_keyoid_checkscan_check(), catalog_check_consistency(), catalog_dump(), css_make_access_status_exist_user(), heap_class_get_partition_info(), heap_is_object_not_null(), locator_all_reference_lockset(), locator_check_all_entries_of_all_btrees(), locator_check_btree_entries(), locator_check_by_class_oid(), locator_check_class_names(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_check_unique_btree_entries(), locator_force_for_multi_update(), locator_lock_and_get_object_internal(), locator_update_force(), process_class(), process_value(), qexec_evaluate_aggregates_optimize(), qexec_execute_delete(), qexec_execute_obj_fetch(), qexec_execute_query(), qexec_execute_selupd_list(), qexec_execute_update(), qexec_upddel_setup_current_class(), scan_start_scan(), test_mvcc_get_snapshot(), xbtree_find_unique(), xbtree_load_online_index(), xheap_has_instance(), xlocator_check_fk_validity(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockset(), xlocator_remove_class_from_index(), xlogtb_get_mvcc_snapshot(), and xstats_update_all_statistics().
void logtb_get_new_subtransaction_mvccid | ( | THREAD_ENTRY * | thread_p, |
MVCC_INFO * | curr_mvcc_info | ||
) |
Definition at line 4523 of file log_tran_table.c.
References assert, mvcctable::get_new_mvccid(), mvcctable::get_two_new_mvccid(), mvcc_info::id, log_Gl, logtb_assign_subtransaction_mvccid(), log_global::mvcc_table, MVCCID_IS_VALID, and NULL.
Referenced by qexec_execute_selupd_list().
int logtb_get_new_tran_id | ( | THREAD_ENTRY * | thread_p, |
LOG_TDES * | tdes | ||
) |
Definition at line 1723 of file log_tran_table.c.
References assert, DB_INT32_MAX, log_global::hdr, log_Gl, LOG_SYSTEM_TRANID, logtb_clear_tdes(), log_header::next_trid, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_tdes::trid, and VOLATILE_ACCESS.
Referenced by log_complete(), log_complete_for_2pc(), and logtb_allocate_tran_index().
int logtb_get_number_assigned_tran_indices | ( | void | ) |
Definition at line 633 of file log_tran_table.c.
References NUM_ASSIGNED_TRAN_INDICES.
Referenced by lock_victimize_first_thread_mapfunc().
int logtb_get_number_of_total_tran_indices | ( | void | ) |
Definition at line 692 of file log_tran_table.c.
References log_Gl, trantable::num_total_indices, and log_global::trantable.
Referenced by mvcctable::alloc_transaction_lowest_active(), mvcctable::build_mvcc_info(), file_tempcache_final(), file_tempcache_init(), heap_chnguess_initialize(), heap_chnguess_realloc(), heap_chnguess_remove_entry(), mvcc_active_tran::long_tran_max_size(), and qmgr_initialize().
LOG_TDES* logtb_get_system_tdes | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 6039 of file log_tran_table.c.
References trantable::all_tdes, assert, log_tdes::block_global_oldest_active_until_commit, log_tdes::head_lsa, mvcctable::is_global_oldest_visible_locked(), log_topops_stack::last, mvcctable::lock_global_oldest_visible(), log_Gl, LOG_ISRESTARTED, LOG_SYSTEM_TRAN_INDEX, LOG_SYSTEM_TRANID, LSA_SET_NULL(), log_global::mvcc_table, NO_ERROR, NULL, NULL_ATTRID, trantable::num_total_indices, log_tdes::rcv, rmutex_lock, log_tdes::rmutex_topop, rmutex_unlock, log_rcv_tdes::sysop_start_postpone_lsa, log_tdes::tail_lsa, log_tdes::tail_topresult_lsa, thread_get_thread_entry_info(), log_tdes::topops, log_rcv_tdes::tran_start_postpone_lsa, log_global::trantable, log_tdes::trid, log_tdes::undo_nxlsa, and mvcctable::unlock_global_oldest_visible().
Referenced by LOG_FIND_TDES(), and vacuum_worker_allocate_resources().
|
static |
Definition at line 4602 of file log_tran_table.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), global_unique_stats::mutex, NULL, and pthread_mutex_init.
Referenced by logtb_initialize_global_unique_stats_table().
|
static |
Definition at line 4624 of file log_tran_table.c.
References ER_FAILED, mutex, NO_ERROR, NULL, and pthread_mutex_destroy.
Referenced by logtb_initialize_global_unique_stats_table().
|
static |
Definition at line 4644 of file log_tran_table.c.
References global_unique_stats::btid, BTID_SET_NULL, ER_FAILED, global_unique_stats::last_log_lsa, LSA_SET_NULL(), NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, and global_unique_stats::unique_stats.
Referenced by logtb_initialize_global_unique_stats_table().
|
static |
Definition at line 4670 of file log_tran_table.c.
References BTID_COPY, ER_FAILED, NO_ERROR, and NULL.
Referenced by logtb_initialize_global_unique_stats_table().
bool logtb_has_deadlock_priority | ( | int | tran_index | ) |
Definition at line 4498 of file log_tran_table.c.
References log_tdes::has_deadlock_priority, and LOG_FIND_TDES().
Referenced by lock_demote_class_lock().
bool logtb_has_updated | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3109 of file log_tran_table.c.
References LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LSA_ISNULL(), NULL, and log_tdes::tail_lsa.
Referenced by net_server_request(), slog_checkpoint(), sqmgr_execute_query(), stran_server_abort(), stran_server_abort_internal(), stran_server_commit_internal(), and xtran_server_has_updated().
|
static |
Definition at line 662 of file log_tran_table.c.
References log_Gl, trantable::num_assigned_indices, and log_global::trantable.
Referenced by logtb_allocate_tran_index().
int logtb_initialize_global_unique_stats_table | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4691 of file log_tran_table.c.
References btree_compare_btids(), btree_hash_btid(), global_unique_stats_table::curr_rcv_rec_lsa, lf_entry_descriptor::f_alloc, lf_entry_descriptor::f_duplicate, lf_entry_descriptor::f_free, lf_entry_descriptor::f_hash, lf_entry_descriptor::f_init, lf_entry_descriptor::f_key_cmp, lf_entry_descriptor::f_key_copy, lf_entry_descriptor::f_uninit, GLOBAL_UNIQUE_STATS_HASH_SIZE, global_unique_stats_Ts, global_unique_stats_table::initialized, LF_EM_USING_MUTEX, lf_freelist_init(), lf_hash_destroy(), lf_hash_init(), log_Gl, logtb_global_unique_stat_alloc(), logtb_global_unique_stat_free(), logtb_global_unique_stat_init(), logtb_global_unique_stat_key_copy(), LSA_SET_NULL(), mutex, NO_ERROR, NULL, lf_entry_descriptor::of_del_tran_id, lf_entry_descriptor::of_key, lf_entry_descriptor::of_local_next, lf_entry_descriptor::of_mutex, lf_entry_descriptor::of_next, global_unique_stats_table::unique_stats_descriptor, global_unique_stats_table::unique_stats_freelist, global_unique_stats_table::unique_stats_hash, log_global::unique_stats_table, and lf_entry_descriptor::using_mutex.
Referenced by boot_create_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
|
static |
Definition at line 532 of file log_tran_table.c.
References ARG_FILE_LINE, log_tdes::block_global_oldest_active_until_commit, log_tdes::client, log_tdes::client_id, ER_FATAL_ERROR_SEVERITY, ER_LOG_UNKNOWN_TRANINDEX, er_set(), log_tdes::isloose_end, log_tdes::isolation, LOG_FIND_TDES(), LOG_SYSTEM_TRAN_INDEX, LOG_SYSTEM_TRANID, logpb_fatal_error(), logtb_clear_tdes(), log_tdes::mvccinfo, NO_ERROR, NULL, log_tdes::query_timeout, mvcc_info::reset(), clientids::set_system_internal(), log_tdes::tran_abort_reason, TRAN_DEFAULT_ISOLATION_LEVEL, log_tdes::tran_index, TRAN_LOCK_INFINITE_WAIT, TRAN_NORMAL, log_tdes::trid, and log_tdes::wait_msecs.
Referenced by logtb_define_trantable_log_latch().
void logtb_initialize_tdes | ( | LOG_TDES * | tdes, |
int | tran_index | ||
) |
Definition at line 1600 of file log_tran_table.c.
References log_rcv_tdes::analysis_last_aborted_sysop_lsa, log_rcv_tdes::analysis_last_aborted_sysop_start_lsa, log_tdes::append_repl_recidx, assert, log_rcv_tdes::atomic_sysop_start_lsa, log_tdes::bind_history, log_tdes::block_global_oldest_active_until_commit, log_tran_update_stats::classes_cos_hash, log_tdes::client_id, multi_index_unique_stats::construct(), log_tdes::coord, log_tran_update_stats::cos_count, log_tran_update_stats::cos_current_chunk, log_tran_update_stats::cos_first_chunk, log_tdes::cur_repl_record, db_Disable_modifications, log_tdes::disable_modifications, log_tdes::first_save_entry, log_tdes::fl_mark_repl_recidx, log_tdes::gtrid, log_tdes::gtrinfo, log_tdes::has_deadlock_priority, log_tdes::head_lsa, i, log_2pc_gtrinfo::info_data, log_2pc_gtrinfo::info_length, lob_rb_root::init(), mvcc_info::init(), log_tdes::interrupt, log_tdes::is_user_active, log_tdes::isloose_end, log_tdes::isolation, log_topops_stack::last, log_tdes::lob_locator_root, LOG_2PC_NULL_GTRID, log_tdes::log_upd_stats, logtb_tran_btid_hash_cmp_func(), logtb_tran_btid_hash_func(), LSA_SET_NULL(), log_tdes::m_multiupd_stats, log_topops_stack::max, MAX_NUM_EXEC_QUERY_HISTORY, log_tdes::max_unique_btrees, mht_create(), log_tdes::mvccinfo, NO_ERROR, NULL, NULL_TRANID, log_tdes::num_exec_queries, log_tdes::num_log_records_written, log_tdes::num_repl_records, log_tdes::num_transient_classnames, log_tdes::num_unique_btrees, oid_compare_equals(), oid_hash(), log_tdes::posp_nxlsa, log_tdes::query_start_time, log_tdes::query_timeout, log_tdes::rcv, log_tdes::repl_insert_lsa, log_tdes::repl_records, log_tdes::repl_update_lsa, rmutex_initialize, RMUTEX_NAME_TDES_TOPOP, log_tdes::rmutex_topop, log_tdes::savept_lsa, db_value_array::size, log_topops_stack::stack, log_tran_update_stats::stats_count, log_tran_update_stats::stats_current_chunk, log_tran_update_stats::stats_first_chunk, log_tdes::suppress_replication, log_rcv_tdes::sysop_start_postpone_lsa, log_tdes::tail_lsa, log_tdes::tail_topresult_lsa, log_tdes::topop_lsa, log_tdes::topops, log_tdes::tran_abort_reason, log_tdes::tran_index, TRAN_LOCK_INFINITE_WAIT, TRAN_NORMAL, TRAN_SERIALIZABLE, log_rcv_tdes::tran_start_postpone_lsa, log_tdes::tran_start_time, log_tdes::trid, log_tdes::undo_nxlsa, log_tran_update_stats::unique_stats_hash, db_value_array::vals, log_tdes::wait_msecs, log_tdes::waiting_for_res, log_tdes::xasl_id, and XASL_ID_SET_NULL.
Referenced by logtb_allocate_tdes_area(), and systdes_create_tdes().
|
static |
Definition at line 512 of file log_tran_table.c.
References trantable::all_tdes, trantable::area, trantable::hint_free_index, NULL, trantable::num_assigned_indices, trantable::num_coord_loose_end_indices, trantable::num_interrupts, trantable::num_prepared_loose_end_indices, and trantable::num_total_indices.
Referenced by logtb_define_trantable_log_latch(), and logtb_undefine_trantable().
int logtb_invalidate_snapshot_data | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3801 of file log_tran_table.c.
References log_tdes::isolation, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, logtb_tran_reset_count_optim_state(), log_tdes::mvccinfo, NO_ERROR, NULL, mvcc_info::snapshot, TRAN_REPEATABLE_READ, and mvcc_snapshot::valid.
Referenced by net_server_request(), and xbtree_load_online_index().
bool logtb_is_active | ( | THREAD_ENTRY * | thread_p, |
TRANID | trid | ||
) |
Definition at line 2982 of file log_tran_table.c.
References trantable::all_tdes, i, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, LOG_ISRESTARTED, LOG_ISTRAN_ACTIVE, NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by lock_demote_class_lock(), lock_detect_local_deadlock(), spage_has_enough_total_space(), and spage_save_space().
bool logtb_is_current_active | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3028 of file log_tran_table.c.
References assert, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LOG_ISTRAN_ACTIVE, and NULL.
Referenced by btree_reflect_global_unique_statistics(), css_stop_log_writer(), css_stop_non_log_writer(), pgbuf_block_bcb(), pgbuf_set_lsa(), spage_find_empty_slot_at(), and xtran_server_is_active_and_has_updated().
bool logtb_is_current_mvccid | ( | THREAD_ENTRY * | thread_p, |
MVCCID | mvccid | ||
) |
Definition at line 3913 of file log_tran_table.c.
References assert, i, mvcc_info::id, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::mvccinfo, NULL, and mvcc_info::sub_ids.
Referenced by mvcc_is_active_id().
bool logtb_is_interrupted | ( | THREAD_ENTRY * | thread_p, |
bool | clear, | ||
bool * | continue_checking | ||
) |
Definition at line 2868 of file log_tran_table.c.
References trantable::area, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, logtb_is_interrupted_tdes(), NULL, and log_global::trantable.
Referenced by disk_extend(), logpb_backup(), logwr_log_ha_filestat_to_string(), online_index_builder(), pgbuf_copy_to_area(), pgbuf_fix_debug(), pgbuf_is_log_check_for_interrupts(), vacuum_process_log_block(), xs_receive_data_from_client_with_timeout(), xs_send_action_to_client(), and xvacuum().
|
static |
Definition at line 2778 of file log_tran_table.c.
References ARG_FILE_LINE, assert, BO_IS_SERVER_RESTARTED, er_log_debug, log_tdes::interrupt, log_get_clock_msec(), log_Gl, LOG_ISTRAN_ACTIVE, NULL, trantable::num_interrupts, log_tdes::query_timeout, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and VACUUM_IS_THREAD_VACUUM.
Referenced by logtb_is_interrupted(), and logtb_is_interrupted_tran().
bool logtb_is_interrupted_tran | ( | THREAD_ENTRY * | thread_p, |
bool | clear, | ||
bool * | continue_checking, | ||
int | tran_index | ||
) |
Definition at line 2906 of file log_tran_table.c.
References trantable::area, LOG_FIND_TDES(), log_Gl, logtb_is_interrupted_tdes(), NULL, and log_global::trantable.
Referenced by lock_force_timeout_expired_wait_transactions(), net_server_conn_down(), qmgr_free_list_temp_file(), qmgr_get_old_page(), and xtran_wait_server_active_trans().
int logtb_is_tran_modification_disabled | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 1018 of file log_tran_table.c.
References db_Disable_modifications, log_tdes::disable_modifications, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, and NULL.
bool logtb_istran_finished | ( | THREAD_ENTRY * | thread_p, |
TRANID | trid | ||
) |
Definition at line 3069 of file log_tran_table.c.
References trantable::all_tdes, i, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_Gl, NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
|
static |
Definition at line 3774 of file log_tran_table.c.
References log_tran_update_stats::classes_cos_hash, ER_FAILED, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, logtb_tran_load_global_stats_func(), mht_map_no_key(), NO_ERROR, and NULL.
Referenced by mvcctable::build_mvcc_info().
void* logtb_realloc_topops_stack | ( | LOG_TDES * | tdes, |
int | num_elms | ||
) |
Definition at line 157 of file log_tran_table.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), log_topops_stack::last, LOG_TOPOPS_STACK_INCREMENT, log_topops_stack::max, NULL, log_topops_stack::stack, and log_tdes::topops.
Referenced by log_rv_analysis_end_checkpoint(), log_rv_analysis_sysop_end(), log_rv_analysis_sysop_start_postpone(), and log_sysop_start().
int logtb_reflect_global_unique_stats_to_btree | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 5058 of file log_tran_table.c.
References ASSERT_ERROR, btree_reflect_global_unique_statistics(), error(), global_unique_stats_table::initialized, global_unique_stats::last_log_lsa, lf_hash_create_iterator(), lf_hash_iterate(), lf_tran_end_with_mb, log_Gl, logtb_set_check_interrupt(), LSA_ISNULL(), LSA_SET_NULL(), global_unique_stats::mutex, NO_ERROR, NULL, pthread_mutex_unlock, thread_get_tran_entry(), THREAD_TS_GLOBAL_UNIQUE_STATS, global_unique_stats_table::unique_stats_hash, and log_global::unique_stats_table.
Referenced by logpb_checkpoint(), and xboot_shutdown_server().
void logtb_release_tran_index | ( | THREAD_ENTRY * | thread_p, |
int | tran_index | ||
) |
Definition at line 1135 of file log_tran_table.c.
References log_tdes::client, free_and_init, heap_chnguess_clear(), log_tdes::is_user_active, log_tdes::isloose_end, log_topops_stack::last, LOG_FIND_TDES(), log_Gl, LOG_ISTRAN_2PC_INFORMING_PARTICIPANTS, LOG_ISTRAN_2PC_PREPARE, LOG_SYSTEM_TRAN_INDEX, logtb_free_tran_index(), log_topops_stack::max, log_tdes::mvccinfo, NULL, trantable::num_coord_loose_end_indices, trantable::num_prepared_loose_end_indices, qmgr_clear_trans_wakeup(), clientids::reset(), mvcc_info::reset(), log_topops_stack::stack, log_tdes::topops, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, and log_global::trantable.
Referenced by boot_create_all_volumes(), xboot_initialize_server(), xboot_register_client(), and xboot_unregister_client().
void logtb_rv_assign_mvccid_for_undo_recovery | ( | THREAD_ENTRY * | thread_p, |
MVCCID | mvccid | ||
) |
Definition at line 1111 of file log_tran_table.c.
References assert, mvcc_info::id, LOG_FIND_CURRENT_TDES(), MVCCID_IS_VALID, log_tdes::mvccinfo, and NULL.
Referenced by log_rv_undo_record().
LOG_TDES* logtb_rv_find_allocate_tran_index | ( | THREAD_ENTRY * | thread_p, |
TRANID | trid, | ||
const LOG_LSA * | log_lsa | ||
) |
Definition at line 1052 of file log_tran_table.c.
References ARG_FILE_LINE, assert, log_tdes::head_lsa, LOG_FIND_TDES(), logpb_fatal_error(), logtb_allocate_tran_index(), logtb_find_tran_index(), logtb_is_system_worker_tranid(), LSA_COPY(), NULL, NULL_TRAN_INDEX, NULL_TRANID, log_system_tdes::rv_get_or_alloc_tdes(), TRAN_LOCK_INFINITE_WAIT, TRAN_SERIALIZABLE, and TRAN_UNACTIVE_UNILATERALLY_ABORTED.
Referenced by log_rv_analysis_2pc_abort_decision(), log_rv_analysis_2pc_abort_inform_particps(), log_rv_analysis_2pc_commit_decision(), log_rv_analysis_2pc_commit_inform_particps(), log_rv_analysis_2pc_prepare(), log_rv_analysis_2pc_recv_ack(), log_rv_analysis_2pc_start(), log_rv_analysis_atomic_sysop_start(), log_rv_analysis_commit_with_postpone(), log_rv_analysis_compensate(), log_rv_analysis_dummy_head_postpone(), log_rv_analysis_end_checkpoint(), log_rv_analysis_postpone(), log_rv_analysis_run_postpone(), log_rv_analysis_save_point(), log_rv_analysis_sysop_end(), log_rv_analysis_sysop_start_postpone(), log_rv_analysis_undo_redo(), and log_rv_analysis_will_commit().
int logtb_rv_update_global_unique_stats_by_abs | ( | THREAD_ENTRY * | thread_p, |
BTID * | btid, | ||
int | num_oids, | ||
int | num_nulls, | ||
int | num_keys | ||
) |
Definition at line 4875 of file log_tran_table.c.
References _er_log_debug(), ARG_FILE_LINE, global_unique_stats_table::curr_rcv_rec_lsa, ER_FAILED, vfid::fileid, global_unique_stats::last_log_lsa, log_Gl, logtb_get_global_unique_stats_entry(), LSA_COPY(), LSA_ISNULL(), global_unique_stats::mutex, NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, log_lsa::offset, log_lsa::pageid, prm_get_bool_value(), PRM_ID_LOG_UNIQUE_STATS, pthread_mutex_unlock, btid::root_pageid, global_unique_stats::unique_stats, log_global::unique_stats_table, btid::vfid, and vfid::volid.
Referenced by btree_rv_redo_global_unique_stats_commit().
bool logtb_set_check_interrupt | ( | THREAD_ENTRY * | thread_p, |
bool | flag | ||
) |
Definition at line 5988 of file log_tran_table.c.
References assert, BO_IS_SERVER_RESTARTED, NULL, thread_get_thread_entry_info(), tran_set_check_interrupt(), and VACUUM_IS_THREAD_VACUUM.
Referenced by btree_delete_internal(), btree_verify_node(), disk_extend(), disk_is_page_sector_reserved_with_debug_crash(), disk_reserve_sectors(), dwb_wait_for_block_completion(), dwb_wait_for_strucure_modification(), file_create(), file_destroy(), file_temp_alloc(), file_temp_reset_user_pages(), heap_does_exist(), heap_is_object_not_null(), logtb_reflect_global_unique_stats_to_btree(), logtb_tran_update_all_global_unique_stats(), px_sort_myself(), qexec_destroy_upddel_ehash_files(), xbtree_load_online_index(), and xvacuum().
void logtb_set_current_tran_index | ( | THREAD_ENTRY * | thread_p, |
int | tran_index | ||
) |
Definition at line 5973 of file log_tran_table.c.
References NULL, and thread_get_thread_entry_info().
void logtb_set_current_user_active | ( | THREAD_ENTRY * | thread_p, |
bool | is_user_active | ||
) |
Definition at line 2069 of file log_tran_table.c.
References log_tdes::is_user_active, LOG_FIND_TDES(), and LOG_FIND_THREAD_TRAN_INDEX.
Referenced by session_check_session(), session_state_create(), and session_state_destroy().
void logtb_set_current_user_name | ( | THREAD_ENTRY * | thread_p, |
const char * | user_name | ||
) |
Definition at line 2056 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_set_user_name().
Referenced by ssession_find_or_create_session().
|
static |
Definition at line 4085 of file log_tran_table.c.
References log_tdes::client, clientids::get_db_user(), log_tdes::gtrid, log_tdes::isloose_end, log_Gl, LOG_ISTRAN_2PC_IN_SECOND_PHASE, LOG_ISTRAN_2PC_PREPARE, LOG_ISTRAN_COMMITTED, trantable::num_coord_loose_end_indices, trantable::num_prepared_loose_end_indices, prm_get_bool_value(), PRM_ID_LOG_TRACE_DEBUG, log_tdes::state, log_tdes::tran_index, TRAN_UNACTIVE_2PC_COLLECTING_PARTICIPANT_VOTES, log_global::trantable, and log_tdes::trid.
Referenced by logtb_set_num_loose_end_trans().
int logtb_set_num_loose_end_trans | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4131 of file log_tran_table.c.
References trantable::all_tdes, i, log_Gl, LOG_SYSTEM_TRAN_INDEX, logtb_set_loose_end_tdes(), NULL, NULL_TRANID, trantable::num_coord_loose_end_indices, trantable::num_prepared_loose_end_indices, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by log_recovery().
|
static |
Definition at line 648 of file log_tran_table.c.
References log_Gl, trantable::num_assigned_indices, and log_global::trantable.
Referenced by logtb_define_trantable_log_latch().
|
static |
Definition at line 706 of file log_tran_table.c.
References log_Gl, NUM_ASSIGNED_TRAN_INDICES, trantable::num_total_indices, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, and log_global::trantable.
Referenced by logtb_expand_trantable().
bool logtb_set_suppress_repl_on_transaction | ( | THREAD_ENTRY * | thread_p, |
int | tran_index, | ||
int | set | ||
) |
Definition at line 2944 of file log_tran_table.c.
References trantable::area, LOG_FIND_TDES(), log_Gl, NULL, NULL_TRANID, log_tdes::suppress_replication, log_global::trantable, and log_tdes::trid.
Referenced by xlogtb_set_suppress_repl_on_transaction().
|
static |
Definition at line 838 of file log_tran_table.c.
References tx_transient_class_registry::clear(), log_tdes::client, css_conn_entry::client_id, log_tdes::client_id, log_tdes::first_save_entry, lob_rb_root::init(), log_tdes::interrupt, log_tdes::is_user_active, log_tdes::isloose_end, log_tdes::isolation, log_topops_stack::last, log_tdes::lob_locator_root, log_Client_credential, log_tdes::m_log_postpone_cache, log_tdes::m_modified_classes, log_topops_stack::max, NULL, log_tdes::num_transient_classnames, log_postpone_cache::reset(), clientids::set_ids(), log_topops_stack::stack, thread_get_thread_entry_info(), log_tdes::topops, and log_tdes::wait_msecs.
Referenced by logtb_allocate_tran_index().
void logtb_set_to_system_tran_index | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3159 of file log_tran_table.c.
References LOG_SET_CURRENT_TRAN_INDEX, and LOG_SYSTEM_TRAN_INDEX.
Referenced by boot_restart_server(), and xboot_shutdown_server().
bool logtb_set_tran_index_interrupt | ( | THREAD_ENTRY * | thread_p, |
int | tran_index, | ||
bool | set | ||
) |
Definition at line 2706 of file log_tran_table.c.
References trantable::area, ARG_FILE_LINE, assert, ER_INTERRUPTING, ER_NOTIFICATION_SEVERITY, er_set(), log_tdes::interrupt, LOG_FIND_TDES(), log_Gl, LOG_SYSTEM_TRAN_INDEX, NULL, NULL_TRANID, trantable::num_interrupts, perfmon_inc_stat(), pgbuf_force_to_check_for_interrupts(), PSTAT_TRAN_NUM_INTERRUPTS, TR_TABLE_CS_ENTER, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by css_block_all_active_conn(), css_stop_non_log_writer(), cubload::session::interrupt(), logtb_slam_transaction(), net_server_conn_down(), xbtree_load_online_index(), xlogtb_kill_or_interrupt_tran(), xlogtb_set_interrupt(), and xtran_wait_server_active_trans().
void logtb_set_user_name | ( | int | tran_index, |
const char * | user_name | ||
) |
Definition at line 2036 of file log_tran_table.c.
References log_tdes::client, LOG_FIND_TDES(), NULL, NULL_TRANID, clientids::set_user(), log_tdes::trid, and clientids::UNKNOWN_ID.
Referenced by logtb_set_current_user_name().
void logtb_slam_transaction | ( | THREAD_ENTRY * | thread_p, |
int | tran_index | ||
) |
Definition at line 5660 of file log_tran_table.c.
References ARG_FILE_LINE, css_shutdown_conn_by_tran_index(), ER_CSS_CONN_SHUTDOWN, ER_ERROR_SEVERITY, er_set(), and logtb_set_tran_index_interrupt().
Referenced by css_change_ha_server_state(), and xlogtb_kill_tran_index().
Definition at line 3265 of file log_tran_table.c.
References BTID_IS_EQUAL.
Referenced by logtb_initialize_tdes().
|
static |
Definition at line 3253 of file log_tran_table.c.
Referenced by logtb_initialize_tdes().
|
static |
Definition at line 3227 of file log_tran_table.c.
References log_tran_update_stats::classes_cos_hash, log_tran_update_stats::cos_count, log_tran_update_stats::cos_current_chunk, log_tran_update_stats::cos_first_chunk, mht_clear(), NULL, log_tran_update_stats::stats_count, log_tran_update_stats::stats_current_chunk, log_tran_update_stats::stats_first_chunk, and log_tran_update_stats::unique_stats_hash.
Referenced by logtb_clear_tdes(), logtb_complete_mvcc(), and logtb_tran_free_update_stats().
|
static |
Definition at line 3281 of file log_tran_table.c.
References ARG_FILE_LINE, assert, log_tran_btid_unique_stats::btid, BTID_COPY, log_tran_btid_unique_stats_chunk::buffer, log_tran_btid_unique_stats::deleted, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), log_tran_btid_unique_stats::global_stats, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, mht_put(), log_tran_btid_unique_stats_chunk::next_chunk, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, log_tran_update_stats::stats_count, log_tran_update_stats::stats_current_chunk, log_tran_update_stats::stats_first_chunk, log_tran_btid_unique_stats::tran_stats, TRAN_UNIQUE_STATS_CHUNK_SIZE, and log_tran_update_stats::unique_stats_hash.
Referenced by logtb_tran_find_btid_stats().
|
static |
Definition at line 3363 of file log_tran_table.c.
References ARG_FILE_LINE, log_tran_class_cos_chunk::buffer, log_tran_class_cos::class_oid, log_tran_update_stats::classes_cos_hash, COPY_OID, COS_CLASSES_CHUNK_SIZE, log_tran_update_stats::cos_count, log_tran_update_stats::cos_current_chunk, log_tran_update_stats::cos_first_chunk, COS_NOT_LOADED, log_tran_class_cos::count_state, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, mht_put(), log_tran_class_cos_chunk::next_chunk, and NULL.
Referenced by logtb_tran_find_class_cos().
LOG_TRAN_BTID_UNIQUE_STATS* logtb_tran_find_btid_stats | ( | THREAD_ENTRY * | thread_p, |
const BTID * | btid, | ||
bool | create | ||
) |
Definition at line 3458 of file log_tran_table.c.
References LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, logtb_tran_create_btid_unique_stats(), mht_get(), NULL, and log_tran_update_stats::unique_stats_hash.
Referenced by btree_get_unique_statistics_for_count(), btree_online_index_check_unique_constraint(), btree_rv_remove_unique_stats(), index_builder_loader_task::execute(), logtb_complete_mvcc(), logtb_create_unique_stats_from_repr(), logtb_tran_update_btid_unique_stats(), and qexec_evaluate_aggregates_optimize().
LOG_TRAN_CLASS_COS* logtb_tran_find_class_cos | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
bool | create | ||
) |
Definition at line 3427 of file log_tran_table.c.
References assert, log_tran_update_stats::classes_cos_hash, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, logtb_tran_create_class_cos(), mht_get(), and NULL.
Referenced by logtb_tran_load_global_stats_func(), logtb_tran_prepare_count_optim_classes(), and qexec_evaluate_aggregates_optimize().
|
static |
Definition at line 3171 of file log_tran_table.c.
References log_tran_update_stats::classes_cos_hash, log_tran_update_stats::cos_count, log_tran_update_stats::cos_current_chunk, log_tran_update_stats::cos_first_chunk, logtb_tran_clear_update_stats(), mht_destroy(), log_tran_btid_unique_stats_chunk::next_chunk, log_tran_class_cos_chunk::next_chunk, NULL, log_tran_update_stats::stats_count, log_tran_update_stats::stats_current_chunk, log_tran_update_stats::stats_first_chunk, and log_tran_update_stats::unique_stats_hash.
Referenced by logtb_finalize_tdes().
|
static |
Definition at line 3679 of file log_tran_table.c.
References or_partition::class_oid, log_tran_class_cos::class_oid, cleanup(), COS_LOADED, COS_TO_LOAD, pruning_context::count, log_tran_class_cos::count_state, DB_PARTITIONED_CLASS, ER_FAILED, or_classrep::has_partition_info, heap_classrepr_free_and_init, heap_classrepr_get(), logtb_create_unique_stats_from_repr(), logtb_tran_find_class_cos(), NO_ERROR, NULL, NULL_REPRID, OID_ISNULL, partition_clear_pruning_context(), partition_init_pruning_context(), partition_load_pruning_context(), and pruning_context::partitions.
Referenced by logtb_load_global_statistics_to_tran().
int logtb_tran_prepare_count_optim_classes | ( | THREAD_ENTRY * | thread_p, |
const char ** | classes, | ||
LC_PREFETCH_FLAGS * | flags, | ||
int | n_classes | ||
) |
Definition at line 4267 of file log_tran_table.c.
References COS_LOADED, COS_TO_LOAD, log_tran_class_cos::count_state, ER_FAILED, LC_CLASSNAME_ERROR, LC_CLASSNAME_EXIST, LC_PREF_FLAG_COUNT_OPTIM, logtb_tran_find_class_cos(), NO_ERROR, NULL, NULL_LOCK, OID_ISNULL, and xlocator_find_class_oid().
Referenced by xlocator_find_lockhint_class_oids().
|
static |
Definition at line 4332 of file log_tran_table.c.
References COS_NOT_LOADED, and NO_ERROR.
Referenced by logtb_tran_reset_count_optim_state().
void logtb_tran_reset_count_optim_state | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4348 of file log_tran_table.c.
References log_tran_update_stats::classes_cos_hash, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, logtb_tran_reset_cos_func(), mht_map_no_key(), and NULL.
Referenced by logtb_complete_mvcc(), and logtb_invalidate_snapshot_data().
int logtb_tran_update_all_global_unique_stats | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3640 of file log_tran_table.c.
References ER_FAILED, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::log_upd_stats, logtb_set_check_interrupt(), logtb_tran_update_delta_hash_func(), mht_map_no_key(), NO_ERROR, NULL, and log_tran_update_stats::unique_stats_hash.
Referenced by mvcctable::complete_mvcc(), and logtb_complete_mvcc().
int logtb_tran_update_btid_unique_stats | ( | THREAD_ENTRY * | thread_p, |
const BTID * | btid, | ||
int | n_keys, | ||
int | n_oids, | ||
int | n_nulls | ||
) |
Definition at line 3494 of file log_tran_table.c.
References ER_FAILED, logtb_tran_find_btid_stats(), NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, and log_tran_btid_unique_stats::tran_stats.
Referenced by logtb_tran_update_unique_stats(), and online_index_builder().
|
static |
Definition at line 3609 of file log_tran_table.c.
References log_tran_btid_unique_stats::btid, log_tran_btid_unique_stats::deleted, logtb_update_global_unique_stats_by_delta(), NO_ERROR, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, and log_tran_btid_unique_stats::tran_stats.
Referenced by logtb_tran_update_all_global_unique_stats().
int logtb_tran_update_unique_stats | ( | THREAD_ENTRY * | thread_p, |
const BTID * | btid, | ||
int | n_keys, | ||
int | n_oids, | ||
int | n_nulls, | ||
bool | write_to_log | ||
) |
Definition at line 3527 of file log_tran_table.c.
References recdes::area_size, btree_rv_mvcc_save_increments(), recdes::data, error(), recdes::length, log_append_undo_data2(), logtb_tran_update_btid_unique_stats(), MAX_ALIGNMENT, NO_ERROR, NULL, NULL_OFFSET, OR_BTID_ALIGNED_SIZE, OR_INT_SIZE, PTR_ALIGN, and RVBT_MVCC_INCREMENTS_UPD.
Referenced by btree_fix_root_for_delete(), btree_fix_root_for_insert(), btree_key_online_index_IB_insert(), btree_key_online_index_tran_delete(), btree_key_online_index_tran_insert(), btree_key_online_index_tran_insert_DF(), btree_online_index_list_dispatcher(), btree_rv_update_tran_stats(), locator_force_for_multi_update(), logtb_tran_update_unique_stats(), qexec_execute_insert(), qexec_process_partition_unique_stats(), qexec_process_unique_stats(), cubload::server_object_loader::stop_scancache(), and xlocator_remove_class_from_index().
int logtb_tran_update_unique_stats | ( | THREAD_ENTRY * | thread_p, |
const BTID & | btid, | ||
const btree_unique_stats & | ustats, | ||
bool | write_to_log | ||
) |
Definition at line 3568 of file log_tran_table.c.
References btree_unique_stats::get_key_count(), btree_unique_stats::get_null_count(), btree_unique_stats::get_row_count(), btree_unique_stats::is_zero(), logtb_tran_update_unique_stats(), and NO_ERROR.
int logtb_tran_update_unique_stats | ( | THREAD_ENTRY * | thread_p, |
const multi_index_unique_stats & | multi_stats, | ||
bool | write_to_log | ||
) |
Definition at line 3580 of file log_tran_table.c.
References ASSERT_ERROR, error(), multi_index_unique_stats::get_map(), logtb_tran_update_unique_stats(), and NO_ERROR.
void logtb_undefine_trantable | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 568 of file log_tran_table.c.
References trantable::all_tdes, trantable::area, assert, file_manager_final(), mvcctable::finalize(), free_and_init, i, lock_finalize(), log_Gl, logtb_finalize_tdes(), logtb_initialize_trantable(), log_global::mvcc_table, log_addr_tdesarea::next, NULL, NUM_TOTAL_TRAN_INDICES, pgbuf_finalize(), log_addr_tdesarea::tdesarea, log_tdes::tran_index, and log_global::trantable.
Referenced by log_final(), log_initialize_internal(), log_rv_outside_noop_redo(), logpb_delete(), and logtb_define_trantable_log_latch().
int logtb_update_global_unique_stats_by_delta | ( | THREAD_ENTRY * | thread_p, |
BTID * | btid, | ||
int | oid_delta, | ||
int | null_delta, | ||
int | key_delta, | ||
bool | log | ||
) |
Definition at line 4925 of file log_tran_table.c.
References _er_log_debug(), recdes::area_size, ARG_FILE_LINE, BTREE_MAX_ALIGN, CAST_BUFLEN, global_unique_stats_table::curr_rcv_rec_lsa, recdes::data, ER_FAILED, vfid::fileid, HEADER, global_unique_stats::last_log_lsa, recdes::length, log_append_undoredo_data2(), LOG_FIND_CURRENT_TDES(), log_Gl, logtb_get_global_unique_stats_entry(), LSA_COPY(), LSA_ISNULL(), global_unique_stats::mutex, NO_ERROR, NULL, log_unique_stats::num_keys, log_unique_stats::num_nulls, log_unique_stats::num_oids, log_lsa::offset, OR_BTID_ALIGNED_SIZE, OR_INT_SIZE, OR_PUT_BTID, OR_PUT_INT, log_lsa::pageid, prm_get_bool_value(), PRM_ID_LOG_UNIQUE_STATS, pthread_mutex_unlock, PTR_ALIGN, btid::root_pageid, RVBT_LOG_GLOBAL_UNIQUE_STATS_COMMIT, log_tdes::tail_lsa, global_unique_stats::unique_stats, log_global::unique_stats_table, btid::vfid, and vfid::volid.
Referenced by btree_rv_undo_global_unique_stats_commit(), logtb_complete_mvcc(), logtb_tran_update_delta_hash_func(), and logtb_tran_update_stats_online_index_rb().
const char* tran_abort_reason_to_string | ( | TRAN_ABORT_REASON | val | ) |
Definition at line 5612 of file log_tran_table.c.
References TRAN_ABORT_DUE_DEADLOCK, TRAN_ABORT_DUE_ROLLBACK_ON_ESCALATION, and TRAN_NORMAL.
Referenced by logtb_descriptors_start_scan().
bool xlogtb_does_active_user_exist | ( | THREAD_ENTRY * | thread_p, |
const char * | user_name | ||
) |
Definition at line 5111 of file log_tran_table.c.
References trantable::all_tdes, log_tdes::client, clientids::get_db_user(), i, log_tdes::is_user_active, log_Gl, NULL, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, and log_global::trantable.
Referenced by slogtb_does_active_user_exist().
void xlogtb_dump_trantable | ( | THREAD_ENTRY * | thread_p, |
FILE * | out_fp | ||
) |
Definition at line 1433 of file log_tran_table.c.
References trantable::all_tdes, i, log_Gl, logtb_dump_tdes(), NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_global::trantable, and log_tdes::trid.
Referenced by logtb_dump_trantable(), slogtb_dump_trantable(), and xlog_dump().
int xlogtb_get_mvcc_snapshot | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 3829 of file log_tran_table.c.
References ASSERT_ERROR_AND_SET, logtb_get_mvcc_snapshot(), NO_ERROR, and NULL.
Referenced by log_get_mvcc_snapshot(), and slogtb_get_mvcc_snapshot().
int xlogtb_get_pack_tran_table | ( | THREAD_ENTRY * | thread_p, |
char ** | buffer_p, | ||
int * | size_p, | ||
int | include_query_exec_info | ||
) |
Definition at line 2199 of file log_tran_table.c.
References trantable::all_tdes, ARG_FILE_LINE, assert, ASSERT_ERROR, CAST_BUFLEN, log_tdes::client, CUB_MAXHOSTNAMELEN, DB_ALIGN, clientids::db_user, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, clientids::get_db_user(), clientids::get_host_name(), clientids::get_login_name(), clientids::get_program_name(), clientids::host_name, i, INT_ALIGNMENT, L_cuserid, lock_get_lock_holder_tran_index(), log_get_clock_msec(), log_Gl, LOG_SYSTEM_TRAN_INDEX, LOG_USERNAME_MAX, clientids::login_name, NO_ERROR, NULL, NULL_TRANID, NUM_TOTAL_TRAN_INDICES, OR_FLOAT_SIZE, OR_INT_SIZE, or_pack_float(), or_pack_int(), or_pack_string(), or_pack_string_with_length(), OR_PACK_XASL_ID, or_packed_string_length(), OR_XASL_ID_SIZE, clientids::process_id, clientids::program_name, qmgr_get_sql_id(), log_tdes::query_start_time, tran_query_exec_info::query_stmt, tran_query_exec_info::query_time, xasl_id::sha1, execution_info::sql_hash_text, xasl_cache_ent::sql_info, execution_info::sql_user_text, log_tdes::state, strdup(), strlen, TR_TABLE_CS_ENTER_READ_MODE, TR_TABLE_CS_EXIT, log_tdes::tran_index, log_tdes::tran_start_time, tran_query_exec_info::tran_time, log_global::trantable, log_tdes::trid, log_tdes::waiting_for_res, XASL_CACHE_SEARCH_GENERIC, log_tdes::xasl_id, XASL_ID_COPY, XASL_ID_IS_NULL, XASL_ID_SET_NULL, xcache_find_sha1(), and xcache_unfix().
Referenced by logtb_get_pack_tran_table(), and slogtb_get_pack_tran_table().
int xlogtb_kill_or_interrupt_tran | ( | THREAD_ENTRY * | thread_p, |
int | tran_index, | ||
bool | is_dba_group_member, | ||
bool | interrupt_only | ||
) |
Definition at line 5807 of file log_tran_table.c.
References ARG_FILE_LINE, css_shutdown_conn_by_tran_index(), ER_ERROR_SEVERITY, ER_FAILED, ER_KILL_TR_NOT_ALLOWED, er_set(), error(), i, KILLSTMT_QUERY, KILLSTMT_TRAN, LOG_SYSTEM_TRAN_INDEX, logtb_check_kill_tran_auth(), logtb_find_interrupt(), LOGTB_RETRY_SLAM_MAX_TIMES, logtb_set_tran_index_interrupt(), NO_ERROR, and thread_sleep_for().
Referenced by sthread_kill_or_interrupt_tran().
int xlogtb_kill_tran_index | ( | THREAD_ENTRY * | thread_p, |
int | kill_tran_index, | ||
char * | kill_user_p, | ||
char * | kill_host_p, | ||
int | kill_pid | ||
) |
Definition at line 5717 of file log_tran_table.c.
References ARG_FILE_LINE, ER_CSS_KILL_BAD_INTERFACE, ER_CSS_KILL_DOES_NOTMATCH, ER_CSS_KILL_UNKNOWN_TRANSACTION, ER_ERROR_SEVERITY, ER_FAILED, ER_KILL_TR_NOT_ALLOWED, er_set(), i, LOG_SYSTEM_TRAN_INDEX, logtb_find_client_name_host_pid(), LOGTB_RETRY_SLAM_MAX_TIMES, logtb_slam_transaction(), NO_ERROR, NULL, NULL_TRAN_INDEX, and thread_sleep_for().
Referenced by sthread_kill_tran_index().
int xlogtb_reset_isolation | ( | THREAD_ENTRY * | thread_p, |
TRAN_ISOLATION | isolation | ||
) |
Definition at line 2611 of file log_tran_table.c.
References ARG_FILE_LINE, ER_MVCC_LOG_INVALID_ISOLATION_LEVEL, er_set(), ER_SYNTAX_ERROR_SEVERITY, IS_VALID_ISOLATION_LEVEL, log_tdes::isolation, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, NO_ERROR, and NULL.
Referenced by log_reset_isolation(), and slogtb_reset_isolation().
int xlogtb_reset_wait_msecs | ( | THREAD_ENTRY * | thread_p, |
int | wait_msecs | ||
) |
Definition at line 2498 of file log_tran_table.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_LOG_UNKNOWN_TRANINDEX, er_set(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, NULL, and log_tdes::wait_msecs.
Referenced by btree_set_error(), disk_is_page_sector_reserved_with_debug_crash(), heap_does_exist(), heap_stats_find_page_in_bestspace(), lock_object_wait_msecs(), log_reset_wait_msecs(), log_rollback(), qexec_execute_mainblock_internal(), slogtb_reset_wait_msecs(), xbtree_load_online_index(), and xlock_dump().
void xlogtb_set_interrupt | ( | THREAD_ENTRY * | thread_p, |
int | set | ||
) |
Definition at line 2687 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_set_tran_index_interrupt().
Referenced by log_set_interrupt(), qexec_execute_query(), and slogtb_set_interrupt().
void xlogtb_set_suppress_repl_on_transaction | ( | THREAD_ENTRY * | thread_p, |
int | set | ||
) |
Definition at line 2928 of file log_tran_table.c.
References LOG_FIND_THREAD_TRAN_INDEX, and logtb_set_suppress_repl_on_transaction().
Referenced by log_set_suppress_repl_on_transaction(), and slogtb_set_suppress_repl_on_transaction().
|
static |
Definition at line 97 of file log_tran_table.c.
Referenced by logtb_set_tdes().
|
static |
Definition at line 95 of file log_tran_table.c.
Referenced by logtb_allocate_tran_index().
Definition at line 94 of file log_tran_table.c.
Referenced by logtb_expand_trantable().
|
static |
Definition at line 96 of file log_tran_table.c.
Referenced by logtb_realloc_topops_stack().
|
static |
Definition at line 99 of file log_tran_table.c.
Referenced by xlogtb_kill_or_interrupt_tran(), and xlogtb_kill_tran_index().