CUBRID Engine
latest
|
#include "locator.h"
#include "config.h"
#include "porting.h"
#include "memory_alloc.h"
#include "oid.h"
#include "object_representation.h"
#include "error_manager.h"
#include "storage_common.h"
#include "thread_compat.hpp"
#include <stdio.h>
#include <string.h>
#include <assert.h>
Go to the source code of this file.
Classes | |
struct | locator_global |
struct | locator_global::locator_global_copyareas |
struct | locator_global::locator_global_lockset_areas |
struct | locator_global::locator_global_lockhint_areas |
struct | locator_global::locator_global_packed_areas |
Macros | |
#define | pthread_mutex_init(a, b) |
#define | pthread_mutex_destroy(a) |
#define | pthread_mutex_lock(a) 0 |
#define | pthread_mutex_unlock(a) |
#define | LOCATOR_NKEEP_LIMIT (2) |
#define | LOCATOR_CACHED_COPYAREA_SIZE_LIMIT (IO_MAX_PAGE_SIZE * 2 + sizeof (LC_COPYAREA)) |
Typedefs | |
typedef struct locator_global | LOCATOR_GLOBAL |
Functions | |
static char * | locator_allocate_packed (int packed_size) |
static char * | locator_reallocate_packed (char *packed, int packed_size) |
static void | locator_free_packed (char *packed_area, int packed_size) |
static int | locator_initialize_lockset (LC_LOCKSET *lockset, int length, int max_reqobjs, LOCK reqobj_inst_lock, LOCK reqobj_class_lock, int quit_on_errors) |
static char * | locator_pack_lockset_header (char *packed, LC_LOCKSET *lockset) |
static char * | locator_pack_lockset_classes (char *packed, LC_LOCKSET *lockset) |
static char * | locator_pack_lockset_objects (char *packed, LC_LOCKSET *lockset) |
static char * | locator_unpack_lockset_header (char *unpacked, LC_LOCKSET *lockset) |
static char * | locator_unpack_lockset_classes (char *unpacked, LC_LOCKSET *lockset) |
static char * | locator_unpack_lockset_objects (char *unpacked, LC_LOCKSET *lockset) |
static int | locator_initialize_lockhint (LC_LOCKHINT *lockhint, int length, int max_classes, bool quit_on_errors) |
static char * | locator_pack_lockhint_header (char *packed, LC_LOCKHINT *lockhint) |
static char * | locator_pack_lockhint_classes (char *packed, LC_LOCKHINT *lockhint) |
static char * | locator_unpack_lockhint_header (char *unpacked, LC_LOCKHINT *lockhint) |
static char * | locator_unpack_lockhint_classes (char *unpacked, LC_LOCKHINT *lockhint) |
static bool | locator_is_hfid_equal (HFID *hfid1_p, HFID *hfid2_p) |
void | locator_initialize_areas (void) |
void | locator_free_areas (void) |
LC_COPYAREA * | locator_allocate_copy_area_by_length (int min_length) |
LC_COPYAREA * | locator_reallocate_copy_area_by_length (LC_COPYAREA *old_area, int new_length) |
void | locator_free_copy_area (LC_COPYAREA *copyarea) |
char * | locator_pack_copy_area_descriptor (int num_objs, LC_COPYAREA *copyarea, char *desc, int desc_len) |
char * | locator_unpack_copy_area_descriptor (int num_objs, LC_COPYAREA *copyarea, char *desc) |
int | locator_send_copy_area (LC_COPYAREA *copyarea, char **contents_ptr, int *contents_length, char **desc_ptr, int *desc_length) |
LC_COPYAREA * | locator_recv_allocate_copyarea (int num_objs, char **packed_desc, int packed_desc_length, char **contents_ptr, int contents_length) |
LC_LOCKSET * | locator_allocate_lockset (int max_reqobjs, LOCK reqobj_inst_lock, LOCK reqobj_class_lock, int quit_on_errors) |
LC_LOCKSET * | locator_reallocate_lockset (LC_LOCKSET *lockset, int max_reqobjs) |
void | locator_free_lockset (LC_LOCKSET *lockset) |
LC_LOCKSET * | locator_allocate_and_unpack_lockset (char *unpacked, int unpacked_size, bool unpack_classes, bool unpack_objects, bool reg_unpacked) |
int | locator_pack_lockset (LC_LOCKSET *lockset, bool pack_classes, bool pack_objects) |
int | locator_unpack_lockset (LC_LOCKSET *lockset, bool unpack_classes, bool unpack_objects) |
LC_LOCKHINT * | locator_allocate_lockhint (int max_classes, bool quit_on_errors) |
LC_LOCKHINT * | locator_reallocate_lockhint (LC_LOCKHINT *lockhint, int max_classes) |
void | locator_free_lockhint (LC_LOCKHINT *lockhint) |
LC_LOCKHINT * | locator_allocate_and_unpack_lockhint (char *unpacked, int unpacked_size, bool unpack_classes, bool reg_unpacked) |
int | locator_pack_lockhint (LC_LOCKHINT *lockhint, bool pack_classes) |
int | locator_unpack_lockhint (LC_LOCKHINT *lockhint, bool unpack_classes) |
LC_OIDSET * | locator_make_oid_set (void) |
void | locator_clear_oid_set (THREAD_ENTRY *thread_p, LC_OIDSET *oidset) |
void | locator_free_oid_set (THREAD_ENTRY *thread_p, LC_OIDSET *oidset) |
LC_OIDMAP * | locator_add_oid_set (THREAD_ENTRY *thread_p, LC_OIDSET *set, HFID *heap, OID *class_oid, OID *obj_oid) |
int | locator_get_packed_oid_set_size (LC_OIDSET *oidset) |
char * | locator_pack_oid_set (char *buffer, LC_OIDSET *oidset) |
bool | locator_unpack_oid_set_to_exist (char *buffer, LC_OIDSET *use) |
LC_OIDSET * | locator_unpack_oid_set_to_new (THREAD_ENTRY *thread_p, char *buffer) |
bool | locator_manyobj_flag_is_set (LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf) |
void | locator_manyobj_flag_remove (LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf) |
void | locator_manyobj_flag_set (LC_COPYAREA_MANYOBJS *copyarea, enum MULTI_UPDATE_FLAG muf) |
Variables | |
static int | rv |
static LOCATOR_GLOBAL | locator_Keep |
static LC_COPYAREA | packed_req_area_ptrs [LOCATOR_NKEEP_LIMIT] |
static bool | locator_Is_initialized = false |
#define LOCATOR_CACHED_COPYAREA_SIZE_LIMIT (IO_MAX_PAGE_SIZE * 2 + sizeof (LC_COPYAREA)) |
Definition at line 60 of file locator.c.
Referenced by locator_free_copy_area().
#define LOCATOR_NKEEP_LIMIT (2) |
Definition at line 57 of file locator.c.
Referenced by locator_free_copy_area(), locator_free_lockhint(), locator_free_lockset(), locator_free_packed(), and locator_initialize_areas().
#define pthread_mutex_destroy | ( | a | ) |
Definition at line 48 of file locator.c.
Referenced by locator_free_areas().
#define pthread_mutex_init | ( | a, | |
b | |||
) |
Definition at line 47 of file locator.c.
Referenced by locator_initialize_areas().
#define pthread_mutex_lock | ( | a | ) | 0 |
Definition at line 49 of file locator.c.
Referenced by locator_allocate_copy_area_by_length(), locator_allocate_lockhint(), locator_allocate_lockset(), locator_allocate_packed(), locator_free_copy_area(), locator_free_lockhint(), locator_free_lockset(), and locator_free_packed().
#define pthread_mutex_unlock | ( | a | ) |
Definition at line 50 of file locator.c.
Referenced by locator_allocate_copy_area_by_length(), locator_allocate_lockhint(), locator_allocate_lockset(), locator_allocate_packed(), locator_free_copy_area(), locator_free_lockhint(), locator_free_lockset(), and locator_free_packed().
typedef struct locator_global LOCATOR_GLOBAL |
LC_OIDMAP* locator_add_oid_set | ( | THREAD_ENTRY * | thread_p, |
LC_OIDSET * | set, | ||
HFID * | heap, | ||
OID * | class_oid, | ||
OID * | obj_oid | ||
) |
Definition at line 2255 of file locator.c.
References ARG_FILE_LINE, lc_class_oidset::class_oid, lc_oidmap::client_data, db_private_alloc, db_private_free_and_init, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), lc_oidmap::est_size, lc_class_oidset::hfid, lc_class_oidset::is_list, locator_is_hfid_equal(), lc_oidmap::mop, lc_oidmap::next, lc_class_oidset::next, NULL, lc_class_oidset::num_oids, lc_oidmap::oid, OID_EQ, lc_class_oidset::oids, and thread_get_thread_entry_info().
Referenced by locator_add_oidset_object().
LC_LOCKHINT* locator_allocate_and_unpack_lockhint | ( | char * | unpacked, |
int | unpacked_size, | ||
bool | unpack_classes, | ||
bool | reg_unpacked | ||
) |
Definition at line 1876 of file locator.c.
References locator_allocate_lockhint(), locator_unpack_lockhint(), NULL, or_unpack_int(), lc_lock_hint::packed, and lc_lock_hint::packed_size.
Referenced by locator_find_lockhint_class_oids(), and slocator_fetch_lockhint_classes().
LC_LOCKSET* locator_allocate_and_unpack_lockset | ( | char * | unpacked, |
int | unpacked_size, | ||
bool | unpack_classes, | ||
bool | unpack_objects, | ||
bool | reg_unpacked | ||
) |
Definition at line 1302 of file locator.c.
References locator_allocate_lockset(), locator_unpack_lockset(), NULL, NULL_LOCK, or_unpack_int(), lc_lock_set::packed, and lc_lock_set::packed_size.
Referenced by locator_fetch_all_reference_lockset(), and slocator_fetch_lockset().
LC_COPYAREA* locator_allocate_copy_area_by_length | ( | int | min_length | ) |
Definition at line 407 of file locator.c.
References locator_global::locator_global_copyareas::areas, ARG_FILE_LINE, locator_global::copy_areas, DB_ALIGN, db_network_page_size(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, lc_copy_area::length, lc_copy_area::mem, MEM_REGION_SCRAMBLE, NULL, locator_global::locator_global_copyareas::number, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_allocate_copy_area_by_attr_info(), locator_force(), locator_free_packed(), locator_mflush_reallocate_copy_area(), locator_reallocate_copy_area_by_length(), locator_recv_allocate_copyarea(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockhint_classes(), xlocator_fetch_lockset(), xlocator_lock_and_fetch_all(), and xlocator_notify_isolation_incons().
LC_LOCKHINT* locator_allocate_lockhint | ( | int | max_classes, |
bool | quit_on_errors | ||
) |
Definition at line 1629 of file locator.c.
References locator_global::locator_global_lockhint_areas::areas, lc_lock_hint::classes, i, lc_lock_hint::length, locator_initialize_lockhint(), locator_global::lockhint_areas, MEM_REGION_SCRAMBLE, NO_ERROR, NULL, locator_global::locator_global_lockhint_areas::number, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_allocate_and_unpack_lockhint(), and xlocator_find_lockhint_class_oids().
LC_LOCKSET* locator_allocate_lockset | ( | int | max_reqobjs, |
LOCK | reqobj_inst_lock, | ||
LOCK | reqobj_class_lock, | ||
int | quit_on_errors | ||
) |
Definition at line 955 of file locator.c.
References locator_global::locator_global_lockset_areas::areas, lc_lock_set::classes, i, lc_lock_set::length, locator_initialize_lockset(), locator_global::lockset_areas, MEM_REGION_SCRAMBLE, NO_ERROR, NULL, locator_global::locator_global_lockset_areas::number, lc_lock_set::objects, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_all_reference_lockset(), locator_allocate_and_unpack_lockset(), locator_initialize_lockset(), and locator_lock_set().
|
static |
Definition at line 276 of file locator.c.
References locator_global::locator_global_packed_areas::areas, i, lc_copy_area::length, lc_copy_area::mem, MEM_REGION_SCRAMBLE, NULL, locator_global::locator_global_packed_areas::number, locator_global::packed_areas, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_pack_lockhint(), and locator_pack_lockset().
void locator_clear_oid_set | ( | THREAD_ENTRY * | thread_p, |
LC_OIDSET * | oidset | ||
) |
Definition at line 2153 of file locator.c.
References lc_oidset::classes, lc_oidmap::client_data, db_private_free_and_init, lc_class_oidset::is_list, lc_oidset::is_list, lc_oidmap::mop, lc_oidmap::next, lc_class_oidset::next, NULL, lc_oidset::num_classes, lc_lockhint_class::oid, lc_class_oidset::oids, thread_get_thread_entry_info(), and lc_oidset::total_oids.
Referenced by ldr_assign_all_perm_oids(), locator_add_to_oidset_when_temp_oid(), and locator_free_oid_set().
void locator_free_areas | ( | void | ) |
Definition at line 206 of file locator.c.
References locator_global::locator_global_copyareas::areas, locator_global::locator_global_lockset_areas::areas, locator_global::locator_global_lockhint_areas::areas, locator_global::locator_global_packed_areas::areas, locator_global::copy_areas, free_and_init, i, locator_Is_initialized, locator_global::lockhint_areas, locator_global::lockset_areas, lc_copy_area::mem, locator_global::locator_global_copyareas::number, locator_global::locator_global_lockset_areas::number, locator_global::locator_global_lockhint_areas::number, locator_global::locator_global_packed_areas::number, lc_lock_set::packed, lc_lock_hint::packed, locator_global::packed_areas, and pthread_mutex_destroy.
Referenced by boot_client_all_finalize(), boot_initialize_client(), boot_restart_client(), and boot_server_all_finalize().
void locator_free_copy_area | ( | LC_COPYAREA * | copyarea | ) |
Definition at line 534 of file locator.c.
References locator_global::locator_global_copyareas::areas, locator_global::copy_areas, free_and_init, lc_copy_area::length, LOCATOR_CACHED_COPYAREA_SIZE_LIMIT, LOCATOR_NKEEP_LIMIT, lc_copy_area::mem, MEM_REGION_SCRAMBLE, locator_global::locator_global_copyareas::number, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_allocate_copy_area_by_attr_info(), locator_attribute_info_force(), locator_force(), locator_fun_get_all_mops(), locator_get_rest_objects_classes(), locator_insert_force(), locator_lock(), locator_lock_and_doesexist(), locator_lock_class_of_instance(), locator_lock_nested(), locator_lockhint_classes(), locator_mflush_end(), locator_mflush_reallocate_copy_area(), locator_mvcc_reev_cond_assigns(), locator_reallocate_copy_area_by_length(), locator_recv_allocate_copyarea(), locator_repl_mflush_force(), locator_synch_isolation_incons(), locator_update_force(), net_client_request_recv_copyarea(), process_class(), qexec_execute_delete(), qexec_execute_update(), qexec_oid_of_duplicate_key_update(), qexec_remove_duplicates_for_replace(), slocator_does_exist(), slocator_fetch(), slocator_fetch_all(), slocator_fetch_all_reference_lockset(), slocator_fetch_lockhint_classes(), slocator_fetch_lockset(), slocator_find_lockhint_class_oids(), slocator_force(), slocator_get_class(), slocator_notify_isolation_incons(), slocator_repl_force(), xlocator_fetch(), xlocator_fetch_all(), xlocator_fetch_lockhint_classes(), xlocator_fetch_lockset(), xlocator_lock_and_fetch_all(), xlocator_notify_isolation_incons(), and xlocator_upgrade_instances_domain().
void locator_free_lockhint | ( | LC_LOCKHINT * | lockhint | ) |
Definition at line 1765 of file locator.c.
References locator_global::locator_global_lockhint_areas::areas, lc_lockhint_class::chn, lc_lock_hint::classes, free_and_init, i, lc_lock_hint::length, locator_free_packed(), LOCATOR_NKEEP_LIMIT, lc_lockhint_class::lock, LOCK_TO_LOCKMODE_STRING, locator_global::lockhint_areas, lc_lock_hint::max_classes, lc_lock_hint::mem, MEM_REGION_SCRAMBLE, lc_lockhint_class::need_subclasses, NULL, lc_lock_hint::num_classes, lc_lock_hint::num_classes_processed, locator_global::locator_global_lockhint_areas::number, lc_lockhint_class::oid, lc_lock_hint::packed, lc_lock_hint::packed_size, db_identifier::pageid, pthread_mutex_lock, pthread_mutex_unlock, rv, db_identifier::slotid, and db_identifier::volid.
Referenced by locator_lockhint_classes(), slocator_fetch_lockhint_classes(), slocator_find_lockhint_class_oids(), and xlocator_find_lockhint_class_oids().
void locator_free_lockset | ( | LC_LOCKSET * | lockset | ) |
Definition at line 1140 of file locator.c.
References locator_global::locator_global_lockset_areas::areas, lc_lockset_reqobj::chn, lc_lockset_classof::chn, lc_lockset_reqobj::class_index, lc_lock_set::classes, free_and_init, i, lc_lock_set::last_classof_reqobjs_cached, lc_lock_set::last_reqobj_cached, lc_lock_set::length, locator_free_packed(), LOCATOR_NKEEP_LIMIT, LOCK_TO_LOCKMODE_STRING, locator_global::lockset_areas, lc_lock_set::mem, MEM_REGION_SCRAMBLE, NULL, lc_lock_set::num_classes_of_reqobjs, lc_lock_set::num_classes_of_reqobjs_processed, lc_lock_set::num_reqobjs, lc_lock_set::num_reqobjs_processed, locator_global::locator_global_lockset_areas::number, lc_lock_set::objects, lc_lockset_reqobj::oid, lc_lockset_classof::oid, lc_lock_set::packed, lc_lock_set::packed_size, db_identifier::pageid, pthread_mutex_lock, pthread_mutex_unlock, lc_lock_set::quit_on_errors, lc_lock_set::reqobj_class_lock, lc_lock_set::reqobj_inst_lock, rv, db_identifier::slotid, and db_identifier::volid.
Referenced by locator_all_reference_lockset(), locator_lock_nested(), locator_lock_set(), slocator_fetch_all_reference_lockset(), and slocator_fetch_lockset().
void locator_free_oid_set | ( | THREAD_ENTRY * | thread_p, |
LC_OIDSET * | oidset | ||
) |
Definition at line 2227 of file locator.c.
References db_private_free_and_init, locator_clear_oid_set(), and NULL.
Referenced by col_permanent_oids(), ldr_assign_all_perm_oids(), locator_assign_all_permanent_oids(), locator_unpack_oid_set_to_new(), slocator_assign_oid_batch(), and tf_free_fixup().
|
static |
Definition at line 348 of file locator.c.
References locator_global::locator_global_packed_areas::areas, free_and_init, IO_PAGESIZE, lc_copy_area::length, locator_allocate_copy_area_by_length(), LOCATOR_NKEEP_LIMIT, lc_copy_area::mem, MEM_REGION_SCRAMBLE, locator_global::locator_global_packed_areas::number, locator_global::packed_areas, pthread_mutex_lock, pthread_mutex_unlock, and rv.
Referenced by locator_free_lockhint(), and locator_free_lockset().
int locator_get_packed_oid_set_size | ( | LC_OIDSET * | oidset | ) |
Definition at line 2363 of file locator.c.
References lc_oidset::classes, cubregex::count(), lc_class_oidset::next, NULL, lc_oidset::num_classes, lc_class_oidset::num_oids, OR_HFID_SIZE, OR_INT_SIZE, and OR_OID_SIZE.
Referenced by locator_assign_oid_batch().
void locator_initialize_areas | ( | void | ) |
Definition at line 166 of file locator.c.
References locator_global::locator_global_copyareas::areas, locator_global::locator_global_lockset_areas::areas, locator_global::locator_global_lockhint_areas::areas, locator_global::locator_global_packed_areas::areas, locator_global::copy_areas, i, locator_Is_initialized, LOCATOR_NKEEP_LIMIT, locator_global::lockhint_areas, locator_global::lockset_areas, NULL, locator_global::locator_global_copyareas::number, locator_global::locator_global_lockset_areas::number, locator_global::locator_global_lockhint_areas::number, locator_global::locator_global_packed_areas::number, locator_global::packed_areas, and pthread_mutex_init.
Referenced by boot_initialize_client(), boot_restart_client(), and boot_restart_server().
|
static |
Definition at line 1697 of file locator.c.
References lc_lock_hint::classes, ER_FAILED, lc_lock_hint::first_fetch_lockhint_call, lc_lock_hint::length, lc_lock_hint::max_classes, lc_lock_hint::mem, NO_ERROR, NULL, lc_lock_hint::num_classes, lc_lock_hint::num_classes_processed, lc_lock_hint::packed, lc_lock_hint::packed_size, and lc_lock_hint::quit_on_errors.
Referenced by locator_allocate_lockhint().
|
static |
Definition at line 1027 of file locator.c.
References lc_lock_set::classes, ER_FAILED, lc_lock_set::first_fetch_lockset_call, lc_lock_set::last_classof_reqobjs_cached, lc_lock_set::last_reqobj_cached, lc_lock_set::length, locator_allocate_lockset(), lc_lock_set::max_reqobjs, lc_lock_set::mem, NO_ERROR, NULL, NULL_LOCK, lc_lock_set::num_classes_of_reqobjs, lc_lock_set::num_classes_of_reqobjs_processed, lc_lock_set::num_reqobjs, lc_lock_set::num_reqobjs_processed, lc_lock_set::objects, lc_lock_set::packed, lc_lock_set::packed_size, lc_lock_set::quit_on_errors, lc_lock_set::reqobj_class_lock, and lc_lock_set::reqobj_inst_lock.
Referenced by locator_allocate_lockset().
Definition at line 152 of file locator.c.
References vfid::fileid, hfid::hpgid, hfid::vfid, and vfid::volid.
Referenced by locator_add_oid_set().
LC_OIDSET* locator_make_oid_set | ( | void | ) |
Definition at line 2116 of file locator.c.
References db_private_alloc, and NULL.
Referenced by col_permanent_oids(), ldr_assign_all_perm_oids(), locator_assign_all_permanent_oids(), and tf_add_fixup().
bool locator_manyobj_flag_is_set | ( | LC_COPYAREA_MANYOBJS * | copyarea, |
enum MULTI_UPDATE_FLAG | muf | ||
) |
Definition at line 2597 of file locator.c.
References lc_copyarea_manyobjs::multi_update_flags.
Referenced by locator_force(), locator_force_for_multi_update(), locator_manyobj_flag_remove(), and xlocator_force().
void locator_manyobj_flag_remove | ( | LC_COPYAREA_MANYOBJS * | copyarea, |
enum MULTI_UPDATE_FLAG | muf | ||
) |
Definition at line 2603 of file locator.c.
References assert, locator_manyobj_flag_is_set(), and lc_copyarea_manyobjs::multi_update_flags.
Referenced by locator_force().
void locator_manyobj_flag_set | ( | LC_COPYAREA_MANYOBJS * | copyarea, |
enum MULTI_UPDATE_FLAG | muf | ||
) |
Definition at line 2610 of file locator.c.
References lc_copyarea_manyobjs::multi_update_flags.
Referenced by locator_flush_for_multi_update().
char* locator_pack_copy_area_descriptor | ( | int | num_objs, |
LC_COPYAREA * | copyarea, | ||
char * | desc, | ||
int | desc_len | ||
) |
Definition at line 577 of file locator.c.
References assert, CAST_BUFLEN, i, LC_MANYOBJS_PTR_IN_COPYAREA, LC_NEXT_ONEOBJ_PTR_IN_COPYAREA, LC_START_ONEOBJ_PTR_IN_COPYAREA, or_pack_hfid(), or_pack_int(), and or_pack_oid().
Referenced by locator_send_copy_area(), and slocator_force().
int locator_pack_lockhint | ( | LC_LOCKHINT * | lockhint, |
bool | pack_classes | ||
) |
Definition at line 1970 of file locator.c.
References CAST_BUFLEN, LC_LOCKHINT_PACKED_SIZE, locator_allocate_packed(), locator_pack_lockhint_classes(), locator_pack_lockhint_header(), locator_reallocate_packed(), NULL, lc_lock_hint::packed, and lc_lock_hint::packed_size.
Referenced by locator_fetch_lockhint_classes(), slocator_fetch_lockhint_classes(), and slocator_find_lockhint_class_oids().
|
static |
Definition at line 1937 of file locator.c.
References lc_lockhint_class::chn, lc_lock_hint::classes, i, lc_lockhint_class::lock, lc_lockhint_class::need_subclasses, lc_lockhint_class::oid, or_pack_int(), or_pack_lock(), and or_pack_oid().
Referenced by locator_pack_lockhint().
|
static |
Definition at line 1916 of file locator.c.
References lc_lock_hint::max_classes, lc_lock_hint::num_classes, lc_lock_hint::num_classes_processed, or_pack_int(), and lc_lock_hint::quit_on_errors.
Referenced by locator_pack_lockhint().
int locator_pack_lockset | ( | LC_LOCKSET * | lockset, |
bool | pack_classes, | ||
bool | pack_objects | ||
) |
Definition at line 1429 of file locator.c.
References CAST_BUFLEN, LC_LOCKSET_PACKED_SIZE, locator_allocate_packed(), locator_pack_lockset_classes(), locator_pack_lockset_header(), locator_pack_lockset_objects(), locator_reallocate_packed(), NULL, lc_lock_set::packed, and lc_lock_set::packed_size.
Referenced by locator_fetch_lockset(), slocator_fetch_all_reference_lockset(), and slocator_fetch_lockset().
|
static |
Definition at line 1371 of file locator.c.
References lc_lockset_classof::chn, lc_lock_set::classes, i, lc_lockset_classof::oid, or_pack_int(), and or_pack_oid().
Referenced by locator_pack_lockset().
|
static |
Definition at line 1345 of file locator.c.
References lc_lock_set::first_fetch_lockset_call, lc_lock_set::max_reqobjs, lc_lock_set::num_classes_of_reqobjs, lc_lock_set::num_classes_of_reqobjs_processed, lc_lock_set::num_reqobjs, lc_lock_set::num_reqobjs_processed, or_pack_int(), lc_lock_set::quit_on_errors, lc_lock_set::reqobj_class_lock, and lc_lock_set::reqobj_inst_lock.
Referenced by locator_pack_lockset().
|
static |
Definition at line 1396 of file locator.c.
References lc_lockset_reqobj::chn, lc_lockset_reqobj::class_index, i, lc_lock_set::objects, lc_lockset_reqobj::oid, or_pack_int(), and or_pack_oid().
Referenced by locator_pack_lockset().
char* locator_pack_oid_set | ( | char * | buffer, |
LC_OIDSET * | oidset | ||
) |
Definition at line 2400 of file locator.c.
References lc_class_oidset::class_oid, lc_oidset::classes, lc_oidmap::est_size, lc_class_oidset::hfid, lc_oidmap::next, lc_class_oidset::next, NULL, lc_oidset::num_classes, lc_class_oidset::num_oids, lc_lockhint_class::oid, lc_oidmap::oid, lc_class_oidset::oids, or_pack_hfid(), or_pack_int(), and or_pack_oid().
Referenced by locator_assign_oid_batch(), and slocator_assign_oid_batch().
LC_COPYAREA* locator_reallocate_copy_area_by_length | ( | LC_COPYAREA * | old_area, |
int | new_length | ||
) |
Definition at line 467 of file locator.c.
References i, LC_COPY_ONEOBJ, LC_FIND_ONEOBJ_PTR_IN_COPYAREA, LC_MANYOBJS_PTR_IN_COPYAREA, lc_copyarea_oneobj::length, locator_allocate_copy_area_by_length(), locator_free_copy_area(), lc_copy_area::mem, lc_copyarea_manyobjs::multi_update_flags, NULL, lc_copyarea_manyobjs::num_objs, and lc_copyarea_oneobj::offset.
Referenced by locator_repl_add_error_to_copyarea().
LC_LOCKHINT* locator_reallocate_lockhint | ( | LC_LOCKHINT * | lockhint, |
int | max_classes | ||
) |
Definition at line 1731 of file locator.c.
References lc_lock_hint::classes, lc_lock_hint::length, lc_lock_hint::max_classes, lc_lock_hint::mem, and NULL.
Referenced by locator_guess_sub_classes().
LC_LOCKSET* locator_reallocate_lockset | ( | LC_LOCKSET * | lockset, |
int | max_reqobjs | ||
) |
Definition at line 1091 of file locator.c.
References lc_lock_set::classes, lc_lock_set::length, lc_lock_set::max_reqobjs, lc_lock_set::mem, NULL, lc_lock_set::num_reqobjs, and lc_lock_set::objects.
Referenced by locator_all_reference_lockset().
|
static |
Definition at line 332 of file locator.c.
Referenced by locator_pack_lockhint(), and locator_pack_lockset().
LC_COPYAREA* locator_recv_allocate_copyarea | ( | int | num_objs, |
char ** | packed_desc, | ||
int | packed_desc_length, | ||
char ** | contents_ptr, | ||
int | contents_length | ||
) |
Definition at line 755 of file locator.c.
References vfid::fileid, lc_copyarea_oneobj::hfid, hfid::hpgid, i, LC_FETCH, LC_FETCH_DECACHE_LOCK, LC_FETCH_DELETED, LC_FETCH_VERIFY_CHN, LC_FLUSH_DELETE, LC_FLUSH_INSERT, LC_FLUSH_INSERT_PRUNE, LC_FLUSH_UPDATE, LC_FLUSH_UPDATE_PRUNE, LC_MANYOBJS_PTR_IN_COPYAREA, lc_copyarea_oneobj::length, lc_copy_area::length, locator_allocate_copy_area_by_length(), locator_free_copy_area(), lc_copy_area::mem, NULL, lc_copyarea_manyobjs::num_objs, lc_copyarea_manyobjs::objs, lc_copyarea_oneobj::offset, lc_copyarea_oneobj::oid, lc_copyarea_oneobj::operation, db_identifier::pageid, db_identifier::slotid, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by locator_send_copy_area(), net_client_recv_copyarea(), net_client_request_2recv_copyarea(), net_client_request_3_data_recv_copyarea(), net_client_request_3recv_copyarea(), net_client_request_recv_copyarea(), slocator_force(), and slocator_repl_force().
int locator_send_copy_area | ( | LC_COPYAREA * | copyarea, |
char ** | contents_ptr, | ||
int * | contents_length, | ||
char ** | desc_ptr, | ||
int * | desc_length | ||
) |
Definition at line 664 of file locator.c.
References assert, CAST_BUFLEN, DB_ALIGN, i, LC_AREA_ONEOBJ_PACKED_SIZE, LC_MANYOBJS_PTR_IN_COPYAREA, lc_copyarea_oneobj::length, locator_pack_copy_area_descriptor(), locator_recv_allocate_copyarea(), MAX_ALIGNMENT, lc_copy_area::mem, NULL, lc_copyarea_manyobjs::num_objs, lc_copyarea_manyobjs::objs, and lc_copyarea_oneobj::offset.
Referenced by locator_force(), locator_repl_force(), slocator_does_exist(), slocator_fetch(), slocator_fetch_all(), slocator_fetch_all_reference_lockset(), slocator_fetch_lockhint_classes(), slocator_fetch_lockset(), slocator_find_lockhint_class_oids(), slocator_get_class(), slocator_notify_isolation_incons(), and slocator_repl_force().
char* locator_unpack_copy_area_descriptor | ( | int | num_objs, |
LC_COPYAREA * | copyarea, | ||
char * | desc | ||
) |
Definition at line 619 of file locator.c.
References i, LC_MANYOBJS_PTR_IN_COPYAREA, LC_NEXT_ONEOBJ_PTR_IN_COPYAREA, LC_START_ONEOBJ_PTR_IN_COPYAREA, lc_copyarea_manyobjs::num_objs, or_unpack_hfid(), or_unpack_int(), and or_unpack_oid().
Referenced by locator_force(), net_client_recv_copyarea(), net_client_request_2recv_copyarea(), net_client_request_3_data_recv_copyarea(), net_client_request_3recv_copyarea(), net_client_request_recv_copyarea(), slocator_force(), and slocator_repl_force().
int locator_unpack_lockhint | ( | LC_LOCKHINT * | lockhint, |
bool | unpack_classes | ||
) |
Definition at line 2083 of file locator.c.
References CAST_BUFLEN, locator_unpack_lockhint_classes(), locator_unpack_lockhint_header(), and lc_lock_hint::packed.
Referenced by locator_allocate_and_unpack_lockhint(), and locator_fetch_lockhint_classes().
|
static |
Definition at line 2056 of file locator.c.
References lc_lockhint_class::chn, lc_lock_hint::classes, i, lc_lockhint_class::lock, lc_lockhint_class::need_subclasses, lc_lockhint_class::oid, or_unpack_int(), or_unpack_lock(), and or_unpack_oid().
Referenced by locator_unpack_lockhint().
|
static |
Definition at line 2035 of file locator.c.
References lc_lock_hint::max_classes, lc_lock_hint::num_classes, lc_lock_hint::num_classes_processed, or_unpack_int(), and lc_lock_hint::quit_on_errors.
Referenced by locator_unpack_lockhint().
int locator_unpack_lockset | ( | LC_LOCKSET * | lockset, |
bool | unpack_classes, | ||
bool | unpack_objects | ||
) |
Definition at line 1588 of file locator.c.
References CAST_BUFLEN, locator_unpack_lockset_classes(), locator_unpack_lockset_header(), locator_unpack_lockset_objects(), and lc_lock_set::packed.
Referenced by locator_allocate_and_unpack_lockset(), and locator_fetch_lockset().
|
static |
Definition at line 1536 of file locator.c.
References lc_lockset_classof::chn, lc_lock_set::classes, i, lc_lockset_classof::oid, or_unpack_int(), and or_unpack_oid().
Referenced by locator_unpack_lockset().
|
static |
Definition at line 1507 of file locator.c.
References lc_lock_set::first_fetch_lockset_call, lc_lock_set::max_reqobjs, lc_lock_set::num_classes_of_reqobjs, lc_lock_set::num_classes_of_reqobjs_processed, lc_lock_set::num_reqobjs, lc_lock_set::num_reqobjs_processed, or_unpack_int(), lc_lock_set::quit_on_errors, lc_lock_set::reqobj_class_lock, and lc_lock_set::reqobj_inst_lock.
Referenced by locator_unpack_lockset().
|
static |
Definition at line 1561 of file locator.c.
References lc_lockset_reqobj::chn, lc_lockset_reqobj::class_index, i, lc_lock_set::objects, lc_lockset_reqobj::oid, or_unpack_int(), and or_unpack_oid().
Referenced by locator_unpack_lockset().
Definition at line 2445 of file locator.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), lc_oidmap::next, lc_class_oidset::next, NULL, lc_class_oidset::num_oids, lc_lockhint_class::oid, lc_oidmap::oid, lc_class_oidset::oids, OR_HFID_SIZE, OR_INT_SIZE, OR_OID_SIZE, or_unpack_int(), and or_unpack_oid().
Referenced by locator_assign_oid_batch().
LC_OIDSET* locator_unpack_oid_set_to_new | ( | THREAD_ENTRY * | thread_p, |
char * | buffer | ||
) |
Definition at line 2499 of file locator.c.
References lc_class_oidset::class_oid, lc_oidmap::client_data, db_private_alloc, lc_oidmap::est_size, lc_class_oidset::hfid, lc_class_oidset::is_list, locator_free_oid_set(), lc_oidmap::mop, lc_oidmap::next, lc_class_oidset::next, NULL, lc_class_oidset::num_oids, lc_lockhint_class::oid, lc_oidmap::oid, lc_class_oidset::oids, or_unpack_hfid(), or_unpack_int(), or_unpack_oid(), and thread_get_thread_entry_info().
Referenced by slocator_assign_oid_batch().
|
static |
Definition at line 107 of file locator.c.
Referenced by locator_free_areas(), and locator_initialize_areas().
|
static |
|
static |
|
static |
Definition at line 51 of file locator.c.
Referenced by locator_allocate_copy_area_by_length(), locator_allocate_lockhint(), locator_allocate_lockset(), locator_allocate_packed(), locator_free_copy_area(), locator_free_lockhint(), locator_free_lockset(), and locator_free_packed().