CUBRID Engine
latest
|
#include <inttypes.h>
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "heap_file.h"
#include "porting.h"
#include "porting_inline.hpp"
#include "record_descriptor.hpp"
#include "slotted_page.h"
#include "overflow_file.h"
#include "boot_sr.h"
#include "locator_sr.h"
#include "btree.h"
#include "btree_unique.hpp"
#include "transform.h"
#include "serial.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "object_representation_sr.h"
#include "xserver_interface.h"
#include "chartype.h"
#include "query_executor.h"
#include "fetch.h"
#include "server_interface.h"
#include "elo.h"
#include "db_elo.h"
#include "string_opfunc.h"
#include "xasl.h"
#include "xasl_unpack_info.hpp"
#include "stream_to_xasl.h"
#include "query_opfunc.h"
#include "set_object.h"
#include "dbtype.h"
#include "thread_manager.hpp"
#include "db_value_printer.hpp"
#include "log_append.hpp"
#include "string_buffer.hpp"
#include "tde.h"
#include <set>
Go to the source code of this file.
Classes | |
struct | heap_hdr_stats |
struct | heap_stats_entry |
struct | heap_chain |
struct | heap_chk_relocoid |
struct | heap_chkall_relocoids |
struct | heap_classrepr_entry |
struct | heap_classrepr_lock |
struct | heap_classrepr_hash |
struct | heap_classrepr_LRU_list |
struct | heap_classrepr_free_list |
struct | heap_classrepr_cache |
struct | heap_chnguess_entry |
struct | heap_chnguess |
struct | heap_stats_bestspace_cache |
struct | heap_show_scan_ctx |
Typedefs | |
typedef struct heap_hdr_stats | HEAP_HDR_STATS |
typedef struct heap_stats_entry | HEAP_STATS_ENTRY |
typedef struct heap_chain | HEAP_CHAIN |
typedef struct heap_chk_relocoid | HEAP_CHK_RELOCOID |
typedef struct heap_chkall_relocoids | HEAP_CHKALL_RELOCOIDS |
typedef struct heap_classrepr_entry | HEAP_CLASSREPR_ENTRY |
typedef struct heap_classrepr_lock | HEAP_CLASSREPR_LOCK |
typedef struct heap_classrepr_hash | HEAP_CLASSREPR_HASH |
typedef struct heap_classrepr_LRU_list | HEAP_CLASSREPR_LRU_LIST |
typedef struct heap_classrepr_free_list | HEAP_CLASSREPR_FREE_LIST |
typedef struct heap_classrepr_cache | HEAP_CLASSREPR_CACHE |
typedef struct heap_chnguess_entry | HEAP_CHNGUESS_ENTRY |
typedef struct heap_chnguess | HEAP_CHNGUESS |
typedef struct heap_stats_bestspace_cache | HEAP_STATS_BESTSPACE_CACHE |
typedef struct heap_show_scan_ctx | HEAP_SHOW_SCAN_CTX |
Enumerations | |
enum | HEAP_FINDSPACE { HEAP_FINDSPACE_FOUND, HEAP_FINDSPACE_NOTFOUND, HEAP_FINDSPACE_ERROR } |
enum | HEAP_DIRECTION { HEAP_DIRECTION_NONE, HEAP_DIRECTION_LEFT, HEAP_DIRECTION_RIGHT, HEAP_DIRECTION_BOTH } |
enum | { ZONE_VOID = 1, ZONE_FREE = 2, ZONE_LRU = 3 } |
Variables | |
static int | rv |
static HEAP_CLASSREPR_CACHE | heap_Classrepr_cache |
static int | heap_Maxslotted_reclength |
static int | heap_Slotted_overhead = 4 |
static const int | heap_Find_best_page_limit = 100 |
static HEAP_CLASSREPR_CACHE * | heap_Classrepr = NULL |
static HEAP_CHNGUESS | heap_Guesschn_area |
static HEAP_CHNGUESS * | heap_Guesschn = NULL |
static HEAP_STATS_BESTSPACE_CACHE | heap_Bestspace_cache_area |
static HEAP_STATS_BESTSPACE_CACHE * | heap_Bestspace = NULL |
static HEAP_HFID_TABLE | heap_Hfid_table_area |
static HEAP_HFID_TABLE * | heap_Hfid_table = NULL |
static const cubmem::block_allocator | HEAP_SCANCACHE_BLOCK_ALLOCATOR |
#define __STDC_FORMAT_MACROS |
Definition at line 26 of file heap_file.c.
#define BEST_PAGE_SEARCH_MAX_COUNT 100 |
Referenced by heap_stats_find_page_in_bestspace().
#define CLASSREPR_HASH_SIZE (heap_Classrepr_cache.num_entries * 2) |
Definition at line 402 of file heap_file.c.
Referenced by heap_classrepr_initialize_cache().
#define CLASSREPR_REPR_INCREMENT 10 |
Definition at line 401 of file heap_file.c.
#define DEFAULT_REPR_INCREMENT 16 |
Definition at line 303 of file heap_file.c.
Referenced by heap_classrepr_entry_reset(), and heap_classrepr_initialize_cache().
#define heap_bestspace_log | ( | ... | ) | if (prm_get_bool_value (PRM_ID_DEBUG_BESTSPACE)) _er_log_debug (ARG_FILE_LINE, __VA_ARGS__) |
Definition at line 581 of file heap_file.c.
Referenced by heap_stats_find_best_page(), and heap_stats_sync_bestspace().
#define HEAP_BESTSPACE_SYNC_THRESHOLD (0.1f) |
Definition at line 86 of file heap_file.c.
Referenced by heap_stats_find_best_page().
#define HEAP_BIT_CLEAR | ( | byte_ptr, | |
bit_num | |||
) |
Definition at line 438 of file heap_file.c.
Referenced by heap_chnguess_clear().
#define HEAP_BIT_GET | ( | byte_ptr, | |
bit_num | |||
) | (*HEAP_BYTEGET(byte_ptr, bit_num) & HEAP_BITMASK_INBYTE(bit_num)) |
Definition at line 433 of file heap_file.c.
Referenced by heap_chnguess_get(), and heap_chnguess_remove_entry().
#define HEAP_BIT_SET | ( | byte_ptr, | |
bit_num | |||
) |
Definition at line 435 of file heap_file.c.
Referenced by heap_chnguess_put().
#define HEAP_BITMASK (HEAP_NBITS_IN_BYTE - 1) |
Definition at line 421 of file heap_file.c.
#define HEAP_BITMASK_INBYTE | ( | bit_num | ) | (1 << ((unsigned int)(bit_num) & HEAP_BITMASK)) |
Definition at line 431 of file heap_file.c.
#define HEAP_BYTEGET | ( | byte_ptr, | |
bit_num | |||
) | ((unsigned char *)(byte_ptr) + HEAP_BYTEOFFSET_OFBIT(bit_num)) |
Definition at line 428 of file heap_file.c.
#define HEAP_BYTEOFFSET_OFBIT | ( | bit_num | ) | ((unsigned int)(bit_num) >> HEAP_NSHIFTS) |
Definition at line 427 of file heap_file.c.
#define HEAP_CHK_ADD_UNFOUND_RELOCOIDS 100 |
Definition at line 280 of file heap_file.c.
Referenced by heap_chkreloc_next(), and heap_chkreloc_start().
#define HEAP_CHKRELOC_UNFOUND_SHORT 5 |
Definition at line 14540 of file heap_file.c.
Referenced by heap_chkreloc_next().
#define HEAP_CHNGUESS_FUDGE_MININDICES (100) |
Definition at line 418 of file heap_file.c.
Referenced by heap_chnguess_initialize(), and heap_chnguess_realloc().
#define heap_classrepr_log_er | ( | msg, | |
... | |||
) |
Definition at line 1358 of file heap_file.c.
Referenced by heap_classrepr_decache_guessed_last().
#define heap_classrepr_log_stack | ( | msg, | |
... | |||
) |
Definition at line 1361 of file heap_file.c.
Referenced by heap_classrepr_get().
#define HEAP_CLASSREPR_MAXCACHE 1024 |
Definition at line 96 of file heap_file.c.
Referenced by heap_chnguess_initialize(), and heap_classrepr_initialize_cache().
#define HEAP_DEBUG_ISVALID_SCANRANGE | ( | scan_range | ) | (DISK_VALID) |
Definition at line 110 of file heap_file.c.
Referenced by heap_scanrange_next(), heap_scanrange_to_following(), and heap_scanrange_to_prior().
#define HEAP_DEBUG_SCANCACHE_INITPATTERN (12345) |
Definition at line 104 of file heap_file.c.
Referenced by heap_next_internal(), heap_scancache_check_with_hfid(), heap_scancache_end_internal(), heap_scancache_force_modify(), heap_scancache_quick_end(), heap_scancache_quick_start_internal(), and heap_scancache_start_internal().
#define HEAP_DROP_FREE_SPACE (int)(DB_PAGESIZE * 0.3) |
Definition at line 102 of file heap_file.c.
Referenced by heap_should_try_update_stat(), heap_stats_get_min_freespace(), heap_stats_sync_bestspace(), heap_stats_update(), heap_stats_update_internal(), heap_vpid_alloc(), and xheap_reclaim_addresses().
#define HEAP_GUESS_NUM_ATTRS_REFOIDS 100 |
Definition at line 93 of file heap_file.c.
Referenced by heap_attrinfo_start_refoids().
#define HEAP_GUESS_NUM_INDEXED_ATTRS 100 |
Definition at line 94 of file heap_file.c.
Referenced by heap_attrinfo_start_with_btid(), and heap_attrinfo_start_with_index().
#define heap_hfid_table_log | ( | thp, | |
oidp, | |||
msg, | |||
... | |||
) |
Definition at line 510 of file heap_file.c.
Referenced by heap_cache_class_info(), heap_delete_hfid_from_cache(), and heap_hfid_cache_get().
#define HEAP_IS_PAGE_OF_OID | ( | thread_p, | |
pgptr, | |||
oid | |||
) |
Definition at line 113 of file heap_file.c.
#define HEAP_LOG_MVCC_INSERT_MAX_REDO_CRUMBS 4 |
Referenced by heap_mvcc_log_insert().
#define HEAP_LOG_MVCC_REDISTRIBUTE_MAX_REDO_CRUMBS 4 |
Referenced by heap_mvcc_log_redistribute().
#define HEAP_MAX_FIRSTSLOTID_LENGTH (sizeof (HEAP_HDR_STATS)) |
Referenced by heap_manager_initialize().
#define HEAP_MAYNEED_DECACHE_GUESSED_LASTREPRS | ( | class_oid, | |
hfid | |||
) |
Definition at line 405 of file heap_file.c.
Referenced by heap_update_logical().
#define HEAP_MVCC_SET_HEADER_MAXIMUM_SIZE | ( | mvcc_rec_header_p | ) |
Definition at line 128 of file heap_file.c.
Referenced by heap_delete_adjust_header(), heap_insert_adjust_recdes_header(), and heap_update_adjust_recdes_header().
#define HEAP_NBITS_IN_BYTE (8) |
Definition at line 419 of file heap_file.c.
#define HEAP_NBITS_TO_NBYTES | ( | bit_cnt | ) | ((unsigned int)((bit_cnt) + HEAP_BITMASK) >> HEAP_NSHIFTS) |
Definition at line 422 of file heap_file.c.
Referenced by heap_chnguess_initialize(), and heap_chnguess_realloc().
#define HEAP_NBYTES_CLEARED | ( | byte_ptr, | |
byte_cnt | |||
) | memset((byte_ptr), '\0', (byte_cnt)) |
Definition at line 425 of file heap_file.c.
Referenced by heap_chnguess_initialize(), heap_chnguess_put(), and heap_chnguess_realloc().
#define HEAP_NBYTES_TO_NBITS | ( | byte_cnt | ) | ((unsigned int)(byte_cnt) << HEAP_NSHIFTS) |
Definition at line 424 of file heap_file.c.
Referenced by heap_chnguess_initialize(), and heap_chnguess_realloc().
#define HEAP_NSHIFTS (3) /* For multiplication/division by 8 */ |
Definition at line 420 of file heap_file.c.
#define HEAP_NUM_BEST_SPACESTATS 10 |
Definition at line 182 of file heap_file.c.
Referenced by heap_check_all_pages(), heap_create_internal(), heap_dump_hdr(), heap_header_next_scan(), heap_remove_page_on_vacuum(), heap_reuse(), heap_stats_find_page_in_bestspace(), heap_stats_get_second_best(), heap_stats_put_second_best(), heap_stats_sync_bestspace(), heap_stats_update_internal(), heap_vpid_alloc(), heap_vpid_remove(), and xheap_reclaim_addresses().
#define HEAP_PAGE_FLAG_VACUUM_ONCE 0x80000000 |
Definition at line 241 of file heap_file.c.
#define HEAP_PAGE_FLAG_VACUUM_STATUS_MASK 0xC0000000 |
Definition at line 240 of file heap_file.c.
#define HEAP_PAGE_FLAG_VACUUM_UNKNOWN 0x40000000 |
Definition at line 242 of file heap_file.c.
#define HEAP_PAGE_GET_VACUUM_STATUS | ( | chain | ) |
Definition at line 262 of file heap_file.c.
Referenced by heap_page_get_vacuum_status(), heap_page_rv_chain_update(), heap_page_set_vacuum_status_none(), and heap_page_update_chain_after_mvcc_op().
#define HEAP_PAGE_SET_VACUUM_STATUS | ( | chain, | |
status | |||
) |
Definition at line 244 of file heap_file.c.
Referenced by heap_alloc_new_page(), heap_page_rv_chain_update(), heap_page_set_vacuum_status_none(), heap_page_update_chain_after_mvcc_op(), heap_reuse(), heap_rv_redo_reuse_page(), heap_rv_redo_reuse_page_reuse_oid(), and heap_vpid_alloc().
#define HEAP_PERF_START | ( | thread_p, | |
context | |||
) | PERF_UTIME_TRACKER_START (thread_p, (context)->time_track) |
Definition at line 519 of file heap_file.c.
Referenced by heap_delete_logical(), heap_insert_logical(), and heap_update_logical().
#define HEAP_PERF_TRACK_EXECUTE | ( | thread_p, | |
context | |||
) |
Definition at line 540 of file heap_file.c.
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_insert_logical(), heap_insert_newhome(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
#define HEAP_PERF_TRACK_LOGGING | ( | thread_p, | |
context | |||
) |
Definition at line 561 of file heap_file.c.
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), heap_insert_logical(), heap_insert_newhome(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
#define HEAP_PERF_TRACK_PREPARE | ( | thread_p, | |
context | |||
) |
Definition at line 521 of file heap_file.c.
Referenced by heap_delete_logical(), heap_delete_relocation(), heap_insert_logical(), heap_update_bigone(), heap_update_home(), heap_update_logical(), and heap_update_relocation().
#define HEAP_RV_FLAG_VACUUM_STATUS_CHANGE 0x8000 |
Definition at line 517 of file heap_file.c.
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_rv_mvcc_redo_delete_home(), heap_rv_mvcc_redo_insert(), heap_rv_mvcc_redo_redistribute(), heap_rv_mvcc_undo_delete(), heap_rv_redo_update_and_update_chain(), heap_rv_remove_flags_from_offset(), heap_rv_undo_delete(), heap_rv_undo_insert(), heap_rv_undo_update(), heap_rv_undoredo_update(), and heap_rv_update_chain_after_mvcc_op().
#define HEAP_SCAN_ORDERED_HFID | ( | scan | ) | (((scan) != NULL) ? (&(scan)->node.hfid) : (PGBUF_ORDERED_NULL_HFID)) |
Definition at line 156 of file heap_file.c.
#define heap_scan_pb_lock_and_fetch | ( | ... | ) | heap_scan_pb_lock_and_fetch_debug (__VA_ARGS__, ARG_FILE_LINE) |
Definition at line 588 of file heap_file.c.
Referenced by heap_attrinfo_check_unique_index(), heap_check_all_pages(), heap_check_all_pages_by_heapchain(), heap_compact_pages(), heap_does_exist(), heap_dump(), heap_flush(), heap_get_capacity(), heap_get_last_page(), heap_get_page_with_watcher(), heap_get_record_location(), heap_header_next_scan(), heap_next_internal(), heap_page_next(), heap_page_prev(), heap_prefetch(), heap_stats_del_bestspace_by_vpid(), heap_stats_find_page_in_bestspace(), heap_vpid_alloc(), heap_vpid_remove(), and xheap_reclaim_addresses().
#define HEAP_STATS_ENTRY_FREELIST_SIZE 1000 |
Definition at line 99 of file heap_file.c.
Referenced by heap_stats_entry_free().
#define HEAP_STATS_ENTRY_MHT_EST_SIZE 1000 |
Definition at line 98 of file heap_file.c.
Referenced by heap_stats_bestspace_initialize().
#define HEAP_STATS_NEXT_BEST_INDEX | ( | i | ) | (((i) + 1) % HEAP_NUM_BEST_SPACESTATS) |
Definition at line 185 of file heap_file.c.
Referenced by heap_stats_get_second_best(), heap_stats_put_second_best(), heap_stats_sync_bestspace(), heap_stats_update_internal(), and heap_vpid_alloc().
#define HEAP_STATS_PREV_BEST_INDEX | ( | i | ) | (((i) == 0) ? (HEAP_NUM_BEST_SPACESTATS - 1) : ((i) - 1)); |
Definition at line 187 of file heap_file.c.
Referenced by heap_stats_sync_bestspace().
#define HEAP_UPDATE_IS_MVCC_OP | ( | is_mvcc_class, | |
update_style | |||
) | (false) |
Definition at line 153 of file heap_file.c.
Referenced by heap_update_adjust_recdes_header(), and heap_update_logical().
#define MVCC_SET_DELETE_INFO | ( | mvcc_delete_info_p, | |
row_delete_id, | |||
satisfies_del_result | |||
) |
Definition at line 118 of file heap_file.c.
#define OR_FIXED_ATTRIBUTES_OFFSET_BY_OBJ | ( | obj, | |
nvars | |||
) | (OR_HEADER_SIZE(obj) + OR_VAR_TABLE_SIZE_INTERNAL(nvars, OR_GET_OFFSET_SIZE(obj))) |
Definition at line 90 of file heap_file.c.
Referenced by heap_attrinfo_transform_to_disk_internal(), heap_attrvalue_read(), and heap_midxkey_get_value().
#define pthread_mutex_destroy | ( | a | ) |
Definition at line 79 of file heap_file.c.
Referenced by heap_classrepr_finalize_cache(), and heap_stats_bestspace_finalize().
#define pthread_mutex_init | ( | a, | |
b | |||
) |
Definition at line 78 of file heap_file.c.
Referenced by heap_classrepr_initialize_cache(), and heap_stats_bestspace_initialize().
#define pthread_mutex_lock | ( | a | ) | 0 |
Definition at line 80 of file heap_file.c.
Referenced by heap_check_all_pages(), heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), heap_classrepr_entry_free(), heap_classrepr_free(), heap_classrepr_get(), heap_stats_add_bestspace(), heap_stats_del_bestspace_by_hfid(), heap_stats_del_bestspace_by_vpid(), and heap_stats_find_page_in_bestspace().
#define pthread_mutex_trylock | ( | a | ) | 0 |
Definition at line 81 of file heap_file.c.
Referenced by heap_classrepr_decache_guessed_last(), and heap_classrepr_get().
#define pthread_mutex_unlock | ( | a | ) |
Definition at line 82 of file heap_file.c.
Referenced by heap_check_all_pages(), heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), heap_classrepr_entry_free(), heap_classrepr_free(), heap_classrepr_get(), heap_stats_add_bestspace(), heap_stats_del_bestspace_by_hfid(), heap_stats_del_bestspace_by_vpid(), and heap_stats_find_page_in_bestspace().
#define REPR_HASH | ( | class_oid | ) | (OID_PSEUDO_KEY(class_oid)%CLASSREPR_HASH_SIZE) |
Definition at line 403 of file heap_file.c.
Referenced by heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), and heap_classrepr_get().
typedef struct heap_chain HEAP_CHAIN |
Definition at line 269 of file heap_file.c.
typedef struct heap_chk_relocoid HEAP_CHK_RELOCOID |
Definition at line 282 of file heap_file.c.
typedef struct heap_chkall_relocoids HEAP_CHKALL_RELOCOIDS |
Definition at line 289 of file heap_file.c.
typedef struct heap_chnguess HEAP_CHNGUESS |
Definition at line 454 of file heap_file.c.
typedef struct heap_chnguess_entry HEAP_CHNGUESS_ENTRY |
Definition at line 442 of file heap_file.c.
typedef struct heap_classrepr_cache HEAP_CLASSREPR_CACHE |
Definition at line 364 of file heap_file.c.
typedef struct heap_classrepr_entry HEAP_CLASSREPR_ENTRY |
Definition at line 308 of file heap_file.c.
typedef struct heap_classrepr_free_list HEAP_CLASSREPR_FREE_LIST |
Definition at line 356 of file heap_file.c.
typedef struct heap_classrepr_hash HEAP_CLASSREPR_HASH |
Definition at line 339 of file heap_file.c.
typedef struct heap_classrepr_lock HEAP_CLASSREPR_LOCK |
Definition at line 331 of file heap_file.c.
typedef struct heap_classrepr_LRU_list HEAP_CLASSREPR_LRU_LIST |
Definition at line 348 of file heap_file.c.
typedef struct heap_hdr_stats HEAP_HDR_STATS |
Definition at line 190 of file heap_file.c.
typedef struct heap_show_scan_ctx HEAP_SHOW_SCAN_CTX |
Definition at line 481 of file heap_file.c.
typedef struct heap_stats_bestspace_cache HEAP_STATS_BESTSPACE_CACHE |
Definition at line 468 of file heap_file.c.
typedef struct heap_stats_entry HEAP_STATS_ENTRY |
Definition at line 231 of file heap_file.c.
anonymous enum |
Enumerator | |
---|---|
ZONE_VOID | |
ZONE_FREE | |
ZONE_LRU |
Definition at line 305 of file heap_file.c.
enum HEAP_DIRECTION |
Enumerator | |
---|---|
HEAP_DIRECTION_NONE | |
HEAP_DIRECTION_LEFT | |
HEAP_DIRECTION_RIGHT | |
HEAP_DIRECTION_BOTH |
Definition at line 170 of file heap_file.c.
enum HEAP_FINDSPACE |
Enumerator | |
---|---|
HEAP_FINDSPACE_FOUND | |
HEAP_FINDSPACE_NOTFOUND | |
HEAP_FINDSPACE_ERROR |
Definition at line 159 of file heap_file.c.
|
static |
Definition at line 18229 of file heap_file.c.
References strlen.
Referenced by heap_header_next_scan().
|
static |
Definition at line 25330 of file heap_file.c.
References assert, ASSERT_ERROR, DONT_FREE, ER_FAILED, heap_get_chain_ptr(), heap_get_page_with_watcher(), HEAP_HEADER_AND_CHAIN_SLOTID, log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, heap_chain::next_vpid, NO_ERROR, NULL, log_data_addr::offset, PGBUF_CLEAR_WATCHER, PGBUF_INIT_WATCHER, pgbuf_is_page_fixed_by_thread(), PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix_and_init, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, heap_chain::prev_vpid, RVHF_CHAIN, log_data_addr::vfid, hfid::vfid, and VPID_COPY.
Referenced by heap_rv_postpone_append_pages_to_heap().
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().
|
static |
Definition at line 11186 of file heap_file.c.
References ARG_FILE_LINE, er_errid(), ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_HEAP_WRONG_ATTRINFO, er_set(), NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, NULL_VOLID, OID_EQ, OID_ISNULL, db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by heap_attrinfo_set(), and heap_attrinfo_set_uninitialized().
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 * | db_valuep, | ||
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().
|
static |
Definition at line 11465 of file heap_file.c.
References BIG_VAR_OFFSET_SIZE, i, OR_BOUND_BIT_BYTES, OR_BYTE_SIZE, OR_MAX_BYTE, OR_MAX_SHORT, OR_MVCC_INSERT_HEADER_SIZE, OR_NON_MVCC_HEADER_SIZE, OR_SHORT_SIZE, OR_VAR_TABLE_SIZE_INTERNAL, pr_data_writeval_disk_size(), and tp_domain_disk_size().
Referenced by heap_attrinfo_transform_to_disk_internal().
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().
|
static |
Definition at line 9887 of file heap_file.c.
References er_errid(), ER_FAILED, heap_attrinfo_recache_attrepr(), heap_classrepr_free_and_init, heap_classrepr_get(), i, NO_ERROR, NULL, and NULL_REPRID.
Referenced by heap_attrinfo_delete_lob(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_read_dbvalues_without_oid(), heap_attrinfo_set_uninitialized(), heap_attrvalue_get_key(), and heap_midxkey_key_generate().
|
static |
Definition at line 9678 of file heap_file.c.
References ARG_FILE_LINE, DB_TYPE_OBJECT, DB_TYPE_OID, db_value_domain_init(), er_errid(), ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_HEAP_UNKNOWN_ATTRS, er_set(), i, or_attribute::id, NO_ERROR, and or_attribute::type.
Referenced by heap_attrinfo_recache(), heap_attrinfo_start(), and heap_attrinfo_start_with_index().
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().
|
static |
Definition at line 11348 of file heap_file.c.
References assert, db_elo_delete(), db_get_elo(), DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_copy(), db_value_is_null(), db_value_type(), er_errid(), ER_FAILED, heap_attrinfo_check(), heap_attrinfo_recache(), heap_attrvalue_read(), i, NO_ERROR, NULL, or_chn(), or_rep_id(), pr_clear_value(), pr_clone_value(), and pr_free_ext_value().
Referenced by heap_attrinfo_set_uninitialized_global(), and heap_attrinfo_transform_to_disk_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 * | attrids, | ||
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().
|
static |
Definition at line 11922 of file heap_file.c.
References ARG_FILE_LINE, or_classrep::attributes, or_attribute::domain, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, heap_attrinfo_start(), heap_classrepr_free_and_init, heap_classrepr_get(), HEAP_GUESS_NUM_ATTRS_REFOIDS, i, or_attribute::id, or_classrep::n_attributes, NO_ERROR, NULL, NULL_REPRID, and tp_domain_references_objects().
Referenced by heap_get_referenced_by().
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().
|
static |
Definition at line 11568 of file heap_file.c.
References assert, or_buf::buffer, CAST_BUFLEN, pr_type::data_writeval(), db_elo_copy(), db_get_elo(), db_make_elo(), DB_PAGESIZE, DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_domain_init(), db_value_is_null(), db_value_type(), db_value::domain, or_buf::endptr, or_buf::env, ER_TF_BUFFER_OVERFLOW, error(), free_and_init, record_descriptor::get_data_for_modify(), heap_attrinfo_get_disksize(), heap_attrinfo_set_uninitialized(), heap_get_class_name(), i, pr_type::id, INT_ALIGNMENT, LOB_FLAG_INCLUDE_LOB, LSA_INITIALIZER, db_elo::meta_data, mvcc_is_mvcc_disabled_class(), db_value::need_clear, NO_ERROR, NULL, OR_BOUND_BIT_BYTES, OR_BOUND_BIT_FLAG, OR_BUF_INIT2, OR_CLEAR_BOUND_BIT, OR_ENABLE_BOUND_BIT, OR_FIXED_ATTRIBUTES_OFFSET_BY_OBJ, OR_GET_BOUND_BITS, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_INSID, OR_MVCC_FLAG_VALID_PREV_VERSION, OR_MVCC_INSERT_HEADER_SIZE, OR_MVCC_MAX_HEADER_SIZE, OR_MVCC_PREV_VERSION_LSA_SIZE, OR_NON_MVCC_HEADER_SIZE, or_pad(), or_put_bigint(), or_put_data(), or_put_int(), or_put_offset_internal(), OR_SET_VAR_OFFSET_SIZE, OR_VAR_ELEMENT_PTR, pr_clear_value(), or_buf::ptr, PTR_ALIGN, qdata_increment_dbval(), record_descriptor::resize_buffer(), S_ERROR, S_SUCCESS, record_descriptor::set_record_length(), and tp_domain_disk_size().
Referenced by heap_attrinfo_transform_to_disk(), and heap_attrinfo_transform_to_disk_except_lob().
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_pred, | ||
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().
|
static |
Definition at line 10075 of file heap_file.c.
References recdes::data, pr_type::data_readval(), DB_TYPE_BLOB, DB_TYPE_CLOB, DB_TYPE_MULTISET, DB_TYPE_SEQUENCE, DB_TYPE_SET, db_value_domain_init(), or_attribute::default_value, or_attribute::domain, or_buf::env, er_errid(), ER_FAILED, or_buf::error_abort, NO_ERROR, NULL, OR_BUF_INIT2, OR_FIXED_ATT_IS_UNBOUND, OR_FIXED_ATTRIBUTES_OFFSET_BY_OBJ, OR_VAR_IS_NULL, OR_VAR_LENGTH, OR_VAR_OFFSET, pr_clear_value(), pr_type_from_id(), tp_domain::precision, tp_domain::scale, tp_domain_disk_size(), TP_DOMAIN_TYPE, or_attribute::type, and or_default_value::val_length.
Referenced by heap_attrinfo_delete_lob(), heap_attrinfo_read_dbvalues(), heap_attrinfo_read_dbvalues_without_oid(), and heap_attrinfo_set_uninitialized().
|
static |
Definition at line 18204 of file heap_file.c.
References heap_bestspace::freespace, vpid::pageid, vpid::volid, and heap_bestspace::vpid.
Referenced by heap_header_next_scan().
|
static |
Definition at line 19683 of file heap_file.c.
References recdes::area_size, assert, recdes::data, recdes::length, NULL, and recdes::type.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_insert_handle_multipage_record(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
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().
|
static |
Definition at line 13622 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DISK_ERROR, DISK_INVALID, DISK_VALID, ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_CYCLE, er_set(), file_check_vpid(), file_map_pages(), vfid::fileid, heap_chkreloc_next(), heap_scan_pb_lock_and_fetch, heap_vpid_next(), hfid::hpgid, NO_ERROR, NULL, OLD_PAGE_PREVENT_DEALLOC, vpid::pageid, pgbuf_get_vpid_ptr(), PGBUF_INIT_WATCHER, PGBUF_LATCH_READ, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, PGBUF_UNCONDITIONAL_LATCH, pgbuf_watcher::pgptr, S_LOCK, spage_check(), hfid::vfid, vpid::volid, vfid::volid, VPID_EQ, VPID_ISNULL, and VPID_SET_NULL.
Referenced by heap_check_all_pages().
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().
|
static |
Definition at line 14407 of file heap_file.c.
References ARG_FILE_LINE, DISK_ERROR, DISK_INVALID, DISK_VALID, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_HEAP_FOUND_NOT_VACUUMED, er_log_debug, er_set(), free_and_init, heap_chkreloc_print_notfound(), heap_chkall_relocoids::ht, i, mht_count(), mht_destroy(), mht_get(), mht_map(), mht_rem(), NO_ERROR, heap_chkall_relocoids::not_vacuumed_res, NULL, heap_chkall_relocoids::num_unfound_reloc, db_identifier::pageid, db_identifier::slotid, heap_chkall_relocoids::unfound_reloc_oids, heap_chkall_relocoids::verify, and db_identifier::volid.
Referenced by heap_check_all_pages().
|
static |
Definition at line 14543 of file heap_file.c.
References ARG_FILE_LINE, heap_hdr_stats::class_oid, recdes::data, DISK_ERROR, DISK_INVALID, DISK_VALID, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, HEAP_CHK_ADD_UNFOUND_RELOCOIDS, HEAP_CHKRELOC_UNFOUND_SHORT, heap_get_class_oid_from_page(), heap_get_mvcc_rec_header_from_overflow(), HEAP_HEADER_AND_CHAIN_SLOTID, heap_chkall_relocoids::ht, i, if(), heap_chkall_relocoids::max_unfound_reloc, mht_get(), mht_put(), mht_rem(), NO_ERROR, heap_chkall_relocoids::not_vacuumed_res, NULL, heap_chkall_relocoids::num_unfound_reloc, OID_EQ, OLD_PAGE, vpid::pageid, db_identifier::pageid, PEEK, pgbuf_fix, pgbuf_get_page_id(), pgbuf_get_volume_id(), PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, heap_chk_relocoid::real_oid, REC_BIGONE, REC_DELETED_WILL_REUSE, REC_HOME, REC_MARKDELETED, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, heap_chk_relocoid::reloc_oid, S_SUCCESS, db_identifier::slotid, spage_get_record_type(), spage_next_record(), heap_chkall_relocoids::unfound_reloc_oids, vacuum_check_not_vacuumed_rec_header(), vacuum_check_not_vacuumed_recdes(), heap_chkall_relocoids::verify, heap_chkall_relocoids::verify_not_vacuumed, vpid::volid, db_identifier::volid, and VPID_ISNULL.
Referenced by heap_check_all_pages_by_heapchain().
|
static |
Definition at line 14493 of file heap_file.c.
References ARG_FILE_LINE, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), free_and_init, heap_chkall_relocoids::ht, mht_rem(), NO_ERROR, NULL, db_identifier::pageid, heap_chk_relocoid::real_oid, heap_chk_relocoid::reloc_oid, db_identifier::slotid, heap_chkall_relocoids::verify, and db_identifier::volid.
Referenced by heap_chkreloc_end().
|
static |
Definition at line 14354 of file heap_file.c.
References ARG_FILE_LINE, DISK_ERROR, DISK_VALID, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), HEAP_CHK_ADD_UNFOUND_RELOCOIDS, heap_chkall_relocoids::ht, heap_chkall_relocoids::max_unfound_reloc, mht_create(), mht_destroy(), heap_chkall_relocoids::not_vacuumed_res, NULL, heap_chkall_relocoids::num_unfound_reloc, oid_compare_equals(), oid_hash(), heap_chkall_relocoids::unfound_reloc_oids, heap_chkall_relocoids::verify, and heap_chkall_relocoids::verify_not_vacuumed.
Referenced by heap_check_all_pages().
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().
Definition at line 15134 of file heap_file.c.
References heap_chnguess_remove_entry(), heap_chnguess::ht, mht_get(), mht_map(), NO_ERROR, NULL, and heap_chnguess::schema_change.
Referenced by heap_classrepr_decache(), and heap_mark_class_as_modified().
|
static |
Definition at line 14994 of file heap_file.c.
References heap_chnguess::bitindex, heap_chnguess::clock_hand, heap_chnguess::entries, free_and_init, heap_chnguess::ht, mht_destroy(), heap_chnguess::nbytes, NO_ERROR, NULL, heap_chnguess::num_clients, heap_chnguess::num_entries, and heap_chnguess::schema_change.
Referenced by heap_chnguess_initialize(), and heap_manager_finalize().
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().
|
static |
Definition at line 14820 of file heap_file.c.
References ARG_FILE_LINE, heap_chnguess::bitindex, heap_chnguess_entry::bits, heap_chnguess_entry::chn, heap_chnguess::clock_hand, heap_chnguess::entries, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, heap_chnguess_finalize(), HEAP_CHNGUESS_FUDGE_MININDICES, HEAP_CLASSREPR_MAXCACHE, heap_Guesschn_area, HEAP_NBITS_TO_NBYTES, HEAP_NBYTES_CLEARED, HEAP_NBYTES_TO_NBITS, heap_chnguess::ht, i, heap_chnguess_entry::idx, logtb_get_number_of_total_tran_indices(), mht_create(), mht_destroy(), heap_chnguess::nbytes, NO_ERROR, NULL, NULL_CHN, heap_chnguess::num_clients, heap_chnguess::num_entries, heap_chnguess_entry::oid, oid_compare_equals(), oid_hash(), OID_SET_NULL, heap_chnguess_entry::recently_accessed, and heap_chnguess::schema_change.
Referenced by heap_chnguess_realloc(), and heap_manager_initialize().
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().
|
static |
Definition at line 14912 of file heap_file.c.
References ARG_FILE_LINE, heap_chnguess::bitindex, heap_chnguess_entry::bits, heap_chnguess::entries, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, HEAP_CHNGUESS_FUDGE_MININDICES, heap_chnguess_initialize(), HEAP_NBITS_TO_NBYTES, HEAP_NBYTES_CLEARED, HEAP_NBYTES_TO_NBITS, i, logtb_get_number_of_total_tran_indices(), heap_chnguess::nbytes, NO_ERROR, NULL, heap_chnguess::num_clients, and heap_chnguess::num_entries.
Referenced by heap_chnguess_get(), and heap_chnguess_put().
|
static |
Definition at line 15176 of file heap_file.c.
References heap_chnguess::bitindex, heap_chnguess_entry::bits, heap_chnguess_entry::chn, heap_chnguess::clock_hand, heap_chnguess::entries, HEAP_BIT_GET, heap_chnguess::ht, i, heap_chnguess_entry::idx, logtb_get_number_of_total_tran_indices(), mht_count(), mht_rem(), heap_chnguess::nbytes, NO_ERROR, NULL, NULL_CHN, heap_chnguess::num_clients, heap_chnguess::num_entries, heap_chnguess_entry::oid, OID_ISNULL, OID_SET_NULL, db_identifier::pageid, heap_chnguess_entry::recently_accessed, heap_chnguess::schema_change, db_identifier::slotid, and db_identifier::volid.
Referenced by heap_chnguess_decache().
|
static |
Definition at line 10785 of file heap_file.c.
References assert, cleanup(), ER_FAILED, error(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), logtb_get_mvcc_snapshot(), heap_scancache::mvcc_snapshot, NO_ERROR, NULL, or_class_get_partition_info(), or_class_hfid(), PEEK, and S_SUCCESS.
Referenced by heap_get_class_partitions(), and heap_get_partitions_from_subclasses().
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().
Definition at line 1676 of file heap_file.c.
References ARG_FILE_LINE, heap_classrepr_entry::class_oid, ER_CSS_PTHREAD_MUTEX_LOCK, ER_ERROR_SEVERITY, er_set_with_oserror(), heap_classrepr_entry::fcnt, heap_classrepr_entry::force_decache, heap_classrepr_hash::hash_mutex, heap_classrepr_entry::hash_next, heap_classrepr_hash::hash_next, heap_classrepr_cache::hash_table, heap_classrepr_entry_free(), heap_classrepr_entry_remove_from_LRU(), heap_classrepr_entry_reset(), heap_classrepr_log_er, heap_classrepr_cache::LRU_list, heap_classrepr_LRU_list::LRU_mutex, heap_classrepr_entry::mutex, heap_classrepr_entry::next, NO_ERROR, NULL, OID_AS_ARGS, OID_EQ, heap_classrepr_entry::prev, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock, REPR_HASH, rv, heap_classrepr_entry::zone, ZONE_LRU, and ZONE_VOID.
Referenced by heap_classrepr_decache().
|
static |
Definition at line 2672 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, or_classrep::attributes, or_index::btid, BTID_IS_EQUAL, or_attribute::btids, or_index::btname, or_attribute::classoid, COPY, pr_type::data_readval(), db_fprint_value(), db_private_free_and_init, or_attribute::default_value, or_attribute::domain, or_buf::env, ER_FAILED, er_log_debug, or_buf::error_abort, vfid::fileid, or_classrep::fixed_length, free_and_init, heap_get_class_name(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, or_attribute::id, or_classrep::id, or_classrep::indexes, or_attribute::location, or_classrep::n_attributes, or_attribute::n_btids, or_classrep::n_class_attrs, or_classrep::n_indexes, or_classrep::n_shared_attrs, or_classrep::n_variable, NO_ERROR, NULL, OID_EQ, OID_ISNULL, or_class_name(), or_get_attrname(), or_init(), db_identifier::pageid, or_attribute::position, pr_clear_value(), pr_is_set_type(), pr_type_from_id(), pr_type_name(), RECDES_INITIALIZER, btid::root_pageid, S_SUCCESS, db_identifier::slotid, or_attribute::type, or_default_value::val_length, or_default_value::value, btid::vfid, vfid::volid, and db_identifier::volid.
Referenced by heap_attrinfo_dump(), heap_classrepr_dump_all(), heap_classrepr_get(), heap_dump(), and heap_dump_capacity().
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().
|
static |
Definition at line 2097 of file heap_file.c.
References heap_classrepr_entry::class_oid, heap_classrepr_entry::fcnt, heap_classrepr_free_list::free_cnt, heap_classrepr_cache::free_list, heap_classrepr_free_list::free_mutex, heap_classrepr_free_list::free_top, heap_classrepr_hash::hash_mutex, heap_classrepr_entry::hash_next, heap_classrepr_hash::hash_next, heap_classrepr_cache::hash_table, heap_classrepr_entry_remove_from_LRU(), heap_classrepr_entry_reset(), heap_classrepr_LRU_list::LRU_bottom, heap_classrepr_cache::LRU_list, heap_classrepr_LRU_list::LRU_mutex, heap_classrepr_entry::mutex, heap_classrepr_entry::next, NULL, heap_classrepr_entry::prev, pthread_mutex_lock, pthread_mutex_unlock, REPR_HASH, rv, heap_classrepr_entry::zone, and ZONE_VOID.
Referenced by heap_classrepr_get().
|
static |
Definition at line 2221 of file heap_file.c.
References heap_classrepr_free_list::free_cnt, heap_classrepr_cache::free_list, heap_classrepr_free_list::free_mutex, heap_classrepr_free_list::free_top, heap_classrepr_entry::next, NO_ERROR, pthread_mutex_lock, pthread_mutex_unlock, rv, heap_classrepr_entry::zone, and ZONE_FREE.
Referenced by heap_classrepr_decache_guessed_last(), heap_classrepr_free(), and heap_classrepr_get().
|
static |
Definition at line 1637 of file heap_file.c.
References heap_classrepr_LRU_list::LRU_bottom, heap_classrepr_cache::LRU_list, heap_classrepr_LRU_list::LRU_top, heap_classrepr_entry::next, NO_ERROR, and heap_classrepr_entry::prev.
Referenced by heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), and heap_classrepr_free().
|
static |
Definition at line 1584 of file heap_file.c.
References ARG_FILE_LINE, heap_classrepr_entry::class_oid, DEFAULT_REPR_INCREMENT, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_classrepr_entry::force_decache, free_and_init, i, heap_classrepr_entry::last_reprid, heap_classrepr_entry::max_reprid, NO_ERROR, NULL, NULL_REPRID, OID_SET_NULL, or_free_classrep(), and heap_classrepr_entry::repr.
Referenced by heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), and heap_classrepr_free().
|
static |
Definition at line 1498 of file heap_file.c.
References heap_classrepr_cache::area, assert, free_and_init, heap_classrepr_cache::free_list, heap_classrepr_free_list::free_mutex, heap_classrepr_cache::hash_table, i, heap_classrepr_entry::last_reprid, heap_classrepr_cache::lock_table, heap_classrepr_cache::LRU_list, heap_classrepr_LRU_list::LRU_mutex, mutex, NO_ERROR, NULL, heap_classrepr_cache::num_entries, heap_classrepr_cache::num_hash, or_free_classrep(), pthread_mutex_destroy, and heap_classrepr_entry::repr.
Referenced by heap_classrepr_initialize_cache(), heap_classrepr_restart_cache(), and heap_manager_finalize().
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().
|
static |
Definition at line 2246 of file heap_file.c.
References heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), NULL, NULL_REPRID, or_get_classrep(), or_rep_id(), PEEK, and S_SUCCESS.
Referenced by heap_classrepr_get().
|
static |
Definition at line 1371 of file heap_file.c.
References heap_classrepr_cache::area, ARG_FILE_LINE, heap_hdr_stats::class_oid, CLASSREPR_HASH_SIZE, DEFAULT_REPR_INCREMENT, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_classrepr_entry::fcnt, heap_classrepr_entry::force_decache, heap_classrepr_free_list::free_cnt, heap_classrepr_cache::free_list, heap_classrepr_free_list::free_mutex, heap_classrepr_free_list::free_top, heap_classrepr_entry::hash_next, heap_classrepr_hash::hash_next, heap_classrepr_cache::hash_table, heap_Classrepr_cache, heap_classrepr_finalize_cache(), HEAP_CLASSREPR_MAXCACHE, i, heap_classrepr_entry::idx, heap_classrepr_hash::idx, heap_classrepr_entry::last_reprid, 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::max_reprid, mutex, heap_classrepr_entry::next, heap_classrepr_entry::next_wait_thrd, heap_classrepr_lock::next_wait_thrd, NO_ERROR, NULL, NULL_REPRID, heap_classrepr_cache::num_entries, heap_classrepr_cache::num_hash, OID_SET_NULL, heap_classrepr_entry::prev, pthread_mutex_init, heap_classrepr_entry::repr, thread_num_total_threads(), heap_classrepr_entry::zone, and ZONE_FREE.
Referenced by heap_classrepr_restart_cache(), and heap_manager_initialize().
void heap_classrepr_logging_template | ( | const char * | filename, |
const int | line, | ||
ErF && | er_f, | ||
const char * | msg, | ||
Args &&... | args | ||
) |
Definition at line 1350 of file heap_file.c.
References string_buffer::get_buffer(), cubthread::get_entry(), cubthread::entry::index, and cubthread::entry::tran_index.
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().
|
static |
Definition at line 19404 of file heap_file.c.
References recdes::area_size, assert, heap_operation_context::class_oid, recdes::data, heap_operation_context::file_type, FILE_UNKNOWN_TYPE, heap_operation_context::forward_page_watcher, heap_operation_context::header_page_watcher, heap_link_watchers(), HEAP_OPERATION_NONE, heap_operation_context::hfid, HFID_COPY, heap_operation_context::home_page_watcher, heap_operation_context::home_recdes, heap_operation_context::is_bulk_op, heap_operation_context::is_logical_old, heap_operation_context::is_redistribute_insert_with_delid, recdes::length, heap_operation_context::map_recdes, NULL, heap_operation_context::oid, OID_SET_NULL, heap_operation_context::overflow_page_watcher, heap_operation_context::ovf_oid, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_HDR, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_HEAP_OVERFLOW, REC_UNKNOWN, heap_operation_context::recdes_p, heap_operation_context::record_type, heap_operation_context::res_oid, heap_operation_context::scan_cache_p, heap_operation_context::time_track, recdes::type, heap_operation_context::type, heap_operation_context::update_in_place, and UPDATE_INPLACE_NONE.
Referenced by heap_create_delete_context(), heap_create_insert_context(), and heap_create_update_context().
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().
Definition at line 951 of file heap_file.c.
References HFID_EQ.
Referenced by heap_stats_bestspace_initialize().
Definition at line 922 of file heap_file.c.
References VPID_EQ.
Referenced by heap_stats_bestspace_initialize().
STATIC_INLINE int heap_copy_chain | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page_heap, | ||
HEAP_CHAIN * | chain | ||
) |
Definition at line 4149 of file heap_file.c.
References assert, assert_release, recdes::data, ER_FAILED, HEAP_HEADER_AND_CHAIN_SLOTID, recdes::length, NO_ERROR, PEEK, S_SUCCESS, and spage_get_record().
STATIC_INLINE int heap_copy_header_stats | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page_header, | ||
HEAP_HDR_STATS * | header_stats | ||
) |
Definition at line 4108 of file heap_file.c.
References recdes::area_size, assert_release, COPY, recdes::data, ER_FAILED, HEAP_HEADER_AND_CHAIN_SLOTID, NO_ERROR, S_SUCCESS, spage_get_record(), and STATIC_INLINE.
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().
|
static |
Definition at line 5161 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, heap_hdr_stats::best, file_heap_des::class_oid, heap_hdr_stats::class_oid, recdes::data, DB_PAGESIZE, ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_UNABLE_TO_CREATE_HEAP, er_set(), error(), heap_hdr_stats::estimates, file_alloc_sticky_first_page(), file_apply_tde_algorithm(), file_create_heap(), file_descriptor_update(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_init_page_type(), file_tracker_reuse_heap(), vfid::fileid, fileio_get_volume_label(), FREE, heap_bestspace::freespace, heap_hdr_stats::full_search_vpid, heap_hdr_stats::head, heap_hdr_stats::head_second_best, file_descriptors::heap, heap_cache_class_info(), heap_get_class_tde_algorithm(), heap_get_spage_type(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_MAX_ALIGN, HEAP_NUM_BEST_SPACESTATS, heap_reuse(), heap_stats_del_bestspace_by_hfid(), file_heap_des::hfid, HFID_IS_NULL, HFID_SET_NULL, hfid::hpgid, i, heap_hdr_stats::last_vpid, recdes::length, log_append_redo_data(), log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_start(), logpb_force_flush_pages(), heap_hdr_stats::next_vpid, NO_ERROR, NULL, NULL_FILEID, null_oid, NULL_PAGEID, 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, OID_INITIALIZER, heap_hdr_stats::ovf_vfid, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_set_dirty(), pgbuf_set_page_ptype(), pgbuf_unfix_and_init, log_data_addr::pgptr, prm_get_bool_value(), prm_get_float_value(), PRM_ID_DONT_REUSE_HEAP_FILE, PRM_ID_HF_UNFILL_FACTOR, REC_HOME, heap_hdr_stats::recs_sumlen, RVHF_CREATE_HEADER, SAFEGUARD_RVSPACE, heap_hdr_stats::second_best, SP_SUCCESS, spage_initialize(), spage_insert(), spage_max_space_for_new_record(), heap_hdr_stats::tail_second_best, TDE_ALGORITHM_NONE, recdes::type, heap_hdr_stats::unfill_space, vacuum_log_add_dropped_file(), VACUUM_LOG_ADD_DROPPED_FILE_UNDO, log_data_addr::vfid, hfid::vfid, VFID_SET_NULL, vpid::volid, vfid::volid, heap_bestspace::vpid, and VPID_SET_NULL.
Referenced by xheap_create().
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().
|
static |
Definition at line 20449 of file heap_file.c.
References assert, HEAP_MVCC_SET_HEADER_MAXIMUM_SIZE, MVCC_SET_DELID, MVCC_SET_FLAG_BITS, NULL, and OR_MVCC_FLAG_VALID_DELID.
Referenced by heap_delete_bigone(), heap_delete_home(), and heap_delete_relocation().
|
static |
Definition at line 5407 of file heap_file.c.
References assert, HEAP_HEADER_AND_CHAIN_SLOTID, NULL, NULL_SLOTID, vpid::pageid, db_identifier::pageid, PEEK, S_SUCCESS, db_identifier::slotid, spage_delete(), spage_next_record(), vpid::volid, and db_identifier::volid.
Referenced by heap_reuse(), and heap_rv_redo_reuse_page().
|
static |
Definition at line 20548 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, COPY, recdes::data, DONT_FREE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_LK_PAGE_TIMEOUT, ER_PAGE_LATCH_ABORTED, er_set(), heap_operation_context::file_type, heap_delete_adjust_header(), heap_delete_physical(), heap_fix_header_page(), heap_get_mvcc_rec_header_from_overflow(), heap_is_reusable_oid(), heap_log_delete_physical(), heap_mvcc_log_delete(), heap_mvcc_log_home_no_change(), HEAP_OPERATION_DELETE, heap_ovf_delete(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, heap_set_mvcc_rec_header_on_overflow(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, recdes::length, logtb_get_current_mvccid(), mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, NO_ERROR, NULL, log_data_addr::offset, heap_operation_context::oid, OLD_PAGE, OR_MVCC_MAX_HEADER_SIZE, heap_operation_context::overflow_page_watcher_p, PAGE_OVERFLOW, pgbuf_watcher::page_was_unfixed, vpid::pageid, db_identifier::pageid, PEEK, perfmon_inc_stat(), pgbuf_check_page_ptype(), PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_OVERFLOW, pgbuf_set_dirty(), PGBUF_WATCHER_COPY_GROUP, PGBUF_WATCHER_RESET_RANK, log_data_addr::pgptr, pgbuf_watcher::pgptr, PSTAT_HEAP_BIG_DELETES, PSTAT_HEAP_BIG_MVCC_DELETES, rc, RVHF_MVCC_DELETE_OVERFLOW, S_SUCCESS, db_identifier::slotid, spage_get_record(), heap_operation_context::type, log_data_addr::vfid, hfid::vfid, vpid::volid, and db_identifier::volid.
Referenced by heap_delete_logical().
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().
|
static |
Definition at line 21175 of file heap_file.c.
References recdes::area_size, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, COPY, recdes::data, er_errid(), ER_FAILED, heap_operation_context::file_type, heap_build_forwarding_recdes(), heap_delete_adjust_header(), heap_delete_physical(), heap_insert_newhome(), heap_is_big_length(), heap_is_reusable_oid(), heap_log_delete_physical(), heap_mvcc_log_delete(), heap_mvcc_log_home_change_on_delete(), HEAP_OPERATION_DELETE, heap_ovf_insert(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_SET_RECORD, heap_update_physical(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, IO_DEFAULT_PAGE_SIZE, recdes::length, logtb_get_current_mvccid(), MAX_ALIGNMENT, mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, NO_ERROR, NULL, log_data_addr::offset, heap_operation_context::oid, OR_GET_BOUND_BIT_FLAG, OR_GET_MVCC_REPID_AND_FLAG, OR_GET_OFFSET_SIZE, or_mvcc_add_header(), OR_MVCC_DELETE_ID_OFFSET, OR_MVCC_DELETE_ID_SIZE, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_header(), OR_MVCC_MAX_HEADER_SIZE, OR_MVCC_PREV_VERSION_LSA_OFFSET, OR_MVCCID_SIZE, OR_PUT_BIGINT, OR_PUT_INT, pgbuf_watcher::page_was_unfixed, PEEK, perfmon_inc_stat(), log_data_addr::pgptr, pgbuf_watcher::pgptr, PSTAT_HEAP_HOME_DELETES, PSTAT_HEAP_HOME_MVCC_DELETES, PSTAT_HEAP_HOME_TO_BIG_DELETES, PSTAT_HEAP_HOME_TO_REL_DELETES, PTR_ALIGN, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_HOME, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, heap_operation_context::record_type, RVHF_MVCC_DELETE_REC_HOME, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_is_updatable(), recdes::type, heap_operation_context::type, log_data_addr::vfid, and hfid::vfid.
Referenced by heap_delete_logical().
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().
|
static |
Definition at line 21472 of file heap_file.c.
References assert, DONT_FREE, ER_FAILED, heap_stats_update(), NO_ERROR, NULL, NULL_SLOTID, pgbuf_set_dirty(), db_identifier::slotid, spage_delete(), and spage_get_free_space_without_saving().
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), and heap_update_relocation().
|
static |
Definition at line 20704 of file heap_file.c.
References recdes::area_size, assert, COPY, recdes::data, DONT_FREE, ER_FAILED, heap_operation_context::file_type, heap_operation_context::forward_page_watcher_p, heap_build_forwarding_recdes(), heap_delete_adjust_header(), heap_delete_physical(), heap_fix_forward_page(), heap_fix_header_page(), heap_insert_newhome(), heap_is_big_length(), heap_is_reusable_oid(), heap_log_delete_physical(), heap_mvcc_log_delete(), heap_mvcc_log_home_change_on_delete(), heap_mvcc_log_home_no_change(), HEAP_OPERATION_DELETE, heap_ovf_insert(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_PERF_TRACK_PREPARE, HEAP_SET_RECORD, heap_update_physical(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, IO_DEFAULT_PAGE_SIZE, recdes::length, log_append_postpone(), log_append_undoredo_recdes(), logtb_get_current_mvccid(), MAX_ALIGNMENT, mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, NO_ERROR, NULL, log_data_addr::offset, heap_operation_context::oid, OR_GET_BOUND_BIT_FLAG, OR_GET_MVCC_REPID_AND_FLAG, OR_GET_OFFSET_SIZE, or_mvcc_add_header(), OR_MVCC_DELETE_ID_OFFSET, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_header(), OR_MVCC_MAX_HEADER_SIZE, OR_MVCC_PREV_VERSION_LSA_OFFSET, OR_MVCCID_SIZE, OR_PUT_BIGINT, OR_PUT_INT, pgbuf_watcher::page_was_unfixed, PEEK, perfmon_inc_stat(), pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, PSTAT_HEAP_REL_DELETES, PSTAT_HEAP_REL_MVCC_DELETES, PSTAT_HEAP_REL_TO_BIG_DELETES, PSTAT_HEAP_REL_TO_HOME_DELETES, PSTAT_HEAP_REL_TO_REL_DELETES, PTR_ALIGN, rc, REC_BIGONE, REC_HOME, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, heap_operation_context::record_type, RVHF_DELETE, RVHF_MARK_REUSABLE_SLOT, RVHF_MVCC_DELETE_REC_NEWHOME, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_is_updatable(), recdes::type, heap_operation_context::type, log_data_addr::vfid, and hfid::vfid.
Referenced by heap_delete_logical().
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().
|
static |
Definition at line 14050 of file heap_file.c.
References heap_hdr_stats::best, heap_hdr_stats::class_oid, 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_NUM_BEST_SPACESTATS, i, heap_hdr_stats::last_vpid, heap_hdr_stats::next_vpid, NO_ERROR, 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, heap_hdr_stats::ovf_vfid, vpid::pageid, db_identifier::pageid, heap_hdr_stats::recs_sumlen, heap_hdr_stats::second_best, db_identifier::slotid, heap_hdr_stats::tail_second_best, heap_hdr_stats::unfill_space, vpid::volid, vfid::volid, db_identifier::volid, and heap_bestspace::vpid.
Referenced by heap_dump(), and heap_rv_dump_statistics().
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().
|
static |
Definition at line 9086 of file heap_file.c.
References ER_FAILED, heap_estimate(), and NO_ERROR.
Referenced by heap_assign_address().
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().
|
static |
Definition at line 17352 of file heap_file.c.
References ARG_FILE_LINE, or_index::atts, func_pred::cache_attrinfo, DB_IS_NULL, db_value_domain_init(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), function_index_info::expr, or_function_index::expr_stream, function_index_info::expr_stream, or_function_index::expr_stream_size, function_index_info::expr_stream_size, fetch_peek_dbval(), free_and_init, free_xasl_unpack_info(), or_index::func_index_info, func_pred_unpack_info::func_pred, func_pred::func_regu, heap_attrinfo_clear_dbvalues(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), i, or_attribute::id, or_index::n_atts, db_value::need_clear, NO_ERROR, NULL, pr_clear_value(), pr_clone_value(), qexec_clear_func_pred(), stx_map_stream_to_func_pred(), tp_domain_cache(), and TP_DOMAIN_TYPE.
Referenced by heap_attrinfo_generate_key(), and heap_attrvalue_get_key().
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().
|
static |
Definition at line 20183 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, heap_scancache_node::class_oid, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), heap_get_class_oid_from_page(), heap_is_big_length(), heap_Maxslotted_reclength, HEAP_OPERATION_INSERT, heap_stats_find_best_page(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, recdes::length, NO_ERROR, heap_scancache::node, NULL, OID_EQ, OID_SET_NULL, PAGE_HEAP, db_identifier::pageid, pgbuf_check_page_ptype(), pgbuf_get_page_id(), pgbuf_get_volume_id(), pgbuf_ordered_unfix, pgbuf_watcher::pgptr, REC_NEWHOME, heap_operation_context::recdes_p, heap_operation_context::res_oid, heap_operation_context::scan_cache_p, db_identifier::slotid, SP_ERROR, SP_SUCCESS, spage_insert(), recdes::type, heap_operation_context::type, and db_identifier::volid.
Referenced by heap_insert_newhome().
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().
|
static |
Definition at line 19617 of file heap_file.c.
References ARG_FILE_LINE, assert, COPY_OID, recdes::data, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_BAD_OBJECT_TYPE, ER_LK_PAGE_TIMEOUT, ER_PAGE_LATCH_ABORTED, er_set(), heap_operation_context::forward_page_watcher_p, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, NO_ERROR, NULL, OLD_PAGE, PAGE_HEAP, vpid::pageid, db_identifier::pageid, pgbuf_check_page_ptype(), PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_WATCHER_COPY_GROUP, pgbuf_watcher::pgptr, rc, REC_NEWHOME, db_identifier::slotid, spage_get_record_type(), vpid::volid, and db_identifier::volid.
Referenced by heap_delete_relocation(), and heap_update_relocation().
|
static |
Definition at line 19568 of file heap_file.c.
References ARG_FILE_LINE, assert, er_errid(), ER_ERROR_SEVERITY, ER_LK_PAGE_TIMEOUT, ER_PAGE_LATCH_ABORTED, er_set(), heap_operation_context::header_page_watcher_p, heap_operation_context::hfid, hfid::hpgid, NO_ERROR, NULL, OLD_PAGE, PAGE_HEAP, vpid::pageid, pgbuf_check_page_ptype(), PGBUF_LATCH_WRITE, pgbuf_ordered_fix, pgbuf_watcher::pgptr, rc, hfid::vfid, vpid::volid, and vfid::volid.
Referenced by heap_delete_bigone(), heap_delete_relocation(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
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().
|
static |
Definition at line 18783 of file heap_file.c.
References assert, heap_scancache::assign_recdes_to_area(), recdes::data, heap_ovf_get(), heap_scancache::is_recdes_assigned_to_area(), recdes::length, NULL, NULL_CHN, PEEK, S_DOESNT_FIT, and S_SUCCESS.
Referenced by heap_get_record_data_when_all_ready(), and heap_update_bigone().
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().
|
static |
Definition at line 9116 of file heap_file.c.
References assert, recdes::data, er_errid(), ER_FAILED, HEAP_HEADER_AND_CHAIN_SLOTID, heap_ovf_get_capacity(), heap_scan_pb_lock_and_fetch, heap_vpid_next(), hfid::hpgid, if(), NO_ERROR, NULL, OLD_PAGE_PREVENT_DEALLOC, vpid::pageid, PEEK, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_DELETED_WILL_REUSE, REC_HOME, REC_MARKDELETED, REC_NEWHOME, REC_RELOCATION, REC_UNKNOWN, S_LOCK, S_SUCCESS, spage_get_free_space(), spage_get_record_length(), spage_get_record_type(), spage_next_record(), spage_number_of_records(), spage_slot_size(), hfid::vfid, vpid::volid, vfid::volid, and VPID_ISNULL.
Referenced by heap_capacity_next_scan(), and heap_dump_capacity().
STATIC_INLINE HEAP_CHAIN * heap_get_chain_ptr | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page_heap | ||
) |
Definition at line 4129 of file heap_file.c.
References assert_release, recdes::data, HEAP_HEADER_AND_CHAIN_SLOTID, NULL, PEEK, S_SUCCESS, spage_get_record(), and STATIC_INLINE.
Referenced by heap_add_chain_links(), and heap_vpid_alloc().
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().
|
static |
Definition at line 22987 of file heap_file.c.
References ER_FAILED, heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), NO_ERROR, NULL, or_class_hfid(), or_class_name(), PEEK, S_SUCCESS, and strdup().
Referenced by heap_cache_class_info(), and heap_hfid_cache_get().
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 ** | classname_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().
|
static |
Definition at line 10702 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_subclasses_from_record(), PEEK, and S_SUCCESS.
Referenced by heap_get_class_partitions().
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().
|
static |
Definition at line 19513 of file heap_file.c.
References assert, ASSERT_ERROR, heap_operation_context::class_oid, FILE_HEAP, FILE_HEAP_REUSE_SLOTS, heap_scancache::file_type, FILE_UNKNOWN_TYPE, heap_get_class_info(), heap_scancache_node::hfid, heap_operation_context::hfid, HFID_EQ, NO_ERROR, heap_scancache::node, NULL, and heap_operation_context::scan_cache_p.
Referenced by heap_delete_logical(), and heap_update_logical().
|
static |
Definition at line 19236 of file heap_file.c.
References assert, file_get_sticky_first_page(), hfid::vfid, and VFID_ISNULL.
Referenced by heap_check_heap_file(), heap_get_hfid_from_vfid(), and heap_rv_postpone_append_pages_to_heap().
STATIC_INLINE HEAP_HDR_STATS * heap_get_header_stats_ptr | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | page_header | ||
) |
Definition at line 4088 of file heap_file.c.
References assert_release, recdes::data, HEAP_HEADER_AND_CHAIN_SLOTID, NULL, PEEK, S_SUCCESS, spage_get_record(), and STATIC_INLINE.
Referenced by heap_get_last_vpid(), and heap_rv_postpone_append_pages_to_heap().
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().
|
static |
Definition at line 7274 of file heap_file.c.
References COPY, MVCC_IS_CHN_UPTODATE, NULL, or_mvcc_get_header(), PEEK, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, mvcc_snapshot::snapshot_fnc, spage_get_record(), and TOO_OLD_FOR_SNAPSHOT.
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().
|
static |
Definition at line 20046 of file heap_file.c.
References assert, ASSERT_ERROR_AND_SET, heap_operation_context::class_oid, ER_FAILED, ER_SP_NOSPACE_IN_PAGE, HEAP_OPERATION_INSERT, heap_stats_find_best_page(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::is_bulk_op, recdes::length, LK_COND_LOCK, LK_GRANTED, LK_NOTGRANTED_DUE_ABORTED, LK_NOTGRANTED_DUE_TIMEOUT, lock_object(), LOG_FIND_CURRENT_TDES(), NO_ERROR, NULL, NULL_LOCK, OID_IS_ROOTOID, OID_SET_NULL, db_identifier::pageid, pgbuf_get_page_id(), pgbuf_get_volume_id(), pgbuf_ordered_unfix, pgbuf_watcher::pgptr, REC_NEWHOME, heap_operation_context::recdes_p, heap_operation_context::res_oid, heap_operation_context::scan_cache_p, SCH_M_LOCK, db_identifier::slotid, SP_ERROR, spage_find_free_slot(), spage_max_space_for_new_record(), spage_number_of_slots(), TRAN_ABORT_DUE_ROLLBACK_ON_ESCALATION, log_tdes::tran_abort_reason, recdes::type, heap_operation_context::type, db_identifier::volid, and X_LOCK.
Referenced by heap_insert_logical().
|
static |
Definition at line 4004 of file heap_file.c.
References assert, ASSERT_ERROR_AND_SET, recdes::data, ER_FAILED, heap_hdr_stats::estimates, HEAP_HEADER_AND_CHAIN_SLOTID, heap_scan_pb_lock_and_fetch, heap_hdr_stats::last_vpid, heap_chain::next_vpid, NO_ERROR, NULL, OLD_PAGE, PEEK, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, S_SUCCESS, spage_get_record(), STATIC_INLINE, VPID_ISNULL, and X_LOCK.
Referenced by heap_rv_postpone_append_pages_to_heap(), and heap_vpid_alloc().
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().
STATIC_INLINE int heap_get_last_vpid | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
VPID * | last_vpid | ||
) |
Definition at line 4048 of file heap_file.c.
References ASSERT_ERROR, assert_release, ER_FAILED, heap_hdr_stats::estimates, heap_get_header_stats_ptr(), hfid::hpgid, heap_hdr_stats::last_vpid, NO_ERROR, NULL, OLD_PAGE, vpid::pageid, PGBUF_INIT_WATCHER, PGBUF_LATCH_READ, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_HDR, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, STATIC_INLINE, hfid::vfid, vpid::volid, vfid::volid, and VPID_SET_NULL.
Referenced by heap_next_internal(), and heap_page_prev().
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().
|
static |
Definition at line 18257 of file heap_file.c.
References recdes::data, db_make_int(), db_make_null(), db_make_oid(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_PAGE_INFO_CLASS_OID, HEAP_PAGE_INFO_NEXT_PAGE, HEAP_PAGE_INFO_PREV_PAGE, hfid::hpgid, heap_hdr_stats::next_vpid, heap_chain::next_vpid, NULL, vpid::pageid, PEEK, heap_chain::prev_vpid, S_ERROR, S_SUCCESS, spage_get_page_header_info(), spage_get_record(), hfid::vfid, vpid::volid, and vfid::volid.
Referenced by heap_page_next(), and heap_page_prev().
|
static |
Definition at line 25311 of file heap_file.c.
References assert, ASSERT_ERROR_AND_SET, heap_scan_pb_lock_and_fetch, NO_ERROR, NULL, OLD_PAGE, pgbuf_watcher::pgptr, and X_LOCK.
Referenced by heap_add_chain_links(), and heap_rv_postpone_append_pages_to_heap().
|
static |
Definition at line 10839 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, cleanup(), db_private_free_and_init, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, er_set(), error(), heap_attrinfo_end(), heap_attrinfo_start(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, NO_ERROR, NULL, NULL_ATTRID, or_get_attrname(), PEEK, and S_SUCCESS.
|
static |
Definition at line 10946 of file heap_file.c.
References assert, cleanup(), COPY_OID, db_seq_free(), ER_FAILED, error(), heap_class_get_partition_info(), HFID_COPY, i, NO_ERROR, NULL, OID_ISNULL, and or_partition::rep_id.
Referenced by heap_get_class_partitions().
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().
|
static |
Definition at line 18445 of file heap_file.c.
References recdes::area_size, assert, heap_scancache::assign_recdes_to_area(), heap_scancache::cache_last_fix_page, COPY, COPY_OID, recdes::data, db_make_bigint(), db_make_int(), db_make_null(), heap_ovf_get(), HEAP_RECORD_INFO_T_CHN, HEAP_RECORD_INFO_T_LENGTH, HEAP_RECORD_INFO_T_MVCC_DELID, HEAP_RECORD_INFO_T_MVCC_FLAGS, HEAP_RECORD_INFO_T_MVCC_INSID, HEAP_RECORD_INFO_T_MVCC_PREV_VERSION, HEAP_RECORD_INFO_T_OFFSET, HEAP_RECORD_INFO_T_PAGEID, HEAP_RECORD_INFO_T_REC_TYPE, HEAP_RECORD_INFO_T_REPRID, HEAP_RECORD_INFO_T_SLOTID, HEAP_RECORD_INFO_T_VOLUMEID, recdes::length, MVCC_GET_DELID, MVCC_GET_FLAG, MVCC_GET_INSID, MVCC_IS_FLAG_SET, MVCC_IS_HEADER_DELID_VALID, NULL, NULL_CHN, spage_slot::offset_to_record, or_chn(), OR_GET_MVCC_CHN, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_header(), or_rep_id(), heap_scancache::page_watcher, db_identifier::pageid, PEEK, PGBUF_IS_CLEAN_WATCHER, pgbuf_ordered_unfix, pgbuf_replace_watcher, 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_length, spage_slot::record_type, S_DOESNT_FIT, S_ERROR, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_get_slot(), and db_identifier::volid.
Referenced by heap_next_internal().
|
static |
Definition at line 20470 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, heap_scancache::cache_last_fix_page, heap_scancache_node::class_oid, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_PB_BAD_PAGEID, er_set(), heap_get_class_oid_from_page(), heap_scan_pb_lock_and_fetch, heap_operation_context::hfid, HFID_IS_NULL, heap_operation_context::home_page_watcher_p, NO_ERROR, heap_scancache::node, NULL, heap_operation_context::oid, OID_EQ, OID_ISNULL, OLD_PAGE, heap_scancache::page_watcher, vpid::pageid, db_identifier::pageid, pgbuf_get_vpid_ptr(), pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, rc, REC_ASSIGN_ADDRESS, heap_operation_context::scan_cache_p, db_identifier::slotid, spage_get_record_type(), vpid::volid, db_identifier::volid, VPID_EQ, and X_LOCK.
Referenced by heap_delete_logical(), and heap_update_logical().
int heap_get_referenced_by | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
const OID * | obj_oid, | ||
RECDES * | recdes, | ||
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().
|
static |
Definition at line 1312 of file heap_file.c.
References ANCHORED_DONT_REUSE_SLOTS.
Referenced by heap_create_internal(), heap_reinitialize_page(), heap_rv_redo_newpage(), and heap_vpid_init_new().
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().
|
static |
Definition at line 24145 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_scancache::assign_recdes_to_area(), recdes::data, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), log_page::hdr, IO_MAX_PAGE_SIZE, heap_scancache::is_recdes_assigned_to_area(), recdes::length, LOG_CS_ENTER(), LOG_CS_EXIT(), LOG_CS_SAFE_READER, log_get_append_lsa(), log_get_undo_record(), log_hdrpage::logical_pageid, logpb_fatal_error(), logpb_fetch_page(), logpb_prior_lsa_append_all_list(), LSA_COPY(), LSA_ISNULL(), LSA_LT(), MAX_ALIGNMENT, MVCC_GET_PREV_VERSION_LSA, MVCC_IS_CHN_UPTODATE, heap_scancache::mvcc_snapshot, NO_ERROR, NULL, NULL_OFFSET, NULL_PAGEID, log_hdrpage::offset, or_mvcc_get_header(), PTR_ALIGN, S_DOESNT_EXIST, S_DOESNT_FIT, S_ERROR, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, mvcc_snapshot::snapshot_fnc, SNAPSHOT_SATISFIED, TOO_NEW_FOR_SNAPSHOT, and TOO_OLD_FOR_SNAPSHOT.
Referenced by heap_get_visible_version_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().
|
static |
Definition at line 937 of file heap_file.c.
References hfid::hpgid, hfid::vfid, and vfid::volid.
Referenced by heap_stats_bestspace_initialize().
|
static |
Definition at line 908 of file heap_file.c.
References vpid::pageid, and vpid::volid.
Referenced by heap_stats_bestspace_initialize().
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().
|
static |
Definition at line 23484 of file heap_file.c.
References assert, ASSERT_ERROR, assert_release, boot_find_root_heap(), heap_hfid_table_entry::classname, file_get_type(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_type_to_string(), FILE_UNKNOWN_TYPE, vfid::fileid, heap_hfid_table_entry::ftype, heap_get_class_info_from_record(), heap_hfid_table_log, heap_hfid_table_entry::hfid, HFID_AS_ARGS, heap_hfid_table::hfid_hash, HFID_INITIALIZER, hfid::hpgid, lf_hash_delete(), lf_hash_find_or_insert(), lf_tran_end_with_mb, NO_ERROR, NULL, NULL_FILEID, NULL_PAGEID, NULL_VOLID, OID_IS_ROOTOID, OID_ISNULL, thread_get_tran_entry(), THREAD_TS_HFID_TABLE, hfid::vfid, and vfid::volid.
Referenced by heap_get_class_info().
|
static |
Definition at line 23028 of file heap_file.c.
References heap_hfid_table_entry::classname, and NULL.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23048 of file heap_file.c.
References heap_hfid_table_entry::classname, ER_FAILED, NO_ERROR, and NULL.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23076 of file heap_file.c.
References heap_hfid_table_entry::class_oid, heap_hfid_table_entry::classname, ER_FAILED, FILE_UNKNOWN_TYPE, vfid::fileid, heap_hfid_table_entry::ftype, heap_hfid_table_entry::hfid, hfid::hpgid, NO_ERROR, NULL, NULL_FILEID, NULL_PAGEID, NULL_VOLID, OID_SET_NULL, hfid::vfid, and vfid::volid.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23152 of file heap_file.c.
References assert, NULL, and OID_EQ.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23115 of file heap_file.c.
References COPY_OID, ER_FAILED, NO_ERROR, and NULL.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23139 of file heap_file.c.
References OID_PSEUDO_KEY.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 23097 of file heap_file.c.
References heap_hfid_table_entry::classname, NO_ERROR, and NULL.
Referenced by heap_initialize_hfid_table().
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().
|
static |
Definition at line 19707 of file heap_file.c.
References recdes::area_size, assert, recdes::data, ER_FAILED, heap_is_big_length(), HEAP_MVCC_SET_HEADER_MAXIMUM_SIZE, HEAP_OPERATION_INSERT, heap_operation_context::is_bulk_op, heap_operation_context::is_redistribute_insert_with_delid, recdes::length, logtb_get_current_mvccid(), MVCC_CLEAR_ALL_FLAG_BITS, MVCC_CLEAR_FLAG_BITS, mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, MVCC_IS_FLAG_SET, MVCC_IS_HEADER_DELID_VALID, MVCC_SET_FLAG, MVCC_SET_INSID, NO_ERROR, NULL, OR_GET_MVCC_REPID_AND_FLAG, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_INSID, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_header(), OR_MVCC_INSERT_ID_OFFSET, or_mvcc_set_header(), OR_MVCCID_SIZE, OR_PUT_BIGINT, OR_PUT_INT, heap_operation_context::recdes_p, heap_operation_context::type, heap_operation_context::update_in_place, UPDATE_INPLACE_NONE, and UPDATE_INPLACE_OLD_MVCCID.
Referenced by heap_insert_logical().
|
static |
Definition at line 20001 of file heap_file.c.
References assert, ER_FAILED, heap_build_forwarding_recdes(), heap_is_big_length(), HEAP_OPERATION_INSERT, HEAP_OPERATION_UPDATE, heap_ovf_insert(), heap_operation_context::hfid, recdes::length, heap_operation_context::map_recdes, NO_ERROR, NULL, heap_operation_context::ovf_oid, REC_BIGONE, heap_operation_context::recdes_p, and heap_operation_context::type.
Referenced by heap_insert_logical().
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().
|
static |
Definition at line 20264 of file heap_file.c.
References assert, ASSERT_ERROR, heap_operation_context::class_oid, COPY_OID, DONT_FREE, heap_create_insert_context(), heap_find_location_and_insert_rec_newhome(), heap_log_insert_physical(), HEAP_OPERATION_DELETE, HEAP_OPERATION_UPDATE, HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, heap_unfix_watchers(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, NO_ERROR, NULL, pgbuf_replace_watcher, pgbuf_set_dirty(), pgbuf_watcher::pgptr, heap_operation_context::recdes_p, heap_operation_context::res_oid, heap_operation_context::type, and hfid::vfid.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
|
static |
Definition at line 20328 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_operation_context::class_oid, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), heap_get_class_oid_from_page(), heap_is_big_length(), heap_Maxslotted_reclength, HEAP_OPERATION_INSERT, heap_operation_context::home_page_watcher_p, recdes::length, NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, NULL_VOLID, OID_EQ, OID_ISNULL, OID_SET_NULL, db_identifier::pageid, pgbuf_watcher::pgptr, rc, heap_operation_context::recdes_p, heap_operation_context::res_oid, db_identifier::slotid, SP_SUCCESS, spage_insert_at(), heap_operation_context::type, and db_identifier::volid.
Referenced by heap_insert_logical().
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().
Definition at line 1323 of file heap_file.c.
References ARG_FILE_LINE, assert, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), FILE_HEAP, and FILE_HEAP_REUSE_SLOTS.
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), and heap_vacuum_all_objects().
|
static |
Definition at line 19541 of file heap_file.c.
References ARG_FILE_LINE, assert, DISK_ERROR, DISK_VALID, ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_UNKNOWN_OBJECT, er_set(), HEAP_ISVALID_OID, NO_ERROR, db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by heap_delete_logical(), and heap_update_logical().
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().
|
static |
Definition at line 19354 of file heap_file.c.
References assert, heap_operation_context::forward_page_watcher, heap_operation_context::forward_page_watcher_p, heap_operation_context::header_page_watcher, heap_operation_context::header_page_watcher_p, heap_operation_context::home_page_watcher, heap_operation_context::home_page_watcher_p, NULL, heap_operation_context::overflow_page_watcher, and heap_operation_context::overflow_page_watcher_p.
Referenced by heap_clear_operation_context().
|
static |
Definition at line 10613 of file heap_file.c.
Referenced by heap_midxkey_key_generate().
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().
|
static |
Definition at line 21512 of file heap_file.c.
References recdes::area_size, assert, recdes::data, recdes::length, log_append_postpone(), log_append_undoredo_recdes(), logtb_find_current_tran_lsa(), LSA_COPY(), NULL, log_data_addr::offset, log_data_addr::pgptr, REC_ASSIGN_ADDRESS, RVHF_DELETE, RVHF_MARK_REUSABLE_SLOT, db_identifier::slotid, recdes::type, and log_data_addr::vfid.
Referenced by heap_delete_bigone(), heap_delete_home(), heap_delete_relocation(), and heap_update_relocation().
|
static |
Definition at line 20388 of file heap_file.c.
References recdes::area_size, recdes::data, heap_mvcc_log_insert(), heap_mvcc_log_redistribute(), recdes::length, log_append_undoredo_recdes(), NULL, log_data_addr::offset, log_data_addr::pgptr, REC_ASSIGN_ADDRESS, REC_NEWHOME, RVHF_INSERT, RVHF_INSERT_NEWHOME, db_identifier::slotid, recdes::type, and log_data_addr::vfid.
Referenced by heap_insert_logical(), and heap_insert_newhome().
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().
|
static |
Definition at line 22283 of file heap_file.c.
References heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_append_undo_recdes(), log_append_undoredo_recdes(), LOG_IS_MVCC_HEAP_OPERATION, logtb_get_current_mvccid(), log_data_addr::offset, log_data_addr::pgptr, db_identifier::slotid, and log_data_addr::vfid.
Referenced by heap_update_bigone(), heap_update_home(), and heap_update_relocation().
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().
|
static |
Definition at line 19460 of file heap_file.c.
References assert, ASSERT_ERROR, csect_enter, csect_exit, CSECT_HEAP_CHNGUESS, ER_FAILED, free_and_init, heap_chnguess_decache(), heap_chnguess_put(), heap_get_class_name(), HFID_IS_NULL, INF_WAIT, log_add_to_modified_class_list(), LOG_FIND_THREAD_TRAN_INDEX, NO_ERROR, NULL, heap_classrepr_cache::rootclass_hfid, and heap_chnguess::schema_change.
Referenced by heap_delete_logical(), heap_insert_logical(), and heap_update_logical().
|
static |
Definition at line 10242 of file heap_file.c.
References assert, recdes::data, pr_type::data_readval(), db_make_null(), or_attribute::default_value, or_attribute::domain, ER_FAILED, i, or_attribute::id, or_attribute::is_fixed, or_attribute::location, NO_ERROR, NULL, OR_FIXED_ATT_IS_UNBOUND, OR_FIXED_ATTRIBUTES_OFFSET_BY_OBJ, or_init(), or_rep_id(), OR_VAR_IS_NULL, OR_VAR_OFFSET, or_attribute::position, tp_domain::type, or_default_value::val_length, and or_default_value::value.
Referenced by heap_midxkey_key_generate(), and heap_midxkey_key_get().
|
static |
Definition at line 12553 of file heap_file.c.
References assert, db_midxkey::buf, or_buf::buffer, CAST_BUFLEN, DB_NEED_CLEAR, db_value_is_null(), or_attribute::domain, db_midxkey::domain, db_value::domain, error(), db_domain_info::general_info, heap_attrinfo_recache(), heap_locate_attribute(), heap_midxkey_get_value(), i, pr_type::index_writeval(), INT_ALIGNMENT, MIN_COLUMN, db_midxkey::min_max_val, db_midxkey::ncolumns, db_value::need_clear, NO_ERROR, NULL, or_advance(), OR_ENABLE_BOUND_BIT, or_init(), or_rep_id(), special_column::position, pr_clear_value(), pr_midxkey_init_boundbits(), or_buf::ptr, PTR_ALIGN, db_midxkey::size, tp_domain_resolve_default(), tp_domain::type, db_domain_info::general_info::type, and special_column::type.
Referenced by heap_attrinfo_generate_key().
|
static |
Definition at line 12387 of file heap_file.c.
References or_index::asc_desc, assert, or_function_index::attr_index_start, or_index::atts, db_midxkey::buf, or_buf::buffer, CAST_BUFLEN, or_function_index::col_id, DB_NEED_CLEAR, DB_TYPE_MIDXKEY, db_value_is_null(), or_attribute::domain, db_midxkey::domain, error(), or_index::func_index_info, heap_midxkey_get_value(), i, pr_type::index_writeval(), INT_ALIGNMENT, tp_domain::is_desc, or_index::n_atts, db_midxkey::ncolumns, tp_domain::next, NO_ERROR, NULL, or_advance(), OR_ENABLE_BOUND_BIT, or_init(), pr_clear_value(), pr_midxkey_init_boundbits(), or_buf::ptr, PTR_ALIGN, db_midxkey::size, tp_domain_cache(), tp_domain_construct(), tp_domain_copy(), tp_domain_free(), and tp_domain::type.
Referenced by heap_attrvalue_get_key().
|
static |
Definition at line 15828 of file heap_file.c.
References assert, heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_append_undo_data(), log_append_undoredo_data(), LOG_IS_MVCC_HEAP_OPERATION, logtb_get_current_mvccid(), MAX_ALIGNMENT, NULL, log_data_addr::offset, OR_MVCCID_SIZE, or_pack_mvccid(), log_data_addr::pgptr, PTR_ALIGN, RVHF_MVCC_DELETE_OVERFLOW, RVHF_MVCC_DELETE_REC_HOME, and RVHF_MVCC_DELETE_REC_NEWHOME.
Referenced by heap_delete_bigone(), heap_delete_home(), and heap_delete_relocation().
|
static |
Definition at line 18862 of file heap_file.c.
References heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_append_undo_recdes(), log_append_undoredo_recdes(), logtb_get_current_mvccid(), log_data_addr::offset, log_data_addr::pgptr, and RVHF_MVCC_DELETE_MODIFY_HOME.
Referenced by heap_delete_home(), and heap_delete_relocation().
|
static |
Definition at line 18897 of file heap_file.c.
References heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_append_undoredo_data(), logtb_get_current_mvccid(), NULL, log_data_addr::offset, log_data_addr::pgptr, and RVHF_MVCC_NO_MODIFY_HOME.
Referenced by heap_delete_bigone(), heap_delete_relocation(), heap_update_bigone(), and heap_update_relocation().
|
static |
Definition at line 15619 of file heap_file.c.
References assert, log_crumb::data, recdes::data, HEAP_LOG_MVCC_INSERT_MAX_REDO_CRUMBS, heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_crumb::length, recdes::length, log_append_undo_crumbs(), log_append_undoredo_crumbs(), logtb_get_current_mvccid(), NULL, log_data_addr::offset, OR_CHN_OFFSET, OR_GET_MVCC_FLAG, OR_HEADER_SIZE, OR_INT_SIZE, log_data_addr::pgptr, REC_BIGONE, RVHF_MVCC_INSERT, and recdes::type.
Referenced by heap_log_insert_physical().
|
static |
Definition at line 23985 of file heap_file.c.
References assert, log_crumb::data, recdes::data, HEAP_LOG_MVCC_REDISTRIBUTE_MAX_REDO_CRUMBS, heap_page_get_vacuum_status(), heap_page_update_chain_after_mvcc_op(), HEAP_RV_FLAG_VACUUM_STATUS_CHANGE, log_crumb::length, recdes::length, log_append_undoredo_crumbs(), logtb_get_current_mvccid(), MVCC_IS_FLAG_SET, NULL, log_data_addr::offset, OR_HEADER_SIZE, OR_INT_SIZE, OR_MVCC_FLAG_VALID_DELID, or_mvcc_get_header(), OR_MVCCID_SIZE, log_data_addr::pgptr, REC_BIGONE, RVHF_MVCC_REDISTRIBUTE, and recdes::type.
Referenced by heap_log_insert_physical().
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().
|
static |
Definition at line 7775 of file heap_file.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR, heap_scancache::cache_last_fix_page, heap_scancache_node::class_oid, recdes::data, heap_scancache::debug_initpattern, er_errid(), ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_HEAP_UNKNOWN_OBJECT, er_log_debug, ER_PB_BAD_PAGEID, er_set(), HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_get_last_vpid(), heap_get_record_info(), HEAP_HEADER_AND_CHAIN_SLOTID, heap_scan_get_visible_version(), heap_scan_pb_lock_and_fetch, heap_vpid_next(), heap_vpid_prev(), heap_scancache_node::hfid, HFID_IS_NULL, hfid::hpgid, NO_ERROR, heap_scancache::node, NULL, NULL_CHN, NULL_PAGEID, NULL_SLOTID, OID_IS_ROOTOID, OID_ISNULL, OID_SET_NULL, OLD_PAGE_PREVENT_DEALLOC, heap_scancache::page_watcher, vpid::pageid, db_identifier::pageid, PEEK, pgbuf_get_vpid_ptr(), PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_replace_watcher, pgbuf_watcher::pgptr, REC_ASSIGN_ADDRESS, REC_NEWHOME, REC_UNKNOWN, S_DOESNT_EXIST, S_END, S_ERROR, S_LOCK, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, db_identifier::slotid, spage_get_record_type(), spage_next_record(), spage_next_record_dont_skip_empty(), spage_previous_record(), spage_previous_record_dont_skip_empty(), hfid::vfid, vpid::volid, vfid::volid, db_identifier::volid, and VPID_EQ.
Referenced by heap_next(), heap_next_record_info(), heap_prev(), and heap_prev_record_info().
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 | docreate, | ||
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().
|
static |
Definition at line 6558 of file heap_file.c.
References NO_ERROR, overflow_flush(), vpid::pageid, db_identifier::pageid, vpid::volid, and db_identifier::volid.
Referenced by heap_flush().
|
static |
Definition at line 6606 of file heap_file.c.
References NULL_CHN, or_chn(), OR_MVCC_MAX_HEADER_SIZE, overflow_get(), overflow_get_nbytes(), vpid::pageid, db_identifier::pageid, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, vpid::volid, and db_identifier::volid.
Referenced by heap_get_bigone_content(), and heap_get_record_info().
|
static |
Definition at line 6648 of file heap_file.c.
References overflow_get_capacity(), vpid::pageid, db_identifier::pageid, vpid::volid, and db_identifier::volid.
Referenced by heap_get_capacity().
|
static |
Definition at line 6579 of file heap_file.c.
References overflow_get_length(), vpid::pageid, db_identifier::pageid, vpid::volid, and db_identifier::volid.
|
static |
Definition at line 6458 of file heap_file.c.
References FILE_MULTIPAGE_OBJECT_HEAP, heap_ovf_find_vfid(), NO_ERROR, NULL, NULL_SLOTID, overflow_insert(), heap_hdr_stats::ovf_vfid, vpid::pageid, db_identifier::pageid, PGBUF_UNCONDITIONAL_LATCH, db_identifier::slotid, vpid::volid, and db_identifier::volid.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_insert_handle_multipage_record(), heap_update_home(), and heap_update_relocation().
|
static |
Definition at line 6486 of file heap_file.c.
References ASSERT_ERROR, FILE_MULTIPAGE_OBJECT_HEAP, heap_ovf_find_vfid(), NO_ERROR, NULL, overflow_update(), heap_hdr_stats::ovf_vfid, vpid::pageid, db_identifier::pageid, PGBUF_UNCONDITIONAL_LATCH, vpid::volid, and db_identifier::volid.
Referenced by heap_update_bigone().
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().
|
static |
Definition at line 23692 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, HEAP_PAGE_VACUUM_UNKNOWN, if(), recdes::length, heap_chain::max_mvccid, MVCC_ID_PRECEDES, NULL, PEEK, PGBUF_PAGE_STATE_ARGS, S_SUCCESS, spage_get_record(), vacuum_er_log, VACUUM_ER_LOG_HEAP, and VACUUM_ER_LOG_RECOVERY.
Referenced by heap_rv_mvcc_redo_delete_home(), heap_rv_mvcc_redo_insert(), heap_rv_mvcc_redo_redistribute(), heap_rv_redo_update_and_update_chain(), and heap_rv_update_chain_after_mvcc_op().
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().
|
static |
Definition at line 23601 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, HEAP_PAGE_VACUUM_UNKNOWN, recdes::length, heap_chain::max_mvccid, MVCC_ID_PRECEDES, MVCCID_IS_NORMAL, NULL, PEEK, PGBUF_PAGE_STATE_ARGS, PGBUF_PAGE_VPID_AS_ARGS, S_SUCCESS, spage_get_record(), vacuum_er_log, VACUUM_ER_LOG_HEAP, and vacuum_is_mvccid_vacuumed().
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(), and heap_mvcc_log_redistribute().
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 * | next_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().
|
static |
Definition at line 5444 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, recdes::data, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), heap_get_spage_type(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_MAX_ALIGN, recdes::length, NO_ERROR, NULL_SLOTID, PAGE_HEAP, PEEK, pgbuf_set_page_ptype(), REC_HOME, S_SUCCESS, SAFEGUARD_RVSPACE, SP_SUCCESS, spage_get_record(), spage_initialize(), spage_insert(), and recdes::type.
Referenced by heap_reuse(), and heap_rv_redo_reuse_page_reuse_oid().
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().
|
static |
Definition at line 5512 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_hdr_stats::best, heap_hdr_stats::class_oid, heap_chain::class_oid, COPY_OID, recdes::data, DB_PAGESIZE, DISK_ERROR, DISK_INVALID, disk_is_page_sector_reserved(), DISK_VALID, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), error(), heap_hdr_stats::estimates, vfid::fileid, heap_chain::flags, FREE, heap_bestspace::freespace, heap_hdr_stats::head, heap_delete_all_page_records(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, heap_reinitialize_page(), heap_stats_add_bestspace(), heap_vpid_next(), HFID_IS_NULL, hfid::hpgid, i, heap_hdr_stats::last_vpid, log_append_redo_data(), heap_chain::max_mvccid, MVCCID_NULL, 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, log_data_addr::offset, OID_ISNULL, OLD_PAGE, heap_hdr_stats::ovf_vfid, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, log_data_addr::pgptr, prm_get_float_value(), prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, PRM_ID_HF_UNFILL_FACTOR, heap_hdr_stats::recs_sumlen, RVHF_REUSE_PAGE, RVHF_REUSE_PAGE_REUSE_OID, RVHF_STATS, S_SUCCESS, heap_scanrange::scan_cache, spage_get_free_space_without_saving(), spage_get_record(), spage_number_of_slots(), heap_hdr_stats::unfill_space, log_data_addr::vfid, hfid::vfid, VFID_SET_NULL, vpid::volid, vfid::volid, heap_bestspace::vpid, VPID_ISNULL, and VPID_SET_NULL.
Referenced by heap_create_internal().
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 * | ignore_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.
|
static |
Definition at line 15973 of file heap_file.c.
References recdes::area_size, assert, assert_release, COPY, recdes::data, DB_PAGESIZE, ER_FAILED, IO_MAX_PAGE_SIZE, MAX_ALIGNMENT, MVCC_SET_DELID, MVCC_SET_FLAG_BITS, MVCCID_IS_NORMAL, NO_ERROR, NULL, OR_MVCC_FLAG_VALID_DELID, or_mvcc_get_header(), or_mvcc_set_header(), PTR_ALIGN, S_SUCCESS, SP_SUCCESS, spage_get_record(), and spage_update().
Referenced by heap_rv_mvcc_redo_delete_home(), and heap_rv_mvcc_redo_delete_newhome().
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_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().
|
static |
Definition at line 24761 of file heap_file.c.
References assert, heap_scancache::assign_recdes_to_area(), NO_ERROR, and NULL.
Referenced by heap_get_record_data_when_all_ready().
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().
|
static |
Definition at line 1227 of file heap_file.c.
References assert, lock_Conv, NA_LOCK, NO_ERROR, NULL, NULL_LOCK, PAGE_HEAP, heap_scancache::page_latch, pgbuf_check_page_ptype(), pgbuf_fix_debug(), PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_ordered_fix_debug(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_watcher::pgptr, and S_LOCK.
|
static |
Definition at line 23938 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_scancache_node::class_oid, COPY_OID, db_private_alloc, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_get_class_info(), HEAP_SCANCACHE_SET_NODE, heap_scancache_node::hfid, HFID_COPY, heap_scancache_node_list::next, NO_ERROR, heap_scancache_node_list::node, NULL, and heap_scancache::partition_list.
|
static |
Definition at line 24900 of file heap_file.c.
References assert, DB_ALIGN, DB_PAGESIZE, db_private_alloc, db_private_realloc, cubmem::block::dim, NULL, and cubmem::block::ptr.
|
static |
Definition at line 24933 of file heap_file.c.
References db_private_free_and_init, cubmem::block::dim, NULL, and cubmem::block::ptr.
|
static |
Definition at line 6673 of file heap_file.c.
References ARG_FILE_LINE, er_log_debug, HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_scancache_reset_modify(), HFID_EQ, NO_ERROR, NULL, and OID_ISNULL.
Referenced by heap_delete_logical(), heap_insert_logical(), and heap_update_logical().
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().
|
static |
Definition at line 7171 of file heap_file.c.
References ARG_FILE_LINE, heap_scancache::debug_initpattern, ER_FAILED, er_log_debug, HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_scancache_quick_end(), and NO_ERROR.
Referenced by heap_scancache_end(), and heap_scancache_end_when_scan_will_resume().
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().
|
static |
Definition at line 6934 of file heap_file.c.
References heap_scancache::debug_initpattern, HEAP_DEBUG_SCANCACHE_INITPATTERN, NO_ERROR, NULL, heap_scancache::page_watcher, pgbuf_ordered_unfix, and pgbuf_watcher::pgptr.
Referenced by heap_scancache_end_modify(), and heap_scancache_reset_modify().
|
static |
Definition at line 7110 of file heap_file.c.
References ARG_FILE_LINE, assert, heap_scancache::cache_last_fix_page, heap_scancache_node::class_oid, heap_scancache_node::classname, db_private_free_and_init, heap_scancache::debug_initpattern, heap_scancache::end_area(), ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), heap_scancache::file_type, FILE_UNKNOWN_TYPE, HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_scancache_node::hfid, HFID_SET_NULL, heap_scancache::m_index_stats, heap_scancache_node_list::next, NO_ERROR, heap_scancache::node, NULL, NULL_LOCK, NULL_VOLID, heap_scancache::num_btids, OID_SET_NULL, heap_scancache::page_latch, heap_scancache::page_watcher, heap_scancache::partition_list, PGBUF_IS_CLEAN_WATCHER, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, hfid::vfid, and vfid::volid.
Referenced by heap_scancache_end_internal(), and heap_scancache_end_modify().
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().
|
static |
Definition at line 7072 of file heap_file.c.
References heap_scancache::cache_last_fix_page, heap_scancache_node::class_oid, heap_scancache_node::classname, heap_scancache::debug_initpattern, heap_scancache::file_type, FILE_UNKNOWN_TYPE, HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_scancache_node::hfid, HFID_COPY, HFID_SET_NULL, heap_scancache::m_index_stats, heap_scancache::mvcc_snapshot, NO_ERROR, heap_scancache::node, NULL, NULL_VOLID, heap_scancache::num_btids, OID_SET_NULL, heap_scancache::page_latch, heap_scancache::page_watcher, heap_scancache::partition_list, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, S_LOCK, heap_scancache::start_area(), hfid::vfid, and vfid::volid.
Referenced by heap_scancache_quick_start(), heap_scancache_quick_start_modify(), heap_scancache_quick_start_modify_with_class_oid(), heap_scancache_quick_start_root_hfid(), and heap_scancache_quick_start_with_class_hfid().
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().
|
static |
Definition at line 6962 of file heap_file.c.
References assert, ASSERT_ERROR, assert_release, heap_scancache_node::class_oid, heap_hdr_stats::class_oid, heap_scancache_node::classname, ER_FAILED, file_get_type(), heap_scancache::file_type, FILE_UNKNOWN_TYPE, vfid::fileid, heap_get_class_info(), heap_scancache_force_modify(), heap_scancache_node::hfid, HFID_EQ, hfid::hpgid, NO_ERROR, heap_scancache::node, NULL, OID_EQ, OID_SET_NULL, heap_scancache::page_latch, hfid::vfid, vfid::volid, and X_LOCK.
Referenced by heap_scancache_check_with_hfid(), and heap_scancache_start_modify().
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().
|
static |
Definition at line 6719 of file heap_file.c.
References assert, ASSERT_ERROR, assert_release, heap_scancache::cache_last_fix_page, heap_scancache_node::class_oid, heap_hdr_stats::class_oid, heap_scancache_node::classname, heap_scancache::debug_initpattern, er_errid(), ER_FAILED, file_get_type(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, heap_scancache::file_type, FILE_UNKNOWN_TYPE, vfid::fileid, HEAP_DEBUG_SCANCACHE_INITPATTERN, heap_get_class_info(), heap_scancache_node::hfid, HFID_EQ, HFID_SET_NULL, hfid::hpgid, IS_LOCK, LK_GRANTED, LK_UNCOND_LOCK, lock_scan(), heap_scancache::m_index_stats, heap_scancache::mvcc_snapshot, NO_ERROR, heap_scancache::node, NULL, NULL_LOCK, NULL_VOLID, heap_scancache::num_btids, OID_SET_NULL, heap_scancache::page_latch, heap_scancache::page_watcher, heap_scancache::partition_list, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, PGBUF_ORDERED_RANK_UNDEFINED, S_LOCK, heap_scancache::start_area(), hfid::vfid, and vfid::volid.
Referenced by heap_scancache_start(), and heap_scancache_start_modify().
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.
|
static |
Definition at line 997 of file heap_file.c.
References ARG_FILE_LINE, assert, assert_release, heap_stats_entry::best, heap_stats_bestspace_cache::bestspace_mutex, ER_ERROR_SEVERITY, ER_HF_MAX_BESTSPACE_ENTRIES, ER_NOTIFICATION_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), heap_stats_bestspace_cache::free_list, heap_stats_bestspace_cache::free_list_count, heap_bestspace::freespace, heap_stats_entry_free(), heap_stats_entry::hfid, HFID_COPY, heap_stats_bestspace_cache::hfid_ht, mht_count(), mht_get(), mht_put(), mht_put_new(), mht_rem(), heap_stats_entry::next, NULL, heap_stats_bestspace_cache::num_alloc, heap_stats_bestspace_cache::num_stats_entries, perfmon_inc_stat(), prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, PSTAT_HF_BEST_SPACE_ADD, PSTAT_HF_NUM_STATS_MAXED, pthread_mutex_lock, pthread_mutex_unlock, rc, heap_bestspace::vpid, and heap_stats_bestspace_cache::vpid_ht.
Referenced by heap_reuse(), heap_stats_find_page_in_bestspace(), heap_stats_sync_bestspace(), heap_stats_update(), heap_vpid_alloc(), and xheap_reclaim_addresses().
|
static |
Definition at line 15075 of file heap_file.c.
References assert_release, heap_stats_bestspace_cache::bestspace_mutex, heap_stats_bestspace_cache::free_list, heap_stats_bestspace_cache::free_list_count, heap_stats_entry_free(), heap_stats_bestspace_cache::hfid_ht, mht_destroy(), mht_map_no_key(), heap_stats_entry::next, NO_ERROR, NULL, pthread_mutex_destroy, and heap_stats_bestspace_cache::vpid_ht.
Referenced by heap_manager_finalize(), and heap_stats_bestspace_initialize().
|
static |
Definition at line 15023 of file heap_file.c.
References heap_stats_bestspace_cache::bestspace_mutex, ER_FAILED, heap_stats_bestspace_cache::free_list, heap_stats_bestspace_cache::free_list_count, heap_Bestspace_cache_area, heap_compare_hfid(), heap_compare_vpid(), heap_hash_hfid(), heap_hash_vpid(), heap_stats_bestspace_finalize(), HEAP_STATS_ENTRY_MHT_EST_SIZE, heap_stats_bestspace_cache::hfid_ht, mht_create(), NO_ERROR, NULL, heap_stats_bestspace_cache::num_alloc, heap_stats_bestspace_cache::num_free, heap_stats_bestspace_cache::num_stats_entries, pthread_mutex_init, and heap_stats_bestspace_cache::vpid_ht.
Referenced by heap_manager_initialize().
|
static |
Definition at line 1097 of file heap_file.c.
References assert, heap_stats_entry::best, heap_stats_bestspace_cache::bestspace_mutex, heap_stats_entry_free(), heap_stats_entry::hfid, heap_stats_bestspace_cache::hfid_ht, mht_count(), mht_get2(), mht_rem(), mht_rem2(), NULL, heap_stats_bestspace_cache::num_stats_entries, PSTAT_HF_BEST_SPACE_DEL, pthread_mutex_lock, pthread_mutex_unlock, rc, heap_bestspace::vpid, and heap_stats_bestspace_cache::vpid_ht.
Referenced by heap_create_internal(), xheap_destroy(), and xheap_destroy_newly_created().
|
static |
Definition at line 1137 of file heap_file.c.
References assert, heap_hdr_stats::best, heap_stats_entry::best, heap_stats_bestspace_cache::bestspace_mutex, heap_bestspace::freespace, heap_scan_pb_lock_and_fetch, heap_stats_entry_free(), heap_stats_entry::hfid, heap_stats_bestspace_cache::hfid_ht, mht_count(), mht_get(), mht_rem(), mht_rem2(), NO_ERROR, NULL, heap_stats_bestspace_cache::num_stats_entries, PSTAT_HF_BEST_SPACE_DEL, pthread_mutex_lock, pthread_mutex_unlock, rc, heap_bestspace::vpid, heap_stats_bestspace_cache::vpid_ht, and VPID_SET_NULL.
Referenced by heap_remove_page_on_vacuum(), heap_stats_find_page_in_bestspace(), and heap_vpid_remove().
|
static |
Definition at line 966 of file heap_file.c.
References assert_release, free_and_init, heap_stats_bestspace_cache::free_list, heap_stats_bestspace_cache::free_list_count, HEAP_STATS_ENTRY_FREELIST_SIZE, heap_stats_entry::next, NO_ERROR, NULL, and heap_stats_bestspace_cache::num_free.
Referenced by heap_stats_add_bestspace(), heap_stats_bestspace_finalize(), heap_stats_del_bestspace_by_hfid(), heap_stats_del_bestspace_by_vpid(), and heap_stats_find_page_in_bestspace().
|
static |
Definition at line 3487 of file heap_file.c.
References assert, ASSERT_ERROR, heap_hdr_stats::best, heap_scancache::cache_last_fix_page, CEIL_PTVDIV, recdes::data, DB_PAGESIZE, er_errid(), ER_FILE_NOT_ENOUGH_PAGES_IN_DATABASE, ER_INTERRUPTED, error(), heap_hdr_stats::estimates, heap_scancache::file_type, FILE_UNKNOWN_TYPE, vfid::fileid, heap_hdr_stats::head, heap_bestspace_log, HEAP_BESTSPACE_SYNC_THRESHOLD, HEAP_FINDSPACE_ERROR, HEAP_HEADER_AND_CHAIN_SLOTID, heap_is_big_length(), heap_Slotted_overhead, heap_stats_find_page_in_bestspace(), heap_stats_sync_bestspace(), heap_vpid_alloc(), heap_scancache_node::hfid, HFID_EQ, hfid::hpgid, if(), log_skip_logging(), NO_ERROR, heap_scancache::node, NULL, heap_hdr_stats::num_other_high_best, heap_hdr_stats::num_pages, heap_hdr_stats::num_recs, log_data_addr::offset, OLD_PAGE, PAGE_HEAP, pgbuf_watcher::page_was_unfixed, heap_scancache::page_watcher, 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, PSTAT_HF_HEAP_FIND_BEST_PAGE, heap_hdr_stats::recs_sumlen, S_SUCCESS, spage_get_record(), heap_hdr_stats::unfill_space, log_data_addr::vfid, hfid::vfid, vpid::volid, and vfid::volid.
Referenced by heap_find_location_and_insert_rec_newhome(), and heap_get_insert_location_with_lock().
|
static |
Definition at line 3240 of file heap_file.c.
References assert, heap_hdr_stats::best, heap_stats_entry::best, BEST_PAGE_SEARCH_MAX_COUNT, heap_stats_bestspace_cache::bestspace_mutex, er_clear(), er_errid(), er_errid_if_has_error(), ER_INTERRUPTED, heap_bestspace::freespace, HEAP_FINDSPACE_ERROR, HEAP_FINDSPACE_FOUND, HEAP_FINDSPACE_NOTFOUND, HEAP_NUM_BEST_SPACESTATS, heap_scan_pb_lock_and_fetch, heap_Slotted_overhead, heap_stats_add_bestspace(), heap_stats_del_bestspace_by_vpid(), heap_stats_entry_free(), heap_stats_entry::hfid, heap_stats_bestspace_cache::hfid_ht, i, LK_FORCE_ZERO_WAIT, mht_get2(), mht_rem(), mht_rem2(), NO_ERROR, NULL, heap_stats_bestspace_cache::num_stats_entries, OLD_PAGE, PGBUF_IS_CLEAN_WATCHER, pgbuf_ordered_unfix, PGLENGTH_MAX, pgbuf_watcher::pgptr, prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, PSTAT_HF_BEST_SPACE_FIND, PSTAT_HF_HEAP_FIND_PAGE_BEST_SPACE, pthread_mutex_lock, pthread_mutex_unlock, rc, spage_max_space_for_new_record(), heap_bestspace::vpid, VPID_EQ, heap_stats_bestspace_cache::vpid_ht, X_LOCK, and xlogtb_reset_wait_msecs().
Referenced by heap_stats_find_best_page().
|
static |
Definition at line 2887 of file heap_file.c.
References heap_hdr_stats::estimates, HEAP_DROP_FREE_SPACE, heap_hdr_stats::num_recs, OR_MVCC_MAX_HEADER_SIZE, heap_hdr_stats::recs_sumlen, and heap_hdr_stats::unfill_space.
Referenced by heap_stats_sync_bestspace(), and heap_stats_update_internal().
|
static |
Definition at line 3152 of file heap_file.c.
References assert, ER_FAILED, heap_hdr_stats::estimates, heap_bestspace::freespace, heap_hdr_stats::head, heap_hdr_stats::head_second_best, HEAP_NUM_BEST_SPACESTATS, HEAP_STATS_NEXT_BEST_INDEX, i, NO_ERROR, NULL, heap_hdr_stats::num_second_best, heap_hdr_stats::second_best, heap_hdr_stats::tail_second_best, heap_hdr_stats::unfill_space, and VPID_SET_NULL.
Referenced by heap_stats_sync_bestspace().
|
static |
Definition at line 3110 of file heap_file.c.
References assert, heap_hdr_stats::estimates, heap_hdr_stats::head_second_best, HEAP_NUM_BEST_SPACESTATS, HEAP_STATS_NEXT_BEST_INDEX, heap_hdr_stats::num_second_best, heap_hdr_stats::num_substitutions, heap_hdr_stats::second_best, and heap_hdr_stats::tail_second_best.
Referenced by heap_stats_update_internal(), heap_vpid_alloc(), and xheap_reclaim_addresses().
|
static |
Definition at line 3696 of file heap_file.c.
References assert, heap_hdr_stats::best, heap_hdr_stats::estimates, heap_bestspace::freespace, heap_hdr_stats::full_search_vpid, heap_hdr_stats::head, heap_bestspace_log, HEAP_DROP_FREE_SPACE, heap_Find_best_page_limit, HEAP_NUM_BEST_SPACESTATS, heap_stats_add_bestspace(), heap_stats_get_min_freespace(), heap_stats_get_second_best(), HEAP_STATS_NEXT_BEST_INDEX, HEAP_STATS_PREV_BEST_INDEX, heap_vpid_next(), hfid::hpgid, i, heap_hdr_stats::next_vpid, NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, 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, 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_watcher::pgptr, prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, PSTAT_HEAP_STATS_SYNC_BESTSPACE, heap_hdr_stats::recs_sumlen, spage_collect_statistics(), spage_max_space_for_new_record(), hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, VPID_EQ, VPID_ISNULL, and VPID_SET_NULL.
Referenced by heap_get_num_objects(), and heap_stats_find_best_page().
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().
|
static |
Definition at line 2990 of file heap_file.c.
References assert, heap_hdr_stats::best, recdes::data, ER_FAILED, heap_hdr_stats::estimates, FREE, heap_bestspace::freespace, heap_hdr_stats::head, HEAP_DROP_FREE_SPACE, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_stats_get_min_freespace(), HEAP_STATS_NEXT_BEST_INDEX, heap_stats_put_second_best(), hfid::hpgid, i, if(), log_skip_logging(), NO_ERROR, NULL, heap_hdr_stats::num_high_best, heap_hdr_stats::num_other_high_best, log_data_addr::offset, OLD_PAGE, PAGE_HEAP, vpid::pageid, PEEK, pgbuf_check_page_ptype(), PGBUF_CONDITIONAL_LATCH, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, log_data_addr::pgptr, S_SUCCESS, spage_get_record(), log_data_addr::vfid, hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, and VPID_ISNULL.
Referenced by heap_stats_update().
|
static |
Definition at line 19375 of file heap_file.c.
References assert, heap_operation_context::forward_page_watcher, heap_operation_context::header_page_watcher, heap_operation_context::home_page_watcher, NULL, heap_operation_context::overflow_page_watcher, pgbuf_ordered_unfix, and pgbuf_watcher::pgptr.
Referenced by heap_delete_logical(), heap_insert_logical(), heap_insert_newhome(), and heap_update_logical().
|
static |
Definition at line 19838 of file heap_file.c.
References recdes::area_size, assert, CAST_BUFLEN, recdes::data, ER_FAILED, heap_is_big_length(), HEAP_MVCC_SET_HEADER_MAXIMUM_SIZE, HEAP_OPERATION_UPDATE, HEAP_UPDATE_IS_MVCC_OP, recdes::length, logtb_get_current_mvccid(), LSA_INITIALIZER, LSA_SET_NULL(), MVCC_CLEAR_ALL_FLAG_BITS, MVCC_CLEAR_FLAG_BITS, mvcc_rec_header::mvcc_flag, mvcc_header_size_lookup, MVCC_IS_FLAG_SET, MVCC_SET_FLAG, MVCC_SET_FLAG_BITS, MVCC_SET_INSID, NO_ERROR, NULL, OR_GET_MVCC_REPID_AND_FLAG, OR_MVCC_FLAG_MASK, OR_MVCC_FLAG_SHIFT_BITS, OR_MVCC_FLAG_VALID_DELID, OR_MVCC_FLAG_VALID_INSID, OR_MVCC_FLAG_VALID_PREV_VERSION, or_mvcc_get_header(), OR_MVCC_INSERT_ID_OFFSET, OR_MVCC_PREV_VERSION_LSA_SIZE, or_mvcc_set_header(), OR_MVCCID_SIZE, OR_PUT_BIGINT, OR_PUT_INT, mvcc_rec_header::prev_version_lsa, heap_operation_context::recdes_p, heap_operation_context::type, heap_operation_context::update_in_place, and UPDATE_INPLACE_OLD_MVCCID.
Referenced by heap_update_logical().
|
static |
Definition at line 25407 of file heap_file.c.
References assert, DONT_FREE, heap_hdr_stats::estimates, HEAP_HEADER_AND_CHAIN_SLOTID, heap_hdr_stats::last_vpid, log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, heap_hdr_stats::next_vpid, NO_ERROR, NULL, heap_hdr_stats::num_pages, log_data_addr::offset, PGBUF_IS_CLEAN_WATCHER, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, RVHF_STATS, log_data_addr::vfid, and hfid::vfid.
Referenced by heap_rv_postpone_append_pages_to_heap().
|
static |
Definition at line 21568 of file heap_file.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, COPY, COPY_OID, recdes::data, DONT_FREE, ER_FAILED, FREE, heap_build_forwarding_recdes(), heap_fix_header_page(), heap_get_bigone_content(), heap_insert_newhome(), heap_is_big_length(), heap_log_update_physical(), heap_mvcc_log_home_no_change(), HEAP_OPERATION_UPDATE, heap_ovf_delete(), heap_ovf_find_vfid(), heap_ovf_update(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_PERF_TRACK_PREPARE, heap_update_physical(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, recdes::length, log_append_undo_recdes2(), logtb_find_current_tran_lsa(), NO_ERROR, NULL, heap_operation_context::oid, OLD_PAGE, or_mvcc_set_log_lsa_to_record(), heap_operation_context::overflow_page_watcher_p, heap_operation_context::ovf_oid, heap_hdr_stats::ovf_vfid, perfmon_inc_stat(), pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_watcher::pgptr, PSTAT_HEAP_BIG_UPDATES, REC_HOME, REC_NEWHOME, REC_RELOCATION, RECDES_INITIALIZER, heap_operation_context::recdes_p, heap_operation_context::record_type, heap_operation_context::res_oid, RVHF_MVCC_UPDATE_OVERFLOW, RVHF_UPDATE, RVHF_UPDATE_NOTIFY_VACUUM, S_SUCCESS, heap_operation_context::scan_cache_p, db_identifier::slotid, SP_SUCCESS, spage_update(), spage_update_record_type(), recdes::type, heap_operation_context::type, hfid::vfid, and VPID_GET_FROM_OID.
Referenced by heap_update_logical().
|
static |
Definition at line 22024 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, heap_operation_context::class_oid, COPY, COPY_OID, ER_FAILED, er_log_debug, heap_operation_context::forward_page_watcher_p, heap_build_forwarding_recdes(), heap_fix_header_page(), heap_insert_newhome(), heap_is_big_length(), HEAP_IS_UPDATE_INPLACE, heap_log_update_physical(), HEAP_OPERATION_UPDATE, heap_ovf_insert(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_PERF_TRACK_PREPARE, heap_update_physical(), heap_update_set_prev_version(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, recdes::length, logtb_find_current_tran_lsa(), LSA_COPY(), mvcc_is_mvcc_disabled_class(), NO_ERROR, NULL, heap_operation_context::oid, pgbuf_watcher::page_was_unfixed, PEEK, perfmon_inc_stat(), PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, PSTAT_HEAP_HOME_TO_BIG_UPDATES, PSTAT_HEAP_HOME_TO_REL_UPDATES, PSTAT_HEAP_HOME_UPDATES, REC_ASSIGN_ADDRESS, REC_BIGONE, REC_HOME, REC_NEWHOME, REC_RELOCATION, heap_operation_context::recdes_p, heap_operation_context::res_oid, RVHF_UPDATE, RVHF_UPDATE_NOTIFY_VACUUM, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_is_updatable(), recdes::type, heap_operation_context::type, heap_operation_context::update_in_place, and hfid::vfid.
Referenced by heap_update_logical().
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().
|
static |
Definition at line 22223 of file heap_file.c.
References ARG_FILE_LINE, assert, DONT_FREE, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), NO_ERROR, NULL, NULL_SLOTID, pgbuf_set_dirty(), SP_ERROR, SP_SUCCESS, spage_get_record_type(), spage_update(), spage_update_record_type(), and recdes::type.
Referenced by heap_delete_home(), heap_delete_relocation(), heap_rv_undoredo_update(), heap_update_bigone(), heap_update_home(), and heap_update_relocation().
|
static |
Definition at line 21744 of file heap_file.c.
References recdes::area_size, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, COPY, COPY_OID, recdes::data, DB_PAGESIZE, DONT_FREE, ER_FAILED, heap_operation_context::forward_page_watcher_p, heap_build_forwarding_recdes(), heap_delete_physical(), heap_fix_forward_page(), heap_fix_header_page(), heap_insert_newhome(), heap_is_big_length(), heap_log_delete_physical(), heap_log_update_physical(), heap_mvcc_log_home_no_change(), HEAP_OPERATION_UPDATE, heap_ovf_insert(), HEAP_PERF_TRACK_EXECUTE, HEAP_PERF_TRACK_LOGGING, HEAP_PERF_TRACK_PREPARE, heap_update_physical(), heap_update_set_prev_version(), heap_operation_context::hfid, heap_operation_context::home_page_watcher_p, heap_operation_context::home_recdes, IO_MAX_PAGE_SIZE, recdes::length, logtb_find_current_tran_lsa(), LSA_COPY(), LSA_INITIALIZER, MAX_ALIGNMENT, NO_ERROR, NULL, log_data_addr::offset, heap_operation_context::oid, pgbuf_watcher::page_was_unfixed, perfmon_inc_stat(), PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_ordered_unfix, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, PSTAT_HEAP_REL_TO_BIG_UPDATES, PSTAT_HEAP_REL_TO_HOME_UPDATES, PSTAT_HEAP_REL_TO_REL_UPDATES, PSTAT_HEAP_REL_UPDATES, PTR_ALIGN, rc, REC_BIGONE, REC_HOME, REC_NEWHOME, REC_RELOCATION, heap_operation_context::recdes_p, heap_operation_context::res_oid, RVHF_UPDATE, RVHF_UPDATE_NOTIFY_VACUUM, S_SUCCESS, db_identifier::slotid, spage_get_record(), spage_is_updatable(), recdes::type, heap_operation_context::type, log_data_addr::vfid, and hfid::vfid.
Referenced by heap_update_logical().
|
static |
Definition at line 24442 of file heap_file.c.
References assert, ASSERT_ERROR_AND_SET, recdes::data, DONT_FREE, ER_FAILED, recdes::length, LSA_ISNULL(), NO_ERROR, NULL, log_lsa::offset, OID_ISNULL, OLD_PAGE, OR_HEADER_SIZE, or_mvcc_set_log_lsa_to_record(), overflow_get_first_page_data(), log_lsa::pageid, PEEK, pgbuf_get_vpid_ptr(), PGBUF_INIT_WATCHER, PGBUF_LATCH_WRITE, pgbuf_ordered_fix, PGBUF_ORDERED_HEAP_NORMAL, PGBUF_ORDERED_NULL_HFID, pgbuf_ordered_unfix, pgbuf_set_dirty(), PGBUF_WATCHER_COPY_GROUP, pgbuf_watcher::pgptr, REC_BIGONE, REC_HOME, REC_RELOCATION, S_SUCCESS, db_identifier::slotid, spage_get_record(), recdes::type, VPID_EQ, and VPID_GET_FROM_OID.
Referenced by heap_update_home(), and heap_update_relocation().
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().
|
static |
Definition at line 4229 of file heap_file.c.
References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, heap_hdr_stats::best, heap_hdr_stats::class_oid, heap_chain::class_oid, DB_PAGESIZE, DONT_FREE, ER_FAILED, error(), heap_hdr_stats::estimates, file_alloc(), heap_chain::flags, heap_bestspace::freespace, heap_hdr_stats::head, HEAP_DROP_FREE_SPACE, heap_get_chain_ptr(), heap_get_last_page(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, HEAP_PAGE_SET_VACUUM_STATUS, HEAP_PAGE_VACUUM_NONE, heap_scan_pb_lock_and_fetch, heap_stats_add_bestspace(), HEAP_STATS_NEXT_BEST_INDEX, heap_stats_put_second_best(), heap_vpid_init_new(), heap_hdr_stats::last_vpid, log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, log_sysop_abort(), log_sysop_commit(), log_sysop_start(), heap_chain::max_mvccid, MVCCID_NULL, heap_hdr_stats::next_vpid, heap_chain::next_vpid, NO_ERROR, NULL, heap_hdr_stats::num_high_best, heap_hdr_stats::num_other_high_best, heap_hdr_stats::num_pages, log_data_addr::offset, OLD_PAGE, PGBUF_INIT_WATCHER, PGBUF_IS_CLEAN_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_unfix, pgbuf_set_dirty(), log_data_addr::pgptr, pgbuf_watcher::pgptr, heap_chain::prev_vpid, prm_get_integer_value(), PRM_ID_HF_MAX_BESTSPACE_ENTRIES, RVHF_CHAIN, RVHF_STATS, log_data_addr::vfid, hfid::vfid, heap_bestspace::vpid, VPID_ISNULL, VPID_SET_NULL, and X_LOCK.
Referenced by heap_stats_find_best_page().
|
static |
Definition at line 4172 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, recdes::data, DONT_FREE, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), heap_get_spage_type(), HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_MAX_ALIGN, recdes::length, log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, NO_ERROR, NULL, PAGE_HEAP, pgbuf_set_dirty(), pgbuf_set_page_ptype(), log_data_addr::pgptr, REC_HOME, RVHF_NEWPAGE, SAFEGUARD_RVSPACE, SP_SUCCESS, spage_initialize(), spage_insert(), and recdes::type.
Referenced by heap_alloc_new_page(), and heap_vpid_alloc().
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().
|
static |
Definition at line 4384 of file heap_file.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, heap_hdr_stats::best, recdes::data, ER_ERROR_SEVERITY, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, ER_PB_UNEXPECTED_PAGE_REFIX, er_set(), error(), heap_hdr_stats::estimates, file_dealloc(), FILE_HEAP, vfid::fileid, heap_bestspace::freespace, heap_hdr_stats::head, HEAP_HEADER_AND_CHAIN_SLOTID, HEAP_NUM_BEST_SPACESTATS, heap_scan_pb_lock_and_fetch, heap_stats_del_bestspace_by_vpid(), hfid::hpgid, i, heap_hdr_stats::last_vpid, recdes::length, log_append_undoredo_data(), heap_hdr_stats::next_vpid, heap_chain::next_vpid, NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, pgbuf_watcher::page_was_unfixed, vpid::pageid, PEEK, PGBUF_INIT_WATCHER, PGBUF_ORDERED_HEAP_NORMAL, pgbuf_ordered_set_dirty_and_free(), pgbuf_ordered_unfix, log_data_addr::pgptr, pgbuf_watcher::pgptr, heap_chain::prev_vpid, REC_HOME, RVHF_CHAIN, S_SUCCESS, SP_ERROR, SP_SUCCESS, spage_get_record(), spage_update(), recdes::type, log_data_addr::vfid, hfid::vfid, vpid::volid, vfid::volid, heap_bestspace::vpid, VPID_EQ, VPID_ISNULL, VPID_SET_NULL, and X_LOCK.
Referenced by xheap_reclaim_addresses().
int xheap_create | ( | THREAD_ENTRY * | thread_p, |
HFID * | hfid, | ||
const OID * | class_oid, | ||
bool | reuse_oid | ||
) |
Definition at line 5772 of file heap_file.c.
References heap_create_internal().
Referenced by boot_create_all_volumes(), heap_create(), and shf_create().
int xheap_destroy | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
const OID * | class_oid | ||
) |
Definition at line 5786 of file heap_file.c.
References file_postpone_destroy(), heap_ovf_find_vfid(), heap_stats_del_bestspace_by_hfid(), NO_ERROR, NULL, log_data_addr::offset, PGBUF_UNCONDITIONAL_LATCH, log_data_addr::pgptr, vacuum_log_add_dropped_file(), VACUUM_LOG_ADD_DROPPED_FILE_POSTPONE, log_data_addr::vfid, and hfid::vfid.
Referenced by heap_create(), shf_destroy(), and xheap_destroy_newly_created().
int xheap_destroy_newly_created | ( | THREAD_ENTRY * | thread_p, |
const HFID * | hfid, | ||
const OID * | class_oid | ||
) |
Definition at line 5818 of file heap_file.c.
References ASSERT_ERROR, file_get_type(), FILE_HEAP_REUSE_SLOTS, file_postpone_destroy(), heap_ovf_find_vfid(), heap_stats_del_bestspace_by_hfid(), log_append_postpone(), LOG_DATA_ADDR_INITIALIZER, NO_ERROR, NULL, PGBUF_UNCONDITIONAL_LATCH, RVHF_MARK_DELETED, vacuum_log_add_dropped_file(), VACUUM_LOG_ADD_DROPPED_FILE_POSTPONE, hfid::vfid, and xheap_destroy().
Referenced by heap_destroy_newly_created(), and shf_destroy_when_new().
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().
|
static |
Definition at line 502 of file heap_file.c.
|
static |
Definition at line 499 of file heap_file.c.
Referenced by heap_stats_bestspace_initialize().
|
static |
Definition at line 492 of file heap_file.c.
|
static |
Definition at line 381 of file heap_file.c.
Referenced by heap_classrepr_initialize_cache().
|
static |
Definition at line 490 of file heap_file.c.
Referenced by heap_stats_sync_bestspace().
|
static |
Definition at line 497 of file heap_file.c.
|
static |
Definition at line 493 of file heap_file.c.
Referenced by heap_chnguess_initialize().
|
static |
Definition at line 508 of file heap_file.c.
|
static |
Definition at line 504 of file heap_file.c.
Referenced by heap_initialize_hfid_table().
|
static |
Definition at line 488 of file heap_file.c.
Referenced by heap_find_location_and_insert_rec_newhome(), heap_insert_physical(), heap_is_big_length(), and heap_manager_initialize().
|
static |
Definition at line 888 of file heap_file.c.
|
static |
Definition at line 489 of file heap_file.c.
Referenced by heap_manager_initialize(), heap_stats_find_best_page(), and heap_stats_find_page_in_bestspace().
|
static |
Definition at line 83 of file heap_file.c.
Referenced by heap_check_heap_file(), heap_classrepr_decache_guessed_last(), heap_classrepr_entry_alloc(), heap_classrepr_entry_free(), heap_classrepr_free(), and heap_classrepr_get().