CUBRID Engine
latest
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <math.h>
#include "chartype.h"
#include "storage_common.h"
#include "memory_alloc.h"
#include "object_representation.h"
#include "error_manager.h"
#include "xserver_interface.h"
#include "log_manager.h"
#include "extendible_hash.h"
#include "page_buffer.h"
#include "lock_manager.h"
#include "slotted_page.h"
#include "file_manager.h"
#include "overflow_file.h"
#include "memory_hash.h"
#include "tz_support.h"
#include "db_date.h"
#include "thread_compat.hpp"
Go to the source code of this file.
Classes | |
struct | ehash_dir_header |
struct | ehash_dir_record |
struct | ehash_bucket_header |
struct | ehash_repetition |
Macros | |
#define | EHASH_OVERFLOW_RATE 0.9 /* UPPER THRESHOLD for a merge operation. */ |
#define | EHASH_UNDERFLOW_RATE 0.4 /* LOWER THRESHOLD for a merge operation. */ |
#define | EHASH_OVERFLOW_THRESHOLD (EHASH_OVERFLOW_RATE * DB_PAGESIZE) |
#define | EHASH_UNDERFLOW_THRESHOLD (EHASH_UNDERFLOW_RATE * DB_PAGESIZE) |
#define | EHASH_HASH_KEY_BITS (sizeof(EHASH_HASH_KEY) * 8) |
#define | EHASH_SHORT_BITS (sizeof(short) * 8) |
#define | EHASH_LONG_STRING_PREFIX_SIZE 10 |
#define | EHASH_DIR_HEADER_SIZE ((ssize_t) (((sizeof(EHASH_DIR_HEADER) + sizeof(int) - 1 ) / sizeof(int) ) * sizeof(int))) |
#define | EHASH_MAX_STRING_SIZE (DB_PAGESIZE - (SSIZEOF(EHASH_BUCKET_HEADER) + 16)) |
#define | EHASH_NUM_FIRST_PAGES ((DB_PAGESIZE - EHASH_DIR_HEADER_SIZE) / SSIZEOF (EHASH_DIR_RECORD)) |
#define | EHASH_LAST_OFFSET_IN_FIRST_PAGE (EHASH_DIR_HEADER_SIZE + (EHASH_NUM_FIRST_PAGES - 1) * sizeof(EHASH_DIR_RECORD)) |
#define | EHASH_NUM_NON_FIRST_PAGES (DB_PAGESIZE / sizeof(EHASH_DIR_RECORD)) |
#define | EHASH_LAST_OFFSET_IN_NON_FIRST_PAGE ((EHASH_NUM_NON_FIRST_PAGES - 1) * sizeof(EHASH_DIR_RECORD)) |
#define | GETBITS(value, pos, n) ( ((value) >> ( EHASH_HASH_KEY_BITS - (pos) - (n) + 1)) & (~(~0UL << (n))) ) |
#define | FIND_OFFSET(hash_key, depth) (GETBITS((hash_key), 1, (depth))) |
#define | GETBIT(word, pos) (GETBITS((word), (pos), 1)) |
#define | SETBIT(word, pos) ( (word) | (1 << (EHASH_HASH_KEY_BITS - (pos))) ) |
#define | CLEARBIT(word, pos) ( (word) & ~(1 << (EHASH_HASH_KEY_BITS - (pos))) ) |
Typedefs | |
typedef unsigned int | EHASH_HASH_KEY |
typedef struct ehash_dir_header | EHASH_DIR_HEADER |
typedef struct ehash_dir_record | EHASH_DIR_RECORD |
typedef struct ehash_bucket_header | EHASH_BUCKET_HEADER |
typedef struct ehash_repetition | EHASH_REPETITION |
Enumerations | |
enum | EHASH_RESULT { EHASH_SUCCESSFUL_COMPLETION, EHASH_BUCKET_FULL, EHASH_BUCKET_UNDERFLOW, EHASH_BUCKET_EMPTY, EHASH_FULL_SIBLING_BUCKET, EHASH_NO_SIBLING_BUCKET, EHASH_ERROR_OCCURRED } |
Functions | |
static char * | ehash_allocate_recdes (RECDES *recdes, int size, short type) |
static void | ehash_free_recdes (RECDES *recdes) |
static int | ehash_initialize_bucket_new_page (THREAD_ENTRY *thread_p, PAGE_PTR page_p, void *alignment_depth) |
static int | ehash_initialize_dir_new_page (THREAD_ENTRY *thread_p, PAGE_PTR page_p, void *args) |
static short | ehash_get_key_size (DB_TYPE key_type) |
static EHID * | ehash_create_helper (THREAD_ENTRY *thread_p, EHID *ehid, DB_TYPE key_type, int exp_num_entries, OID *class_oid, int attr_id, bool istmp) |
static PAGE_PTR | ehash_fix_old_page (THREAD_ENTRY *thread_p, const VFID *vfid, const VPID *vpid, PGBUF_LATCH_MODE mode) |
static PAGE_PTR | ehash_fix_ehid_page (THREAD_ENTRY *thread_p, EHID *ehid, PGBUF_LATCH_MODE latch_mode) |
static PAGE_PTR | ehash_fix_nth_page (THREAD_ENTRY *thread_p, const VFID *vfid, int offset, PGBUF_LATCH_MODE mode) |
static void * | ehash_insert_helper (THREAD_ENTRY *thread_p, EHID *ehid, void *key, OID *value_ptr, int lock_type, VPID *existing_ovf_vpid) |
static EHASH_RESULT | ehash_insert_to_bucket (THREAD_ENTRY *thread_p, EHID *ehid, VFID *ovf_file, bool is_temp, PAGE_PTR buc_pgptr, DB_TYPE key_type, void *key_ptr, OID *value_ptr, VPID *existing_ovf_vpid) |
static int | ehash_compose_record (DB_TYPE key_type, void *key_ptr, OID *value_ptr, RECDES *recdes) |
static bool | ehash_locate_slot (THREAD_ENTRY *thread_p, PAGE_PTR page, DB_TYPE key_type, void *key, PGSLOTID *position) |
static PAGE_PTR | ehash_split_bucket (THREAD_ENTRY *thread_p, EHASH_DIR_HEADER *dir_header, PAGE_PTR buc_pgptr, void *key, int *old_local_depth, int *new_local_depth, VPID *sib_vpid, bool is_temp) |
static int | ehash_expand_directory (THREAD_ENTRY *thread_p, EHID *ehid, int new_depth, bool is_temp) |
static int | ehash_connect_bucket (THREAD_ENTRY *thread_p, EHID *ehid, int local_depth, EHASH_HASH_KEY hash_key, VPID *buc_vpid, bool is_temp) |
static char | ehash_find_depth (THREAD_ENTRY *thread_p, EHID *ehid, int location, VPID *vpid, VPID *sib_vpid) |
static void | ehash_merge (THREAD_ENTRY *thread_p, EHID *ehid, void *key, bool is_temp) |
static void | ehash_shrink_directory (THREAD_ENTRY *thread_p, EHID *ehid, int new_depth, bool is_temp) |
static EHASH_HASH_KEY | ehash_hash (void *orig_key, DB_TYPE key_type) |
static int | ehash_find_bucket_vpid (THREAD_ENTRY *thread_p, EHID *ehid, EHASH_DIR_HEADER *dir_header, int location, PGBUF_LATCH_MODE latch, VPID *out_vpid) |
static PAGE_PTR | ehash_find_bucket_vpid_with_hash (THREAD_ENTRY *thread_p, EHID *ehid, void *key, PGBUF_LATCH_MODE root_latch, PGBUF_LATCH_MODE bucket_latch, VPID *out_vpid, EHASH_HASH_KEY *out_hash_key, int *out_location) |
static char * | ehash_read_oid_from_record (char *rec_p, OID *oid_p) |
static char * | ehash_write_oid_to_record (char *rec_p, OID *oid_p) |
static char * | ehash_read_ehid_from_record (char *rec_p, EHID *ehid_p) |
static char * | ehash_write_ehid_to_record (char *rec_p, EHID *ehid_p) |
static int | ehash_rv_delete (THREAD_ENTRY *thread_p, EHID *ehid, void *key) |
static void | ehash_adjust_local_depth (THREAD_ENTRY *thread_p, EHID *ehid, PAGE_PTR dir_Rpgptr, EHASH_DIR_HEADER *dir_header, int depth, int delta, bool is_temp) |
static int | ehash_apply_each (THREAD_ENTRY *thread_p, EHID *ehid, RECDES *recdes, DB_TYPE key_type, char *bucrec_ptr, OID *assoc_value, int *out_apply_error, int(*apply_function)(THREAD_ENTRY *thread_p, void *key, void *data, void *args), void *args) |
static int | ehash_merge_permanent (THREAD_ENTRY *thread_p, EHID *ehid, PAGE_PTR dir_Rpgptr, EHASH_DIR_HEADER *dir_header, PAGE_PTR buc_pgptr, PAGE_PTR sib_pgptr, VPID *buc_vpid, VPID *sib_vpid, int num_recs, int loc, PGSLOTID first_slotid, int *out_new_local_depth, bool is_temp) |
static void | ehash_shrink_directory_if_need (THREAD_ENTRY *thread_p, EHID *ehid, EHASH_DIR_HEADER *dir_header, bool is_temp) |
static EHASH_RESULT | ehash_check_merge_possible (THREAD_ENTRY *thread_p, EHID *ehid, EHASH_DIR_HEADER *dir_header, VPID *buc_vpid, PAGE_PTR buc_pgptr, int location, int lock_type, int *old_local_depth, VPID *sib_vpid, PAGE_PTR *out_sib_pgptr, PGSLOTID *out_first_slotid, int *out_num_recs, int *out_loc) |
static int | ehash_distribute_records_into_two_bucket (THREAD_ENTRY *thread_p, EHASH_DIR_HEADER *dir_header, PAGE_PTR buc_pgptr, EHASH_BUCKET_HEADER *buc_header, int num_recs, PGSLOTID first_slotid, PAGE_PTR sib_pgptr) |
static int | ehash_find_first_bit_position (THREAD_ENTRY *thread_p, EHASH_DIR_HEADER *dir_header, PAGE_PTR buc_pgptr, EHASH_BUCKET_HEADER *buc_header, void *key, int num_recs, PGSLOTID first_slotid, int *old_local_depth, int *new_local_depth) |
static int | ehash_get_pseudo_key (THREAD_ENTRY *thread_p, RECDES *recdes, DB_TYPE key_type, EHASH_HASH_KEY *out_hash_key) |
static bool | ehash_binary_search_bucket (THREAD_ENTRY *thread_p, PAGE_PTR buc_pgptr, PGSLOTID num_record, DB_TYPE key_type, void *key, PGSLOTID *position) |
static int | ehash_compare_key (THREAD_ENTRY *thread_p, char *bucrec_ptr, DB_TYPE key_type, void *key, INT16 rec_type, int *out_compare_result) |
static int | ehash_write_key_to_record (RECDES *recdes, DB_TYPE key_type, void *key_ptr, short key_size, OID *value_ptr, bool long_str) |
static EHASH_RESULT | ehash_insert_bucket_after_extend_if_need (THREAD_ENTRY *thread_p, EHID *ehid, PAGE_PTR dir_Rpgptr, EHASH_DIR_HEADER *dir_header, VPID *buc_vpid, void *key, EHASH_HASH_KEY hash_key, int lock_type, bool is_temp, OID *value_ptr, VPID *existing_ovf_vpid) |
static PAGE_PTR | ehash_extend_bucket (THREAD_ENTRY *thread_p, EHID *ehid, PAGE_PTR dir_Rpgptr, EHASH_DIR_HEADER *dir_header, PAGE_PTR buc_pgptr, void *key, EHASH_HASH_KEY hash_key, int *new_bit, VPID *buc_vpid, bool is_temp) |
static int | ehash_insert_to_bucket_after_create (THREAD_ENTRY *thread_p, EHID *ehid, PAGE_PTR dir_Rpgptr, EHASH_DIR_HEADER *dir_header, VPID *buc_vpid, int location, EHASH_HASH_KEY hash_key, bool is_temp, void *key, OID *value_ptr, VPID *existing_ovf_vpid) |
static EHASH_HASH_KEY | ehash_hash_string_type (char *key, char *orig_key) |
static EHASH_HASH_KEY | ehash_hash_eight_bytes_type (char *key) |
static void | ehash_dump_bucket (THREAD_ENTRY *thread_p, PAGE_PTR buc_pgptr, DB_TYPE key_type) |
static void | ehash_dir_locate (int *out_page_no_p, int *out_offset_p) |
int | ehash_rv_init_dir_new_page_redo (THREAD_ENTRY *thread_p, LOG_RCV *rcv) |
EHID * | xehash_create (THREAD_ENTRY *thread_p, EHID *ehid_p, DB_TYPE key_type, int exp_num_entries, OID *class_oid_p, int attr_id, bool is_tmp) |
int | xehash_destroy (THREAD_ENTRY *thread_p, EHID *ehid_p) |
EH_SEARCH | ehash_search (THREAD_ENTRY *thread_p, EHID *ehid_p, void *key_p, OID *value_p) |
void * | ehash_insert (THREAD_ENTRY *thread_p, EHID *ehid_p, void *key_p, OID *value_p) |
void * | ehash_delete (THREAD_ENTRY *thread_p, EHID *ehid_p, void *key_p) |
int | ehash_map (THREAD_ENTRY *thread_p, EHID *ehid_p, int(*apply_function)(THREAD_ENTRY *thread_p, void *key, void *data, void *args), void *args) |
void | ehash_dump (THREAD_ENTRY *thread_p, EHID *ehid_p) |
int | ehash_rv_init_bucket_redo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_init_dir_redo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_insert_redo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_insert_undo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_delete_redo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_delete_undo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_increment (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
int | ehash_rv_connect_bucket_redo (THREAD_ENTRY *thread_p, LOG_RCV *recv_p) |
#define CLEARBIT | ( | word, | |
pos | |||
) | ( (word) & ~(1 << (EHASH_HASH_KEY_BITS - (pos))) ) |
Definition at line 247 of file extendible_hash.c.
Referenced by ehash_check_merge_possible(), ehash_extend_bucket(), and ehash_find_depth().
#define EHASH_DIR_HEADER_SIZE ((ssize_t) (((sizeof(EHASH_DIR_HEADER) + sizeof(int) - 1 ) / sizeof(int) ) * sizeof(int))) |
Definition at line 154 of file extendible_hash.c.
Referenced by ehash_connect_bucket(), ehash_create_helper(), ehash_dir_locate(), ehash_dump(), ehash_find_depth(), and ehash_shrink_directory().
#define EHASH_HASH_KEY_BITS (sizeof(EHASH_HASH_KEY) * 8) |
Definition at line 92 of file extendible_hash.c.
Referenced by ehash_check_merge_possible(), ehash_create_helper(), ehash_dump(), ehash_find_depth(), and ehash_find_first_bit_position().
#define EHASH_LAST_OFFSET_IN_FIRST_PAGE (EHASH_DIR_HEADER_SIZE + (EHASH_NUM_FIRST_PAGES - 1) * sizeof(EHASH_DIR_RECORD)) |
Definition at line 166 of file extendible_hash.c.
Referenced by ehash_expand_directory().
#define EHASH_LAST_OFFSET_IN_NON_FIRST_PAGE ((EHASH_NUM_NON_FIRST_PAGES - 1) * sizeof(EHASH_DIR_RECORD)) |
Definition at line 174 of file extendible_hash.c.
Referenced by ehash_expand_directory().
#define EHASH_LONG_STRING_PREFIX_SIZE 10 |
Definition at line 151 of file extendible_hash.c.
Referenced by ehash_compare_key(), ehash_compose_record(), ehash_dump_bucket(), ehash_free_recdes(), and ehash_insert_to_bucket().
#define EHASH_MAX_STRING_SIZE (DB_PAGESIZE - (SSIZEOF(EHASH_BUCKET_HEADER) + 16)) |
Definition at line 158 of file extendible_hash.c.
Referenced by ehash_compose_record(), and ehash_insert_helper().
#define EHASH_NUM_FIRST_PAGES ((DB_PAGESIZE - EHASH_DIR_HEADER_SIZE) / SSIZEOF (EHASH_DIR_RECORD)) |
Definition at line 162 of file extendible_hash.c.
Referenced by ehash_dir_locate().
#define EHASH_NUM_NON_FIRST_PAGES (DB_PAGESIZE / sizeof(EHASH_DIR_RECORD)) |
Definition at line 170 of file extendible_hash.c.
Referenced by ehash_dir_locate().
#define EHASH_OVERFLOW_RATE 0.9 /* UPPER THRESHOLD for a merge operation. */ |
Definition at line 67 of file extendible_hash.c.
#define EHASH_OVERFLOW_THRESHOLD (EHASH_OVERFLOW_RATE * DB_PAGESIZE) |
Definition at line 88 of file extendible_hash.c.
Referenced by ehash_check_merge_possible().
#define EHASH_SHORT_BITS (sizeof(short) * 8) |
Definition at line 95 of file extendible_hash.c.
Referenced by ehash_hash_eight_bytes_type().
#define EHASH_UNDERFLOW_RATE 0.4 /* LOWER THRESHOLD for a merge operation. */ |
Definition at line 79 of file extendible_hash.c.
#define EHASH_UNDERFLOW_THRESHOLD (EHASH_UNDERFLOW_RATE * DB_PAGESIZE) |
Definition at line 89 of file extendible_hash.c.
Referenced by ehash_delete(), and ehash_merge().
#define FIND_OFFSET | ( | hash_key, | |
depth | |||
) | (GETBITS((hash_key), 1, (depth))) |
Definition at line 207 of file extendible_hash.c.
Referenced by ehash_find_bucket_vpid_with_hash().
#define GETBIT | ( | word, | |
pos | |||
) | (GETBITS((word), (pos), 1)) |
Definition at line 221 of file extendible_hash.c.
Referenced by ehash_check_merge_possible(), ehash_distribute_records_into_two_bucket(), ehash_extend_bucket(), and ehash_find_depth().
#define GETBITS | ( | value, | |
pos, | |||
n | |||
) | ( ((value) >> ( EHASH_HASH_KEY_BITS - (pos) - (n) + 1)) & (~(~0UL << (n))) ) |
Definition at line 191 of file extendible_hash.c.
Referenced by ehash_connect_bucket().
#define SETBIT | ( | word, | |
pos | |||
) | ( (word) | (1 << (EHASH_HASH_KEY_BITS - (pos))) ) |
Definition at line 234 of file extendible_hash.c.
Referenced by ehash_check_merge_possible(), ehash_extend_bucket(), and ehash_find_depth().
typedef struct ehash_bucket_header EHASH_BUCKET_HEADER |
Definition at line 124 of file extendible_hash.c.
typedef struct ehash_dir_header EHASH_DIR_HEADER |
Definition at line 100 of file extendible_hash.c.
typedef struct ehash_dir_record EHASH_DIR_RECORD |
Definition at line 117 of file extendible_hash.c.
typedef unsigned int EHASH_HASH_KEY |
Definition at line 97 of file extendible_hash.c.
typedef struct ehash_repetition EHASH_REPETITION |
Definition at line 142 of file extendible_hash.c.
enum EHASH_RESULT |
Enumerator | |
---|---|
EHASH_SUCCESSFUL_COMPLETION | |
EHASH_BUCKET_FULL | |
EHASH_BUCKET_UNDERFLOW | |
EHASH_BUCKET_EMPTY | |
EHASH_FULL_SIBLING_BUCKET | |
EHASH_NO_SIBLING_BUCKET | |
EHASH_ERROR_OCCURRED |
Definition at line 130 of file extendible_hash.c.
|
static |
Definition at line 3625 of file extendible_hash.c.
References CAST_BUFLEN, ehash_dir_header::depth, DONT_FREE, ehash_dir_header::local_depth_count, log_append_undoredo_data2(), pgbuf_set_dirty(), RVEH_INC_COUNTER, and ehid::vfid.
Referenced by ehash_extend_bucket(), ehash_insert_to_bucket_after_create(), and ehash_merge().
|
static |
Definition at line 473 of file extendible_hash.c.
References recdes::area_size, ARG_FILE_LINE, recdes::data, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), recdes::length, NULL, and recdes::type.
Referenced by ehash_compose_record(), ehash_delete(), ehash_free_recdes(), ehash_insert_to_bucket(), and ehash_rv_delete().
|
static |
Definition at line 4652 of file extendible_hash.c.
References ARG_FILE_LINE, CAST_BUFLEN, recdes::data, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, ER_EH_ROOT_CORRUPTED, ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), vfid::fileid, free_and_init, i, recdes::length, NO_ERROR, NULL, OR_MOVE_DOUBLE, ehid::pageid, REC_BIGONE, recdes::type, ehid::vfid, and vfid::volid.
Referenced by ehash_map().
|
static |
Definition at line 2393 of file extendible_hash.c.
References ARG_FILE_LINE, recdes::data, ehash_compare_key(), ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), NO_ERROR, PEEK, S_SUCCESS, spage_get_record(), and recdes::type.
Referenced by ehash_locate_slot().
|
static |
Definition at line 3266 of file extendible_hash.c.
References recdes::area_size, ARG_FILE_LINE, CLEARBIT, COPY, recdes::data, DB_PAGESIZE, ehash_dir_header::depth, EHASH_ERROR_OCCURRED, ehash_find_bucket_vpid(), ehash_fix_old_page(), EHASH_FULL_SIBLING_BUCKET, EHASH_HASH_KEY_BITS, EHASH_NO_SIBLING_BUCKET, EHASH_OVERFLOW_THRESHOLD, EHASH_SUCCESSFUL_COMPLETION, ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), GETBIT, if(), ehash_bucket_header::local_depth, NO_ERROR, NULL, PEEK, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, S_LOCK, S_SUCCESS, SETBIT, spage_max_space_for_new_record(), spage_next_record(), spage_number_of_records(), ehid::vfid, VPID_EQ, and VPID_ISNULL.
Referenced by ehash_delete(), and ehash_merge().
|
static |
Definition at line 2215 of file extendible_hash.c.
References ansisql_strcmp(), ARG_FILE_LINE, d1, db_datetime::date, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, EHASH_LONG_STRING_PREFIX_SIZE, ER_EH_CORRUPTED, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_set(), NO_ERROR, oid_compare(), OR_MOVE_DOUBLE, REC_BIGONE, and db_datetime::time.
Referenced by ehash_binary_search_bucket().
|
static |
Definition at line 2164 of file extendible_hash.c.
References assert, DB_TYPE_STRING, ehash_allocate_recdes(), ehash_get_key_size(), EHASH_LONG_STRING_PREFIX_SIZE, EHASH_MAX_STRING_SIZE, ehash_write_key_to_record(), ER_FAILED, NULL, REC_HOME, and strlen.
Referenced by ehash_insert_to_bucket().
|
static |
Definition at line 3059 of file extendible_hash.c.
References ehash_dir_record::bucket_vpid, ehash_repetition::count, DB_PAGESIZE, ehash_dir_header::depth, diff, EHASH_DIR_HEADER_SIZE, ehash_dir_locate(), ehash_fix_ehid_page(), ehash_fix_nth_page(), ER_FAILED, FREE, GETBITS, i, log_append_undoredo_data2(), NO_ERROR, NULL, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, RVEH_CONNECT_BUCKET, ehid::vfid, and ehash_repetition::vpid.
Referenced by ehash_extend_bucket(), ehash_insert_to_bucket_after_create(), and ehash_merge().
|
static |
Definition at line 952 of file extendible_hash.c.
References ehash_dir_header::alignment, assert, ASSERT_ERROR, assert_release, file_ehash_des::attr_id, ehash_dir_header::bucket_file, ehash_dir_record::bucket_vpid, CEIL_PTVDIV, file_ehash_des::class_oid, COPY_OID, DB_PAGESIZE, DB_TYPE_OBJECT, DB_TYPE_STRING, ehash_dir_header::depth, EHASH_DIR_HEADER_SIZE, ehash_dir_locate(), ehash_get_key_size(), EHASH_HASH_KEY_BITS, ehash_initialize_bucket_new_page(), file_alloc(), file_create_ehash(), file_create_ehash_dir(), file_destroy(), file_init_page_type(), file_init_temp_page_type(), file_postpone_destroy(), FREE, i, ehash_dir_header::key_type, ehash_dir_header::local_depth_count, log_append_redo_data2(), NO_ERROR, NULL, OID_SET_NULL, ehash_dir_header::overflow_file, PAGE_EHASH, ehid::pageid, vpid::pageid, db_identifier::pageid, pgbuf_check_page_ptype(), pgbuf_set_dirty(), RVEH_INIT_DIR, ehid::vfid, VFID_COPY, VFID_INITIALIZER, VFID_ISNULL, VFID_SET_NULL, vfid::volid, and VPID_INITIALIZER.
Referenced by xehash_create().
void* ehash_delete | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p, | ||
void * | key_p | ||
) |
Definition at line 3410 of file extendible_hash.c.
References ARG_FILE_LINE, ASSERT_ERROR, recdes::data, DB_PAGESIZE, do_merge(), DONT_FREE, ehash_allocate_recdes(), EHASH_BUCKET_EMPTY, EHASH_BUCKET_UNDERFLOW, ehash_check_merge_possible(), ehash_find_bucket_vpid_with_hash(), ehash_fix_old_page(), ehash_free_recdes(), ehash_locate_slot(), ehash_merge(), EHASH_SUCCESSFUL_COMPLETION, EHASH_UNDERFLOW_THRESHOLD, ehash_write_ehid_to_record(), ER_EH_UNKNOWN_KEY, er_set(), ER_WARNING_SEVERITY, file_is_temp(), ehash_dir_header::key_type, recdes::length, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, NULL_PAGEID, overflow_delete(), ehash_dir_header::overflow_file, vpid::pageid, PEEK, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, REC_BIGONE, REC_HOME, RVEH_DELETE, S_LOCK, spage_delete(), spage_get_record(), spage_max_space_for_new_record(), spage_number_of_records(), recdes::type, ehid::vfid, and VPID_INITIALIZER.
Referenced by catalog_put_representation_item().
|
static |
Definition at line 382 of file extendible_hash.c.
References EHASH_DIR_HEADER_SIZE, EHASH_NUM_FIRST_PAGES, EHASH_NUM_NON_FIRST_PAGES, i, and max.
Referenced by ehash_connect_bucket(), ehash_create_helper(), ehash_dump(), ehash_expand_directory(), ehash_find_bucket_vpid(), ehash_find_depth(), and ehash_shrink_directory().
|
static |
Definition at line 2597 of file extendible_hash.c.
References ARG_FILE_LINE, ehash_get_pseudo_key(), ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_log_debug, er_set(), GETBIT, i, ehash_dir_header::key_type, ehash_bucket_header::local_depth, NO_ERROR, PEEK, S_SUCCESS, SP_SUCCESS, spage_delete(), spage_get_record(), spage_insert(), and success().
Referenced by ehash_split_bucket().
void ehash_dump | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p | ||
) |
Definition at line 4855 of file extendible_hash.c.
References ARG_FILE_LINE, ASSERT_ERROR, ehash_dir_header::bucket_file, ehash_dir_record::bucket_vpid, DB_PAGESIZE, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, ehash_dir_header::depth, EHASH_DIR_HEADER_SIZE, ehash_dir_locate(), ehash_dump_bucket(), ehash_find_bucket_vpid(), ehash_fix_ehid_page(), ehash_fix_nth_page(), ehash_fix_old_page(), ehash_get_key_size(), EHASH_HASH_KEY_BITS, ER_EH_ROOT_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), file_get_num_user_pages(), vfid::fileid, i, ehash_dir_header::key_type, ehash_dir_header::local_depth_count, NO_ERROR, NULL, ehid::pageid, vpid::pageid, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, ehid::vfid, vpid::volid, vfid::volid, and VPID_ISNULL.
|
static |
Definition at line 5129 of file extendible_hash.c.
References ARG_FILE_LINE, CAST_BUFLEN, recdes::data, db_date_decode(), db_datetime_decode(), db_time_decode(), db_timestamp_decode_ses(), DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, EH_KEY_FOUND, EHASH_LONG_STRING_PREFIX_SIZE, ehash_read_oid_from_record(), ehash_search(), ER_EH_INVALID_KEY_TYPE, ER_ERROR_SEVERITY, er_set(), i, recdes::length, ehash_bucket_header::local_depth, OR_MOVE_DOUBLE, vpid::pageid, db_identifier::pageid, PEEK, REC_BIGONE, db_identifier::slotid, spage_get_record(), spage_next_record(), spage_number_of_records(), recdes::type, vpid::volid, and db_identifier::volid.
Referenced by ehash_dump().
|
static |
Definition at line 2784 of file extendible_hash.c.
References ARG_FILE_LINE, ASSERT_ERROR, ehash_dir_header::bucket_file, DB_PAGESIZE, ehash_dir_header::depth, ehash_dir_locate(), ehash_fix_ehid_page(), ehash_fix_nth_page(), ehash_initialize_dir_new_page(), EHASH_LAST_OFFSET_IN_FIRST_PAGE, EHASH_LAST_OFFSET_IN_NON_FIRST_PAGE, ER_EH_ROOT_CORRUPTED, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_log_debug, er_set(), file_alloc_multiple(), file_get_num_user_pages(), vfid::fileid, FREE, i, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, ehid::pageid, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, RVEH_REPLACE, ehid::vfid, and vfid::volid.
Referenced by ehash_extend_bucket().
|
static |
Definition at line 1538 of file extendible_hash.c.
References CLEARBIT, ehash_dir_header::depth, ehash_adjust_local_depth(), ehash_connect_bucket(), ehash_expand_directory(), ehash_split_bucket(), GETBIT, log_sysop_abort(), log_sysop_commit(), log_sysop_start(), NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, pgbuf_unfix_and_init, and SETBIT.
Referenced by ehash_insert_bucket_after_extend_if_need().
|
static |
Definition at line 1289 of file extendible_hash.c.
References ehash_dir_record::bucket_vpid, ehash_dir_locate(), ehash_fix_nth_page(), ER_FAILED, NO_ERROR, NULL, pgbuf_unfix_and_init, and ehid::vfid.
Referenced by ehash_check_merge_possible(), ehash_dump(), and ehash_find_bucket_vpid_with_hash().
|
static |
Definition at line 1321 of file extendible_hash.c.
References ehash_dir_header::depth, ehash_find_bucket_vpid(), ehash_fix_ehid_page(), ehash_hash(), FIND_OFFSET, ehash_dir_header::key_type, NO_ERROR, NULL, and pgbuf_unfix_and_init.
Referenced by ehash_delete(), ehash_insert_helper(), ehash_merge(), ehash_rv_delete(), and ehash_search().
|
static |
Definition at line 3175 of file extendible_hash.c.
References ehash_dir_record::bucket_vpid, cubregex::clear(), CLEARBIT, ehash_dir_header::depth, EHASH_DIR_HEADER_SIZE, ehash_dir_locate(), ehash_fix_ehid_page(), ehash_fix_nth_page(), EHASH_HASH_KEY_BITS, GETBIT, i, NULL, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, SETBIT, ehid::vfid, VPID_EQ, and VPID_ISNULL.
Referenced by ehash_insert_to_bucket_after_create(), and ehash_merge_permanent().
|
static |
Definition at line 2537 of file extendible_hash.c.
References ARG_FILE_LINE, ehash_get_pseudo_key(), ehash_hash(), EHASH_HASH_KEY_BITS, ER_EH_CORRUPTED, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_set(), i, ehash_dir_header::key_type, ehash_bucket_header::local_depth, NO_ERROR, PEEK, S_SUCCESS, and spage_get_record().
Referenced by ehash_split_bucket().
|
static |
Definition at line 1212 of file extendible_hash.c.
References ehash_fix_old_page(), ehid::pageid, vpid::pageid, ehid::vfid, vpid::volid, and vfid::volid.
Referenced by ehash_connect_bucket(), ehash_dump(), ehash_expand_directory(), ehash_find_bucket_vpid_with_hash(), ehash_find_depth(), ehash_hash(), ehash_map(), and xehash_destroy().
|
static |
Definition at line 1230 of file extendible_hash.c.
References ASSERT_ERROR, ehash_fix_old_page(), file_numerable_find_nth(), NO_ERROR, and NULL.
Referenced by ehash_connect_bucket(), ehash_dump(), ehash_expand_directory(), ehash_find_bucket_vpid(), ehash_find_depth(), ehash_hash(), ehash_map(), and ehash_shrink_directory().
|
static |
Definition at line 1184 of file extendible_hash.c.
References ARG_FILE_LINE, ER_EH_UNKNOWN_EXT_HASH, er_errid(), ER_ERROR_SEVERITY, ER_PB_BAD_PAGEID, er_set(), vfid::fileid, NULL, OLD_PAGE, PAGE_EHASH, vpid::pageid, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_UNCONDITIONAL_LATCH, vpid::volid, and vfid::volid.
Referenced by ehash_check_merge_possible(), ehash_delete(), ehash_dump(), ehash_fix_ehid_page(), ehash_fix_nth_page(), ehash_insert_bucket_after_extend_if_need(), ehash_merge(), ehash_rv_delete(), and ehash_search().
|
static |
Definition at line 497 of file extendible_hash.c.
References ansisql_strcmp(), recdes::area_size, recdes::data, ehash_allocate_recdes(), EHASH_LONG_STRING_PREFIX_SIZE, ER_FAILED, free_and_init, recdes::length, NO_ERROR, NULL, overflow_get(), overflow_get_length(), REC_HOME, and S_SUCCESS.
Referenced by ehash_delete(), ehash_insert_to_bucket(), ehash_rv_delete(), and ehash_write_key_to_record().
|
static |
Definition at line 877 of file extendible_hash.c.
References ARG_FILE_LINE, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, ER_EH_INVALID_KEY_TYPE, ER_ERROR_SEVERITY, er_set(), and OR_MONETARY_SIZE.
Referenced by ehash_compose_record(), ehash_create_helper(), and ehash_dump().
|
static |
Definition at line 2501 of file extendible_hash.c.
References recdes::data, ehash_hash(), ER_FAILED, free_and_init, NO_ERROR, NULL, REC_BIGONE, and recdes::type.
Referenced by ehash_distribute_records_into_two_bucket(), and ehash_find_first_bit_position().
|
static |
Definition at line 4339 of file extendible_hash.c.
References ARG_FILE_LINE, ehash_dir_header::bucket_file, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, ehash_dir_header::depth, ehash_fix_ehid_page(), ehash_fix_nth_page(), ehash_hash_eight_bytes_type(), ehash_hash_string_type(), ER_EH_CORRUPTED, ER_FAILED, ER_FATAL_ERROR_SEVERITY, er_set(), vfid::fileid, NO_ERROR, NULL, NULL_FILEID, ehash_dir_header::overflow_file, PGBUF_LATCH_READ, pgbuf_unfix_and_init, spage_get_free_space(), spage_get_record_length(), spage_number_of_records(), spage_slot_size(), and ehid::vfid.
Referenced by ehash_find_bucket_vpid_with_hash(), ehash_find_first_bit_position(), and ehash_get_pseudo_key().
|
static |
Definition at line 4236 of file extendible_hash.c.
References EHASH_SHORT_BITS, htonl(), i, and ntohs().
Referenced by ehash_hash().
|
static |
Definition at line 4148 of file extendible_hash.c.
References char_isspace(), free_and_init, i, mht_1strhash(), mht_2strhash(), mht_3strhash(), NULL, p, and strlen.
Referenced by ehash_hash().
|
static |
Definition at line 626 of file extendible_hash.c.
References ehash_dir_header::alignment, recdes::area_size, ARG_FILE_LINE, ASSERT_ERROR_AND_SET, recdes::data, ehash_dir_header::depth, DONT_FREE, DONT_SAFEGUARD_RVSPACE, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), recdes::length, ehash_bucket_header::local_depth, log_append_undoredo_data2(), NO_ERROR, NULL, PAGE_EHASH, pgbuf_set_dirty(), pgbuf_set_page_ptype(), REC_HOME, RVEH_INIT_BUCKET, SP_ERROR, SP_SUCCESS, spage_initialize(), spage_insert(), success(), recdes::type, and UNANCHORED_KEEP_SEQUENCE.
Referenced by ehash_create_helper(), ehash_insert_to_bucket_after_create(), and ehash_split_bucket().
|
static |
Definition at line 710 of file extendible_hash.c.
References DONT_FREE, log_append_undoredo_data2(), NO_ERROR, NULL, PAGE_EHASH, pgbuf_set_dirty(), pgbuf_set_page_ptype(), and RVEH_INIT_NEW_DIR_PAGE.
Referenced by ehash_expand_directory().
void* ehash_insert | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p, | ||
void * | key_p, | ||
OID * | value_p | ||
) |
Definition at line 1455 of file extendible_hash.c.
References ehash_insert_helper(), NULL, and S_LOCK.
Referenced by qexec_upddel_add_unique_oid_to_ehid().
|
static |
Definition at line 1633 of file extendible_hash.c.
References EHASH_BUCKET_FULL, EHASH_ERROR_OCCURRED, ehash_extend_bucket(), ehash_fix_old_page(), ehash_insert_to_bucket(), ehash_dir_header::key_type, NULL, ehash_dir_header::overflow_file, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, S_LOCK, and ehid::vfid.
Referenced by ehash_insert_helper().
|
static |
Definition at line 1707 of file extendible_hash.c.
References assert, ASSERT_ERROR, DB_TYPE_STRING, EHASH_BUCKET_FULL, EHASH_ERROR_OCCURRED, ehash_find_bucket_vpid_with_hash(), ehash_insert_bucket_after_extend_if_need(), ehash_insert_to_bucket_after_create(), EHASH_MAX_STRING_SIZE, file_is_temp(), vfid::fileid, ehash_dir_header::key_type, NO_ERROR, NULL, ehash_dir_header::overflow_file, ehid::pageid, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, S_LOCK, strlen, ehid::vfid, VFID_ISNULL, vfid::volid, VPID_ISNULL, and X_LOCK.
Referenced by ehash_insert(), and ehash_rv_delete_undo().
|
static |
Definition at line 1829 of file extendible_hash.c.
References recdes::area_size, ARG_FILE_LINE, recdes::data, DONT_FREE, ehash_allocate_recdes(), EHASH_BUCKET_FULL, ehash_compose_record(), EHASH_ERROR_OCCURRED, ehash_free_recdes(), ehash_locate_slot(), EHASH_LONG_STRING_PREFIX_SIZE, EHASH_SUCCESSFUL_COMPLETION, ehash_write_ehid_to_record(), ehash_write_oid_to_record(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), if(), recdes::length, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, overflow_delete(), overflow_insert(), PEEK, pgbuf_set_dirty(), REC_BIGONE, REC_HOME, RVEH_DELETE, RVEH_INSERT, RVEH_REPLACE, SP_DOESNT_FIT, SP_SUCCESS, spage_get_record(), spage_insert_at(), spage_max_space_for_new_record(), strlen, success(), recdes::type, and ehid::vfid.
Referenced by ehash_insert_bucket_after_extend_if_need(), and ehash_insert_to_bucket_after_create().
|
static |
Definition at line 1466 of file extendible_hash.c.
References ehash_dir_header::alignment, ARG_FILE_LINE, ASSERT_ERROR, assert_release, ehash_dir_header::bucket_file, ehash_dir_header::depth, ehash_adjust_local_depth(), ehash_connect_bucket(), ehash_find_depth(), ehash_initialize_bucket_new_page(), ehash_insert_to_bucket(), EHASH_SUCCESSFUL_COMPLETION, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), file_alloc(), ehash_dir_header::key_type, ehash_bucket_header::local_depth, log_sysop_abort(), log_sysop_commit(), log_sysop_start(), NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, ehash_dir_header::overflow_file, PAGE_EHASH, pgbuf_check_page_ptype(), and pgbuf_unfix_and_init.
Referenced by ehash_insert_helper().
|
static |
Definition at line 2471 of file extendible_hash.c.
References ARG_FILE_LINE, ehash_binary_search_bucket(), ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), PEEK, S_SUCCESS, spage_next_record(), and spage_number_of_records().
Referenced by ehash_delete(), ehash_insert_to_bucket(), ehash_merge_permanent(), ehash_rv_delete(), and ehash_search().
int ehash_map | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p, | ||
int(*)(THREAD_ENTRY *thread_p, void *key, void *data, void *args) | apply_function, | ||
void * | args | ||
) |
Definition at line 4775 of file extendible_hash.c.
References ehash_dir_header::bucket_file, recdes::data, ehash_apply_each(), ehash_fix_ehid_page(), ehash_fix_nth_page(), ehash_read_oid_from_record(), ER_FAILED, file_get_num_user_pages(), ehash_dir_header::key_type, NO_ERROR, NULL, NULL_SLOTID, PEEK, PGBUF_LATCH_READ, pgbuf_unfix_and_init, spage_get_record(), spage_next_record(), and spage_number_of_records().
|
static |
Definition at line 3763 of file extendible_hash.c.
References ARG_FILE_LINE, ASSERT_ERROR, ehash_dir_header::bucket_file, DB_PAGESIZE, ehash_adjust_local_depth(), EHASH_BUCKET_EMPTY, EHASH_BUCKET_UNDERFLOW, ehash_check_merge_possible(), ehash_connect_bucket(), EHASH_ERROR_OCCURRED, ehash_find_bucket_vpid_with_hash(), ehash_fix_old_page(), EHASH_FULL_SIBLING_BUCKET, ehash_merge_permanent(), EHASH_NO_SIBLING_BUCKET, ehash_shrink_directory_if_need(), EHASH_SUCCESSFUL_COMPLETION, EHASH_UNDERFLOW_THRESHOLD, ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), file_dealloc(), FILE_EXTENDIBLE_HASH, log_sysop_abort(), log_sysop_commit(), log_sysop_start(), NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, vpid::pageid, PGBUF_LATCH_WRITE, pgbuf_unfix_and_init, spage_max_space_for_new_record(), spage_number_of_records(), ehid::vfid, and X_LOCK.
Referenced by ehash_delete().
|
static |
Definition at line 3647 of file extendible_hash.c.
References recdes::area_size, ARG_FILE_LINE, recdes::data, DB_PAGESIZE, ehash_dir_header::depth, DONT_FREE, ehash_find_depth(), ehash_locate_slot(), ER_EH_CORRUPTED, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), free_and_init, ehash_dir_header::key_type, recdes::length, ehash_bucket_header::local_depth, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, PEEK, pgbuf_set_dirty(), REC_BIGONE, RVEH_REPLACE, SP_SUCCESS, spage_get_record(), spage_insert_at(), spage_update(), success(), recdes::type, and ehid::vfid.
Referenced by ehash_merge().
|
static |
Definition at line 5779 of file extendible_hash.c.
References vfid::fileid, ehid::pageid, ehid::vfid, and vfid::volid.
Referenced by ehash_rv_delete_undo(), and ehash_rv_insert_undo().
|
static |
Definition at line 5749 of file extendible_hash.c.
References db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by ehash_dump_bucket(), ehash_map(), ehash_rv_delete_undo(), and ehash_search().
int ehash_rv_connect_bucket_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5722 of file extendible_hash.c.
References ehash_dir_record::bucket_vpid, ehash_repetition::count, log_rcv::data, DONT_FREE, i, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, ehash_repetition::vpid, and VPID_EQ.
|
static |
Definition at line 5586 of file extendible_hash.c.
References ARG_FILE_LINE, assert, recdes::data, DONT_FREE, ehash_allocate_recdes(), ehash_find_bucket_vpid_with_hash(), ehash_fix_old_page(), ehash_free_recdes(), ehash_locate_slot(), ER_EH_UNKNOWN_KEY, er_errid(), ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_WARNING_SEVERITY, error(), ehash_dir_header::key_type, recdes::length, log_append_redo_data2(), NO_ERROR, NULL, NULL_PAGEID, vpid::pageid, PEEK, PGBUF_LATCH_READ, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, REC_HOME, RVEH_DELETE, spage_delete(), spage_get_record(), recdes::type, and ehid::vfid.
Referenced by ehash_rv_insert_undo().
int ehash_rv_delete_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5474 of file extendible_hash.c.
References recdes::area_size, log_rcv::data, recdes::data, DONT_FREE, log_rcv::length, recdes::length, NO_ERROR, log_rcv::offset, PEEK, pgbuf_set_dirty(), log_rcv::pgptr, S_SUCCESS, spage_delete(), spage_get_record(), and recdes::type.
int ehash_rv_delete_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5513 of file extendible_hash.c.
References recdes::area_size, assert, log_rcv::data, recdes::data, ehash_insert_helper(), ehash_read_ehid_from_record(), ehash_read_oid_from_record(), er_errid(), error(), free_and_init, log_rcv::length, recdes::length, NO_ERROR, NULL, log_rcv::offset, REC_BIGONE, and S_LOCK.
int ehash_rv_increment | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5698 of file extendible_hash.c.
References log_rcv::data, DONT_FREE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), and log_rcv::pgptr.
int ehash_rv_init_bucket_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5316 of file extendible_hash.c.
References ehash_dir_header::alignment, recdes::area_size, ARG_FILE_LINE, assert, log_rcv::data, recdes::data, DONT_SAFEGUARD_RVSPACE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), recdes::length, ehash_bucket_header::local_depth, NO_ERROR, PAGE_EHASH, pgbuf_set_page_ptype(), log_rcv::pgptr, REC_HOME, SP_ERROR, SP_SUCCESS, spage_initialize(), spage_insert(), success(), recdes::type, and UNANCHORED_KEEP_SEQUENCE.
int ehash_rv_init_dir_new_page_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | rcv | ||
) |
Definition at line 733 of file extendible_hash.c.
References ARG_FILE_LINE, db_date_decode(), db_time_decode(), DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DONT_FREE, ER_EH_INVALID_KEY_TYPE, ER_ERROR_SEVERITY, er_set(), NO_ERROR, OR_MOVE_DOUBLE, PAGE_EHASH, db_identifier::pageid, pgbuf_set_dirty(), pgbuf_set_page_ptype(), log_rcv::pgptr, db_identifier::slotid, and db_identifier::volid.
int ehash_rv_init_dir_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5365 of file extendible_hash.c.
References log_rv_copy_char(), PAGE_EHASH, pgbuf_set_page_ptype(), and log_rcv::pgptr.
int ehash_rv_insert_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5382 of file extendible_hash.c.
References recdes::area_size, ARG_FILE_LINE, 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, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, SP_SUCCESS, spage_insert_for_recovery(), success(), and recdes::type.
int ehash_rv_insert_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv_p | ||
) |
Definition at line 5419 of file extendible_hash.c.
References recdes::area_size, assert, log_rcv::data, recdes::data, ehash_read_ehid_from_record(), ehash_rv_delete(), er_errid(), error(), free_and_init, log_rcv::length, recdes::length, NO_ERROR, NULL, log_rcv::offset, and REC_BIGONE.
EH_SEARCH ehash_search | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p, | ||
void * | key_p, | ||
OID * | value_p | ||
) |
Definition at line 1373 of file extendible_hash.c.
References recdes::data, EH_ERROR_OCCURRED, EH_KEY_FOUND, EH_KEY_NOTFOUND, ehash_find_bucket_vpid_with_hash(), ehash_fix_old_page(), ehash_locate_slot(), ehash_read_oid_from_record(), ehash_dir_header::key_type, NULL, NULL_PAGEID, vpid::pageid, PEEK, PGBUF_LATCH_READ, pgbuf_unfix_and_init, spage_get_record(), and ehid::vfid.
Referenced by ehash_dump_bucket(), and qexec_upddel_add_unique_oid_to_ehid().
|
static |
Definition at line 3974 of file extendible_hash.c.
References ARG_FILE_LINE, ASSERT_ERROR, DB_PAGESIZE, ehash_dir_header::depth, EHASH_DIR_HEADER_SIZE, ehash_dir_locate(), ehash_fix_nth_page(), ER_EH_ROOT_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_log_debug, er_set(), file_get_num_user_pages(), file_numerable_truncate(), vfid::fileid, FREE, i, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, ehid::pageid, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix, pgbuf_unfix_and_init, RVEH_REPLACE, ehid::vfid, and vfid::volid.
Referenced by ehash_shrink_directory_if_need().
|
static |
Definition at line 3607 of file extendible_hash.c.
References ehash_dir_header::depth, ehash_shrink_directory(), i, and ehash_dir_header::local_depth_count.
Referenced by ehash_merge().
|
static |
Definition at line 2676 of file extendible_hash.c.
References ehash_dir_header::alignment, ARG_FILE_LINE, ASSERT_ERROR, assert_release, ehash_dir_header::bucket_file, recdes::data, DB_PAGESIZE, DONT_FREE, ehash_distribute_records_into_two_bucket(), ehash_find_first_bit_position(), ehash_initialize_bucket_new_page(), ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), file_alloc(), file_dealloc(), FILE_EXTENDIBLE_HASH, if(), ehash_bucket_header::local_depth, log_append_redo_data2(), log_append_undo_data2(), NO_ERROR, NULL, PEEK, pgbuf_set_dirty(), pgbuf_unfix_and_init, RVEH_REPLACE, S_SUCCESS, spage_next_record(), spage_number_of_records(), and VPID_SET_NULL.
Referenced by ehash_extend_bucket().
|
static |
Definition at line 5794 of file extendible_hash.c.
References vfid::fileid, ehid::pageid, ehid::vfid, and vfid::volid.
Referenced by ehash_delete(), and ehash_insert_to_bucket().
|
static |
Definition at line 2059 of file extendible_hash.c.
References ARG_FILE_LINE, recdes::data, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_OBJECT, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, ehash_free_recdes(), ehash_write_oid_to_record(), ER_EH_CORRUPTED, ER_FATAL_ERROR_SEVERITY, er_set(), NO_ERROR, OR_MOVE_DOUBLE, REC_BIGONE, REC_HOME, and recdes::type.
Referenced by ehash_compose_record().
|
static |
Definition at line 5764 of file extendible_hash.c.
References db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by ehash_insert_to_bucket(), and ehash_write_key_to_record().
EHID* xehash_create | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p, | ||
DB_TYPE | key_type, | ||
int | exp_num_entries, | ||
OID * | class_oid_p, | ||
int | attr_id, | ||
bool | is_tmp | ||
) |
Definition at line 864 of file extendible_hash.c.
References ehash_create_helper().
Referenced by boot_create_all_volumes(), catalog_create(), and qexec_init_upddel_ehash_files().
int xehash_destroy | ( | THREAD_ENTRY * | thread_p, |
EHID * | ehid_p | ||
) |
Definition at line 1253 of file extendible_hash.c.
References assert_release, ehash_dir_header::bucket_file, ehash_fix_ehid_page(), ER_FAILED, file_destroy(), log_sysop_commit(), log_sysop_start(), NO_ERROR, NULL, PGBUF_LATCH_WRITE, pgbuf_unfix, and ehid::vfid.
Referenced by qexec_destroy_upddel_ehash_files(), and qexec_init_upddel_ehash_files().