CUBRID Engine
latest
|
#include "config.h"
#include "file_manager.h"
#include "heap_attrinfo.h"
#include "mem_block.hpp"
#include "mvcc.h"
#include "page_buffer.h"
#include "perf_monitor.h"
#include "storage_common.h"
#include "thread_compat.hpp"
#include "tde.h"
Go to the source code of this file.
Classes | |
struct | heap_mvcc_delete_info |
struct | heap_bestspace |
struct | heap_scancache_node |
struct | heap_scancache_node_list |
struct | heap_scancache |
struct | heap_scanrange |
struct | heap_hfid_table |
struct | heap_hfid_table_entry |
struct | function_index_info |
struct | func_pred_unpack_info |
struct | heap_idx_elements_info |
struct | heap_operation_context |
struct | heap_get_context |
Macros | |
#define | HFID_EQ(hfid_ptr1, hfid_ptr2) |
#define | HEAP_SET_RECORD(recdes, record_area_size, record_length, record_type, record_data) |
#define | HEAP_HEADER_AND_CHAIN_SLOTID 0 /* Slot for chain and header */ |
#define | HEAP_MAX_ALIGN INT_ALIGNMENT /* maximum alignment for heap record */ |
#define | HEAP_ISJUNK_OID(oid) |
#define | HEAP_ISVALID_OID(thread_p, oid) |
#define | HEAP_SCANCACHE_SET_NODE(scan_cache, class_oid_p, hfid_p) |
#define | heap_classrepr_free_and_init(class_repr, idxp) |
#define | HEAP_HFID_HASH_SIZE 1000 |
#define | HEAP_IS_UPDATE_INPLACE(update_inplace_style) ((update_inplace_style) != UPDATE_INPLACE_NONE) |
Typedefs | |
typedef struct heap_mvcc_delete_info | HEAP_MVCC_DELETE_INFO |
typedef struct heap_bestspace | HEAP_BESTSPACE |
typedef struct heap_scancache_node | HEAP_SCANCACHE_NODE |
typedef struct heap_scancache_node_list | HEAP_SCANCACHE_NODE_LIST |
typedef struct heap_scancache | HEAP_SCANCACHE |
typedef struct heap_scanrange | HEAP_SCANRANGE |
typedef struct heap_hfid_table | HEAP_HFID_TABLE |
typedef struct heap_hfid_table_entry | HEAP_HFID_TABLE_ENTRY |
typedef struct function_index_info | FUNCTION_INDEX_INFO |
typedef struct func_pred_unpack_info | FUNC_PRED_UNPACK_INFO |
typedef struct heap_idx_elements_info | HEAP_IDX_ELEMENTS_INFO |
typedef enum update_inplace_style | UPDATE_INPLACE_STYLE |
typedef struct heap_operation_context | HEAP_OPERATION_CONTEXT |
typedef struct heap_get_context | HEAP_GET_CONTEXT |
Enumerations | |
enum | HEAP_OPERATION_TYPE { HEAP_OPERATION_NONE = 0, HEAP_OPERATION_INSERT, HEAP_OPERATION_DELETE, HEAP_OPERATION_UPDATE } |
enum | update_inplace_style { UPDATE_INPLACE_NONE = 0, UPDATE_INPLACE_CURRENT_MVCCID = 1, UPDATE_INPLACE_OLD_MVCCID = 2 } |
enum | { END_SCAN, CONTINUE_SCAN } |
enum | SNAPSHOT_TYPE { SNAPSHOT_TYPE_NONE, SNAPSHOT_TYPE_MVCC, SNAPSHOT_TYPE_DIRTY } |
enum | HEAP_PAGE_VACUUM_STATUS { HEAP_PAGE_VACUUM_NONE, HEAP_PAGE_VACUUM_ONCE, HEAP_PAGE_VACUUM_UNKNOWN } |
Variables | |
int | mvcc_header_size_lookup [8] |
#define heap_classrepr_free_and_init | ( | class_repr, | |
idxp | |||
) |
Definition at line 91 of file heap_file.h.
Referenced by btree_check_by_class_oid(), btree_check_foreign_key(), btree_get_pkey_btid(), btree_index_next_scan(), btree_index_start_scan(), btree_is_btid_online_index(), btree_load_check_fk(), btree_repair_prev_link_by_class_oid(), catalog_get_cardinality(), heap_attrinfo_end(), heap_attrinfo_recache(), heap_attrinfo_start_refoids(), heap_attrinfo_start_with_btid(), heap_attrinfo_start_with_index(), heap_get_btid_from_index_name(), heap_get_class_repr_id(), heap_get_index_with_name(), heap_get_indexinfo_of_btid(), heap_scancache_start_modify(), heap_set_autoincrement_value(), locator_check_foreign_key(), logtb_create_unique_stats_from_repr(), logtb_tran_load_global_stats_func(), partition_get_partition_oids(), qexec_execute_build_columns(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), and xfile_apply_tde_to_class_files().
#define HEAP_HEADER_AND_CHAIN_SLOTID 0 /* Slot for chain and header */ |
Definition at line 62 of file heap_file.h.
Referenced by heap_add_chain_links(), heap_check_all_pages(), heap_chkreloc_next(), heap_copy_chain(), heap_copy_header_stats(), heap_create_internal(), heap_delete_all_page_records(), heap_does_exist(), heap_dump(), heap_estimate(), heap_get_capacity(), heap_get_chain_ptr(), heap_get_class_oid_from_page(), heap_get_header_stats_ptr(), heap_get_last_page(), heap_get_num_objects(), heap_get_page_info(), heap_header_next_scan(), heap_is_page_header(), heap_next_internal(), heap_ovf_find_vfid(), heap_page_get_max_mvccid(), heap_page_get_vacuum_status(), heap_page_rv_chain_update(), heap_page_set_vacuum_status_none(), heap_page_update_chain_after_mvcc_op(), heap_prefetch(), heap_reinitialize_page(), heap_remove_page_on_vacuum(), heap_reuse(), heap_rv_redo_newpage(), heap_rv_redo_reuse_page(), heap_rv_redo_reuse_page_reuse_oid(), heap_rv_undoredo_pagehdr(), heap_scanrange_to_prior(), heap_stats_find_best_page(), heap_stats_update_internal(), heap_update_and_log_header(), heap_vpid_alloc(), heap_vpid_init_new(), heap_vpid_next(), heap_vpid_prev(), heap_vpid_remove(), redistribute_partition_data(), and xheap_reclaim_addresses().
#define HEAP_HFID_HASH_SIZE 1000 |
Definition at line 194 of file heap_file.h.
Referenced by heap_initialize_hfid_table().
#define HEAP_IS_UPDATE_INPLACE | ( | update_inplace_style | ) | ((update_inplace_style) != UPDATE_INPLACE_NONE) |
Definition at line 271 of file heap_file.h.
Referenced by heap_update_home(), heap_update_logical(), locator_attribute_info_force(), and locator_update_force().
#define HEAP_ISJUNK_OID | ( | oid | ) |
Definition at line 66 of file heap_file.h.
#define HEAP_ISVALID_OID | ( | thread_p, | |
oid | |||
) |
Definition at line 77 of file heap_file.h.
Referenced by btree_select_visible_object_for_range_scan(), heap_does_exist(), heap_flush(), heap_is_object_not_null(), heap_is_valid_oid(), scan_next_index_scan(), vacuum_heap_page(), and xlocator_does_exist().
#define HEAP_MAX_ALIGN INT_ALIGNMENT /* maximum alignment for heap record */ |
Definition at line 64 of file heap_file.h.
Referenced by heap_create_internal(), heap_prefetch(), heap_reinitialize_page(), heap_rv_redo_newpage(), heap_vpid_init_new(), and locator_multi_insert_force().
#define HEAP_SCANCACHE_SET_NODE | ( | scan_cache, | |
class_oid_p, | |||
hfid_p | |||
) |
Definition at line 83 of file heap_file.h.
Referenced by heap_scancache_add_partition_node().
#define HEAP_SET_RECORD | ( | recdes, | |
record_area_size, | |||
record_length, | |||
record_type, | |||
record_data | |||
) |
Definition at line 52 of file heap_file.h.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_rv_mvcc_redo_insert(), and heap_rv_mvcc_redo_redistribute().
#define HFID_EQ | ( | hfid_ptr1, | |
hfid_ptr2 | |||
) |
Definition at line 48 of file heap_file.h.
Referenced by heap_compare_hfid(), heap_delete_logical(), heap_get_file_type(), heap_insert_logical(), heap_scancache_check_with_hfid(), heap_scancache_reset_modify(), heap_scancache_start_internal(), heap_stats_find_best_page(), heap_update_logical(), and xlocator_repl_force().
typedef struct func_pred_unpack_info FUNC_PRED_UNPACK_INFO |
Definition at line 226 of file heap_file.h.
typedef struct function_index_info FUNCTION_INDEX_INFO |
Definition at line 216 of file heap_file.h.
typedef struct heap_bestspace HEAP_BESTSPACE |
Definition at line 116 of file heap_file.h.
typedef struct heap_get_context HEAP_GET_CONTEXT |
Definition at line 365 of file heap_file.h.
typedef struct heap_hfid_table HEAP_HFID_TABLE |
Definition at line 185 of file heap_file.h.
typedef struct heap_hfid_table_entry HEAP_HFID_TABLE_ENTRY |
Definition at line 197 of file heap_file.h.
typedef struct heap_idx_elements_info HEAP_IDX_ELEMENTS_INFO |
Definition at line 245 of file heap_file.h.
typedef struct heap_mvcc_delete_info HEAP_MVCC_DELETE_INFO |
Definition at line 109 of file heap_file.h.
typedef struct heap_operation_context HEAP_OPERATION_CONTEXT |
Definition at line 275 of file heap_file.h.
typedef struct heap_scancache HEAP_SCANCACHE |
Definition at line 139 of file heap_file.h.
typedef struct heap_scancache_node HEAP_SCANCACHE_NODE |
Definition at line 123 of file heap_file.h.
typedef struct heap_scancache_node_list HEAP_SCANCACHE_NODE_LIST |
Definition at line 131 of file heap_file.h.
typedef struct heap_scanrange HEAP_SCANRANGE |
Definition at line 176 of file heap_file.h.
typedef enum update_inplace_style UPDATE_INPLACE_STYLE |
Definition at line 268 of file heap_file.h.
anonymous enum |
Enumerator | |
---|---|
END_SCAN | |
CONTINUE_SCAN |
Definition at line 325 of file heap_file.h.
enum HEAP_OPERATION_TYPE |
Enumerator | |
---|---|
HEAP_OPERATION_NONE | |
HEAP_OPERATION_INSERT | |
HEAP_OPERATION_DELETE | |
HEAP_OPERATION_UPDATE |
Definition at line 254 of file heap_file.h.
Enumerator | |
---|---|
HEAP_PAGE_VACUUM_NONE | |
HEAP_PAGE_VACUUM_ONCE | |
HEAP_PAGE_VACUUM_UNKNOWN |
Definition at line 358 of file heap_file.h.
enum SNAPSHOT_TYPE |
Enumerator | |
---|---|
SNAPSHOT_TYPE_NONE | |
SNAPSHOT_TYPE_MVCC | |
SNAPSHOT_TYPE_DIRTY |
Definition at line 328 of file heap_file.h.
enum update_inplace_style |
Enumerator | |
---|---|
UPDATE_INPLACE_NONE | |
UPDATE_INPLACE_CURRENT_MVCCID | |
UPDATE_INPLACE_OLD_MVCCID |
Definition at line 262 of file heap_file.h.
int heap_alloc_new_page | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
OID | class_oid, | ||
PGBUF_WATCHER * | home_hint_p, | ||
VPID * | new_page_vpid | ||
) |
Definition at line 24994 of file heap_file.c.
References assert, ASSERT_ERROR, heap_hdr_stats::class_oid, heap_chain::class_oid, file_alloc(), heap_chain::flags, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, heap_vpid_init_new(), heap_chain::max_mvccid, MVCCID_NULL, heap_chain::next_vpid, NO_ERROR, NULL, pgbuf_attach_watcher, PGBUF_INIT_WATCHER, pgbuf_is_page_fixed_by_thread(), PGBUF_LATCH_WRITE, PGBUF_ORDERED_HEAP_NORMAL, heap_chain::prev_vpid, hfid::vfid, and VPID_SET_NULL.
Referenced by locator_multi_insert_force().
int heap_assign_address | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | oid, | ||
int | expected_length | ||
) |
Definition at line 5914 of file heap_file.c.
References COPY_OID, recdes::data, heap_create_insert_context(), heap_estimate_avg_length(), heap_insert_logical(), heap_is_big_length(), recdes::length, NO_ERROR, NULL, rc, REC_ASSIGN_ADDRESS, heap_operation_context::res_oid, and recdes::type.
Referenced by boot_create_all_volumes(), catcls_insert_instance(), and xlocator_assign_oid().
DB_VALUE* heap_attrinfo_access | ( | ATTR_ID | attrid, |
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10665 of file heap_file.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), heap_attrvalue_locate(), and NULL.
Referenced by fetch_peek_dbval(), heap_attrinfo_generate_key(), heap_attrvalue_get_key(), serial_update_cur_val_of_serial(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
bool heap_attrinfo_check_unique_index | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
ATTR_ID * | att_id, | ||
int | n_att_id | ||
) |
Definition at line 18957 of file heap_file.c.
References ARG_FILE_LINE, or_index::atts, btree_is_unique_type(), er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_PAGE_LATCH_ABORTED, ER_PB_BAD_PAGEID, er_set(), heap_scan_pb_lock_and_fetch, i, or_attribute::id, or_index::n_atts, NO_ERROR, NULL, OLD_PAGE, vpid::pageid, db_identifier::pageid, PGBUF_CONDITIONAL_LATCH, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, db_identifier::slotid, STATIC_INLINE, or_index::type, vpid::volid, db_identifier::volid, and X_LOCK.
Referenced by locator_attribute_info_force().
int heap_attrinfo_clear_dbvalues | ( | HEAP_CACHE_ATTRINFO * | attr_info | ) |
Definition at line 10022 of file heap_file.c.
References ER_FAILED, i, NO_ERROR, NULL, NULL_CHN, OID_SET_NULL, and pr_clear_value().
Referenced by cubload::server_object_loader::clear_db_values(), desc_disk_to_attr_info(), heap_attrinfo_end(), heap_eval_function_index(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_mvcc_reev_cond_assigns(), partition_find_partition_for_record(), qexec_execute_duplicate_key_update(), qexec_execute_increment(), qexec_execute_insert(), qexec_execute_update(), qexec_oid_of_duplicate_key_update(), qexec_remove_duplicates_for_replace(), and xlocator_upgrade_instances_domain().
int heap_attrinfo_delete_lob | ( | THREAD_ENTRY * | thread_p, |
RECDES * | recdes, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10464 of file heap_file.c.
References assert, db_elo_delete(), db_get_elo(), DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_is_null(), db_value_type(), er_errid(), ER_FAILED, heap_attrinfo_recache(), heap_attrvalue_read(), i, NO_ERROR, NULL, and or_rep_id().
Referenced by locator_delete_lob_force().
void heap_attrinfo_dump | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
bool | dump_schema | ||
) |
Definition at line 10540 of file heap_file.c.
References db_fprint_value(), heap_classrepr_dump(), i, NO_ERROR, and pr_type_name().
Referenced by heap_dump().
void heap_attrinfo_end | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 9979 of file heap_file.c.
References db_private_free_and_init, heap_attrinfo_clear_dbvalues(), heap_attrinfo_recache(), heap_classrepr_free_and_init, NO_ERROR, NULL, NULL_REPRID, and OID_SET_NULL.
Referenced by btree_sort_get_next(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_attrinfo_start(), heap_attrinfo_start_with_index(), heap_capacity_next_scan(), heap_dump(), heap_dump_capacity(), heap_eval_function_index(), heap_free_func_pred_unpack_info(), heap_get_partition_attributes(), heap_get_referenced_by(), locator_add_or_remove_index_internal(), locator_check_btree_entries(), locator_check_class(), locator_check_foreign_key(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_check_unique_btree_entries(), locator_delete_lob_force(), locator_eval_filter_predicate(), locator_get_partition_scancache(), locator_prefetch_index_page_internal(), locator_update_index(), partition_clear_pruning_context(), process_class(), qexec_clear_access_spec_list(), qexec_clear_internal_classes(), qexec_execute_increment(), qexec_execute_insert(), qexec_execute_obj_fetch(), qexec_execute_update(), qexec_free_delete_lob_info_list(), qexec_init_next_partition(), cubload::server_class_installer::register_class_with_attributes(), scan_start_scan(), serial_load_attribute_info_of_db_serial(), serial_update_cur_val_of_serial(), cubload::server_object_loader::stop_attrinfo(), xbtree_load_index(), xbtree_load_online_index(), xlocator_check_fk_validity(), xlocator_remove_class_from_index(), xlocator_upgrade_instances_domain(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
DB_VALUE* heap_attrinfo_generate_key | ( | THREAD_ENTRY * | thread_p, |
int | n_atts, | ||
int * | att_ids, | ||
int * | atts_prefix_length, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
RECDES * | recdes, | ||
DB_VALUE * | dbvalue, | ||
char * | buf, | ||
FUNCTION_INDEX_INFO * | func_index_info, | ||
TP_DOMAIN * | midxkey_domain | ||
) |
Definition at line 12672 of file heap_file.c.
References assert, function_index_info::attr_index_start, db_midxkey::buf, function_index_info::col_id, DB_IS_NULL, db_make_midxkey(), db_private_alloc, db_string_truncate(), DB_VALUE_DOMAIN_TYPE, DBVAL_BUFSIZE, heap_attrinfo_access(), heap_eval_function_index(), heap_midxkey_key_generate(), recdes::length, db_value::need_clear, NO_ERROR, NULL, OR_VALUE_ALIGNED_SIZE, pr_clear_value(), pr_clone_value(), and QSTR_IS_ANY_CHAR_OR_BIT.
Referenced by btree_sort_get_next(), online_index_builder(), and xlocator_check_fk_validity().
int heap_attrinfo_read_dbvalues | ( | THREAD_ENTRY * | thread_p, |
const OID * | inst_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10337 of file heap_file.c.
References recdes::data, er_errid(), ER_FAILED, heap_attrinfo_recache(), heap_attrvalue_read(), i, NO_ERROR, NULL, or_chn(), and or_rep_id().
Referenced by btree_sort_get_next(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), desc_disk_to_attr_info(), eval_data_filter(), heap_dump(), heap_eval_function_index(), heap_get_referenced_by(), locator_add_or_remove_index_internal(), locator_check_btree_entries(), locator_check_foreign_key(), locator_check_unique_btree_entries(), locator_eval_filter_predicate(), locator_mvcc_reeval_scan_filters(), locator_mvcc_reevaluate_filters(), locator_update_index(), online_index_builder(), partition_find_partition_for_record(), qexec_execute_delete(), qexec_execute_duplicate_key_update(), qexec_execute_obj_fetch(), qexec_execute_update(), qexec_oid_of_duplicate_key_update(), qexec_remove_duplicates_for_replace(), scan_next_class_attr_scan(), scan_next_heap_scan(), scan_next_index_lookup_heap(), serial_update_cur_val_of_serial(), xlocator_check_fk_validity(), xlocator_remove_class_from_index(), xlocator_upgrade_instances_domain(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
int heap_attrinfo_read_dbvalues_without_oid | ( | THREAD_ENTRY * | thread_p, |
RECDES * | recdes, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10401 of file heap_file.c.
References er_errid(), ER_FAILED, heap_attrinfo_recache(), heap_attrvalue_read(), i, NO_ERROR, NULL, and or_rep_id().
Referenced by locator_prefetch_index_page_internal().
int heap_attrinfo_set | ( | const OID * | inst_oid, |
ATTR_ID | attrid, | ||
DB_VALUE * | attr_val, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 11239 of file heap_file.c.
References ARG_FILE_LINE, assert, db_make_null(), db_value_domain_init(), db_value::domain, DOMAIN_COMPATIBLE, er_errid(), ER_FAILED, heap_attrinfo_check(), heap_attrvalue_locate(), pr_type::id, NO_ERROR, NULL, pr_clear_value(), pr_type_from_id(), pr_type::setval(), tp_domain_check(), tp_domain_status_er_set(), TP_EXACT_MATCH, TP_IS_SET_TYPE, and tp_value_auto_cast().
Referenced by eval_key_filter(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_mvcc_reev_cond_assigns(), cubload::server_object_loader::process_line(), qexec_execute_duplicate_key_update(), qexec_execute_insert(), qexec_execute_update(), serial_update_cur_val_of_serial(), and xserial_get_next_value_internal().
int heap_attrinfo_set_uninitialized_global | ( | THREAD_ENTRY * | thread_p, |
OID * | inst_oid, | ||
RECDES * | recdes, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 16711 of file heap_file.c.
References ER_FAILED, heap_attrinfo_set_uninitialized(), and NULL.
int heap_attrinfo_start | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
int | requested_num_attrs, | ||
const ATTR_ID * | attrid, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 9427 of file heap_file.c.
References assert, heap_hdr_stats::class_oid, db_private_alloc, db_private_realloc, db_value_domain_init(), er_errid(), ER_FAILED, heap_attrinfo_end(), heap_attrinfo_recache_attrepr(), heap_classrepr_get(), i, NO_ERROR, NULL, NULL_CHN, NULL_REPRID, and OID_SET_NULL.
Referenced by btree_sort_get_next(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_attrinfo_start_refoids(), heap_attrinfo_start_with_btid(), heap_capacity_next_scan(), heap_dump(), heap_dump_capacity(), heap_eval_function_index(), heap_get_partition_attributes(), heap_init_func_pred_unpack_info(), locator_check_btree_entries(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_delete_lob_force(), locator_eval_filter_predicate(), locator_get_partition_scancache(), partition_attrinfo_get_key(), partition_find_partition_for_record(), process_class(), qexec_create_delete_lob_info(), qexec_execute_increment(), qexec_execute_insert(), qexec_execute_obj_fetch(), qexec_execute_update(), cubload::server_class_installer::register_class_with_attributes(), scan_start_scan(), serial_load_attribute_info_of_db_serial(), serial_update_cur_val_of_serial(), cubload::server_object_loader::start_attrinfo(), xbtree_load_index(), xbtree_load_online_index(), xlocator_check_fk_validity(), xlocator_upgrade_instances_domain(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
int heap_attrinfo_start_with_btid | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
BTID * | btid, | ||
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 12237 of file heap_file.c.
References ARG_FILE_LINE, or_index::atts, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_attrinfo_start(), heap_classrepr_find_index_id(), heap_classrepr_free_and_init, heap_classrepr_get(), HEAP_GUESS_NUM_INDEXED_ATTRS, i, or_attribute::id, or_classrep::indexes, or_index::n_atts, NO_ERROR, NULL, NULL_ATTRID, and NULL_REPRID.
Referenced by locator_check_unique_btree_entries(), and locator_prefetch_index_page_internal().
int heap_attrinfo_start_with_index | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
RECDES * | class_recdes, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
HEAP_IDX_ELEMENTS_INFO * | idx_info | ||
) |
Definition at line 11997 of file heap_file.c.
References ARG_FILE_LINE, or_classrep::attributes, or_index::atts, heap_hdr_stats::class_oid, db_private_alloc, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_idx_elements_info::has_multi_col, heap_idx_elements_info::has_single_col, heap_attrinfo_end(), heap_attrinfo_recache_attrepr(), heap_classrepr_free_and_init, heap_classrepr_get(), HEAP_GUESS_NUM_INDEXED_ATTRS, i, or_attribute::id, or_classrep::indexes, or_classrep::n_attributes, or_index::n_atts, or_attribute::n_btids, or_classrep::n_indexes, NO_ERROR, NULL, NULL_CHN, NULL_REPRID, heap_idx_elements_info::num_btids, and OID_SET_NULL.
Referenced by locator_add_or_remove_index_internal(), locator_check_class(), locator_check_foreign_key(), locator_update_index(), qexec_execute_insert(), and xlocator_remove_class_from_index().
SCAN_CODE heap_attrinfo_transform_to_disk | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
RECDES * | old_recdes, | ||
record_descriptor * | new_recdes | ||
) |
Definition at line 11527 of file heap_file.c.
References heap_attrinfo_transform_to_disk_internal(), and LOB_FLAG_INCLUDE_LOB.
Referenced by locator_allocate_copy_area_by_attr_info(), and serial_update_serial_object().
SCAN_CODE heap_attrinfo_transform_to_disk_except_lob | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
RECDES * | old_recdes, | ||
record_descriptor * | new_recdes | ||
) |
Definition at line 11547 of file heap_file.c.
References heap_attrinfo_transform_to_disk_internal(), and LOB_FLAG_EXCLUDE_LOB.
Referenced by cubload::server_object_loader::finish_line(), and locator_allocate_copy_area_by_attr_info().
DB_VALUE* heap_attrvalue_get_key | ( | THREAD_ENTRY * | thread_p, |
int | btid_index, | ||
HEAP_CACHE_ATTRINFO * | idx_attrinfo, | ||
RECDES * | recdes, | ||
BTID * | btid, | ||
DB_VALUE * | db_value, | ||
char * | buf, | ||
FUNC_PRED_UNPACK_INFO * | func_indx_preds, | ||
TP_DOMAIN ** | key_domain | ||
) |
Definition at line 12802 of file heap_file.c.
References assert, or_function_index::attr_index_start, or_index::attrs_prefix_length, or_index::atts, or_index::btid, db_midxkey::buf, tp_domain::codeset, tp_domain::collation_flag, tp_domain::collation_id, DB_IS_NULL, db_make_midxkey(), db_private_alloc, db_string_truncate(), DB_VALUE_DOMAIN_TYPE, DBVAL_BUFSIZE, or_attribute::domain, or_index::func_index_info, heap_attrinfo_access(), heap_attrinfo_recache(), heap_eval_function_index(), heap_midxkey_key_get(), or_attribute::id, tp_domain::is_desc, recdes::length, db_midxkey::min_max_val, or_index::n_atts, db_value::need_clear, NO_ERROR, NULL, or_rep_id(), OR_VALUE_ALIGNED_SIZE, special_column::position, pr_clear_value(), pr_clone_value(), tp_domain::precision, QSTR_IS_ANY_CHAR_OR_BIT, tp_domain_cache(), TP_DOMAIN_CODESET, TP_DOMAIN_COLLATION, TP_DOMAIN_COLLATION_FLAG, tp_domain_construct(), tp_domain_find_charbit(), and TP_DOMAIN_TYPE.
Referenced by locator_add_or_remove_index_internal(), locator_check_btree_entries(), locator_check_foreign_key(), locator_check_unique_btree_entries(), locator_prefetch_index_page_internal(), locator_update_index(), qexec_oid_of_duplicate_key_update(), qexec_remove_duplicates_for_replace(), and xlocator_remove_class_from_index().
HEAP_ATTRVALUE* heap_attrvalue_locate | ( | ATTR_ID | attrid, |
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10590 of file heap_file.c.
Referenced by eval_key_filter(), heap_attrinfo_access(), heap_attrinfo_set(), and qexec_execute_increment().
int heap_cache_class_info | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
HFID * | hfid, | ||
FILE_TYPE | ftype, | ||
const char * | classname_in | ||
) |
Definition at line 23392 of file heap_file.c.
References assert, ASSERT_ERROR, heap_hfid_table_entry::classname, FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_type_to_string(), heap_hfid_table_entry::ftype, heap_get_class_info_from_record(), heap_hfid_table_log, heap_hfid_table_entry::hfid, HFID_AS_ARGS, HFID_COPY, heap_hfid_table::hfid_hash, HFID_INITIALIZER, HFID_IS_NULL, hfid::hpgid, lf_hash_delete(), lf_hash_find_or_insert(), lf_tran_end_with_mb, NO_ERROR, NULL, NULL_PAGEID, OID_ISNULL, strdup(), success(), thread_get_tran_entry(), and THREAD_TS_HFID_TABLE.
Referenced by boot_create_all_volumes(), boot_restart_server(), and heap_create_internal().
SCAN_CODE heap_capacity_next_scan | ( | THREAD_ENTRY * | thread_p, |
int | cursor, | ||
DB_VALUE ** | out_values, | ||
int | out_cnt, | ||
void * | ptr | ||
) |
Definition at line 18014 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, file_heap_des::class_oid, cleanup(), db_make_bigint(), db_make_int(), db_make_string_copy(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, er_set(), error(), file_descriptor_get(), vfid::fileid, or_classrep::fixed_length, free_and_init, file_descriptors::heap, heap_attrinfo_end(), heap_attrinfo_start(), heap_get_capacity(), heap_get_class_name(), heap_show_scan_ctx::hfids, heap_show_scan_ctx::hfids_count, hfid::hpgid, or_classrep::id, or_classrep::n_attributes, or_classrep::n_class_attrs, or_classrep::n_shared_attrs, or_classrep::n_variable, NO_ERROR, NULL, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, oid_to_string(), db_identifier::pageid, S_END, S_ERROR, S_SUCCESS, db_identifier::slotid, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by showstmt_scan_init().
DISK_ISVALID heap_check_all_heaps | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 13996 of file heap_file.c.
References assert, ASSERT_ERROR, DISK_ERROR, DISK_VALID, FILE_HEAP, file_tracker_interruptable_iterate(), heap_check_heap_file(), lock_unlock_object(), NO_ERROR, OID_INITIALIZER, OID_ISNULL, oid_Root_class_oid, SCH_S_LOCK, hfid::vfid, VFID_INITIALIZER, and VFID_ISNULL.
Referenced by xboot_check_db_consistency().
DISK_ISVALID heap_check_all_pages | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid | ||
) |
Definition at line 13775 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, assert_release, heap_hdr_stats::best, heap_stats_entry::best, heap_stats_bestspace_cache::bestspace_mutex, recdes::data, DISK_ERROR, DISK_INVALID, DISK_VALID, ER_ERROR_SEVERITY, ER_HEAP_MISMATCH_NPAGES, er_set(), heap_hdr_stats::estimates, file_check_vpid(), file_get_num_user_pages(), vfid::fileid, for(), heap_bestspace::freespace, heap_check_all_pages_by_heapchain(), heap_chkreloc_end(), heap_chkreloc_start(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_scan_pb_lock_and_fetch, heap_stats_bestspace_cache::hfid_ht, hfid::hpgid, i, mht_count(), mht_get2(), NO_ERROR, NULL, OLD_PAGE, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_unfix_and_init, prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, pthread_mutex_lock, pthread_mutex_unlock, rc, S_LOCK, S_SUCCESS, spage_get_record(), heap_chkall_relocoids::verify, heap_chkall_relocoids::verify_not_vacuumed, hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, heap_stats_bestspace_cache::vpid_ht, and VPID_ISNULL.
Referenced by heap_check_heap_file().
DISK_ISVALID heap_check_heap_file | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid | ||
) |
Definition at line 13941 of file heap_file.c.
References assert, ASSERT_ERROR, assert_release, file_heap_des::class_oid, DISK_ERROR, DISK_INVALID, DISK_VALID, file_descriptor_get(), file_get_type(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, FILE_UNKNOWN_TYPE, file_descriptors::heap, heap_check_all_pages(), heap_get_header_page(), hfid::hpgid, lock_has_lock_on_object(), NO_ERROR, OID_ISNULL, oid_Root_class_oid, vpid::pageid, rv, SCH_S_LOCK, and hfid::vfid.
Referenced by heap_check_all_heaps(), and xboot_checkdb_table().
void heap_chnguess_clear | ( | THREAD_ENTRY * | thread_p, |
int | tran_index | ||
) |
Definition at line 15416 of file heap_file.c.
References heap_chnguess_entry::bits, csect_enter, csect_exit, CSECT_HEAP_CHNGUESS, heap_chnguess::entries, HEAP_BIT_CLEAR, i, INF_WAIT, NO_ERROR, NULL, heap_chnguess::num_entries, heap_chnguess_entry::oid, and OID_ISNULL.
Referenced by logtb_release_tran_index().
int heap_chnguess_get | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
int | tran_index | ||
) |
Definition at line 15255 of file heap_file.c.
References heap_chnguess_entry::bits, heap_chnguess_entry::chn, csect_enter, csect_exit, CSECT_HEAP_CHNGUESS, HEAP_BIT_GET, heap_chnguess_realloc(), heap_chnguess::ht, INF_WAIT, mht_get(), NO_ERROR, NULL, NULL_CHN, and heap_chnguess::num_clients.
Referenced by locator_lock_and_return_object().
int heap_chnguess_put | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
int | tran_index, | ||
int | chn | ||
) |
Definition at line 15306 of file heap_file.c.
References heap_chnguess_entry::bits, heap_chnguess_entry::chn, heap_chnguess::clock_hand, csect_enter, csect_exit, CSECT_HEAP_CHNGUESS, heap_chnguess::entries, HEAP_BIT_SET, heap_chnguess_realloc(), HEAP_NBYTES_CLEARED, heap_chnguess::ht, i, INF_WAIT, mht_get(), heap_chnguess::nbytes, NO_ERROR, NULL, NULL_CHN, heap_chnguess::num_clients, heap_chnguess::num_entries, heap_chnguess_entry::oid, and heap_chnguess_entry::recently_accessed.
Referenced by heap_mark_class_as_modified(), and locator_return_object_assign().
int heap_classrepr_decache | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid | ||
) |
Definition at line 1818 of file heap_file.c.
References csect_enter, csect_exit, CSECT_HEAP_CHNGUESS, ER_FAILED, heap_chnguess_decache(), heap_classrepr_decache_guessed_last(), INF_WAIT, NO_ERROR, NULL, and heap_chnguess::schema_change.
Referenced by tx_transient_class_registry::decache_heap_repr().
void heap_classrepr_dump_all | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
OID * | class_oid | ||
) |
Definition at line 16874 of file heap_file.c.
References assert, cubregex::count(), er_clear(), free_and_init, heap_classrepr_dump(), heap_get_class_name(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, NO_ERROR, NULL, or_free_classrep(), or_get_all_representation(), db_identifier::pageid, PEEK, S_SUCCESS, db_identifier::slotid, and db_identifier::volid.
Referenced by catalog_dump().
int heap_classrepr_find_index_id | ( | OR_CLASSREP * | classrepr, |
const BTID * | btid | ||
) |
Definition at line 12193 of file heap_file.c.
References or_index::btid, BTID_IS_EQUAL, i, or_classrep::indexes, and or_classrep::n_indexes.
Referenced by heap_attrinfo_start_with_btid(), and heap_get_indexinfo_of_btid().
int heap_classrepr_free | ( | OR_CLASSREP * | classrep, |
int * | idx_incache | ||
) |
Definition at line 1893 of file heap_file.c.
References heap_classrepr_cache::area, assert, heap_hdr_stats::class_oid, heap_classrepr_lock::class_oid, ER_FAILED, heap_classrepr_entry::fcnt, heap_classrepr_entry::force_decache, heap_classrepr_hash::hash_mutex, heap_classrepr_entry_free(), heap_classrepr_entry_remove_from_LRU(), heap_classrepr_entry_reset(), heap_classrepr_lock::lock_next, heap_classrepr_hash::lock_next, heap_classrepr_cache::lock_table, heap_classrepr_LRU_list::LRU_bottom, heap_classrepr_cache::LRU_list, heap_classrepr_LRU_list::LRU_mutex, heap_classrepr_LRU_list::LRU_top, heap_classrepr_entry::mutex, heap_classrepr_entry::next, heap_classrepr_lock::next_wait_thrd, NO_ERROR, NULL, OID_EQ, or_free_classrep(), heap_classrepr_entry::prev, pthread_mutex_lock, pthread_mutex_unlock, rv, thread_get_thread_entry_info(), THREAD_HEAP_CLSREPR_RESUMED, THREAD_HEAP_CLSREPR_SUSPENDED, thread_lock_entry(), THREAD_RESUME_DUE_TO_INTERRUPT, thread_suspend_wakeup_and_unlock_entry(), thread_wakeup(), heap_classrepr_entry::zone, and ZONE_LRU.
OR_CLASSREP* heap_classrepr_get | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
RECDES * | class_recdes, | ||
REPR_ID | reprid, | ||
int * | idx_incache | ||
) |
Definition at line 2299 of file heap_file.c.
References heap_classrepr_cache::area, ARG_FILE_LINE, assert, ASSERT_ERROR, heap_hdr_stats::class_oid, heap_classrepr_entry::class_oid, ER_CSS_PTHREAD_MUTEX_LOCK, ER_CT_UNKNOWN_REPRID, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), er_set_with_oserror(), heap_classrepr_entry::fcnt, heap_classrepr_entry::force_decache, free_and_init, heap_classrepr_free_list::free_cnt, heap_classrepr_cache::free_list, heap_classrepr_hash::hash_mutex, heap_classrepr_entry::hash_next, heap_classrepr_hash::hash_next, heap_classrepr_cache::hash_table, heap_classrepr_dump(), heap_classrepr_entry_alloc(), heap_classrepr_entry_free(), heap_classrepr_get_from_record(), heap_classrepr_log_stack, i, or_classrep::id, heap_classrepr_entry::idx, heap_classrepr_entry::last_reprid, heap_classrepr_entry::max_reprid, heap_classrepr_entry::mutex, NO_ERROR, NULL, NULL_REPRID, heap_classrepr_cache::num_entries, OID_AS_ARGS, OID_EQ, OLD_PAGE, or_free_classrep(), db_identifier::pageid, PGBUF_CONDITIONAL_LATCH, pgbuf_fix, PGBUF_LATCH_READ, pgbuf_unfix_and_init, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, REC_HOME, heap_classrepr_entry::repr, REPR_HASH, rv, db_identifier::slotid, spage_get_record_type(), db_identifier::volid, and VPID_GET_FROM_OID.
Referenced by btree_check_by_class_oid(), btree_check_foreign_key(), btree_get_pkey_btid(), btree_index_next_scan(), btree_index_start_scan(), btree_is_btid_online_index(), btree_load_check_fk(), btree_repair_prev_link_by_class_oid(), catalog_get_cardinality(), heap_attrinfo_recache(), heap_attrinfo_start(), heap_attrinfo_start_refoids(), heap_attrinfo_start_with_btid(), heap_attrinfo_start_with_index(), heap_get_btid_from_index_name(), heap_get_class_repr_id(), heap_get_index_with_name(), heap_get_indexinfo_of_btid(), heap_scancache_start_modify(), heap_set_autoincrement_value(), locator_check_foreign_key(), logtb_create_unique_stats_from_repr(), logtb_tran_load_global_stats_func(), partition_get_partition_oids(), qexec_execute_build_columns(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), and xfile_apply_tde_to_class_files().
int heap_classrepr_restart_cache | ( | void | ) |
Definition at line 1849 of file heap_file.c.
References assert, ER_FAILED, heap_classrepr_finalize_cache(), heap_classrepr_initialize_cache(), log_is_in_crash_recovery(), and NO_ERROR.
Referenced by log_recovery().
void heap_clean_get_context | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context | ||
) |
Definition at line 24657 of file heap_file.c.
References assert, heap_scancache::cache_last_fix_page, heap_get_context::fwd_page_watcher, heap_get_context::home_page_watcher, NULL, heap_scancache::page_watcher, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, and heap_get_context::scan_cache.
Referenced by heap_get_class_record(), heap_get_visible_version(), heap_prepare_get_context(), heap_scan_get_visible_version(), locator_attribute_info_force(), locator_get_object(), locator_lock_and_get_object(), locator_lock_and_get_object_internal(), locator_lock_and_get_object_with_evaluation(), and update_indexes().
void heap_clear_partition_info | ( | THREAD_ENTRY * | thread_p, |
OR_PARTITION * | parts, | ||
int | parts_count | ||
) |
Definition at line 11126 of file heap_file.c.
References db_private_free, db_seq_free(), i, and NULL.
Referenced by btree_index_start_scan(), heap_header_capacity_start_scan(), partition_clear_pruning_context(), and partition_load_pruning_context().
int heap_compact_pages | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid | ||
) |
Definition at line 16754 of file heap_file.c.
References assert, DONT_FREE, ER_FAILED, ER_QPROC_INVALID_PARAMETER, heap_get_class_info(), heap_scan_pb_lock_and_fetch, heap_vpid_next(), HFID_IS_NULL, hfid::hpgid, IS_LOCK, LK_GRANTED, LK_UNCOND_LOCK, lock_object(), lock_unlock_object(), log_skip_logging(), heap_hdr_stats::next_vpid, NO_ERROR, NULL, log_data_addr::offset, oid_Root_class_oid, OLD_PAGE, OLD_PAGE_PREVENT_DEALLOC, PAGE_HEAP, vpid::pageid, pgbuf_check_page_ptype(), PGBUF_INIT_WATCHER, PGBUF_LATCH_READ, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, spage_compact(), log_data_addr::vfid, hfid::vfid, vpid::volid, vfid::volid, VPID_ISNULL, and X_LOCK.
Referenced by boot_heap_compact_pages().
void heap_create_delete_context | ( | HEAP_OPERATION_CONTEXT * | context, |
HFID * | hfid_p, | ||
OID * | oid_p, | ||
OID * | class_oid_p, | ||
HEAP_SCANCACHE * | scancache_p | ||
) |
Definition at line 22351 of file heap_file.c.
References assert, heap_operation_context::class_oid, COPY_OID, heap_clear_operation_context(), HEAP_OPERATION_DELETE, NULL, heap_operation_context::oid, heap_operation_context::scan_cache_p, heap_operation_context::type, and heap_operation_context::use_bulk_logging.
Referenced by catcls_delete_instance(), and locator_delete_force_internal().
void heap_create_insert_context | ( | HEAP_OPERATION_CONTEXT * | context, |
HFID * | hfid_p, | ||
OID * | class_oid_p, | ||
RECDES * | recdes_p, | ||
HEAP_SCANCACHE * | scancache_p | ||
) |
Definition at line 22324 of file heap_file.c.
References assert, heap_operation_context::class_oid, COPY_OID, heap_clear_operation_context(), HEAP_OPERATION_INSERT, NULL, heap_operation_context::recdes_p, heap_operation_context::scan_cache_p, heap_operation_context::type, and heap_operation_context::use_bulk_logging.
Referenced by boot_create_all_volumes(), heap_assign_address(), heap_insert_newhome(), locator_insert_force(), and tde_initialize().
void heap_create_update_context | ( | HEAP_OPERATION_CONTEXT * | context, |
HFID * | hfid_p, | ||
OID * | oid_p, | ||
OID * | class_oid_p, | ||
RECDES * | recdes_p, | ||
HEAP_SCANCACHE * | scancache_p, | ||
UPDATE_INPLACE_STYLE | in_place | ||
) |
Definition at line 22378 of file heap_file.c.
References assert, heap_operation_context::class_oid, COPY_OID, heap_clear_operation_context(), HEAP_OPERATION_UPDATE, NULL, heap_operation_context::oid, heap_operation_context::recdes_p, heap_operation_context::scan_cache_p, heap_operation_context::type, heap_operation_context::update_in_place, and heap_operation_context::use_bulk_logging.
Referenced by boot_db_parm_update_heap(), catcls_insert_instance(), catcls_update_instance(), disk_update_instance(), locator_insert_force(), locator_update_force(), and tde_update_keyinfo().
int heap_delete_hfid_from_cache | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid | ||
) |
Definition at line 23262 of file heap_file.c.
References error(), heap_hfid_table_log, heap_hfid_table::hfid_hash, lf_hash_delete(), NO_ERROR, success(), thread_get_tran_entry(), and THREAD_TS_HFID_TABLE.
Referenced by vacuum_rv_notify_dropped_file().
int heap_delete_logical | ( | THREAD_ENTRY * | thread_p, |
HEAP_OPERATION_CONTEXT * | context | ||
) |
Definition at line 22606 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, heap_scancache::cache_last_fix_page, heap_operation_context::class_oid, COPY, recdes::data, DB_PAGESIZE, ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_HEAP_BAD_OBJECT_TYPE, ER_HEAP_UNKNOWN_OBJECT, ER_INTERRUPTED, er_set(), error(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, heap_operation_context::file_type, FILE_UNKNOWN_TYPE, heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_get_file_type(), heap_get_record_location(), heap_is_valid_oid(), heap_mark_class_as_modified(), HEAP_OPERATION_DELETE, HEAP_PERF_START, HEAP_PERF_TRACK_PREPARE, heap_scancache_check_with_hfid(), heap_unfix_watchers(), heap_operation_context::hfid, HFID_EQ, HFID_IS_NULL, heap_operation_context::home_page_watcher, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, heap_operation_context::home_recdes_buffer, MAX_ALIGNMENT, mvcc_is_mvcc_disabled_class(), NO_ERROR, NULL, NULL_CHN, heap_operation_context::oid, OID_ISNULL, heap_scancache::page_watcher, db_identifier::pageid, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, PTR_ALIGN, rc, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_HOME, REC_RELOCATION, REC_UNKNOWN, heap_operation_context::record_type, heap_classrepr_cache::rootclass_hfid, S_SUCCESS, heap_operation_context::scan_cache_p, db_identifier::slotid, spage_get_record(), spage_get_record_type(), heap_operation_context::time_track, heap_operation_context::type, and db_identifier::volid.
Referenced by catcls_delete_instance(), and locator_delete_force_internal().
bool heap_does_exist | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const OID * | oid | ||
) |
Definition at line 8714 of file heap_file.c.
References ARG_FILE_LINE, assert, assert_release, heap_hdr_stats::class_oid, DISK_VALID, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_PB_BAD_PAGEID, er_set(), heap_get_class_oid_from_page(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_ISVALID_OID, heap_scan_pb_lock_and_fetch, LK_INFINITE_WAIT, logtb_set_check_interrupt(), NO_ERROR, NULL, OID_EQ, OID_IS_ROOTOID, OID_ISNULL, oid_Root_class_oid, OID_SET_NULL, OLD_PAGE, vpid::pageid, db_identifier::pageid, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, REC_ASSIGN_ADDRESS, S_LOCK, db_identifier::slotid, spage_get_record_type(), spage_is_slot_exist(), vpid::volid, db_identifier::volid, and xlogtb_reset_wait_msecs().
Referenced by heap_is_object_not_null(), locator_all_reference_lockset(), locator_check_btree_entries(), locator_check_unique_btree_entries(), locator_defence_drop_class_name_entry(), locator_guess_sub_classes(), locator_is_exist_class_name_entry(), scan_next_heap_scan(), scan_next_index_lookup_heap(), and xlocator_does_exist().
void heap_dump | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
HFID * | hfid, | ||
bool | dump_records | ||
) |
Definition at line 14113 of file heap_file.c.
References assert, ASSERT_ERROR, file_heap_des::class_oid, recdes::data, file_descriptor_dump(), file_descriptor_get(), file_dump(), vfid::fileid, file_descriptors::heap, heap_attrinfo_dump(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), heap_classrepr_dump(), heap_dump_hdr(), HEAP_HEADER_AND_CHAIN_SLOTID, heap_next(), heap_scan_pb_lock_and_fetch, heap_scancache_end(), heap_scancache_start(), heap_vpid_next(), hfid::hpgid, recdes::length, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, OLD_PAGE, OLD_PAGE_PREVENT_DEALLOC, heap_hdr_stats::ovf_vfid, vpid::pageid, db_identifier::pageid, PEEK, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, S_LOCK, S_SUCCESS, db_identifier::slotid, spage_dump(), spage_get_record(), hfid::vfid, VFID_COPY, VFID_ISNULL, vpid::volid, vfid::volid, db_identifier::volid, and VPID_ISNULL.
Referenced by file_tracker_item_dump_heap().
int heap_dump_capacity | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
const HFID * | hfid | ||
) |
Definition at line 14281 of file heap_file.c.
References ASSERT_ERROR, file_heap_des::class_oid, DB_PAGESIZE, file_descriptor_get(), vfid::fileid, file_descriptors::heap, heap_attrinfo_end(), heap_attrinfo_start(), heap_classrepr_dump(), heap_get_capacity(), hfid::hpgid, IO_PAGESIZE, NO_ERROR, NULL, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, OID_ISNULL, hfid::vfid, and vfid::volid.
Referenced by file_tracker_item_dump_heap_capacity().
int heap_estimate | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
int * | npages, | ||
int * | nobjs, | ||
int * | avg_length | ||
) |
Definition at line 9005 of file heap_file.c.
References recdes::data, ER_FAILED, heap_hdr_stats::estimates, HEAP_HEADER_AND_CHAIN_SLOTID, hfid::hpgid, if(), NULL, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, OLD_PAGE, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, heap_hdr_stats::recs_sumlen, S_SUCCESS, spage_get_record(), hfid::vfid, vpid::volid, and vfid::volid.
Referenced by heap_estimate_avg_length(), heap_estimate_num_objects(), and xheap_get_class_num_objects_pages().
int heap_estimate_num_objects | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid | ||
) |
Definition at line 9060 of file heap_file.c.
References ER_FAILED, and heap_estimate().
Referenced by xlocator_fetch_all(), xlocator_lock_and_fetch_all(), xstats_get_statistics_from_server(), and xstats_update_statistics().
void heap_finalize_hfid_table | ( | void | ) |
Definition at line 23242 of file heap_file.c.
References heap_hfid_table::hfid_hash, heap_hfid_table::hfid_hash_freelist, lf_freelist_destroy(), lf_hash_destroy(), and NULL.
Referenced by heap_manager_finalize().
SCAN_CODE heap_first | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking | ||
) |
Definition at line 8097 of file heap_file.c.
References heap_next(), OID_SET_NULL, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by boot_get_db_parm(), heap_scanrange_to_following(), tde_get_keyinfo(), and xheap_has_instance().
void heap_flush | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid | ||
) |
Definition at line 5974 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, COPY, recdes::data, DISK_VALID, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_PB_BAD_PAGEID, er_set(), HEAP_ISVALID_OID, heap_ovf_flush(), heap_scan_pb_lock_and_fetch, NO_ERROR, NULL, OLD_PAGE, OR_OID_SIZE, PAGE_HEAP, vpid::pageid, db_identifier::pageid, pgbuf_check_page_ptype(), pgbuf_flush_with_wal(), pgbuf_unfix_and_init, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_DELETED_WILL_REUSE, REC_HOME, REC_MARKDELETED, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, S_LOCK, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_get_record_type(), vpid::volid, and db_identifier::volid.
Referenced by boot_dbparm_save_volume(), and tde_change_mk().
void heap_free_func_pred_unpack_info | ( | THREAD_ENTRY * | thread_p, |
int | n_indexes, | ||
FUNC_PRED_UNPACK_INFO * | func_indx_preds, | ||
int * | attr_info_started | ||
) |
Definition at line 17621 of file heap_file.c.
References assert, db_private_free_and_init, free_xasl_unpack_info(), heap_attrinfo_end(), i, NULL, and qexec_clear_func_pred().
Referenced by heap_init_func_pred_unpack_info(), partition_clear_pruning_context(), and qexec_execute_insert().
int heap_get_best_space_num_stats_entries | ( | void | ) |
Definition at line 24829 of file heap_file.c.
References heap_stats_bestspace_cache::num_stats_entries.
Referenced by perfmon_get_peek_stats().
int heap_get_btid_from_index_name | ( | THREAD_ENTRY * | thread_p, |
const OID * | p_class_oid, | ||
const char * | index_name, | ||
BTID * | p_found_btid | ||
) |
Definition at line 16938 of file heap_file.c.
References ARG_FILE_LINE, assert, or_index::btid, BTID_COPY, BTID_SET_NULL, or_index::btname, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_UNEXPECTED, error(), heap_classrepr_free_and_init, heap_classrepr_get(), or_classrep::indexes, intl_identifier_casecmp(), NO_ERROR, NULL, and NULL_REPRID.
Referenced by catalog_get_cardinality_by_name(), serial_alloc_cache_area(), and xbtree_load_online_index().
int heap_get_class_info | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
HFID * | hfid_out, | ||
FILE_TYPE * | ftype_out, | ||
char ** | classname_out | ||
) |
Definition at line 16733 of file heap_file.c.
References ASSERT_ERROR_AND_SET, heap_hfid_cache_get(), and NO_ERROR.
Referenced by boot_compact_db(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_compact_pages(), heap_get_file_type(), heap_header_capacity_start_scan(), heap_scancache_add_partition_node(), heap_scancache_quick_start_modify_with_class_oid(), heap_scancache_quick_start_with_class_oid(), heap_scancache_reset_modify(), heap_scancache_start_internal(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_update_force(), pgbuf_get_groupid_and_unfix(), redistribute_partition_data(), cubload::server_object_loader::start_scancache(), vacuum_heap_get_hfid_and_file_type(), xboot_checkdb_table(), xfile_apply_tde_to_class_files(), xlocator_repl_force(), and xlocator_upgrade_instances_domain().
int heap_get_class_name | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
char ** | class_name | ||
) |
Definition at line 9328 of file heap_file.c.
References heap_get_class_name_alloc_if_diff(), and NULL.
Referenced by btree_dump_capacity(), btree_dump_page(), btree_index_next_scan(), btree_set_error(), catalog_start_access_with_dir_oid(), catcls_convert_class_oid_to_oid(), file_print_name_of_class(), heap_attrinfo_transform_to_disk_internal(), heap_capacity_next_scan(), heap_classrepr_dump(), heap_classrepr_dump_all(), heap_header_next_scan(), heap_mark_class_as_modified(), heap_set_autoincrement_value(), locator_add_or_remove_index_internal(), locator_check_btree_entries(), locator_check_unique_btree_entries(), locator_update_index(), lock_demote_class_lock(), lock_wait_state_to_string(), qdump_print_xasl(), scan_next_index_lookup_heap(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int heap_get_class_name_alloc_if_diff | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
char * | guess_classname, | ||
char ** | class_name_out | ||
) |
Definition at line 9351 of file heap_file.c.
References ARG_FILE_LINE, ASSERT_ERROR_AND_SET, er_clear(), ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_NODATA_NEWADDRESS, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), NO_ERROR, NULL, or_class_name(), PEEK, S_SUCCESS, strdup(), and strlen.
Referenced by heap_get_class_name(), locator_check_class_on_heap(), and locator_update_force().
SCAN_CODE heap_get_class_oid | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
OID * | class_oid | ||
) |
Definition at line 9285 of file heap_file.c.
References assert, assert_release, ER_HEAP_UNKNOWN_OBJECT, err, heap_get_class_oid_from_page(), heap_prepare_object_page(), NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, PGBUF_INIT_WATCHER, PGBUF_LATCH_READ, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, S_DOESNT_EXIST, S_ERROR, and S_SUCCESS.
Referenced by catcls_expand_or_value_by_subset(), locator_check_unique_btree_entries(), locator_find_lockset_missing_class_oids(), locator_update_force(), qdata_get_class_of_function(), qexec_execute_selupd_list_find_class(), vacuum_check_not_vacuumed_rec_header(), xlocator_fetch(), and xlocator_get_class().
int heap_get_class_oid_from_page | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page_p, | ||
OID * | class_oid | ||
) |
Definition at line 18824 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_chain::class_oid, COPY_OID, recdes::data, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, er_set(), HEAP_HEADER_AND_CHAIN_SLOTID, NO_ERROR, OID_ISNULL, oid_Root_class_oid, PEEK, S_SUCCESS, and spage_get_record().
Referenced by heap_chkreloc_next(), heap_does_exist(), heap_find_location_and_insert_rec_newhome(), heap_get_class_oid(), heap_get_record_location(), heap_insert_physical(), heap_prepare_get_context(), locator_get_object(), locator_lock_and_get_object_with_evaluation(), pgbuf_get_groupid_and_unfix(), and vacuum_heap_get_hfid_and_file_type().
int heap_get_class_partitions | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
OR_PARTITION ** | parts, | ||
int * | parts_count | ||
) |
Definition at line 11016 of file heap_file.c.
References ARG_FILE_LINE, ASSERT_ERROR, cleanup(), COPY_OID, db_private_alloc, db_private_free, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_class_get_partition_info(), heap_get_class_subclasses(), heap_get_partitions_from_subclasses(), HFID_COPY, NO_ERROR, NULL, NULL_REPRID, or_partition::partition_type, or_partition::rep_id, set_copy(), set_free(), and or_partition::values.
Referenced by btree_index_start_scan(), heap_header_capacity_start_scan(), and partition_load_pruning_context().
SCAN_CODE heap_get_class_record | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
RECDES * | recdes_p, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking | ||
) |
Definition at line 24780 of file heap_file.c.
References assert, heap_clean_get_context(), heap_get_last_version(), heap_init_get_context(), NULL_CHN, OID_IS_ROOTOID, OID_ISNULL, oid_Root_class_oid, and OID_SET_NULL.
Referenced by btree_scan_for_show_index_header(), catalog_get_dir_oid_from_cache(), catalog_get_rep_dir(), catcls_compile_catalog_classes(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_class_get_partition_info(), heap_classrepr_dump(), heap_classrepr_dump_all(), heap_classrepr_get_from_record(), heap_get_class_info_from_record(), heap_get_class_name_alloc_if_diff(), heap_get_class_subclasses(), heap_get_class_supers(), heap_get_class_tde_algorithm(), heap_get_partition_attributes(), heap_set_autoincrement_value(), locator_check_all_entries_of_all_btrees(), locator_check_by_class_oid(), locator_guess_sub_classes(), locator_update_force(), or_get_hierarchy_helper(), qexec_execute_build_columns(), qexec_execute_build_indexes(), cubload::server_class_installer::register_class_with_attributes(), serial_load_attribute_info_of_db_serial(), and xboot_checkdb_table().
REPR_ID heap_get_class_repr_id | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid | ||
) |
Definition at line 16476 of file heap_file.c.
References heap_classrepr_free_and_init, heap_classrepr_get(), or_classrep::id, NULL, and NULL_REPRID.
Referenced by boot_compact_db(), locator_insert_force(), and locator_repl_prepare_force().
int heap_get_class_supers | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
OID ** | super_oids, | ||
int * | count | ||
) |
Definition at line 11153 of file heap_file.c.
References ER_FAILED, error(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), NO_ERROR, orc_superclasses_from_record(), PEEK, and S_SUCCESS.
Referenced by partition_find_root_class_oid().
int heap_get_class_tde_algorithm | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
TDE_ALGORITHM * | tde_algo | ||
) |
Definition at line 10737 of file heap_file.c.
References assert, ER_FAILED, error(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), NO_ERROR, NULL, OID_ISNULL, or_class_tde_algorithm(), PEEK, S_SUCCESS, and TDE_ALGORITHM_NONE.
Referenced by btree_create_file(), btree_create_overflow_key_file(), btree_index_sort(), heap_create_internal(), heap_ovf_find_vfid(), and xfile_apply_tde_to_class_files().
int heap_get_hfid_from_vfid | ( | THREAD_ENTRY * | thread_p, |
const VFID * | vfid, | ||
HFID * | hfid | ||
) |
Definition at line 24843 of file heap_file.c.
References assert, ASSERT_ERROR, heap_get_header_page(), hfid::hpgid, NO_ERROR, vpid::pageid, hfid::vfid, VFID_SET_NULL, vpid::volid, and vfid::volid.
Referenced by file_tracker_item_dump_heap(), and file_tracker_item_dump_heap_capacity().
int heap_get_index_with_name | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const char * | index_name, | ||
BTID * | btid | ||
) |
Definition at line 13092 of file heap_file.c.
References or_index::btid, BTID_COPY, BTID_SET_NULL, or_index::btname, ER_FAILED, error(), heap_classrepr_free_and_init, heap_classrepr_get(), i, or_classrep::indexes, or_classrep::n_indexes, NO_ERROR, NULL, and NULL_REPRID.
Referenced by partition_find_inherited_btid(), partition_load_aggregate_helper(), and pruningset_to_spec_list().
int heap_get_indexinfo_of_btid | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
const BTID * | btid, | ||
BTREE_TYPE * | type, | ||
int * | num_attrs, | ||
ATTR_ID ** | attr_ids, | ||
int ** | attrs_prefix_length, | ||
char ** | btnamepp, | ||
int * | func_index_col_id | ||
) |
Definition at line 13134 of file heap_file.c.
References or_index::attrs_prefix_length, or_index::atts, or_index::btname, BTREE_INDEX, or_function_index::col_id, db_private_alloc, db_private_free_and_init, er_errid(), ER_FAILED, free_and_init, or_index::func_index_info, heap_classrepr_find_index_id(), heap_classrepr_free_and_init, heap_classrepr_get(), i, or_attribute::id, or_classrep::indexes, or_index::n_atts, NO_ERROR, NULL, NULL_REPRID, strdup(), and or_index::type.
Referenced by btree_check_by_btid(), btree_dump_capacity(), btree_fix_ovfl_oid_pages_by_btid(), btree_repair_prev_link(), btree_repair_prev_link_by_class_oid(), btree_set_error(), file_header_dump_descriptor(), locator_check_class(), locator_check_primary_key_delete(), locator_check_primary_key_update(), partition_attrinfo_get_key(), partition_find_inherited_btid(), partition_get_position_in_key(), partition_load_aggregate_helper(), pruningset_to_spec_list(), qdump_print_xasl(), qexec_process_partition_unique_stats(), scan_next_index_lookup_heap(), scan_open_index_key_info_scan(), and scan_open_index_scan().
SCAN_CODE heap_get_last_version | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context | ||
) |
Definition at line 24546 of file heap_file.c.
References assert, COPY, DB_PAGESIZE, heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_get_mvcc_header(), heap_get_record_data_when_all_ready(), heap_prepare_get_context(), heap_scan_cache_allocate_area(), heap_get_context::ispeeking, LOG_WARNING_IF_DELETED, MVCC_IS_CHN_UPTODATE, MVCC_REC_HEADER_INITIALIZER, NO_ERROR, NULL, OID_ISNULL, heap_get_context::old_chn, pgbuf_watcher::pgptr, REC_BIGONE, REC_HOME, REC_RELOCATION, heap_get_context::recdes_p, heap_get_context::record_type, S_ERROR, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, and heap_get_context::scan_cache.
Referenced by heap_get_class_record(), locator_attribute_info_force(), locator_lock_and_get_object_internal(), and update_indexes().
SCAN_CODE heap_get_mvcc_header | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context, | ||
MVCC_REC_HEADER * | mvcc_header | ||
) |
Definition at line 7620 of file heap_file.c.
References assert, heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_get_mvcc_rec_header_from_overflow(), heap_get_context::home_page_watcher, NO_ERROR, NULL, heap_get_context::oid_p, or_mvcc_get_header(), db_identifier::pageid, PEEK, pgbuf_get_page_id(), pgbuf_get_volume_id(), pgbuf_watcher::pgptr, REC_BIGONE, REC_HOME, REC_RELOCATION, heap_get_context::record_type, S_ERROR, S_SUCCESS, db_identifier::slotid, spage_get_record(), and db_identifier::volid.
Referenced by heap_get_last_version(), heap_get_visible_version_internal(), and locator_lock_and_get_object_internal().
int heap_get_mvcc_rec_header_from_overflow | ( | PAGE_PTR | ovf_page, |
MVCC_REC_HEADER * | mvcc_header, | ||
RECDES * | peek_recdes | ||
) |
Definition at line 18714 of file heap_file.c.
References assert, recdes::data, recdes::length, NULL, or_mvcc_get_header(), OR_MVCC_MAX_HEADER_SIZE, and overflow_get_first_page_data().
Referenced by heap_chkreloc_next(), heap_delete_bigone(), heap_get_mvcc_header(), heap_rv_mvcc_redo_delete_overflow(), heap_rv_mvcc_undo_delete_overflow(), overflow_get_nbytes(), vacuum_heap_prepare_record(), vacuum_rv_check_at_undo(), and vacuum_rv_redo_remove_ovf_insid().
int heap_get_num_objects | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
int * | npages, | ||
int * | nobjs, | ||
int * | avg_length | ||
) |
Definition at line 8935 of file heap_file.c.
References recdes::data, ER_FAILED, heap_hdr_stats::estimates, HEAP_HEADER_AND_CHAIN_SLOTID, heap_stats_sync_bestspace(), hfid::hpgid, if(), log_skip_logging(), NO_ERROR, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, log_data_addr::offset, OLD_PAGE, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_get_vpid_ptr(), PGBUF_INIT_WATCHER, PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_HDR, pgbuf_ordered_set_dirty_and_free(), pgbuf_ordered_unfix, log_data_addr::pgptr, pgbuf_watcher::pgptr, heap_hdr_stats::recs_sumlen, S_SUCCESS, spage_get_record(), log_data_addr::vfid, hfid::vfid, vpid::volid, and vfid::volid.
Referenced by xheap_get_class_num_objects_pages().
SCAN_CODE heap_get_record_data_when_all_ready | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context | ||
) |
Definition at line 7707 of file heap_file.c.
References assert, ASSERT_ERROR, COPY, recdes::data, DB_PAGESIZE, heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_get_bigone_content(), heap_scan_cache_allocate_recdes_data(), heap_get_context::home_page_watcher, heap_get_context::ispeeking, NO_ERROR, NULL, heap_get_context::oid_p, PEEK, pgbuf_watcher::pgptr, REC_BIGONE, REC_HOME, REC_RELOCATION, heap_get_context::recdes_p, heap_get_context::record_type, S_ERROR, heap_get_context::scan_cache, db_identifier::slotid, and spage_get_record().
Referenced by heap_get_last_version(), heap_get_visible_version_internal(), and locator_lock_and_get_object_with_evaluation().
int heap_get_referenced_by | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const OID * | obj_oid, | ||
RECDES * | obj, | ||
int * | max_oid_cnt, | ||
OID ** | oid_list | ||
) |
Definition at line 13303 of file heap_file.c.
References ARG_FILE_LINE, db_get_oid(), db_get_set(), db_set_get(), db_set_size(), DB_TYPE_OID, db_value_is_null(), db_value_type(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start_refoids(), i, NO_ERROR, NULL, oid_is_root(), OID_ISNULL, and TP_IS_SET_TYPE.
Referenced by locator_all_reference_lockset().
SCAN_CODE heap_get_visible_version | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
int | old_chn | ||
) |
Definition at line 24272 of file heap_file.c.
References heap_clean_get_context(), heap_get_visible_version_internal(), heap_init_get_context(), and S_SUCCESS.
Referenced by catcls_delete_instance(), catcls_update_instance(), heap_is_object_not_null(), heap_scanrange_next(), heap_scanrange_to_following(), heap_scanrange_to_prior(), locator_all_reference_lockset(), locator_delete_lob_force(), locator_mvcc_reeval_scan_filters(), locator_repl_prepare_force(), locator_update_force(), lock_demote_class_lock(), process_value(), qexec_execute_delete(), qexec_execute_duplicate_key_update(), qexec_execute_update(), redistribute_partition_data(), scan_next_index_lookup_heap(), serial_update_cur_val_of_serial(), xlocator_lock_and_fetch_all(), xserial_get_current_value_internal(), and xserial_get_next_value_internal().
SCAN_CODE heap_get_visible_version_internal | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context, | ||
bool | is_heap_scan | ||
) |
Definition at line 24333 of file heap_file.c.
References assert, heap_get_context::class_oid_p, COPY, DB_PAGESIZE, heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_get_mvcc_header(), heap_get_record_data_when_all_ready(), heap_get_visible_version_from_log(), heap_prepare_get_context(), heap_scan_cache_allocate_area(), heap_get_context::ispeeking, LOG_WARNING_IF_DELETED, MVCC_GET_PREV_VERSION_LSA, MVCC_IS_CHN_UPTODATE, mvcc_is_mvcc_disabled_class(), MVCC_REC_HEADER_INITIALIZER, heap_scancache::mvcc_snapshot, NO_ERROR, NULL, NULL_CHN, OID_INITIALIZER, OID_ISNULL, heap_get_context::old_chn, pgbuf_watcher::pgptr, REC_BIGONE, REC_HOME, REC_RELOCATION, heap_get_context::recdes_p, heap_get_context::record_type, S_ERROR, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, heap_get_context::scan_cache, mvcc_snapshot::snapshot_fnc, TOO_NEW_FOR_SNAPSHOT, and TOO_OLD_FOR_SNAPSHOT.
Referenced by heap_get_visible_version(), heap_scan_get_visible_version(), and locator_get_object().
int heap_header_capacity_end_scan | ( | THREAD_ENTRY * | thread_p, |
void ** | ptr | ||
) |
Definition at line 18181 of file heap_file.c.
References db_private_free, heap_show_scan_ctx::hfids, NO_ERROR, and NULL.
Referenced by showstmt_scan_init().
int heap_header_capacity_start_scan | ( | THREAD_ENTRY * | thread_p, |
int | show_type, | ||
DB_VALUE ** | arg_values, | ||
int | arg_cnt, | ||
void ** | ptr | ||
) |
Definition at line 17661 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, or_partition::class_hfid, heap_hdr_stats::class_oid, cleanup(), db_get_int(), db_get_string(), DB_NOT_PARTITIONED_CLASS, DB_PARTITIONED_CLASS, db_private_alloc, db_private_free, db_private_free_and_init, DB_TYPE_CHAR, DB_TYPE_INTEGER, DB_VALUE_TYPE, er_errid(), ER_ERROR_SEVERITY, ER_LC_UNKNOWN_CLASSNAME, er_set(), error(), heap_clear_partition_info(), heap_get_class_info(), heap_get_class_partitions(), HFID_COPY, heap_show_scan_ctx::hfids, heap_show_scan_ctx::hfids_count, i, LC_CLASSNAME_DELETED, LC_CLASSNAME_ERROR, NO_ERROR, NULL, S_LOCK, SHOWSTMT_ALL_HEAP_CAPACITY, SHOWSTMT_ALL_HEAP_HEADER, and xlocator_find_class_oid().
Referenced by showstmt_scan_init().
SCAN_CODE heap_header_next_scan | ( | THREAD_ENTRY * | thread_p, |
int | cursor, | ||
DB_VALUE ** | out_values, | ||
int | out_cnt, | ||
void * | ptr | ||
) |
Definition at line 17780 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, heap_hdr_stats::best, heap_hdr_stats::class_oid, cleanup(), recdes::data, db_make_bigint(), db_make_int(), db_make_string_copy(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_INVALID_HEADER, error(), heap_hdr_stats::estimates, vfid::fileid, fileio_get_volume_label(), fill_string_to_buffer(), free_and_init, heap_hdr_stats::full_search_vpid, heap_hdr_stats::head, heap_hdr_stats::head_second_best, heap_bestspace_to_string(), heap_get_class_name(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_scan_pb_lock_and_fetch, heap_show_scan_ctx::hfids, heap_show_scan_ctx::hfids_count, hfid::hpgid, i, if(), heap_hdr_stats::last_vpid, heap_hdr_stats::next_vpid, NO_ERROR, NULL, heap_hdr_stats::num_high_best, heap_hdr_stats::num_other_high_best, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, heap_hdr_stats::num_second_best, heap_hdr_stats::num_substitutions, oid_to_string(), OLD_PAGE, heap_hdr_stats::ovf_vfid, vpid::pageid, PEEK, pgbuf_unfix_and_init, heap_hdr_stats::recs_sumlen, S_END, S_ERROR, S_LOCK, S_SUCCESS, heap_hdr_stats::second_best, spage_get_record(), heap_hdr_stats::tail_second_best, heap_hdr_stats::unfill_space, hfid::vfid, vfid_to_string(), vpid::volid, vfid::volid, and vpid_to_string().
Referenced by showstmt_scan_init().
int heap_indexinfo_get_attrids | ( | int | btid_index, |
HEAP_CACHE_ATTRINFO * | attrinfo, | ||
ATTR_ID * | attrids | ||
) |
Definition at line 13030 of file heap_file.c.
Referenced by locator_check_class().
int heap_indexinfo_get_attrs_prefix_length | ( | int | btid_index, |
HEAP_CACHE_ATTRINFO * | attrinfo, | ||
int * | attrs_prefix_length, | ||
int | len_attrs_prefix_length | ||
) |
Definition at line 13054 of file heap_file.c.
Referenced by locator_check_class().
BTID* heap_indexinfo_get_btid | ( | int | btid_index, |
HEAP_CACHE_ATTRINFO * | attrinfo | ||
) |
Definition at line 12991 of file heap_file.c.
References NULL.
Referenced by locator_check_class(), and locator_prefetch_index_page().
int heap_indexinfo_get_num_attrs | ( | int | btid_index, |
HEAP_CACHE_ATTRINFO * | attrinfo | ||
) |
Definition at line 13010 of file heap_file.c.
Referenced by locator_check_class().
int heap_init_func_pred_unpack_info | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
const OID * | class_oid, | ||
FUNC_PRED_UNPACK_INFO ** | func_indx_preds | ||
) |
Definition at line 17493 of file heap_file.c.
References ARG_FILE_LINE, or_index::atts, func_pred::cache_attrinfo, db_private_alloc, db_private_free_and_init, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), or_function_index::expr_stream, or_function_index::expr_stream_size, or_index::func_index_info, func_pred_unpack_info::func_pred, heap_attrinfo_start(), heap_free_func_pred_unpack_info(), i, or_attribute::id, or_index::n_atts, NO_ERROR, NULL, stx_map_stream_to_func_pred(), and func_pred_unpack_info::unpack_info.
Referenced by locator_get_partition_scancache(), and qexec_execute_insert().
void heap_init_get_context | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context, | ||
const OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
int | old_chn | ||
) |
Definition at line 24697 of file heap_file.c.
References heap_scancache::cache_last_fix_page, heap_hdr_stats::class_oid, heap_get_context::class_oid_p, heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_scancache_node::hfid, HFID_IS_NULL, heap_get_context::home_page_watcher, heap_get_context::ispeeking, heap_get_context::latch_mode, heap_scancache::node, NULL, heap_get_context::oid_p, OID_SET_NULL, heap_get_context::old_chn, heap_scancache::page_latch, heap_scancache::page_watcher, PGBUF_INIT_WATCHER, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_replace_watcher, pgbuf_watcher::pgptr, heap_get_context::recdes_p, heap_get_context::scan_cache, and X_LOCK.
Referenced by heap_get_class_record(), heap_get_visible_version(), heap_scan_get_visible_version(), locator_attribute_info_force(), locator_get_object(), locator_lock_and_get_object(), locator_lock_and_get_object_with_evaluation(), and update_indexes().
int heap_initialize_hfid_table | ( | void | ) |
Definition at line 23185 of file heap_file.c.
References 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, HEAP_HFID_HASH_SIZE, heap_Hfid_table_area, heap_hfid_table_entry_alloc(), heap_hfid_table_entry_free(), heap_hfid_table_entry_init(), heap_hfid_table_entry_key_compare(), heap_hfid_table_entry_key_copy(), heap_hfid_table_entry_key_hash(), heap_hfid_table_entry_uninit(), heap_hfid_table::hfid_hash, heap_hfid_table::hfid_hash_descriptor, heap_hfid_table::hfid_hash_freelist, hfid_table_Ts, LF_EM_NOT_USING_MUTEX, lf_freelist_init(), lf_hash_destroy(), lf_hash_init(), heap_hfid_table::logging, 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, prm_get_bool_value(), PRM_ID_HEAP_INFO_CACHE_LOGGING, and lf_entry_descriptor::using_mutex.
Referenced by heap_manager_initialize().
int heap_insert_logical | ( | THREAD_ENTRY * | thread_p, |
HEAP_OPERATION_CONTEXT * | context, | ||
PGBUF_WATCHER * | home_hint_p | ||
) |
Definition at line 22426 of file heap_file.c.
References assert, BU_LOCK, heap_scancache::cache_last_fix_page, heap_operation_context::class_oid, DONT_FREE, ER_FAILED, error(), heap_get_insert_location_with_lock(), heap_insert_adjust_recdes_header(), heap_insert_handle_multipage_record(), heap_insert_physical(), heap_log_insert_physical(), heap_mark_class_as_modified(), HEAP_OPERATION_INSERT, HEAP_PERF_START, HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_PERF_TRACK_PREPARE, heap_scancache_check_with_hfid(), heap_unfix_watchers(), heap_operation_context::hfid, HFID_EQ, HFID_IS_NULL, heap_operation_context::home_page_watcher, heap_operation_context::home_page_watcher_p, heap_operation_context::is_bulk_op, heap_operation_context::is_redistribute_insert_with_delid, IX_LOCK, LK_GRANTED, LK_UNCOND_LOCK, lock_has_lock_on_object(), lock_object(), mvcc_is_mvcc_disabled_class(), NO_ERROR, NULL, OID_IS_ROOTOID, OID_ISNULL, oid_Root_class_oid, or_chn(), heap_scancache::page_watcher, perfmon_inc_stat(), pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_set_dirty(), pgbuf_watcher::pgptr, PSTAT_HEAP_ASSIGN_INSERTS, PSTAT_HEAP_BIG_INSERTS, PSTAT_HEAP_HOME_INSERTS, rc, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_HOME, heap_operation_context::recdes_p, heap_operation_context::res_oid, heap_classrepr_cache::rootclass_hfid, heap_operation_context::scan_cache_p, heap_operation_context::time_track, recdes::type, heap_operation_context::type, heap_operation_context::use_bulk_logging, and hfid::vfid.
Referenced by boot_create_all_volumes(), heap_assign_address(), locator_insert_force(), and tde_initialize().
bool heap_is_big_length | ( | int | length | ) |
Definition at line 1302 of file heap_file.c.
References heap_Maxslotted_reclength.
Referenced by heap_assign_address(), heap_delete_home(), heap_delete_relocation(), heap_find_location_and_insert_rec_newhome(), heap_insert_adjust_recdes_header(), heap_insert_handle_multipage_record(), heap_insert_physical(), heap_stats_find_best_page(), heap_update_adjust_recdes_header(), heap_update_bigone(), heap_update_home(), heap_update_relocation(), and locator_multi_insert_force().
bool heap_is_object_not_null | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const OID * | oid | ||
) |
Definition at line 8848 of file heap_file.c.
References assert, mvcc_snapshot::copy_to(), DISK_VALID, er_stack_pop(), er_stack_push(), heap_does_exist(), heap_get_visible_version(), HEAP_ISVALID_OID, heap_scancache_end(), heap_scancache_quick_start(), logtb_get_mvcc_snapshot(), logtb_set_check_interrupt(), mvcc_is_not_deleted_for_snapshot(), heap_scancache::mvcc_snapshot, NO_ERROR, NULL, NULL_CHN, OID_EQ, OID_INITIALIZER, OID_ISNULL, oid_Root_class_oid, PEEK, S_SUCCESS, and mvcc_snapshot::snapshot_fnc.
Referenced by eval_pred_comp1().
bool heap_is_page_header | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page | ||
) |
Definition at line 24869 of file heap_file.c.
References assert, HEAP_HEADER_AND_CHAIN_SLOTID, NULL, spage_header::num_records, PAGE_HEAP, pgbuf_get_page_ptype(), spage_slot::record_length, and spage_get_slot().
Referenced by pgbuf_has_perm_pages_fixed().
SCAN_CODE heap_last | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking | ||
) |
Definition at line 8125 of file heap_file.c.
References recdes::data, heap_prev(), heap_scancache_end(), heap_scancache_quick_start(), recdes::length, NULL_CHN, OID_SET_NULL, PEEK, S_SUCCESS, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by heap_scanrange_to_prior().
OR_ATTRIBUTE* heap_locate_last_attrepr | ( | ATTR_ID | attrid, |
HEAP_CACHE_ATTRINFO * | attr_info | ||
) |
Definition at line 10637 of file heap_file.c.
Referenced by qexec_execute_insert().
void heap_log_postpone_heap_append_pages | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
const OID * | class_oid, | ||
const std::vector< VPID > & | heap_pages_array | ||
) |
Definition at line 25440 of file heap_file.c.
References assert, DB_ALIGN, db_private_alloc, db_private_free_and_init, DISK_VPID_ALIGNED_SIZE, i, log_append_postpone(), LOG_DATA_ADDR_INITIALIZER, MAX_ALIGNMENT, NULL, OR_HFID_SIZE, OR_INT_SIZE, OR_OID_SIZE, OR_PUT_HFID, OR_PUT_INT, OR_PUT_OID, OR_PUT_VPID_ALIGNED, PTR_ALIGN, PTR_ALIGNMENT, and RVHF_APPEND_PAGES_TO_HEAP.
Referenced by locator_multi_insert_force().
int heap_manager_finalize | ( | void | ) |
Definition at line 5111 of file heap_file.c.
References heap_chnguess_finalize(), heap_classrepr_finalize_cache(), heap_finalize_hfid_table(), heap_stats_bestspace_finalize(), and NO_ERROR.
Referenced by boot_server_all_finalize().
int heap_manager_initialize | ( | void | ) |
Definition at line 5070 of file heap_file.c.
References heap_chnguess_initialize(), heap_classrepr_initialize_cache(), heap_initialize_hfid_table(), HEAP_MAX_FIRSTSLOTID_LENGTH, heap_Maxslotted_reclength, heap_Slotted_overhead, heap_stats_bestspace_initialize(), NO_ERROR, spage_max_record_size(), and spage_slot_size().
Referenced by boot_create_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
SCAN_CODE heap_next | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | next_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking | ||
) |
Definition at line 18622 of file heap_file.c.
References heap_next_internal(), and NULL.
Referenced by btree_sort_get_next(), catalog_check_consistency(), catalog_dump(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_dump(), heap_first(), heap_scanrange_next(), heap_scanrange_to_following(), locator_check_all_entries_of_all_btrees(), locator_check_btree_entries(), locator_check_class_names(), locator_check_unique_btree_entries(), locator_initialize(), online_index_builder(), scan_next_heap_scan(), xlocator_check_fk_validity(), xlocator_fetch_all(), xlocator_lock_and_fetch_all(), xlocator_remove_class_from_index(), and xstats_update_all_statistics().
SCAN_CODE heap_next_record_info | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | next_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
DB_VALUE ** | cache_recordinfo | ||
) |
Definition at line 18648 of file heap_file.c.
References heap_next_internal().
Referenced by scan_next_heap_scan().
int heap_nonheader_page_capacity | ( | ) |
Definition at line 25032 of file heap_file.c.
References spage_max_record_size().
Referenced by locator_multi_insert_force().
int heap_object_upgrade_domain | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | upd_scancache, | ||
HEAP_CACHE_ATTRINFO * | attr_info, | ||
OID * | oid, | ||
const ATTR_ID | att_id | ||
) |
Definition at line 17011 of file heap_file.c.
References db_monetary::amount, ARG_FILE_LINE, assert, char_isspace(), tp_domain::codeset, tp_domain::collation_id, db_get_bigint(), db_get_double(), db_get_float(), db_get_int(), db_get_monetary(), db_get_short(), db_get_string(), db_get_string_length(), db_get_string_size(), DB_IS_NULL, db_make_null(), DB_NOT_PARTITIONED_CLASS, DB_TYPE_BIGINT, DB_TYPE_CHAR, DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_SMALLINT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_domain_default(), db_value_domain_max(), db_value_domain_min(), DB_VALUE_DOMAIN_TYPE, DOMAIN_COMPATIBLE, tp_domain::enumeration, ER_ALTER_CHANGE_CAST_FAILED_SET_DEFAULT, ER_ALTER_CHANGE_CAST_FAILED_SET_MAX, ER_ALTER_CHANGE_CAST_FAILED_SET_MIN, ER_ALTER_CHANGE_TRUNC_OVERFLOW_NOT_ALLOWED, er_clear(), ER_ERROR_SEVERITY, ER_IT_DATA_OVERFLOW, ER_MVCC_NOT_SATISFIED_REEVALUATION, ER_QPROC_SIZE_STRING_TRUNCATED, er_set(), er_stack_pop(), er_stack_push(), ER_UNEXPECTED, ER_WARNING_SEVERITY, error(), heap_scancache_node::hfid, i, INTL_CODESET_RAW_BYTES, LC_FLUSH_UPDATE, locator_attribute_info_force(), NO_ERROR, heap_scancache::node, NULL, numeric_db_value_is_positive(), p, pr_clear_value(), pr_clone_value(), tp_domain::precision, prm_get_bool_value(), PRM_ID_ALLOW_TRUNCATED_STRING, PRM_ID_ALTER_TABLE_CHANGE_TYPE_STRICT, QSTR_IS_ANY_CHAR, QSTR_IS_ANY_CHAR_OR_BIT, QSTR_IS_BIT, REPL_INFO_TYPE_RBR_NORMAL, tp_domain::scale, SINGLE_ROW_UPDATE, TP_DOMAIN_CODESET, tp_domain_resolve_default(), tp_domain_status_er_set(), TP_DOMAIN_TYPE, TP_IS_CHAR_TYPE, tp_value_cast(), and UPDATE_INPLACE_OLD_MVCCID.
Referenced by xlocator_upgrade_instances_domain().
const OID* heap_ovf_delete | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
const OID * | ovf_oid, | ||
VFID * | ovf_vfid_p | ||
) |
Definition at line 6521 of file heap_file.c.
References heap_ovf_find_vfid(), NULL, overflow_delete(), heap_hdr_stats::ovf_vfid, vpid::pageid, db_identifier::pageid, PGBUF_UNCONDITIONAL_LATCH, VFID_ISNULL, vpid::volid, and db_identifier::volid.
Referenced by heap_delete_bigone(), heap_update_bigone(), and vacuum_heap_record().
VFID* heap_ovf_find_vfid | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
VFID * | ovf_vfid, | ||
bool | create, | ||
PGBUF_LATCH_CONDITION | latch_cond | ||
) |
Definition at line 6353 of file heap_file.c.
References file_ovf_heap_des::class_oid, heap_hdr_stats::class_oid, recdes::data, DONT_FREE, file_apply_tde_algorithm(), file_create_with_npages(), FILE_MULTIPAGE_OBJECT_HEAP, heap_get_class_tde_algorithm(), HEAP_HEADER_AND_CHAIN_SLOTID, file_descriptors::heap_overflow, file_ovf_heap_des::hfid, HFID_COPY, hfid::hpgid, if(), log_append_redo_data(), log_append_undo_data(), log_sysop_abort(), log_sysop_commit(), log_sysop_start(), mode, NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, heap_hdr_stats::ovf_vfid, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, log_data_addr::pgptr, RVHF_STATS, S_SUCCESS, spage_get_record(), TDE_ALGORITHM_NONE, log_data_addr::vfid, hfid::vfid, VFID_COPY, VFID_ISNULL, vpid::volid, and vfid::volid.
Referenced by heap_ovf_delete(), heap_ovf_insert(), heap_ovf_update(), heap_update_bigone(), vacuum_heap_prepare_record(), xfile_apply_tde_to_class_files(), xheap_destroy(), and xheap_destroy_newly_created().
MVCCID heap_page_get_max_mvccid | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | heap_page | ||
) |
Definition at line 23798 of file heap_file.c.
References assert, assert_release, recdes::data, HEAP_HEADER_AND_CHAIN_SLOTID, recdes::length, heap_chain::max_mvccid, MVCCID_NULL, NULL, PEEK, S_SUCCESS, and spage_get_record().
Referenced by xheap_reclaim_addresses().
HEAP_PAGE_VACUUM_STATUS heap_page_get_vacuum_status | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | heap_page | ||
) |
Definition at line 23830 of file heap_file.c.
References assert, assert_release, recdes::data, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_PAGE_GET_VACUUM_STATUS, HEAP_PAGE_VACUUM_UNKNOWN, recdes::length, NULL, PEEK, S_SUCCESS, and spage_get_record().
Referenced by 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_vacuum_all_objects(), and vacuum_heap_page().
SCAN_CODE heap_page_next | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
const HFID * | hfid, | ||
VPID * | next_vpid, | ||
DB_VALUE ** | cache_pageinfo | ||
) |
Definition at line 18305 of file heap_file.c.
References heap_get_page_info(), heap_scan_pb_lock_and_fetch, heap_vpid_next(), hfid::hpgid, NULL, OID_ISNULL, OLD_PAGE, OLD_PAGE_PREVENT_DEALLOC, vpid::pageid, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, S_END, S_ERROR, S_LOCK, S_SUCCESS, hfid::vfid, vpid::volid, vfid::volid, and VPID_ISNULL.
Referenced by scan_next_heap_page_scan().
SCAN_CODE heap_page_prev | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid, | ||
const HFID * | hfid, | ||
VPID * | prev_vpid, | ||
DB_VALUE ** | cache_pageinfo | ||
) |
Definition at line 18372 of file heap_file.c.
References ASSERT_ERROR, heap_get_last_vpid(), heap_get_page_info(), heap_scan_pb_lock_and_fetch, heap_vpid_prev(), NO_ERROR, NULL, OID_ISNULL, OLD_PAGE, OLD_PAGE_PREVENT_DEALLOC, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, S_END, S_ERROR, S_LOCK, S_SUCCESS, and VPID_ISNULL.
Referenced by scan_next_heap_page_scan().
void heap_page_set_vacuum_status_none | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | heap_page | ||
) |
Definition at line 23755 of file heap_file.c.
References assert, assert_release, recdes::data, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_PAGE_GET_VACUUM_STATUS, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, HEAP_PAGE_VACUUM_ONCE, recdes::length, NULL, PEEK, PGBUF_PAGE_VPID_AS_ARGS, S_SUCCESS, spage_get_record(), vacuum_er_log, and VACUUM_ER_LOG_HEAP.
Referenced by vacuum_heap_page(), and vacuum_rv_redo_vacuum_heap_page().
int heap_prefetch | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const OID * | oid, | ||
LC_COPYAREA_DESC * | prefetch | ||
) |
Definition at line 13512 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, COPY, COPY_OID, recdes::data, DB_ALIGN, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_PB_BAD_PAGEID, er_set(), HEAP_DIRECTION_BOTH, HEAP_DIRECTION_LEFT, HEAP_DIRECTION_NONE, HEAP_DIRECTION_RIGHT, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_MAX_ALIGN, heap_scan_pb_lock_and_fetch, LC_FETCH, LC_NEXT_ONEOBJ_PTR_IN_COPYAREA, recdes::length, lc_copyarea_desc::mobjs, NO_ERROR, NULL, lc_copyarea_manyobjs::num_objs, lc_copyarea_desc::obj, lc_copyarea_desc::offset, OLD_PAGE, vpid::pageid, db_identifier::pageid, pgbuf_unfix_and_init, REC_HOME, lc_copyarea_desc::recdes, S_LOCK, S_SUCCESS, db_identifier::slotid, spage_get_record_type(), spage_next_record(), spage_previous_record(), vpid::volid, and db_identifier::volid.
Referenced by xlocator_fetch().
SCAN_CODE heap_prepare_get_context | ( | THREAD_ENTRY * | thread_p, |
HEAP_GET_CONTEXT * | context, | ||
bool | is_heap_scan, | ||
NON_EXISTENT_HANDLING | non_ex_handling_type | ||
) |
Definition at line 7385 of file heap_file.c.
References ARG_FILE_LINE, assert, assert_release, heap_get_context::class_oid_p, COPY_OID, recdes::data, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_BAD_OBJECT_TYPE, ER_HEAP_NODATA_NEWADDRESS, ER_HEAP_UNKNOWN_OBJECT, ER_LK_PAGE_TIMEOUT, ER_PAGE_LATCH_ABORTED, er_set(), ER_WARNING_SEVERITY, error(), heap_get_context::forward_oid, heap_get_context::fwd_page_watcher, heap_clean_get_context(), heap_get_class_oid_from_page(), heap_prepare_object_page(), heap_get_context::home_page_watcher, heap_get_context::latch_mode, LOG_WARNING_IF_DELETED, NO_ERROR, NULL, OID_EQ, oid_is_system_class(), OID_ISNULL, heap_get_context::oid_p, oid_Root_class_oid, oid_User_class_oid, pgbuf_watcher::page_was_unfixed, db_identifier::pageid, PEEK, PGBUF_ORDERED_HEAP_OVERFLOW, pgbuf_ordered_unfix, PGBUF_WATCHER_COPY_GROUP, PGBUF_WATCHER_RESET_RANK, pgbuf_watcher::pgptr, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_DELETED_WILL_REUSE, REC_HOME, REC_MARKDELETED, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, spage_slot::record_type, heap_get_context::record_type, S_DOESNT_EXIST, S_ERROR, S_SUCCESS, db_identifier::slotid, spage_check_slot_owner(), spage_get_record(), spage_get_slot(), and db_identifier::volid.
Referenced by heap_get_last_version(), heap_get_visible_version_internal(), and locator_lock_and_get_object_internal().
int heap_prepare_object_page | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
PGBUF_WATCHER * | page_watcher_p, | ||
PGBUF_LATCH_MODE | latch_mode | ||
) |
Definition at line 24609 of file heap_file.c.
References ARG_FILE_LINE, assert, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_LK_PAGE_TIMEOUT, ER_PAGE_LATCH_ABORTED, ER_PB_BAD_PAGEID, er_set(), NO_ERROR, NULL, OID_ISNULL, OLD_PAGE, db_identifier::pageid, pgbuf_get_vpid_ptr(), pgbuf_ordered_fix, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, db_identifier::slotid, db_identifier::volid, VPID_EQ, and VPID_GET_FROM_OID.
Referenced by heap_get_class_oid(), heap_prepare_get_context(), locator_get_object(), and locator_lock_and_get_object_with_evaluation().
SCAN_CODE heap_prev | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | prev_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking | ||
) |
Definition at line 18671 of file heap_file.c.
References heap_next_internal(), and NULL.
Referenced by heap_last(), heap_scanrange_next(), heap_scanrange_to_prior(), and scan_next_heap_scan().
SCAN_CODE heap_prev_record_info | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
OID * | next_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
DB_VALUE ** | cache_recordinfo | ||
) |
Definition at line 18697 of file heap_file.c.
References heap_next_internal().
Referenced by scan_next_heap_scan().
bool heap_remove_page_on_vacuum | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR * | page_ptr, | ||
HFID * | hfid | ||
) |
Definition at line 4643 of file heap_file.c.
References recdes::area_size, assert, ASSERT_ERROR, assert_release, heap_hdr_stats::best, COPY, recdes::data, DONT_FREE, error(), heap_hdr_stats::estimates, file_dealloc(), FILE_HEAP, heap_bestspace::freespace, heap_hdr_stats::full_search_vpid, heap_hdr_stats::head, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_stats_del_bestspace_by_vpid(), heap_vpid_next(), heap_vpid_prev(), HFID_IS_NULL, hfid::hpgid, i, heap_hdr_stats::last_vpid, recdes::length, log_append_undoredo_data2(), log_sysop_abort(), log_sysop_commit(), log_sysop_start(), MAX_ALIGNMENT, heap_hdr_stats::next_vpid, heap_chain::next_vpid, NO_ERROR, NULL, heap_hdr_stats::num_high_best, OLD_PAGE, pgbuf_watcher::page_was_unfixed, vpid::pageid, pgbuf_attach_watcher, pgbuf_get_vpid(), pgbuf_has_any_waiters(), pgbuf_has_prevent_dealloc(), PGBUF_INIT_WATCHER, PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_HDR, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_ordered_unfix_and_init, pgbuf_set_dirty(), pgbuf_watcher::pgptr, heap_chain::prev_vpid, PTR_ALIGN, RVHF_CHAIN, RVHF_STATS, S_SUCCESS, heap_hdr_stats::second_best, SP_SUCCESS, spage_get_record(), spage_number_of_records(), spage_update(), vacuum_er_log, vacuum_er_log_error, VACUUM_ER_LOG_HEAP, vacuum_er_log_warning, hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, VPID_COPY, VPID_EQ, VPID_INITIALIZER, VPID_ISNULL, and VPID_SET_NULL.
Referenced by vacuum_heap_page().
void heap_rv_dump_append_pages_to_heap | ( | FILE * | fp, |
int | length, | ||
void * | data | ||
) |
Definition at line 25270 of file heap_file.c.
References heap_hdr_stats::class_oid, cubregex::count(), string_buffer::get_buffer(), HFID_AS_ARGS, i, OID_AS_ARGS, OR_GET_HFID, OR_GET_INT, OR_GET_OID, OR_GET_VPID, OR_HFID_SIZE, OR_INT_SIZE, OR_OID_SIZE, OR_VPID_SIZE, and VPID_AS_ARGS.
void heap_rv_dump_chain | ( | FILE * | fp, |
int | ignore_length, | ||
void * | data | ||
) |
Definition at line 15550 of file heap_file.c.
References heap_chain::class_oid, heap_chain::flags, heap_chain::max_mvccid, heap_chain::next_vpid, vpid::pageid, db_identifier::pageid, heap_chain::prev_vpid, db_identifier::slotid, vpid::volid, and db_identifier::volid.
void heap_rv_dump_reuse_page | ( | FILE * | fp, |
int | ignore_length, | ||
void * | data | ||
) |
Definition at line 16382 of file heap_file.c.
void heap_rv_dump_statistics | ( | FILE * | fp, |
int | ignore_length, | ||
void * | data | ||
) |
Definition at line 15533 of file heap_file.c.
References heap_dump_hdr(), and NO_ERROR.
int heap_rv_mark_deleted_on_postpone | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 5877 of file heap_file.c.
References assert_release, file_rv_tracker_mark_heap_deleted(), and NO_ERROR.
int heap_rv_mark_deleted_on_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 5859 of file heap_file.c.
References assert_release, file_rv_tracker_mark_heap_deleted(), and NO_ERROR.
int heap_rv_mvcc_redo_delete_home | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16029 of file heap_file.c.
References assert, ASSERT_ERROR, DONT_FREE, heap_page_rv_chain_update(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, heap_rv_mvcc_redo_delete_internal(), log_rcv::length, log_rcv::mvcc_id, MVCCID_IS_NORMAL, NO_ERROR, NULL, log_rcv::offset, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_rv_mvcc_redo_delete_newhome | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16112 of file heap_file.c.
References assert, ASSERT_ERROR, log_rcv::data, DONT_FREE, heap_rv_mvcc_redo_delete_internal(), log_rcv::length, NO_ERROR, NULL, log_rcv::offset, OR_GET_MVCCID, OR_MVCCID_SIZE, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_rv_mvcc_redo_delete_overflow | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16069 of file heap_file.c.
References assert, assert_release, log_rcv::data, DONT_FREE, ER_FAILED, heap_get_mvcc_rec_header_from_overflow(), heap_set_mvcc_rec_header_on_overflow(), log_rcv::length, MVCC_IS_FLAG_SET, MVCC_SET_DELID, NO_ERROR, NULL, OR_GET_MVCCID, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_INSID, OR_MVCCID_SIZE, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_rv_mvcc_redo_insert | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15690 of file heap_file.c.
References assert, assert_release, log_rcv::data, recdes::data, DONT_FREE, ER_FAILED, heap_page_rv_chain_update(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, HEAP_SET_RECORD, if(), IO_DEFAULT_PAGE_SIZE, log_rcv::length, recdes::length, MAX_ALIGNMENT, log_rcv::mvcc_id, MVCC_SET_CHN, MVCC_SET_FLAG, MVCC_SET_INSID, MVCC_SET_REPID, MVCCID_IS_NORMAL, NO_ERROR, NULL, log_rcv::offset, OR_BOUND_BIT_FLAG, OR_BYTE_SIZE, OR_GET_INT, OR_INT_SIZE, or_mvcc_add_header(), OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_MAX_HEADER_SIZE, OR_MVCC_REPID_MASK, OR_OFFSET_SIZE_1BYTE, OR_OFFSET_SIZE_2BYTE, OR_OFFSET_SIZE_FLAG, OR_SHORT_SIZE, pgbuf_set_dirty(), log_rcv::pgptr, PTR_ALIGN, REC_BIGONE, SP_SUCCESS, and spage_insert_for_recovery().
int heap_rv_mvcc_redo_redistribute | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 24048 of file heap_file.c.
References assert, assert_release, log_rcv::data, recdes::data, DONT_FREE, ER_FAILED, heap_page_rv_chain_update(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, HEAP_SET_RECORD, if(), IO_DEFAULT_PAGE_SIZE, log_rcv::length, recdes::length, MAX_ALIGNMENT, log_rcv::mvcc_id, MVCC_SET_DELID, MVCC_SET_FLAG, MVCC_SET_INSID, MVCC_SET_REPID, NO_ERROR, NULL, log_rcv::offset, OR_BOUND_BIT_FLAG, OR_BYTE_SIZE, OR_GET_INT, OR_GET_MVCCID, OR_INT_SIZE, or_mvcc_add_header(), OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_MAX_HEADER_SIZE, OR_MVCC_REPID_MASK, OR_MVCCID_SIZE, OR_OFFSET_SIZE_1BYTE, OR_OFFSET_SIZE_2BYTE, OR_OFFSET_SIZE_FLAG, OR_SHORT_SIZE, pgbuf_set_dirty(), log_rcv::pgptr, PTR_ALIGN, REC_BIGONE, SP_SUCCESS, and spage_insert_for_recovery().
int heap_rv_mvcc_undo_delete | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15881 of file heap_file.c.
References recdes::area_size, assert, assert_release, COPY, recdes::data, DB_PAGESIZE, DONT_FREE, ER_FAILED, HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, IO_MAX_PAGE_SIZE, MAX_ALIGNMENT, MVCC_CLEAR_FLAG_BITS, MVCC_IS_FLAG_SET, NO_ERROR, log_rcv::offset, OR_MVCC_FLAG_VALID_DELID, or_mvcc_get_header(), or_mvcc_set_header(), pgbuf_set_dirty(), log_rcv::pgptr, PTR_ALIGN, REC_HOME, REC_NEWHOME, S_SUCCESS, SP_SUCCESS, spage_get_record(), spage_update(), and recdes::type.
int heap_rv_mvcc_undo_delete_overflow | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15934 of file heap_file.c.
References assert, assert_release, DONT_FREE, ER_FAILED, heap_get_mvcc_rec_header_from_overflow(), heap_set_mvcc_rec_header_on_overflow(), MVCC_IS_FLAG_SET, MVCC_SET_DELID, MVCCID_NULL, NO_ERROR, NULL, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_PREV_VERSION, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_rv_nop | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 23862 of file heap_file.c.
References assert, DONT_FREE, NO_ERROR, NULL, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_rv_postpone_append_pages_to_heap | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 25049 of file heap_file.c.
References assert, ASSERT_ERROR, heap_hdr_stats::class_oid, cleanup(), log_rcv::data, DB_ALIGN, DISK_VALID, DISK_VPID_ALIGNED_SIZE, ER_FAILED, heap_add_chain_links(), heap_get_header_page(), heap_get_header_stats_ptr(), heap_get_last_page(), heap_get_page_with_watcher(), heap_update_and_log_header(), HFID_IS_NULL, HFID_SET_NULL, i, log_rcv::length, log_sysop_abort(), log_sysop_end_logical_run_postpone(), log_sysop_start_atomic(), heap_hdr_stats::next_vpid, NO_ERROR, NULL, OID_SET_NULL, OR_GET_HFID, OR_GET_INT, OR_GET_OID, OR_GET_VPID, OR_HFID_SIZE, OR_INT_SIZE, OR_OID_SIZE, PGBUF_INIT_WATCHER, pgbuf_is_valid_page(), PGBUF_ORDERED_HEAP_HDR, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix_and_init, pgbuf_watcher::pgptr, PTR_ALIGNMENT, log_rcv::reference_lsa, VPID_COPY, VPID_EQ, VPID_ISNULL, and VPID_SET_NULL.
int heap_rv_redo_delete | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15807 of file heap_file.c.
References DONT_FREE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, and spage_delete().
int heap_rv_redo_insert | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15569 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), log_rcv::length, recdes::length, NO_ERROR, NULL, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, REC_ASSIGN_ADDRESS, SP_ERROR, SP_SUCCESS, spage_insert_for_recovery(), and recdes::type.
Referenced by heap_rv_undo_delete(), and vacuum_rv_undo_vacuum_heap_record().
int heap_rv_redo_mark_reusable_slot | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16147 of file heap_file.c.
References DONT_FREE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, and spage_mark_deleted_slot_as_reusable().
int heap_rv_redo_newpage | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15453 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), heap_get_spage_type(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_MAX_ALIGN, log_rcv::length, recdes::length, NO_ERROR, PAGE_HEAP, pgbuf_set_dirty(), pgbuf_set_page_ptype(), log_rcv::pgptr, REC_HOME, SAFEGUARD_RVSPACE, SP_SUCCESS, spage_initialize(), spage_insert(), and recdes::type.
int heap_rv_redo_newpage_reuse_oid | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
int heap_rv_redo_reuse_page | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16283 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_chain::class_oid, COPY_OID, log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), heap_chain::flags, heap_delete_all_page_records(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, heap_chain::max_mvccid, MVCCID_NULL, NO_ERROR, log_rcv::offset, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_get_page_id(), pgbuf_get_volume_id(), pgbuf_set_dirty(), log_rcv::pgptr, SP_ERROR, SP_SUCCESS, spage_get_record(), and vpid::volid.
int heap_rv_redo_reuse_page_reuse_oid | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16335 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_chain::class_oid, COPY_OID, log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), heap_chain::flags, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, heap_reinitialize_page(), heap_chain::max_mvccid, MVCCID_NULL, NO_ERROR, log_rcv::offset, PAGE_HEAP, PEEK, pgbuf_set_dirty(), pgbuf_set_page_ptype(), log_rcv::pgptr, SP_ERROR, SP_SUCCESS, and spage_get_record().
int heap_rv_redo_update | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16236 of file heap_file.c.
References heap_rv_undoredo_update().
Referenced by heap_rv_redo_update_and_update_chain().
int heap_rv_redo_update_and_update_chain | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 18918 of file heap_file.c.
References assert, ASSERT_ERROR, heap_page_rv_chain_update(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, heap_rv_redo_update(), log_rcv::mvcc_id, MVCCID_IS_NORMAL, NO_ERROR, NULL, log_rcv::offset, and log_rcv::pgptr.
INT16 heap_rv_remove_flags_from_offset | ( | INT16 | offset | ) |
Definition at line 23901 of file heap_file.c.
References HEAP_RV_FLAG_VACUUM_STATUS_CHANGE.
Referenced by vacuum_process_log_block().
int heap_rv_undo_delete | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16164 of file heap_file.c.
References assert_release, log_rcv::data, ER_FAILED, HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, heap_rv_redo_insert(), NO_ERROR, log_rcv::offset, log_rcv::pgptr, REC_NEWHOME, and vacuum_rv_check_at_undo().
int heap_rv_undo_insert | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15784 of file heap_file.c.
References DONT_FREE, HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, and spage_delete_for_recovery().
int heap_rv_undo_ovf_update | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 24812 of file heap_file.c.
References DONT_FREE, NULL_SLOTID, pgbuf_set_dirty(), log_rcv::pgptr, REC_BIGONE, and vacuum_rv_check_at_undo().
int heap_rv_undo_update | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16199 of file heap_file.c.
References ASSERT_ERROR, assert_release, log_rcv::data, HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, heap_rv_undoredo_update(), NO_ERROR, log_rcv::offset, log_rcv::pgptr, REC_HOME, REC_NEWHOME, and vacuum_rv_check_at_undo().
int heap_rv_undoredo_pagehdr | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 15495 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), HEAP_HEADER_AND_CHAIN_SLOTID, log_rcv::length, recdes::length, NO_ERROR, PAGE_HEAP, pgbuf_check_page_ptype(), pgbuf_set_dirty(), log_rcv::pgptr, REC_HOME, SP_ERROR, SP_SUCCESS, spage_update(), and recdes::type.
int heap_rv_undoredo_update | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 16247 of file heap_file.c.
References recdes::area_size, assert, assert_release, log_rcv::data, recdes::data, ER_FAILED, HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, heap_update_physical(), log_rcv::length, recdes::length, NO_ERROR, log_rcv::offset, log_rcv::pgptr, SP_SUCCESS, and recdes::type.
Referenced by heap_rv_redo_update(), and heap_rv_undo_update().
int heap_rv_update_chain_after_mvcc_op | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 23881 of file heap_file.c.
References assert, DONT_FREE, heap_page_rv_chain_update(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_rcv::mvcc_id, MVCCID_IS_NORMAL, NO_ERROR, NULL, log_rcv::offset, pgbuf_set_dirty(), and log_rcv::pgptr.
int heap_scan_cache_allocate_area | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache_p, | ||
int | size | ||
) |
Definition at line 24744 of file heap_file.c.
References assert, NO_ERROR, NULL, and heap_scancache::reserve_area().
Referenced by heap_get_last_version(), heap_get_visible_version_internal(), locator_get_object(), locator_lock_and_get_object(), and locator_lock_and_get_object_with_evaluation().
SCAN_CODE heap_scan_get_visible_version | ( | THREAD_ENTRY * | thread_p, |
const OID * | oid, | ||
OID * | class_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int | ispeeking, | ||
int | old_chn | ||
) |
Definition at line 24309 of file heap_file.c.
References heap_clean_get_context(), heap_get_visible_version_internal(), heap_init_get_context(), and S_SUCCESS.
Referenced by heap_next_internal().
int heap_scancache_end | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache | ||
) |
Definition at line 7195 of file heap_file.c.
References END_SCAN, heap_scancache_end_internal(), and NO_ERROR.
Referenced by boot_db_parm_update_heap(), boot_get_db_parm(), btree_scan_for_show_index_header(), btree_sort_get_next(), catalog_check_consistency(), catalog_dump(), catalog_get_dir_oid_from_cache(), catalog_get_rep_dir(), catalog_get_representation(), catcls_compile_catalog_classes(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_class_get_partition_info(), heap_classrepr_dump(), heap_classrepr_dump_all(), heap_classrepr_get_from_record(), heap_dump(), heap_get_class_info_from_record(), heap_get_class_name_alloc_if_diff(), heap_get_class_subclasses(), heap_get_class_supers(), heap_get_class_tde_algorithm(), heap_get_partition_attributes(), heap_is_object_not_null(), heap_last(), heap_scanrange_end(), heap_set_autoincrement_value(), 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_delete_lob_force(), locator_guess_sub_classes(), locator_initialize(), locator_move_record(), locator_mvcc_reeval_scan_filters(), lock_demote_class_lock(), or_get_hierarchy_helper(), partition_clear_pruning_context(), process_value(), qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_execute_obj_fetch(), qexec_execute_selupd_list(), redistribute_partition_data(), cubload::server_class_installer::register_class_with_attributes(), scan_end_scan(), serial_load_attribute_info_of_db_serial(), serial_update_cur_val_of_serial(), tde_get_keyinfo(), tde_update_keyinfo(), update_indexes(), xboot_checkdb_table(), xbtree_load_index(), xbtree_load_online_index(), xcatalog_check_rep_dir(), xheap_has_instance(), xlocator_check_fk_validity(), xlocator_does_exist(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockhint_classes(), xlocator_fetch_lockset(), xlocator_lock_and_fetch_all(), xlocator_remove_class_from_index(), xserial_get_current_value_internal(), xserial_get_next_value_internal(), and xstats_update_all_statistics().
void heap_scancache_end_modify | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache | ||
) |
Definition at line 7230 of file heap_file.c.
References heap_scancache_force_modify(), heap_scancache_quick_end(), and NO_ERROR.
Referenced by catcls_delete_catalog_classes(), catcls_delete_subset(), catcls_insert_catalog_classes(), catcls_insert_subset(), catcls_update_catalog_classes(), catcls_update_subset(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_end_force_scan_cache(), process_class(), cubload::server_object_loader::stop_scancache(), and xlocator_upgrade_instances_domain().
int heap_scancache_end_when_scan_will_resume | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache | ||
) |
Definition at line 7210 of file heap_file.c.
References CONTINUE_SCAN, heap_scancache_end_internal(), and NO_ERROR.
Referenced by xlocator_fetch_all(), and xlocator_lock_and_fetch_all().
int heap_scancache_quick_start | ( | HEAP_SCANCACHE * | scan_cache | ) |
Definition at line 7040 of file heap_file.c.
References heap_scancache_quick_start_internal(), NO_ERROR, NULL, heap_scancache::page_latch, and S_LOCK.
Referenced by heap_is_object_not_null(), heap_last(), locator_delete_lob_force(), lock_demote_class_lock(), process_value(), update_indexes(), and xlocator_does_exist().
int heap_scancache_quick_start_modify | ( | HEAP_SCANCACHE * | scan_cache | ) |
Definition at line 7056 of file heap_file.c.
References heap_scancache_quick_start_internal(), NO_ERROR, NULL, heap_scancache::page_latch, and X_LOCK.
int heap_scancache_quick_start_modify_with_class_oid | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
OID * | class_oid | ||
) |
Definition at line 19331 of file heap_file.c.
References heap_get_class_info(), heap_scancache_quick_start_internal(), NO_ERROR, NULL, heap_scancache::page_latch, and X_LOCK.
Referenced by serial_update_cur_val_of_serial(), and xserial_get_next_value_internal().
int heap_scancache_quick_start_root_hfid | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache | ||
) |
Definition at line 19255 of file heap_file.c.
References boot_find_root_heap(), heap_scancache_quick_start_internal(), NO_ERROR, heap_scancache::page_latch, and S_LOCK.
Referenced by btree_scan_for_show_index_header(), catalog_get_dir_oid_from_cache(), catalog_get_rep_dir(), catalog_get_representation(), catcls_compile_catalog_classes(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_class_get_partition_info(), heap_classrepr_dump(), heap_classrepr_dump_all(), heap_classrepr_get_from_record(), heap_get_class_info_from_record(), heap_get_class_name_alloc_if_diff(), heap_get_class_subclasses(), heap_get_class_supers(), heap_get_class_tde_algorithm(), heap_get_partition_attributes(), heap_set_autoincrement_value(), or_get_hierarchy_helper(), qexec_execute_build_columns(), qexec_execute_build_indexes(), cubload::server_class_installer::register_class_with_attributes(), xboot_checkdb_table(), and xcatalog_check_rep_dir().
int heap_scancache_quick_start_with_class_hfid | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
const HFID * | hfid | ||
) |
Definition at line 19308 of file heap_file.c.
References heap_scancache_quick_start_internal(), NO_ERROR, heap_scancache::page_latch, and S_LOCK.
Referenced by boot_get_db_parm(), heap_scancache_quick_start_with_class_oid(), locator_mvcc_reeval_scan_filters(), and tde_get_keyinfo().
int heap_scancache_quick_start_with_class_oid | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
OID * | class_oid | ||
) |
Definition at line 19282 of file heap_file.c.
References heap_get_class_info(), heap_scancache_quick_start_with_class_hfid(), NO_ERROR, NULL, heap_scancache::page_latch, and S_LOCK.
Referenced by serial_load_attribute_info_of_db_serial(), and xserial_get_current_value_internal().
int heap_scancache_start | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
const HFID * | hfid, | ||
const OID * | class_oid, | ||
int | cache_last_fix_page, | ||
int | is_indexscan, | ||
MVCC_SNAPSHOT * | mvcc_snapshot | ||
) |
Definition at line 6833 of file heap_file.c.
References heap_scancache_start_internal().
Referenced by btree_sort_get_next(), catalog_check_consistency(), catalog_dump(), catcls_get_apply_info_log_record_time(), catcls_get_db_collation(), catcls_get_server_compat_info(), css_make_access_status_exist_user(), heap_dump(), heap_scanrange_start(), 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_guess_sub_classes(), locator_initialize(), qexec_execute_obj_fetch(), qexec_execute_selupd_list(), redistribute_partition_data(), scan_start_scan(), xbtree_load_index(), xbtree_load_online_index(), xheap_has_instance(), xlocator_check_fk_validity(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockhint_classes(), xlocator_fetch_lockset(), xlocator_lock_and_fetch_all(), xlocator_remove_class_from_index(), and xstats_update_all_statistics().
int heap_scancache_start_modify | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | scan_cache, | ||
const HFID * | hfid, | ||
const OID * | class_oid, | ||
int | op_type, | ||
MVCC_SNAPSHOT * | mvcc_snapshot | ||
) |
Definition at line 6867 of file heap_file.c.
References multi_index_unique_stats::add_empty(), or_index::btid, BTREE_IS_MULTI_ROW_OP, er_errid(), ER_FAILED, heap_classrepr_free_and_init, heap_classrepr_get(), heap_scancache_reset_modify(), heap_scancache_start_internal(), i, or_classrep::indexes, heap_scancache::m_index_stats, or_classrep::n_indexes, NO_ERROR, NULL, NULL_REPRID, heap_scancache::num_btids, OID_EQ, oid_Root_class_oid, heap_scancache::page_latch, and X_LOCK.
Referenced by boot_db_parm_update_heap(), catcls_delete_catalog_classes(), catcls_delete_subset(), catcls_insert_catalog_classes(), catcls_insert_subset(), catcls_update_catalog_classes(), catcls_update_subset(), locator_check_primary_key_delete(), locator_check_primary_key_update(), locator_start_force_scan_cache(), process_class(), redistribute_partition_data(), cubload::server_object_loader::start_scancache(), tde_update_keyinfo(), and xlocator_upgrade_instances_domain().
void heap_scanrange_end | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANRANGE * | scan_range | ||
) |
Definition at line 8238 of file heap_file.c.
References heap_scanrange::first_oid, heap_scancache_end(), heap_scanrange::last_oid, OID_SET_NULL, and heap_scanrange::scan_cache.
Referenced by scan_end_scan().
SCAN_CODE heap_scanrange_next | ( | THREAD_ENTRY * | thread_p, |
OID * | next_oid, | ||
RECDES * | recdes, | ||
HEAP_SCANRANGE * | scan_range, | ||
int | ispeeking | ||
) |
Definition at line 8481 of file heap_file.c.
References heap_scancache_node::class_oid, DISK_VALID, heap_scanrange::first_oid, HEAP_DEBUG_ISVALID_SCANRANGE, heap_get_visible_version(), heap_next(), heap_prev(), heap_scancache_node::hfid, heap_scanrange::last_oid, heap_scancache::node, NULL_CHN, OID_EQ, OID_GT, OID_ISNULL, OID_LT, OID_SET_NULL, S_DOESNT_EXIST, S_END, S_ERROR, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, and heap_scanrange::scan_cache.
Referenced by scan_next_heap_scan().
int heap_scanrange_start | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANRANGE * | scan_range, | ||
const HFID * | hfid, | ||
const OID * | class_oid, | ||
MVCC_SNAPSHOT * | mvcc_snapshot | ||
) |
Definition at line 8203 of file heap_file.c.
References er_errid(), ER_FAILED, heap_scanrange::first_oid, heap_scancache_start(), heap_scanrange::last_oid, NO_ERROR, OID_SET_NULL, heap_scanrange::scan_cache, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by scan_start_scan().
SCAN_CODE heap_scanrange_to_following | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANRANGE * | scan_range, | ||
OID * | start_oid | ||
) |
Definition at line 8265 of file heap_file.c.
References heap_scancache_node::class_oid, DISK_VALID, heap_scanrange::first_oid, HEAP_DEBUG_ISVALID_SCANRANGE, heap_first(), heap_get_visible_version(), heap_next(), heap_scancache_node::hfid, heap_scanrange::last_oid, heap_scancache::node, NULL, NULL_CHN, OID_ISNULL, heap_scancache::page_watcher, vpid::pageid, db_identifier::pageid, PEEK, pgbuf_get_vpid_ptr(), pgbuf_watcher::pgptr, REC_HOME, RECDES_INITIALIZER, S_DOESNT_EXIST, S_ERROR, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, heap_scanrange::scan_cache, db_identifier::slotid, spage_get_record_type(), spage_next_record(), vpid::volid, and db_identifier::volid.
Referenced by scan_next_scan_block().
SCAN_CODE heap_scanrange_to_prior | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANRANGE * | scan_range, | ||
OID * | last_oid | ||
) |
Definition at line 8375 of file heap_file.c.
References heap_scancache_node::class_oid, DISK_VALID, heap_scanrange::first_oid, HEAP_DEBUG_ISVALID_SCANRANGE, heap_get_visible_version(), HEAP_HEADER_AND_CHAIN_SLOTID, heap_last(), heap_prev(), heap_scancache_node::hfid, heap_scanrange::last_oid, heap_scancache::node, NULL, NULL_CHN, OID_ISNULL, heap_scancache::page_watcher, PEEK, pgbuf_watcher::pgptr, REC_HOME, RECDES_INITIALIZER, S_DOESNT_EXIST, S_ERROR, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, heap_scanrange::scan_cache, db_identifier::slotid, spage_get_record_type(), and spage_previous_record().
Referenced by scan_next_scan_block().
int heap_set_autoincrement_value | ( | THREAD_ENTRY * | thread_p, |
HEAP_CACHE_ATTRINFO * | attr_info, | ||
HEAP_SCANCACHE * | scan_cache, | ||
int * | is_set | ||
) |
Definition at line 16507 of file heap_file.c.
References recdes::area_size, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, or_attribute::auto_increment, AUTO_INCREMENT_SERIAL_NAME_MAX_LENGTH, or_index::btid, BTID_COPY, BTREE_KEY_FOUND, heap_scancache::cache_last_fix_page, or_attribute::classoid, CT_SERIAL_NAME, recdes::data, db_make_varchar(), DB_MAX_IDENTIFIER_LENGTH, db_private_free_and_init, DB_TYPE_BIGINT, DB_TYPE_INTEGER, DB_TYPE_NUMERIC, DB_TYPE_SHORT, ER_FAILED, free_and_init, GENERATE_AUTO_INCREMENT, heap_classrepr_free_and_init, heap_classrepr_get(), heap_get_class_name(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, or_attribute::id, or_classrep::indexes, or_attribute::is_autoincrement, LANG_SYS_CODESET, LANG_SYS_COLLATION, LC_CLASSNAME_DELETED, LC_CLASSNAME_ERROR, NO_ERROR, NULL, NULL_LOCK, NULL_REPRID, numeric_db_value_coerce_from_num(), OID_ISNULL, oid_Null_oid, or_get_attrname(), PEEK, S_SELECT, S_SUCCESS, or_auto_increment::serial_obj, SET_AUTO_INCREMENT_SERIAL_NAME, strlen, or_attribute::type, xbtree_find_unique(), xlocator_find_class_oid(), and xserial_get_next_value().
Referenced by qexec_execute_insert().
int heap_set_mvcc_rec_header_on_overflow | ( | PAGE_PTR | ovf_page, |
MVCC_REC_HEADER * | mvcc_header | ||
) |
Definition at line 18740 of file heap_file.c.
References recdes::area_size, assert, recdes::data, recdes::length, MVCC_GET_FLAG, mvcc_header_size_lookup, MVCC_IS_FLAG_SET, MVCC_SET_DELID, MVCC_SET_FLAG_BITS, MVCC_SET_INSID, MVCCID_ALL_VISIBLE, MVCCID_NULL, NULL, OR_HEADER_SIZE, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_INSID, OR_MVCC_MAX_HEADER_SIZE, or_mvcc_set_header(), and overflow_get_first_page_data().
Referenced by heap_delete_bigone(), heap_rv_mvcc_redo_delete_overflow(), heap_rv_mvcc_undo_delete_overflow(), vacuum_heap_record_insid_and_prev_version(), vacuum_rv_check_at_undo(), and vacuum_rv_redo_remove_ovf_insid().
Definition at line 23916 of file heap_file.c.
References HEAP_DROP_FREE_SPACE.
void heap_stats_update | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | pgptr, | ||
const HFID * | hfid, | ||
int | prev_freespace | ||
) |
Definition at line 2936 of file heap_file.c.
References assert_release, error(), HEAP_DROP_FREE_SPACE, heap_stats_add_bestspace(), heap_stats_update_internal(), NO_ERROR, NULL, pgbuf_get_vpid_ptr(), prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, spage_get_free_space_without_saving(), and spage_set_need_update_best_hint().
Referenced by heap_delete_physical(), and vacuum_heap_page_log_and_reset().
int heap_update_logical | ( | THREAD_ENTRY * | thread_p, |
HEAP_OPERATION_CONTEXT * | context | ||
) |
Definition at line 22771 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, heap_scancache::cache_last_fix_page, heap_operation_context::class_oid, COPY, recdes::data, DB_PAGESIZE, ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_HEAP_BAD_OBJECT_TYPE, ER_HEAP_UNKNOWN_HEAP, ER_HEAP_UNKNOWN_OBJECT, ER_INTERRUPTED, er_log_debug, er_set(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, heap_operation_context::file_type, FILE_UNKNOWN_TYPE, heap_get_file_type(), heap_get_record_location(), HEAP_IS_UPDATE_INPLACE, heap_is_valid_oid(), heap_mark_class_as_modified(), HEAP_MAYNEED_DECACHE_GUESSED_LASTREPRS, HEAP_OPERATION_UPDATE, HEAP_PERF_START, HEAP_PERF_TRACK_PREPARE, heap_scancache_check_with_hfid(), heap_unfix_watchers(), heap_update_adjust_recdes_header(), heap_update_bigone(), heap_update_home(), HEAP_UPDATE_IS_MVCC_OP, heap_update_relocation(), heap_scancache_node::hfid, heap_operation_context::hfid, HFID_COPY, HFID_EQ, HFID_IS_NULL, heap_operation_context::home_page_watcher, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, heap_operation_context::home_recdes_buffer, heap_operation_context::is_logical_old, MAX_ALIGNMENT, mvcc_is_mvcc_disabled_class(), NO_ERROR, heap_scancache::node, NULL, NULL_FILEID, NULL_PAGEID, heap_operation_context::oid, OID_IS_ROOTOID, OID_ISNULL, or_chn(), heap_scancache::page_watcher, db_identifier::pageid, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, PTR_ALIGN, rc, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_HOME, REC_RELOCATION, REC_UNKNOWN, heap_operation_context::recdes_p, heap_operation_context::record_type, heap_classrepr_cache::rootclass_hfid, S_SUCCESS, heap_operation_context::scan_cache_p, db_identifier::slotid, spage_get_record(), spage_get_record_type(), heap_operation_context::time_track, heap_operation_context::type, heap_operation_context::update_in_place, and db_identifier::volid.
Referenced by boot_db_parm_update_heap(), catcls_insert_instance(), catcls_update_instance(), disk_update_instance(), locator_insert_force(), locator_update_force(), and tde_update_keyinfo().
int heap_vacuum_all_objects | ( | THREAD_ENTRY * | thread_p, |
HEAP_SCANCACHE * | upd_scancache, | ||
MVCCID | threshold_mvccid | ||
) |
Definition at line 23283 of file heap_file.c.
References ARG_FILE_LINE, assert, COPY_OID, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_scancache::file_type, free_and_init, heap_is_reusable_oid(), vacuum_worker::heap_objects, vacuum_worker::heap_objects_capacity, heap_page_get_vacuum_status(), HEAP_PAGE_VACUUM_NONE, heap_vpid_next(), heap_scancache_node::hfid, hfid::hpgid, i, IO_MAX_PAGE_SIZE, vacuum_worker::n_heap_objects, heap_hdr_stats::next_vpid, NO_ERROR, heap_scancache::node, NULL, vacuum_heap_object::oid, OLD_PAGE, PAGE_HEAP, vpid::pageid, db_identifier::pageid, pgbuf_check_page_ptype(), PGBUF_INIT_WATCHER, PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, db_identifier::slotid, spage_number_of_slots(), vacuum_heap_page(), vacuum_heap_object::vfid, hfid::vfid, VFID_COPY, vpid::volid, vfid::volid, db_identifier::volid, and VPID_ISNULL.
Referenced by redistribute_partition_data(), and xlocator_upgrade_instances_domain().
int heap_vpid_next | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
PAGE_PTR | pgptr, | ||
VPID * | next_vpid | ||
) |
Definition at line 4983 of file heap_file.c.
References recdes::data, ER_FAILED, HEAP_HEADER_AND_CHAIN_SLOTID, hfid::hpgid, heap_hdr_stats::next_vpid, heap_chain::next_vpid, NO_ERROR, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_get_vpid(), S_SUCCESS, spage_get_record(), hfid::vfid, vpid::volid, vfid::volid, and VPID_SET_NULL.
Referenced by heap_check_all_pages_by_heapchain(), heap_compact_pages(), heap_dump(), heap_get_capacity(), heap_next_internal(), heap_page_next(), heap_remove_page_on_vacuum(), heap_reuse(), heap_stats_sync_bestspace(), heap_vacuum_all_objects(), and redistribute_partition_data().
int heap_vpid_prev | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
PAGE_PTR | pgptr, | ||
VPID * | prev_vpid | ||
) |
Definition at line 5028 of file heap_file.c.
References recdes::data, ER_FAILED, HEAP_HEADER_AND_CHAIN_SLOTID, hfid::hpgid, NO_ERROR, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_get_vpid(), heap_chain::prev_vpid, S_SUCCESS, spage_get_record(), hfid::vfid, vpid::volid, vfid::volid, and VPID_SET_NULL.
Referenced by heap_next_internal(), heap_page_prev(), heap_remove_page_on_vacuum(), and xheap_reclaim_addresses().
int xheap_get_class_num_objects_pages | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
int | approximation, | ||
int * | nobjs, | ||
int * | npages | ||
) |
Definition at line 16396 of file heap_file.c.
References assert, er_errid(), ER_FAILED, heap_estimate(), heap_get_num_objects(), HFID_IS_NULL, and NO_ERROR.
Referenced by heap_get_class_num_objects_pages(), and shf_get_class_num_objs_and_pages().
int xheap_has_instance | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
OID * | class_oid, | ||
int | has_visible_instance | ||
) |
Definition at line 16429 of file heap_file.c.
References recdes::data, ER_FAILED, heap_first(), heap_scancache_end(), heap_scancache_start(), logtb_get_mvcc_snapshot(), NO_ERROR, NULL, OID_SET_NULL, S_DOESNT_EXIST, S_END, and S_ERROR.
Referenced by heap_has_instance(), and shf_has_instance().
int xheap_reclaim_addresses | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid | ||
) |
Definition at line 6122 of file heap_file.c.
References recdes::area_size, heap_hdr_stats::best, COPY, recdes::data, DONT_FREE, er_errid(), ER_FAILED, heap_hdr_stats::estimates, vfid::fileid, heap_bestspace::freespace, heap_hdr_stats::full_search_vpid, heap_hdr_stats::head, heap_hdr_stats::head_second_best, HEAP_DROP_FREE_SPACE, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_page_get_max_mvccid(), heap_scan_pb_lock_and_fetch, heap_stats_add_bestspace(), heap_stats_put_second_best(), heap_vpid_prev(), heap_vpid_remove(), hfid::hpgid, i, heap_hdr_stats::last_vpid, log_append_undoredo_data(), log_skip_logging(), NO_ERROR, NULL, heap_hdr_stats::num_high_best, heap_hdr_stats::num_other_high_best, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, heap_hdr_stats::num_second_best, heap_hdr_stats::num_substitutions, log_data_addr::offset, OLD_PAGE, PAGE_HEAP, vpid::pageid, pgbuf_check_page_ptype(), PGBUF_INIT_WATCHER, PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_HDR, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_set_dirty_and_free(), pgbuf_ordered_unfix, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, heap_hdr_stats::recs_sumlen, RVHF_STATS, S_SUCCESS, heap_hdr_stats::second_best, SP_SUCCESS, spage_collect_statistics(), spage_get_free_space_without_saving(), spage_get_record(), spage_number_of_records(), spage_reclaim(), spage_update(), heap_hdr_stats::tail_second_best, vacuum_er_log, VACUUM_ER_LOG_HEAP, vacuum_is_mvccid_vacuumed(), log_data_addr::vfid, hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, VPID_ISNULL, VPID_SET_NULL, and X_LOCK.
Referenced by heap_reclaim_addresses(), and shf_heap_reclaim_addresses().
int mvcc_header_size_lookup[8] |
Definition at line 69 of file object_representation.c.
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_insert_adjust_recdes_header(), heap_set_mvcc_rec_header_on_overflow(), heap_update_adjust_recdes_header(), or_header_size(), or_mvcc_set_header(), vacuum_heap_record_insid_and_prev_version(), and vacuum_rv_redo_vacuum_heap_page().