CUBRID Engine
latest
|
#include "config.h"
#include "disk_manager.h"
#include "error_manager.h"
#include "extendible_hash.h"
#include "heap_file.h"
#include "locator.h"
#include "lock_manager.h"
#include "oid.h"
#include "partition_sr.h"
#include "query_evaluator.h"
#include "replication.h"
#include "storage_common.h"
#include "thread_compat.hpp"
Go to the source code of this file.
Namespaces | |
cubquery | |
Typedefs | |
using | MVCC_REEV_DATA = cubquery::mvcc_reev_data |
Enumerations | |
enum | { LOB_FLAG_EXCLUDE_LOB, LOB_FLAG_INCLUDE_LOB } |
Functions | |
int | locator_initialize (THREAD_ENTRY *thread_p) |
void | locator_finalize (THREAD_ENTRY *thread_p) |
int | locator_drop_transient_class_name_entries (THREAD_ENTRY *thread_p, LOG_LSA *savep_lsa) |
int | locator_savepoint_transient_class_name_entries (THREAD_ENTRY *thread_p, LOG_LSA *savep_lsa) |
DISK_ISVALID | locator_check_class_names (THREAD_ENTRY *thread_p) |
void | locator_dump_class_names (THREAD_ENTRY *thread_p, FILE *out_fp) |
int | xlc_fetch_allrefslockset (OID *oid, int chn, OID *class_oid, int class_chn, LOCK lock, int quit_on_errors, int prune_level, LC_LOCKSET **lockset, LC_COPYAREA **fetch_area) |
int | locator_start_force_scan_cache (THREAD_ENTRY *thread_p, HEAP_SCANCACHE *scan_cache, const HFID *hfid, const OID *class_oid, int op_type) |
void | locator_end_force_scan_cache (THREAD_ENTRY *thread_p, HEAP_SCANCACHE *scan_cache) |
int | locator_attribute_info_force (THREAD_ENTRY *thread_p, const HFID *hfid, OID *oid, HEAP_CACHE_ATTRINFO *attr_info, ATTR_ID *att_id, int n_att_id, LC_COPYAREA_OPERATION operation, int op_type, HEAP_SCANCACHE *scan_cache, int *force_count, bool not_check_fk, REPL_INFO_TYPE repl_info, int pruning_type, PRUNING_CONTEXT *pcontext, FUNC_PRED_UNPACK_INFO *func_preds, MVCC_REEV_DATA *mvcc_reev_data, UPDATE_INPLACE_STYLE force_update_inplace, RECDES *rec_descriptor, bool need_locking) |
LC_COPYAREA * | locator_allocate_copy_area_by_attr_info (THREAD_ENTRY *thread_p, HEAP_CACHE_ATTRINFO *attr_info, RECDES *old_recdes, RECDES *new_recdes, const int copyarea_length_hint, int lob_create_flag) |
int | locator_other_insert_delete (THREAD_ENTRY *thread_p, HFID *hfid, OID *oid, BTID *btid, bool btid_dup_key_locked, HFID *newhfid, OID *newoid, HEAP_CACHE_ATTRINFO *attr_info, HEAP_SCANCACHE *scan_cache, int *force_count, OID *prev_oid, REPR_ID *new_reprid) |
DISK_ISVALID | locator_check_class (THREAD_ENTRY *thtread_p, OID *class_oid, RECDES *peek, HFID *class_hfid, BTID *index_btid, bool repair) |
DISK_ISVALID | locator_check_by_class_oid (THREAD_ENTRY *thread_p, OID *cls_oid, HFID *hfid, BTID *index_btid, bool repair) |
DISK_ISVALID | locator_check_all_entries_of_all_btrees (THREAD_ENTRY *thread_p, bool repair) |
DISK_ISVALID | locator_check_btree_entries (THREAD_ENTRY *thread_p, BTID *btid, HFID *hfid, OID *class_oid, int n_attr_ids, ATTR_ID *attr_ids, int *atts_prefix_length, const char *btname, bool repair) |
int | locator_delete_force (THREAD_ENTRY *thread_p, HFID *hfid, OID *oid, int has_index, int op_type, HEAP_SCANCACHE *scan_cache, int *force_count, MVCC_REEV_DATA *mvcc_reev_data, bool need_locking) |
int | locator_add_or_remove_index (THREAD_ENTRY *thread_p, RECDES *recdes, OID *inst_oid, OID *class_oid, int is_insert, int op_type, HEAP_SCANCACHE *scan_cache, bool datayn, bool replyn, HFID *hfid, FUNC_PRED_UNPACK_INFO *func_preds, bool has_BU_lock, bool skip_checking_fk) |
int | locator_update_index (THREAD_ENTRY *thread_p, RECDES *new_recdes, RECDES *old_recdes, ATTR_ID *att_id, int n_att_id, OID *oid, OID *class_oid, int op_type, HEAP_SCANCACHE *scan_cache, REPL_INFO *repl_info) |
int | locator_delete_lob_force (THREAD_ENTRY *thread_p, OID *class_oid, OID *oid, RECDES *recdes) |
PRUNING_SCAN_CACHE * | locator_get_partition_scancache (PRUNING_CONTEXT *pcontext, const OID *class_oid, const HFID *hfid, int op_type, bool has_function_index) |
int | xlocator_redistribute_partition_data (THREAD_ENTRY *thread_p, OID *class_oid, int no_oids, OID *oid_list) |
int | locator_rv_redo_rename (THREAD_ENTRY *thread_p, LOG_RCV *rcv) |
SCAN_CODE | locator_lock_and_get_object (THREAD_ENTRY *thread_p, const OID *oid, OID *class_oid, RECDES *recdes, HEAP_SCANCACHE *scan_cache, LOCK lock, int ispeeking, int old_chn, NON_EXISTENT_HANDLING non_ex_handling_type) |
SCAN_CODE | locator_lock_and_get_object_with_evaluation (THREAD_ENTRY *thread_p, OID *oid, OID *class_oid, RECDES *recdes, HEAP_SCANCACHE *scan_cache, int ispeeking, int old_chn, MVCC_REEV_DATA *mvcc_reev_data, NON_EXISTENT_HANDLING non_ex_handling_type) |
SCAN_CODE | locator_get_object (THREAD_ENTRY *thread_p, const OID *oid, OID *class_oid, RECDES *recdes, HEAP_SCANCACHE *scan_cache, SCAN_OPERATION_TYPE op_type, LOCK lock_mode, int ispeeking, int chn) |
SCAN_OPERATION_TYPE | locator_decide_operation_type (LOCK lock_mode, LC_FETCH_VERSION_TYPE fetch_version_type) |
LOCK | locator_get_lock_mode_from_op_type (SCAN_OPERATION_TYPE op_type) |
int | locator_insert_force (THREAD_ENTRY *thread_p, HFID *hfid, OID *class_oid, OID *oid, RECDES *recdes, int has_index, int op_type, HEAP_SCANCACHE *scan_cache, int *force_count, int pruning_type, PRUNING_CONTEXT *pcontext, FUNC_PRED_UNPACK_INFO *func_preds, UPDATE_INPLACE_STYLE force_in_place, PGBUF_WATCHER *home_hint_p, bool has_BU_lock, bool dont_check_fk, bool use_bulk_logging=false) |
int | locator_multi_insert_force (THREAD_ENTRY *thread_p, HFID *hfid, OID *class_oid, const std::vector< record_descriptor > &recdes, int has_index, int op_type, HEAP_SCANCACHE *scan_cache, int *force_count, int pruning_type, PRUNING_CONTEXT *pcontext, FUNC_PRED_UNPACK_INFO *func_preds, UPDATE_INPLACE_STYLE force_in_place, bool dont_check_fk) |
bool | has_errors_filtered_for_insert (std::vector< int > error_filter_array) |
Variables | |
bool | locator_Dont_check_foreign_key |
Definition at line 53 of file locator_sr.h.
anonymous enum |
Enumerator | |
---|---|
LOB_FLAG_EXCLUDE_LOB | |
LOB_FLAG_INCLUDE_LOB |
Definition at line 56 of file locator_sr.h.
bool has_errors_filtered_for_insert | ( | std::vector< int > | error_filter_array | ) |
Definition at line 13852 of file locator_sr.c.
References ER_BTREE_UNIQUE_FAILED.
Referenced by cubload::server_object_loader::flush_records().
int locator_add_or_remove_index | ( | THREAD_ENTRY * | thread_p, |
RECDES * | recdes, | ||
OID * | inst_oid, | ||
OID * | class_oid, | ||
int | is_insert, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
bool | datayn, | ||
bool | replyn, | ||
HFID * | hfid, | ||
FUNC_PRED_UNPACK_INFO * | func_preds, | ||
bool | has_BU_lock, | ||
bool | skip_checking_fk | ||
) |
Definition at line 7545 of file locator_sr.c.
References FOR_INSERT_OR_DELETE, and locator_add_or_remove_index_internal().
Referenced by catcls_delete_instance(), catcls_insert_instance(), locator_delete_force_internal(), locator_insert_force(), and locator_update_force().
LC_COPYAREA* locator_allocate_copy_area_by_attr_info | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
RECDES * | old_recdes, | ||
RECDES * | new_recdes, | ||
const int | copyarea_length_hint, | ||
int | lob_create_flag | ||
) |
Definition at line 7210 of file locator_sr.c.
References recdes::area_size, assert, cubmem::CSTYLE_BLOCK_ALLOCATOR, recdes::data, DB_ALIGN, DB_PAGESIZE, record_descriptor::get_recdes(), record_descriptor::get_size(), heap_attrinfo_transform_to_disk(), heap_attrinfo_transform_to_disk_except_lob(), lc_copy_area::length, LOB_FLAG_EXCLUDE_LOB, locator_allocate_copy_area_by_length(), locator_free_copy_area(), lc_copy_area::mem, NULL, record_descriptor::release_buffer(), S_DOESNT_FIT, S_SUCCESS, and record_descriptor::set_external_buffer().
Referenced by locator_attribute_info_force(), locator_mvcc_reev_cond_assigns(), qexec_oid_of_duplicate_key_update(), and qexec_remove_duplicates_for_replace().
int locator_attribute_info_force | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | oid, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
ATTR_ID * | att_id, | ||
int | n_att_id, | ||
LC_COPYAREA_OPERATION | operation, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | force_count, | ||
bool | not_check_fk, | ||
REPL_INFO_TYPE | repl_info, | ||
int | pruning_type, | ||
PRUNING_CONTEXT * | pcontext, | ||
FUNC_PRED_UNPACK_INFO * | func_preds, | ||
MVCC_REEV_DATA * | mvcc_reev_data, | ||
UPDATE_INPLACE_STYLE | force_update_inplace, | ||
RECDES * | rec_descriptor, | ||
bool | need_locking | ||
) |
Definition at line 7311 of file locator_sr.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, COPY, COPY_OID, recdes::data, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_NODATA_NEWADDRESS, ER_HEAP_UNKNOWN_OBJECT, ER_LC_BADFORCE_OPERATION, er_set(), heap_attrinfo_check_unique_index(), heap_clean_get_context(), heap_get_last_version(), heap_init_get_context(), HEAP_IS_UPDATE_INPLACE, HFID_COPY, LC_FLAG_HAS_INDEX, LC_FLAG_HAS_UNIQUE_INDEX, LC_FLUSH_DELETE, LC_FLUSH_INSERT, LC_FLUSH_INSERT_PRUNE, LC_FLUSH_INSERT_PRUNE_VERIFY, LC_FLUSH_UPDATE, LC_FLUSH_UPDATE_PRUNE, LC_FLUSH_UPDATE_PRUNE_VERIFY, LC_IS_FLUSH_INSERT, LC_IS_FLUSH_UPDATE, LOB_FLAG_INCLUDE_LOB, locator_allocate_copy_area_by_attr_info(), locator_delete_force(), locator_free_copy_area(), locator_insert_force(), locator_lock_and_get_object(), locator_update_force(), lock_get_object_lock(), LOG_ERROR_IF_DELETED, heap_scancache::mvcc_snapshot, NO_ERROR, NULL, NULL_CHN, oid_Root_class_oid, db_identifier::pageid, S_DOESNT_EXIST, S_DOESNT_FIT, S_ERROR, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, db_identifier::slotid, UPDATE_INPLACE_NONE, db_identifier::volid, and X_LOCK.
Referenced by heap_object_upgrade_domain(), locator_check_primary_key_delete(), locator_check_primary_key_update(), process_object(), qexec_execute_delete(), qexec_execute_duplicate_key_update(), qexec_execute_increment(), qexec_execute_insert(), qexec_execute_update(), and qexec_remove_duplicates_for_replace().
DISK_ISVALID locator_check_all_entries_of_all_btrees | ( | THREAD_ENTRY * | thread_p, |
bool | repair | ||
) |
Definition at line 10501 of file locator_sr.c.
References boot_find_root_heap(), COPY, recdes::data, DISK_ERROR, DISK_VALID, heap_get_class_record(), heap_next(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, IS_LOCK, LK_COND_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_check_class(), lock_object(), lock_unlock_object(), logtb_get_mvcc_snapshot(), NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, locator_classname_action::oid, oid_Root_class_oid, or_class_hfid(), heap_scancache::page_watcher, db_identifier::pageid, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, RECDES_INITIALIZER, S_END, S_SUCCESS, db_identifier::slotid, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by xboot_check_db_consistency().
DISK_ISVALID locator_check_btree_entries | ( | THREAD_ENTRY * | thread_p, |
BTID * | btid, | ||
HFID * | hfid, | ||
OID * | class_oid, | ||
int | n_attr_ids, | ||
ATTR_ID * | attr_ids, | ||
int * | atts_prefix_length, | ||
const char * | btname, | ||
bool | repair | ||
) |
Definition at line 9276 of file locator_sr.c.
References ARG_FILE_LINE, assert, or_index::btid, BTID_IS_EQUAL, BTREE_END_OF_SCAN, BTREE_INIT_SCAN, btree_keyoid_checkscan_check(), btree_keyoid_checkscan_end(), btree_keyoid_checkscan_start(), btree_multicol_key_is_null(), btree_prepare_bts(), btree_range_scan(), btree_range_scan_select_visible_oids(), btree_iscan_oid_list::capacity, indx_scan_id::check_not_vacuumed, COPY, indx_scan_id::copy_buf, indx_scan_id::copy_buf_len, db_make_null(), db_private_alloc, db_private_free, db_private_free_and_init, db_value_is_null(), DBVAL_BUFSIZE, DISK_ERROR, DISK_INVALID, DISK_VALID, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_INDEX_FOUND_NOT_VACUUMED, ER_INTERRUPTED, ER_LC_INCONSISTENT_BTREE_ENTRY_TYPE1, ER_LC_INCONSISTENT_BTREE_ENTRY_TYPE2, ER_LC_INCONSISTENT_BTREE_ENTRY_TYPE3, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), vfid::fileid, or_index::filter_predicate, free_and_init, heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), heap_attrvalue_get_key(), heap_does_exist(), heap_get_class_name(), heap_next(), heap_scancache_end(), heap_scancache_start(), i, or_classrep::indexes, indx_scan_id::indx_cov, indx_scan_id::indx_info, INF_INF, ISCAN_OID_BUFFER_CAPACITY, ISCAN_OID_BUFFER_SIZE, key_val_range::key1, key_val_range::key2, locator_eval_filter_predicate(), locator_repair_btree_by_delete(), locator_repair_btree_by_insert(), LOG_FIND_THREAD_TRAN_INDEX, logtb_get_mvcc_snapshot(), MAX_ALIGNMENT, btree_iscan_oid_list::max_oid_cnt, indx_scan_id::multi_range_opt, or_classrep::n_indexes, btree_scan::n_oids_read_last_iteration, btree_iscan_oid_list::next_list, NO_ERROR, indx_scan_id::not_vacuumed_res, NULL, NULL_PAGEID, NULL_SLOTID, key_val_range::num_index_term, btree_iscan_oid_list::oid_cnt, OID_ISNULL, indx_scan_id::oid_list, btree_iscan_oid_list::oidp, OR_OID_SIZE, db_identifier::pageid, pr_clear_value(), pr_valstring(), PTR_ALIGN, key_val_range::range, RECDES_INITIALIZER, btid::root_pageid, S_END, S_SUCCESS, indx_scan_id::scan_cache, scan_init_index_scan(), scan_init_iss(), db_identifier::slotid, V_TRUE, hfid::vfid, btid::vfid, vfid::volid, and db_identifier::volid.
Referenced by locator_check_class().
DISK_ISVALID locator_check_by_class_oid | ( | THREAD_ENTRY * | thread_p, |
OID * | cls_oid, | ||
HFID * | hfid, | ||
BTID * | index_btid, | ||
bool | repair | ||
) |
Definition at line 10421 of file locator_sr.c.
References boot_find_root_heap(), COPY, recdes::data, DISK_ERROR, heap_get_class_record(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, IS_LOCK, LK_COND_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_check_class(), lock_object(), lock_unlock_object(), logtb_get_mvcc_snapshot(), NO_ERROR, NULL, oid_Root_class_oid, heap_scancache::page_watcher, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, RECDES_INITIALIZER, rv, and S_SUCCESS.
Referenced by xboot_checkdb_table().
DISK_ISVALID locator_check_class | ( | THREAD_ENTRY * | thtread_p, |
OID * | class_oid, | ||
RECDES * | peek, | ||
HFID * | class_hfid, | ||
BTID * | index_btid, | ||
bool | repair | ||
) |
Definition at line 10297 of file locator_sr.c.
References ARG_FILE_LINE, BTID_IS_EQUAL, DISK_ERROR, DISK_VALID, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, heap_attrinfo_end(), heap_attrinfo_start_with_index(), heap_get_indexinfo_of_btid(), heap_indexinfo_get_attrids(), heap_indexinfo_get_attrs_prefix_length(), heap_indexinfo_get_btid(), heap_indexinfo_get_num_attrs(), i, locator_check_btree_entries(), locator_check_unique_btree_entries(), NO_ERROR, NULL, heap_idx_elements_info::num_btids, rv, and xbtree_get_unique_pk().
Referenced by locator_check_all_entries_of_all_btrees(), and locator_check_by_class_oid().
DISK_ISVALID locator_check_class_names | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 1923 of file locator_sr.c.
References ARG_FILE_LINE, assert, boot_find_root_heap(), csect_enter, csect_exit, CSECT_LOCATOR_SR_CLASSNAME_TABLE, DISK_ERROR, DISK_INVALID, DISK_VALID, locator_classname_entry::e_current, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_LC_INCONSISTENT_CLASSNAME_TYPE2, ER_LC_INCONSISTENT_CLASSNAME_TYPE3, er_set(), error(), heap_next(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, INF_WAIT, locator_check_class_on_heap(), logtb_get_mvcc_snapshot(), mht_get(), mht_map(), NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, locator_classname_action::oid, OID_EQ, oid_Root_class_oid, or_class_name(), db_identifier::pageid, PEEK, RECDES_INITIALIZER, S_SUCCESS, db_identifier::slotid, strlen, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by xboot_check_db_consistency().
SCAN_OPERATION_TYPE locator_decide_operation_type | ( | LOCK | lock_mode, |
LC_FETCH_VERSION_TYPE | fetch_version_type | ||
) |
Definition at line 13649 of file locator_sr.c.
References assert, LC_FETCH_CURRENT_VERSION, LC_FETCH_MVCC_VERSION, NULL_LOCK, S_DELETE, S_LOCK, S_SELECT, and S_SELECT_WITH_LOCK.
Referenced by xlocator_does_exist(), and xlocator_fetch().
int locator_delete_force | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
OID * | oid, | ||
int | has_index, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | force_count, | ||
MVCC_REEV_DATA * | mvcc_reev_data, | ||
bool | need_locking | ||
) |
Definition at line 5993 of file locator_sr.c.
References FOR_INSERT_OR_DELETE, locator_delete_force_internal(), and NULL.
Referenced by locator_attribute_info_force(), locator_check_primary_key_delete(), xlocator_force(), and xlocator_repl_force().
int locator_delete_lob_force | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
OID * | oid, | ||
RECDES * | recdes | ||
) |
Definition at line 6311 of file locator_sr.c.
References assert, COPY, DB_TYPE_BLOB, DB_TYPE_CLOB, error(), heap_attrinfo_delete_lob(), heap_attrinfo_end(), heap_attrinfo_start(), heap_get_visible_version(), heap_scancache_end(), heap_scancache_quick_start(), i, NO_ERROR, NULL, NULL_CHN, RECDES_INITIALIZER, and S_SUCCESS.
Referenced by locator_check_primary_key_delete(), and qexec_remove_duplicates_for_replace().
int locator_drop_transient_class_name_entries | ( | THREAD_ENTRY * | thread_p, |
LOG_LSA * | savep_lsa | ||
) |
Definition at line 1258 of file locator_sr.c.
void locator_dump_class_names | ( | THREAD_ENTRY * | thread_p, |
FILE * | out_fp | ||
) |
Definition at line 1786 of file locator_sr.c.
References assert, csect_enter_as_reader, csect_exit, CSECT_LOCATOR_SR_CLASSNAME_TABLE, INF_WAIT, locator_print_class_name(), mht_dump(), and NO_ERROR.
Referenced by diagdb().
void locator_end_force_scan_cache | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache | ||
) |
Definition at line 3999 of file locator_sr.c.
References heap_scancache_end_modify().
Referenced by locator_force_for_multi_update(), qexec_clear_internal_classes(), qexec_execute_increment(), qexec_execute_insert(), qexec_upddel_setup_current_class(), xlocator_force(), and xlocator_repl_force().
void locator_finalize | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 364 of file locator_sr.c.
References assert, CSECT_CT_OID_TABLE, csect_enter, csect_exit, CSECT_LOCATOR_SR_CLASSNAME_TABLE, INF_WAIT, locator_force_drop_class_name_entry(), mht_destroy(), mht_map(), NO_ERROR, and NULL.
Referenced by boot_server_all_finalize().
LOCK locator_get_lock_mode_from_op_type | ( | SCAN_OPERATION_TYPE | op_type | ) |
Definition at line 13688 of file locator_sr.c.
References assert, NA_LOCK, S_DELETE, S_LOCK, S_SELECT, S_SELECT_WITH_LOCK, S_UPDATE, and X_LOCK.
Referenced by qexec_execute_obj_fetch().
SCAN_CODE locator_get_object | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
SCAN_OPERATION_TYPE | op_type, | ||
LOCK | lock_mode, | ||
int | ispeeking, | ||
int | chn | ||
) |
Definition at line 13175 of file locator_sr.c.
References assert, ASSERT_ERROR, COPY, DB_PAGESIZE, ER_HEAP_UNKNOWN_OBJECT, err, heap_clean_get_context(), heap_get_class_oid_from_page(), heap_get_visible_version_internal(), heap_init_get_context(), heap_prepare_object_page(), heap_scan_cache_allocate_area(), heap_get_context::home_page_watcher, heap_get_context::latch_mode, locator_lock_and_get_object_internal(), mvcc_is_mvcc_disabled_class(), NO_ERROR, NULL, NULL_LOCK, OID_INITIALIZER, OID_IS_ROOTOID, OID_ISNULL, pgbuf_watcher::pgptr, S_DELETE, S_DOESNT_EXIST, S_ERROR, S_LOCK, S_SELECT, S_SELECT_WITH_LOCK, S_UPDATE, and X_LOCK.
Referenced by locator_lock_and_return_object(), qexec_execute_obj_fetch(), and xlocator_does_exist().
PRUNING_SCAN_CACHE* locator_get_partition_scancache | ( | PRUNING_CONTEXT * | pcontext, |
const OID * | class_oid, | ||
const HFID * | hfid, | ||
int | op_type, | ||
bool | has_function_index | ||
) |
Definition at line 12259 of file locator_sr.c.
References pruning_scan_cache::func_index_pred, heap_attrinfo_end(), heap_attrinfo_start(), heap_init_func_pred_unpack_info(), pruning_scan_cache::is_scan_cache_started, locator_start_force_scan_cache(), pruning_scan_cache::n_indexes, NO_ERROR, NULL, partition_get_scancache(), partition_new_scancache(), pruning_scan_cache::scan_cache, and pruning_context::thread_p.
Referenced by locator_insert_force(), locator_move_record(), locator_update_force(), qexec_oid_of_duplicate_key_update(), qexec_remove_duplicates_for_replace(), and qexec_upddel_setup_current_class().
int locator_initialize | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 246 of file locator_sr.c.
References locator_classname_action::action, ARG_FILE_LINE, assert, boot_find_root_heap(), CLASSNAME_CACHE_SIZE, COPY_OID, CSECT_CT_OID_TABLE, csect_enter, csect_exit, CSECT_LOCATOR_SR_CLASSNAME_TABLE, DISK_ERROR, locator_classname_entry::e_current, locator_classname_entry::e_name, locator_classname_entry::e_tran_index, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_next(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, INF_WAIT, LC_CLASSNAME_EXIST, locator_force_drop_class_name_entry(), locator_is_exist_class_name_entry(), LSA_SET_NULL(), mht_1strhash(), mht_compare_strings_are_equal(), mht_create(), mht_map(), mht_put(), NO_ERROR, NULL, NULL_TRAN_INDEX, locator_classname_action::oid, OID_ISNULL, OID_SET_NULL, or_class_name(), PEEK, locator_classname_action::prev, RECDES_INITIALIZER, S_SUCCESS, locator_classname_action::savep_lsa, strdup(), and strlen.
Referenced by boot_create_all_volumes(), boot_restart_server(), log_recovery(), and xboot_emergency_patch().
int locator_insert_force | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | oid, | ||
RECDES * | recdes, | ||
int | has_index, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | force_count, | ||
int | pruning_type, | ||
PRUNING_CONTEXT * | pcontext, | ||
FUNC_PRED_UNPACK_INFO * | func_preds, | ||
UPDATE_INPLACE_STYLE | force_in_place, | ||
PGBUF_WATCHER * | home_hint_p, | ||
bool | has_BU_lock, | ||
bool | dont_check_fk, | ||
bool | use_bulk_logging = false |
||
) |
Definition at line 4854 of file locator_sr.c.
References ARG_FILE_LINE, assert, assert_release, catalog_insert(), catcls_Enable, catcls_insert_catalog_classes(), COPY_OID, recdes::data, DB_NOT_PARTITIONED_CLASS, er_errid(), ER_FAILED, er_log_debug, pruning_scan_cache::func_index_pred, heap_create_insert_context(), heap_create_update_context(), heap_get_class_repr_id(), heap_insert_logical(), heap_update_logical(), HFID_COPY, heap_operation_context::is_bulk_op, heap_operation_context::is_logical_old, IX_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_add_or_remove_index(), locator_check_foreign_key(), locator_Dont_check_foreign_key, locator_free_copy_area(), locator_get_partition_scancache(), locator_permoid_class_name(), lock_subclass(), NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, NULL_VOLID, OID_EQ, OID_IS_ROOTOID, OID_ISNULL, or_class_name(), or_class_rep_dir(), OR_FIXED_ATTRIBUTES_OFFSET, OR_PUT_OID, or_replace_rep_id(), ORC_CLASS_VAR_ATT_COUNT, ORC_REP_DIR_OFFSET, db_identifier::pageid, partition_prune_insert(), qexec_clear_list_cache_by_class(), QFILE_IS_LIST_CACHE_DISABLED, qmgr_add_modified_class(), REC_HOME, heap_operation_context::recdes_p, heap_operation_context::res_oid, pruning_scan_cache::scan_cache, db_identifier::slotid, strlen, recdes::type, heap_operation_context::update_in_place, UPDATE_INPLACE_CURRENT_MVCCID, UPDATE_INPLACE_OLD_MVCCID, heap_operation_context::use_bulk_logging, and db_identifier::volid.
Referenced by cubload::server_object_loader::flush_records(), locator_attribute_info_force(), locator_move_record(), locator_multi_insert_force(), redistribute_partition_data(), xlocator_force(), and xlocator_repl_force().
SCAN_CODE locator_lock_and_get_object | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
LOCK | lock, | ||
int | ispeeking, | ||
int | old_chn, | ||
NON_EXISTENT_HANDLING | non_ex_handling_type | ||
) |
Definition at line 13286 of file locator_sr.c.
References COPY, DB_PAGESIZE, heap_clean_get_context(), heap_init_get_context(), heap_scan_cache_allocate_area(), locator_lock_and_get_object_internal(), NO_ERROR, NULL, and S_ERROR.
Referenced by locator_attribute_info_force(), locator_check_primary_key_delete(), locator_check_primary_key_update(), and process_object().
SCAN_CODE locator_lock_and_get_object_with_evaluation | ( | THREAD_ENTRY * | thread_p, |
OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
int | old_chn, | ||
MVCC_REEV_DATA * | mvcc_reev_data, | ||
NON_EXISTENT_HANDLING | non_ex_handling_type | ||
) |
Definition at line 13034 of file locator_sr.c.
References assert, ASSERT_ERROR, assert_release, COPY, DB_PAGESIZE, er_errid(), ER_HEAP_UNKNOWN_OBJECT, err, heap_clean_get_context(), heap_get_class_oid_from_page(), heap_get_record_data_when_all_ready(), heap_init_get_context(), heap_prepare_object_page(), heap_scan_cache_allocate_area(), heap_get_context::home_page_watcher, heap_get_context::latch_mode, locator_lock_and_get_object_internal(), locator_mvcc_reev_cond_and_assignment(), lock_unlock_object_donot_move_to_non2pl(), MVCC_REC_HEADER_INITIALIZER, heap_scancache::mvcc_snapshot, NO_ERROR, NULL, NULL_CHN, OID_INITIALIZER, OID_ISNULL, or_mvcc_get_header(), PEEK, pgbuf_watcher::pgptr, RECDES_INITIALIZER, S_DOESNT_EXIST, S_ERROR, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, mvcc_snapshot::snapshot_fnc, SNAPSHOT_SATISFIED, V_ERROR, V_FALSE, V_TRUE, V_UNKNOWN, and X_LOCK.
Referenced by locator_delete_force_internal(), locator_update_force(), qexec_execute_selupd_list(), scan_next_heap_scan(), and scan_next_index_lookup_heap().
int locator_multi_insert_force | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
OID * | class_oid, | ||
const std::vector< record_descriptor > & | recdes, | ||
int | has_index, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | force_count, | ||
int | pruning_type, | ||
PRUNING_CONTEXT * | pcontext, | ||
FUNC_PRED_UNPACK_INFO * | func_preds, | ||
UPDATE_INPLACE_STYLE | force_in_place, | ||
bool | dont_check_fk | ||
) |
Definition at line 13713 of file locator_sr.c.
References assert, ASSERT_ERROR, BU_LOCK, heap_scancache::cache_last_fix_page, DB_ALIGN, DB_PAGESIZE, heap_alloc_new_page(), heap_is_big_length(), heap_log_postpone_heap_append_pages(), HEAP_MAX_ALIGN, heap_nonheader_page_capacity(), i, recdes::length, locator_insert_force(), lock_has_lock_on_object(), NO_ERROR, NULL, oid_Root_class_oid, PAGE_HEAP, heap_scancache::page_watcher, pgbuf_is_page_fixed_by_thread(), pgbuf_log_redo_new_page(), pgbuf_ordered_unfix_and_init, pgbuf_replace_watcher, pgbuf_watcher::pgptr, prm_get_float_value(), PRM_ID_HF_UNFILL_FACTOR, spage_slot_size(), VPID_ISNULL, and VPID_SET_NULL.
Referenced by cubload::server_object_loader::flush_records().
int locator_other_insert_delete | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
OID * | oid, | ||
BTID * | btid, | ||
bool | btid_dup_key_locked, | ||
HFID * | newhfid, | ||
OID * | newoid, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | force_count, | ||
OID * | prev_oid, | ||
REPR_ID * | new_reprid | ||
) |
int locator_rv_redo_rename | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 12615 of file locator_sr.c.
References NO_ERROR.
int locator_savepoint_transient_class_name_entries | ( | THREAD_ENTRY * | thread_p, |
LOG_LSA * | savep_lsa | ||
) |
Definition at line 1604 of file locator_sr.c.
References assert, csect_enter, csect_exit, CSECT_LOCATOR_SR_CLASSNAME_TABLE, tx_transient_class_registry::empty(), ER_FAILED, INF_WAIT, locator_get_num_transient_classnames(), locator_savepoint_class_name_entry(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_tdes::m_modified_classes, tx_transient_class_registry::map(), NO_ERROR, NULL_TRAN_INDEX, and locator_classname_action::savep_lsa.
Referenced by xtran_server_savepoint(), and xtran_server_start_topop().
int locator_start_force_scan_cache | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
const HFID * | hfid, | ||
const OID * | class_oid, | ||
int | op_type | ||
) |
Definition at line 3985 of file locator_sr.c.
References heap_scancache_start_modify(), and NULL.
Referenced by locator_force_for_multi_update(), locator_get_partition_scancache(), locator_move_record(), qexec_execute_increment(), qexec_execute_insert(), qexec_upddel_setup_current_class(), xlocator_force(), and xlocator_repl_force().
int locator_update_index | ( | THREAD_ENTRY * | thread_p, |
RECDES * | new_recdes, | ||
RECDES * | old_recdes, | ||
ATTR_ID * | att_id, | ||
int | n_att_id, | ||
OID * | oid, | ||
OID * | class_oid, | ||
int | op_type, | ||
HEAP_SCANCACHE * | scan_cache, | ||
REPL_INFO * | repl_info | ||
) |
Definition at line 8147 of file locator_sr.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, or_index::atts, or_index::btid, or_index::btname, btree_compare_key(), BTREE_CONSTRAINT_PRIMARY_KEY, BTREE_CONSTRAINT_UNIQUE, BTREE_FOREIGN_KEY, btree_insert(), btree_keyoid_checkscan_check(), btree_keyoid_checkscan_end(), btree_keyoid_checkscan_start(), btree_multicol_key_is_null(), btree_mvcc_delete(), btree_online_index_dispatcher(), BTREE_OP_ONLINE_INDEX_TRAN_DELETE, BTREE_OP_ONLINE_INDEX_TRAN_INSERT, btree_physical_delete(), BTREE_PRIMARY_KEY, BTREE_REVERSE_UNIQUE, btree_set_mvcc_header_ids_for_update(), BTREE_UNIQUE, btree_update(), db_value::data, DB_EQ, DB_IS_NULL, db_make_null(), DB_TYPE_MIDXKEY, DB_UNK, DB_VALUE_DOMAIN_TYPE, db_value_is_null(), DBVAL_BUFSIZE, DISK_INVALID, DISK_VALID, db_midxkey::domain, er_errid(), ER_FAILED, ER_INTERRUPTED, error(), or_index::filter_predicate, or_index::fk, free_and_init, multi_index_unique_stats::get_stats_of(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start_with_index(), heap_attrvalue_get_key(), heap_get_class_name(), i, pr_type::id, or_attribute::id, or_index::index_status, LK_GRANTED, LK_UNCOND_LOCK, locator_check_primary_key_update(), locator_Dont_check_foreign_key, locator_eval_filter_predicate(), locator_was_index_already_applied(), lock_object(), LOG_CHECK_LOG_APPLIER, log_does_allow_replication(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LOG_REPLICATION_DATA, logtb_get_current_mvccid(), LSA_COPY(), LSA_ISNULL(), LSA_SET_NULL(), heap_scancache::m_index_stats, MAX_ALIGNMENT, db_data::midxkey, MULTI_ROW_DELETE, MULTI_ROW_INSERT, MULTI_ROW_UPDATE, mvcc_is_mvcc_disabled_class(), MVCCID_NULL, or_index::n_atts, repl_info::need_replication, NO_ERROR, NULL, heap_idx_elements_info::num_btids, locator_classname_action::oid, OID_ISNULL, OR_ONLINE_INDEX_BUILDING_IN_PROGRESS, pr_clear_value(), pr_clone_value(), pr_free_ext_value(), pr_make_ext_value(), pr_type_from_id(), PTR_ALIGN, repl_info::repl_info_type, log_tdes::repl_insert_lsa, RVREPL_DATA_UPDATE, TP_ARE_COMPARABLE_KEY_TYPES, TP_DOMAIN_TYPE, or_index::type, V_TRUE, and X_LOCK.
Referenced by catcls_update_instance(), locator_update_force(), and update_indexes().
int xlc_fetch_allrefslockset | ( | OID * | oid, |
int | chn, | ||
OID * | class_oid, | ||
int | class_chn, | ||
LOCK | lock, | ||
int | quit_on_errors, | ||
int | prune_level, | ||
LC_LOCKSET ** | lockset, | ||
LC_COPYAREA ** | fetch_area | ||
) |
int xlocator_redistribute_partition_data | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
int | no_oids, | ||
OID * | oid_list | ||
) |
Definition at line 12854 of file locator_sr.c.
References redistribute_partition_data().
Referenced by locator_redistribute_partition_data(), and slocator_redistribute_partition_data().
bool locator_Dont_check_foreign_key |
Definition at line 120 of file locator_sr.c.
Referenced by locator_add_or_remove_index_internal(), locator_insert_force(), locator_update_force(), and locator_update_index().