CUBRID Engine
latest
|
#include "config.h"
#include "error_manager.h"
#include "log_manager.h"
#include "memory_alloc.h"
#include "statistics.h"
#include "disk_manager.h"
#include "storage_common.h"
Go to the source code of this file.
Classes | |
struct | ctid |
struct | disk_representation |
struct | disk_attribute |
struct | cls_info |
struct | catalog_access_info |
Macros | |
#define | CATALOG_DIR_REPR_KEY -2 |
#define | CATALOG_ACCESS_INFO_INITIALIZER {NULL, NULL, NULL, false, false, false, false, false} |
#define | CLS_INFO_INITIALIZER { HFID_INITIALIZER, 0, 0, 0, { NULL_PAGEID, NULL_SLOTID, NULL_VOLID } } |
#define | catalog_free_class_info_and_init(class_info_p) |
#define | catalog_free_representation_and_init(repr_p) |
Typedefs | |
typedef struct ctid | CTID |
typedef struct disk_representation | DISK_REPR |
typedef struct disk_attribute | DISK_ATTR |
typedef struct cls_info | CLS_INFO |
typedef struct catalog_access_info | CATALOG_ACCESS_INFO |
Variables | |
CTID | catalog_Id |
Definition at line 122 of file system_catalog.h.
Referenced by catalog_add_class_info(), catalog_add_representation(), catalog_drop(), catalog_drop_all_representation_and_class(), catalog_drop_old_representations(), catalog_get_cardinality(), catalog_get_class_info(), catalog_get_representation(), catalog_update_class_info(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
#define CATALOG_DIR_REPR_KEY -2 |
Definition at line 42 of file system_catalog.h.
Referenced by catalog_drop_all_representation_and_class(), and catalog_get_dir_oid_from_cache().
#define catalog_free_class_info_and_init | ( | class_info_p | ) |
Definition at line 132 of file system_catalog.h.
Referenced by catalog_dump(), catalog_get_cardinality(), catcls_delete_catalog_classes(), catcls_delete_subset(), catcls_insert_catalog_classes(), catcls_insert_subset(), catcls_update_catalog_classes(), catcls_update_subset(), stats_update_partitioned_statistics(), xcache_check_recompilation_threshold(), xlocator_assign_oid_batch(), xstats_get_statistics_from_server(), and xstats_update_statistics().
#define catalog_free_representation_and_init | ( | repr_p | ) |
Definition at line 143 of file system_catalog.h.
Referenced by catalog_dump(), catalog_get_cardinality(), catalog_get_representation(), catalog_update(), catcls_find_btid_of_class_name(), catcls_get_or_value_from_record(), catcls_put_or_value_into_record(), catcls_reorder_attributes_by_repr(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
#define CLS_INFO_INITIALIZER { HFID_INITIALIZER, 0, 0, 0, { NULL_PAGEID, NULL_SLOTID, NULL_VOLID } } |
Definition at line 129 of file system_catalog.h.
Referenced by catalog_check_class_consistency(), catalog_get_rep_dir(), and catalog_get_representation().
typedef struct catalog_access_info CATALOG_ACCESS_INFO |
Definition at line 106 of file system_catalog.h.
Definition at line 96 of file system_catalog.h.
Definition at line 44 of file system_catalog.h.
typedef struct disk_attribute DISK_ATTR |
Definition at line 81 of file system_catalog.h.
typedef struct disk_representation DISK_REPR |
Definition at line 64 of file system_catalog.h.
int catalog_add_class_info | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid_p, | ||
CLS_INFO * | class_info_p, | ||
CATALOG_ACCESS_INFO * | catalog_access_info_p | ||
) |
Definition at line 2985 of file system_catalog.c.
References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, CATALOG_ACCESS_INFO_INITIALIZER, CATALOG_CLS_INFO_RESERVED, CATALOG_CLS_INFO_SIZE, catalog_end_access_with_dir_oid(), catalog_find_optimal_page(), catalog_get_dir_oid_from_cache(), catalog_put_class_info_to_record(), catalog_put_representation_item(), CATALOG_REPR_ITEM_INITIALIZER, catalog_start_access_with_dir_oid(), catalog_update_max_space(), cls_info::ci_rep_dir, catalog_access_info::class_oid, recdes::data, DB_PAGESIZE, catalog_access_info::dir_oid, ER_CT_INVALID_CLASSID, ER_ERROR_SEVERITY, ER_FAILED, er_set(), FREE, recdes::length, log_append_undoredo_recdes2(), NO_ERROR, NULL, NULL_REPRID, OID_ISNULL, OID_ISTEMP, OID_SET_NULL, catalog_repr_item::page_id, db_identifier::pageid, pgbuf_set_dirty(), pgbuf_unfix_and_init, REC_HOME, recdes_allocate_data_area(), recdes_free_data_area(), catalog_repr_item::repr_id, RVCT_INSERT, catalog_repr_item::slot_id, db_identifier::slotid, SP_SUCCESS, spage_insert(), spage_max_space_for_new_record(), success(), ctid::vfid, db_identifier::volid, and X_LOCK.
Referenced by catalog_get_representation(), catalog_insert(), stats_update_partitioned_statistics(), and xstats_update_statistics().
int catalog_add_representation | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id, | ||
REPR_ID | repr_id, | ||
DISK_REPR * | Disk_Repr, | ||
OID * | rep_dir_p, | ||
CATALOG_ACCESS_INFO * | catalog_access_info_p | ||
) |
Definition at line 2771 of file system_catalog.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, disk_attribute::bt_stats, BTREE_STATS_PKEYS_NUM, CATALOG_ACCESS_INFO_INITIALIZER, CATALOG_DISK_REPR_SIZE, catalog_end_access_with_dir_oid(), catalog_find_optimal_page(), catalog_get_dir_oid_from_cache(), CATALOG_MAX_SLOT_ID_SIZE, catalog_put_record_into_page(), catalog_put_representation_item(), CATALOG_REPR_ITEM_INITIALIZER, catalog_start_access_with_dir_oid(), catalog_store_attribute_value(), catalog_store_btree_statistics(), catalog_store_disk_attribute(), catalog_store_disk_representation(), catalog_sum_disk_attribute_size(), catalog_update_max_space(), catalog_access_info::class_oid, recdes::data, DB_PAGESIZE, db_private_alloc, db_private_free_and_init, catalog_access_info::dir_oid, ER_CT_INVALID_CLASSID, ER_CT_INVALID_REPRID, ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), disk_representation::fixed, i, recdes::length, disk_attribute::n_btstats, disk_representation::n_fixed, disk_representation::n_variable, NO_ERROR, NULL, NULL_REPRID, NULL_SLOTID, catalog_record::offset, OID_ISNULL, OID_ISTEMP, catalog_repr_item::page_id, catalog_record::page_p, vpid::pageid, db_identifier::pageid, pgbuf_unfix_and_init, btree_stats::pkeys_size, REC_HOME, catalog_record::recdes, catalog_repr_item::repr_id, catalog_repr_item::slot_id, catalog_record::slotid, db_identifier::slotid, spage_max_space_for_new_record(), recdes::type, disk_attribute::val_length, disk_attribute::value, disk_representation::variable, vpid::volid, db_identifier::volid, catalog_record::vpid, and X_LOCK.
Referenced by catalog_insert(), catalog_update(), stats_update_partitioned_statistics(), xcatalog_check_rep_dir(), and xstats_update_statistics().
DISK_ISVALID catalog_check_consistency | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4671 of file system_catalog.c.
References ARG_FILE_LINE, assert, boot_find_root_heap(), catalog_check_class_consistency(), DISK_ERROR, DISK_VALID, er_log_debug, heap_next(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, LK_COND_LOCK, LK_GRANTED, lock_object(), lock_unlock_object(), logtb_get_mvcc_snapshot(), NO_ERROR, NULL, NULL_PAGEID, NULL_SLOTID, OID_AS_ARGS, oid_Root_class_oid, or_class_name(), db_identifier::pageid, PEEK, RECDES_INITIALIZER, S_SUCCESS, SCH_S_LOCK, db_identifier::slotid, strlen, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by xboot_check_db_consistency().
CTID* catalog_create | ( | THREAD_ENTRY * | thread_p, |
CTID * | catid | ||
) |
Definition at line 2586 of file system_catalog.c.
References ASSERT_ERROR, assert_release, catalog_initialize_max_space(), catalog_initialize_new_page(), catalog_is_header_initialized, catalog_update_max_space(), DB_TYPE_OBJECT, error(), file_alloc_sticky_first_page(), FILE_CATALOG, file_create_with_npages(), ctid::hpgid, log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_start(), NO_ERROR, NULL, oid_Root_class_oid, PAGE_CATALOG, vpid::pageid, pgbuf_check_page_ptype(), pgbuf_get_vpid(), pgbuf_unfix_and_init, spage_max_space_for_new_record(), spage_number_of_records(), ctid::vfid, vpid::volid, vfid::volid, xehash_create(), and ctid::xhid.
Referenced by boot_create_all_volumes().
int catalog_delete | ( | THREAD_ENTRY * | thread_p, |
OID * | classoid | ||
) |
Definition at line 4530 of file system_catalog.c.
References assert, catalog_drop_all_representation_and_class(), er_errid(), and NO_ERROR.
Referenced by locator_delete_force_internal().
int catalog_destroy | ( | void | ) |
int catalog_drop_old_representations | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id | ||
) |
Definition at line 3493 of file system_catalog.c.
References ARG_FILE_LINE, assert, CATALOG_ACCESS_INFO_INITIALIZER, catalog_delete_key(), catalog_drop_representation_class_from_page(), catalog_end_access_with_dir_oid(), catalog_get_dir_oid_from_cache(), catalog_get_repr_item_from_record(), CATALOG_GET_REPR_ITEM_PAGEID_PAGEID, CATALOG_GET_REPR_ITEM_PAGEID_VOLID, CATALOG_GET_REPR_ITEM_REPRID, CATALOG_GET_REPR_ITEM_SLOTID, catalog_get_representation_record_after_search(), catalog_put_repr_item_to_record(), CATALOG_REPR_ITEM_COUNT_OFF, CATALOG_REPR_ITEM_SIZE, catalog_start_access_with_dir_oid(), catalog_update_max_space(), catalog_access_info::class_oid, COPY, recdes::data, DB_PAGESIZE, catalog_access_info::dir_oid, ER_CT_INVALID_CLASSID, ER_ERROR_SEVERITY, ER_FAILED, er_set(), FREE, i, recdes::length, log_append_redo_recdes2(), log_append_undo_recdes2(), NO_ERROR, NULL, NULL_PAGEID, NULL_REPRID, NULL_SLOTID, OID_ISTEMP, OID_SET_NULL, OR_PUT_BYTE, catalog_repr_item::page_id, vpid::pageid, db_identifier::pageid, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_unfix_and_init, recdes_allocate_data_area(), recdes_free_data_area(), catalog_repr_item::repr_id, RVCT_UPDATE, catalog_repr_item::slot_id, db_identifier::slotid, SP_SUCCESS, spage_max_space_for_new_record(), spage_update(), ctid::vfid, vpid::volid, db_identifier::volid, VPID_SET_NULL, and X_LOCK.
Referenced by boot_compact_db(), and process_class().
void catalog_dump | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp, | ||
int | dump_flg | ||
) |
Definition at line 4972 of file system_catalog.c.
References assert, ASSERT_ERROR, boot_find_root_heap(), catalog_dump_representation(), catalog_file_map_overflow_count(), catalog_file_map_page_dump(), catalog_free_class_info_and_init, catalog_free_representation_and_init, catalog_get_class_info(), catalog_get_representation(), catalog_get_representation_directory(), cls_info::ci_hfid, cls_info::ci_rep_dir, cls_info::ci_tot_objects, cls_info::ci_tot_pages, file_get_num_user_pages(), file_map_pages(), vfid::fileid, catalog_page_dump_context::fp, free_and_init, heap_classrepr_dump_all(), heap_next(), heap_scancache_end(), heap_scancache_start(), HFID_IS_NULL, hfid::hpgid, logtb_get_mvcc_snapshot(), NO_ERROR, NULL, NULL_PAGEID, NULL_REPRID, NULL_SLOTID, oid_Root_class_oid, or_class_name(), catalog_page_dump_context::page_index, db_identifier::pageid, PEEK, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, RECDES_INITIALIZER, S_SUCCESS, db_identifier::slotid, strlen, ctid::vfid, hfid::vfid, vfid::volid, and db_identifier::volid.
Referenced by diagdb().
int catalog_end_access_with_dir_oid | ( | THREAD_ENTRY * | thread_p, |
CATALOG_ACCESS_INFO * | catalog_access_info, | ||
int | error | ||
) |
Definition at line 5905 of file system_catalog.c.
References catalog_access_info::access_started, assert, BO_IS_SERVER_RESTARTED, catalog_access_info::class_name, catalog_access_info::class_oid, catalog_access_info::dir_oid, free_and_init, catalog_access_info::is_systemop_started, catalog_access_info::is_update, lock_get_object_lock(), lock_unlock_object_donot_move_to_non2pl(), log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_commit(), catalog_access_info::need_free_class_name, catalog_access_info::need_unlock, NO_ERROR, NULL, OID_GET_VIRTUAL_CLASS_OF_DIR_OID, oid_Root_class_oid, S_LOCK, SCH_M_LOCK, and X_LOCK.
Referenced by catalog_add_class_info(), catalog_add_representation(), catalog_drop(), catalog_drop_all_representation_and_class(), catalog_drop_old_representations(), catalog_get_cardinality(), catalog_get_class_info(), catalog_get_representation(), catalog_start_access_with_dir_oid(), catalog_update_class_info(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
void catalog_finalize | ( | void | ) |
Definition at line 2567 of file system_catalog.c.
References cubthread::lockfree_hashmap< Key, T >::destroy().
Referenced by boot_server_all_finalize().
void catalog_free_class_info | ( | CLS_INFO * | class_info_p | ) |
Definition at line 882 of file system_catalog.c.
References db_private_free_and_init, and NULL.
Referenced by catalog_update().
void catalog_free_representation | ( | DISK_REPR * | repr_p | ) |
Definition at line 829 of file system_catalog.c.
References disk_attribute::bt_stats, db_private_free_and_init, disk_representation::fixed, disk_attribute::n_btstats, disk_representation::n_fixed, disk_representation::n_variable, NULL, btree_stats::pkeys, disk_attribute::value, and disk_representation::variable.
int catalog_get_cardinality | ( | THREAD_ENTRY * | thread_p, |
OID * | class_oid, | ||
DISK_REPR * | rep, | ||
BTID * | btid, | ||
const int | key_pos, | ||
int * | cardinality | ||
) |
Definition at line 5267 of file system_catalog.c.
References ARG_FILE_LINE, assert, assert_release, disk_attribute::bt_stats, btree_stats::btid, BTID_IS_EQUAL, BTREE_STATS_PKEYS_NUM, CATALOG_ACCESS_INFO_INITIALIZER, catalog_end_access_with_dir_oid(), catalog_free_class_info_and_init, catalog_free_representation_and_init, catalog_get_class_info(), catalog_get_dir_oid_from_cache(), catalog_get_last_representation_id(), catalog_get_representation(), catalog_start_access_with_dir_oid(), catalog_access_info::class_oid, cubregex::count(), db_private_free, DB_TYPE_MIDXKEY, catalog_access_info::dir_oid, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_FUNCTION_ARG_ERROR, er_set(), ER_UNEXPECTED, ER_WARNING_SEVERITY, error(), disk_representation::fixed, heap_classrepr_free_and_init, heap_classrepr_get(), i, disk_attribute::id, btree_stats::key_type, btree_stats::keys, NO_ERROR, NULL, NULL_REPRID, partition_get_partition_oids(), btree_stats::pkeys_size, S_LOCK, tp_domain::setdomain, stats_find_inherited_index_stats(), tp_domain_size(), TP_DOMAIN_TYPE, and disk_representation::variable.
Referenced by catalog_get_cardinality_by_name(), and qexec_execute_build_indexes().
int catalog_get_cardinality_by_name | ( | THREAD_ENTRY * | thread_p, |
const char * | class_name, | ||
const char * | index_name, | ||
const int | key_pos, | ||
int * | cardinality | ||
) |
Definition at line 5589 of file system_catalog.c.
References ARG_FILE_LINE, assert, BTID_IS_NULL, BTID_SET_NULL, catalog_get_cardinality(), DB_MAX_IDENTIFIER_LENGTH, ER_FAILED, ER_LC_UNKNOWN_CLASSNAME, ER_OBJ_INDEX_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, error(), heap_get_btid_from_index_name(), intl_identifier_lower(), LC_CLASSNAME_DELETED, LC_CLASSNAME_ERROR, LK_GRANTED, LK_UNCOND_LOCK, lock_object(), NO_ERROR, NULL, NULL_LOCK, OID_ISNULL, oid_Root_class_oid, SCH_S_LOCK, and xlocator_find_class_oid().
Referenced by qdata_get_cardinality().
CLS_INFO* catalog_get_class_info | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id, | ||
CATALOG_ACCESS_INFO * | catalog_access_info_p | ||
) |
Definition at line 4089 of file system_catalog.c.
References ARG_FILE_LINE, assert, CATALOG_ACCESS_INFO_INITIALIZER, CATALOG_CLS_INFO_SIZE, catalog_end_access_with_dir_oid(), catalog_get_class_info_from_record(), catalog_get_dir_oid_from_cache(), catalog_get_representation_item(), CATALOG_REPR_ITEM_INITIALIZER, catalog_start_access_with_dir_oid(), cls_info::ci_rep_dir, catalog_access_info::class_oid, COPY, recdes::data, db_private_alloc, catalog_access_info::dir_oid, er_errid(), ER_FAILED, er_log_debug, ER_SP_UNKNOWN_SLOTID, MAX_ALIGNMENT, NO_ERROR, NULL, NULL_REPRID, OID_ISNULL, OLD_PAGE, PAGE_CATALOG, catalog_repr_item::page_id, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, PTR_ALIGN, REC_HOME, recdes_set_data_area(), catalog_repr_item::repr_id, S_LOCK, S_SUCCESS, catalog_repr_item::slot_id, and spage_get_record().
Referenced by catalog_dump(), catalog_get_cardinality(), catalog_update(), catcls_delete_catalog_classes(), catcls_delete_subset(), catcls_insert_catalog_classes(), catcls_insert_subset(), catcls_update_catalog_classes(), catcls_update_subset(), stats_update_partitioned_statistics(), xcache_check_recompilation_threshold(), xlocator_assign_oid_batch(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int catalog_get_dir_oid_from_cache | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_id_p, | ||
OID * | dir_oid_p | ||
) |
Definition at line 5715 of file system_catalog.c.
References assert, CATALOG_DIR_REPR_KEY, er_errid(), ER_FAILED, error(), cubthread::lockfree_hashmap< Key, T >::find(), cubthread::lockfree_hashmap< Key, T >::find_or_insert(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), catalog_entry::key, NO_ERROR, NULL, OID_ISNULL, OID_SET_NULL, or_class_rep_dir(), catalog_key::page_id, vpid::pageid, db_identifier::pageid, PEEK, catalog_key::r_page_id, catalog_key::r_slot_id, REC_HOME, catalog_key::repr_id, S_SUCCESS, catalog_key::slot_id, db_identifier::slotid, cubthread::lockfree_hashmap< Key, T >::unlock(), catalog_key::volid, vpid::volid, and db_identifier::volid.
Referenced by catalog_add_class_info(), catalog_add_representation(), catalog_drop(), catalog_drop_all_representation_and_class(), catalog_drop_old_representations(), catalog_get_cardinality(), catalog_get_class_info(), catalog_get_representation(), catalog_update_class_info(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int catalog_get_last_representation_id | ( | THREAD_ENTRY * | thread_p, |
OID * | cls_oid, | ||
REPR_ID * | repr_id | ||
) |
Definition at line 4295 of file system_catalog.c.
References assert, CATALOG_GET_REPR_ITEM_REPRID, catalog_get_representation_record_after_search(), CATALOG_REPR_ITEM_SIZE, recdes::data, er_errid(), i, NO_ERROR, NULL, NULL_REPRID, OID_SET_NULL, PEEK, PGBUF_LATCH_READ, and pgbuf_unfix_and_init.
Referenced by catalog_get_cardinality(), catalog_update(), catcls_find_btid_of_class_name(), catcls_get_or_value_from_record(), catcls_put_or_value_into_record(), catcls_reorder_attributes_by_repr(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
DISK_REPR* catalog_get_representation | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id, | ||
REPR_ID | repr_id, | ||
CATALOG_ACCESS_INFO * | catalog_access_info_p | ||
) |
Definition at line 3847 of file system_catalog.c.
References ARG_FILE_LINE, assert, disk_attribute::bt_stats, CATALOG_ACCESS_INFO_INITIALIZER, catalog_add_class_info(), catalog_assign_attribute(), catalog_end_access_with_dir_oid(), catalog_fetch_disk_representation(), catalog_free_representation_and_init, catalog_get_dir_oid_from_cache(), catalog_get_representation_item(), catalog_start_access_with_dir_oid(), cls_info::ci_hfid, cls_info::ci_rep_dir, catalog_access_info::class_oid, CLS_INFO_INITIALIZER, db_private_alloc, catalog_access_info::dir_oid, ER_CT_INVALID_REPRID, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_SP_UNKNOWN_SLOTID, error(), disk_representation::fixed, heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, recdes::length, disk_attribute::n_btstats, disk_representation::n_fixed, disk_representation::n_variable, NO_ERROR, NULL, NULL_CHN, NULL_PAGEID, NULL_REPRID, NULL_SLOTID, NULL_VOLID, catalog_record::offset, OID_ISNULL, or_class_hfid(), or_class_rep_dir(), catalog_repr_item::page_id, catalog_record::page_p, vpid::pageid, PEEK, pgbuf_unfix_and_init, catalog_record::recdes, catalog_repr_item::repr_id, S_LOCK, S_SUCCESS, catalog_repr_item::slot_id, catalog_record::slotid, disk_attribute::value, disk_representation::variable, vpid::volid, and catalog_record::vpid.
Referenced by catalog_dump(), catalog_get_cardinality(), catalog_update(), catcls_find_btid_of_class_name(), catcls_get_or_value_from_record(), catcls_put_or_value_into_record(), catcls_reorder_attributes_by_repr(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int catalog_get_representation_directory | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id, | ||
REPR_ID ** | reprid_set, | ||
int * | repr_cnt | ||
) |
Definition at line 4231 of file system_catalog.c.
References ARG_FILE_LINE, assert, CATALOG_GET_REPR_ITEM_REPRID, catalog_get_representation_record_after_search(), CATALOG_REPR_ITEM_SIZE, recdes::data, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, NO_ERROR, NULL, NULL_REPRID, OID_SET_NULL, PEEK, PGBUF_LATCH_READ, and pgbuf_unfix_and_init.
Referenced by catalog_dump().
void catalog_initialize | ( | CTID * | catid | ) |
Definition at line 2537 of file system_catalog.c.
References CATALOG_HASH_SIZE, catalog_initialize_max_space(), catalog_is_header_initialized, catalog_Max_record_size, CATALOG_MAX_SLOT_ID_SIZE, CATALOG_PAGE_HEADER_SIZE, catalog_Ts, cubthread::lockfree_hashmap< Key, T >::destroy(), vfid::fileid, ctid::hpgid, cubthread::lockfree_hashmap< Key, T >::init(), ehid::pageid, spage_max_record_size(), THREAD_TS_CATALOG, ctid::vfid, VFID_COPY, vfid::volid, and ctid::xhid.
Referenced by boot_create_all_volumes(), boot_restart_server(), and xboot_emergency_patch().
int catalog_insert | ( | THREAD_ENTRY * | thread_p, |
RECDES * | record, | ||
OID * | classoid, | ||
OID * | rep_dir_p | ||
) |
Definition at line 4341 of file system_catalog.c.
References ARG_FILE_LINE, assert, catalog_add_class_info(), catalog_add_representation(), cls_info::ci_rep_dir, COPY_OID, ER_CT_INVALID_REPRID, er_errid(), ER_ERROR_SEVERITY, er_set(), NO_ERROR, NULL, NULL_REPRID, OID_ISNULL, or_rep_id(), orc_class_info_from_record(), orc_diskrep_from_record(), orc_free_class_info(), and orc_free_diskrep().
Referenced by locator_insert_force(), and locator_update_force().
int catalog_reclaim_space | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 2681 of file system_catalog.c.
References ARG_FILE_LINE, ASSERT_ERROR, assert_release, catalog_initialize_max_space(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), FILE_CATALOG, file_dealloc(), file_get_num_user_pages(), file_map_pages(), NO_ERROR, NULL, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, and ctid::vfid.
Referenced by compactdb_start().
int catalog_rv_delete_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5239 of file system_catalog.c.
References catalog_clear_hash_table(), DONT_FREE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, and spage_delete().
int catalog_rv_delete_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5654 of file system_catalog.c.
References catalog_clear_hash_table(), and catalog_rv_insert_redo().
int catalog_rv_insert_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5185 of file system_catalog.c.
References recdes::area_size, ARG_FILE_LINE, assert, catalog_clear_hash_table(), log_rcv::data, DONT_FREE, er_errid(), ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), log_rcv::length, recdes::length, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, recdes_set_data_area(), SP_ERROR, SP_SUCCESS, spage_insert_for_recovery(), success(), and recdes::type.
Referenced by catalog_rv_delete_undo().
int catalog_rv_insert_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5220 of file system_catalog.c.
References catalog_clear_hash_table(), DONT_FREE, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, and spage_delete_for_recovery().
int catalog_rv_new_page_redo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5146 of file system_catalog.c.
References ANCHORED_DONT_REUSE_SLOTS, ARG_FILE_LINE, assert, catalog_clear_hash_table(), CATALOG_HEADER_SLOT, CATALOG_PAGE_HEADER_SIZE, catalog_put_page_header(), log_rcv::data, recdes::data, DONT_FREE, er_errid(), ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), MAX_ALIGNMENT, NO_ERROR, NULL, PAGE_CATALOG, pgbuf_set_dirty(), pgbuf_set_page_ptype(), log_rcv::pgptr, PTR_ALIGN, REC_HOME, recdes_set_data_area(), SAFEGUARD_RVSPACE, SP_SUCCESS, spage_initialize(), spage_insert(), and success().
int catalog_rv_ovf_page_logical_insert_undo | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5697 of file system_catalog.c.
References catalog_clear_hash_table(), log_rcv::data, FILE_CATALOG, file_dealloc(), and ctid::vfid.
int catalog_rv_update | ( | THREAD_ENTRY * | thread_p, |
LOG_RCV * | recv | ||
) |
Definition at line 5668 of file system_catalog.c.
References recdes::area_size, assert, catalog_clear_hash_table(), log_rcv::data, DONT_FREE, er_errid(), log_rcv::length, recdes::length, NO_ERROR, log_rcv::offset, pgbuf_set_dirty(), log_rcv::pgptr, recdes_set_data_area(), SP_SUCCESS, spage_update(), and recdes::type.
int catalog_start_access_with_dir_oid | ( | THREAD_ENTRY * | thread_p, |
CATALOG_ACCESS_INFO * | catalog_access_info, | ||
LOCK | lock_mode | ||
) |
Definition at line 5799 of file system_catalog.c.
References catalog_access_info::access_started, ARG_FILE_LINE, assert, BO_IS_SERVER_RESTARTED, catalog_end_access_with_dir_oid(), catalog_access_info::class_name, catalog_access_info::class_oid, catalog_access_info::dir_oid, er_clear(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_UPDATE_STAT_CANNOT_GET_LOCK, error(), heap_get_class_name(), catalog_access_info::is_systemop_started, catalog_access_info::is_update, LK_GRANTED, LK_NOTGRANTED_DUE_ABORTED, LK_NOTGRANTED_DUE_ERROR, LK_NOTGRANTED_DUE_TIMEOUT, LK_UNCOND_LOCK, lock_get_object_lock(), lock_object(), log_sysop_abort(), log_sysop_start(), catalog_access_info::need_free_class_name, catalog_access_info::need_unlock, NO_ERROR, NULL, NULL_LOCK, OID_GET_VIRTUAL_CLASS_OF_DIR_OID, OID_ISNULL, and X_LOCK.
Referenced by catalog_add_class_info(), catalog_add_representation(), catalog_drop(), catalog_drop_all_representation_and_class(), catalog_drop_old_representations(), catalog_get_cardinality(), catalog_get_class_info(), catalog_get_representation(), catalog_update_class_info(), qexec_execute_build_indexes(), stats_update_partitioned_statistics(), xstats_get_statistics_from_server(), and xstats_update_statistics().
int catalog_update | ( | THREAD_ENTRY * | thread_p, |
RECDES * | record, | ||
OID * | classoid | ||
) |
Definition at line 4418 of file system_catalog.c.
References ARG_FILE_LINE, assert, catalog_add_representation(), catalog_copy_disk_attributes(), catalog_drop(), catalog_free_class_info(), catalog_free_representation_and_init, catalog_get_class_info(), catalog_get_last_representation_id(), catalog_get_representation(), catalog_update_class_info(), cls_info::ci_hfid, cls_info::ci_rep_dir, ER_CT_INVALID_REPRID, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_UNKNOWN_SLOTID, err, disk_representation::fixed, HFID_IS_NULL, disk_representation::n_fixed, disk_representation::n_variable, NO_ERROR, NULL, NULL_REPRID, OID_EQ, OID_ISNULL, or_class_hfid(), or_class_rep_dir(), or_rep_id(), orc_diskrep_from_record(), orc_free_diskrep(), and disk_representation::variable.
Referenced by locator_update_force().
CLS_INFO* catalog_update_class_info | ( | THREAD_ENTRY * | thread_p, |
OID * | class_id, | ||
CLS_INFO * | cls_info, | ||
CATALOG_ACCESS_INFO * | catalog_access_info_p, | ||
bool | skip_logging | ||
) |
Definition at line 3128 of file system_catalog.c.
References ARG_FILE_LINE, assert, CATALOG_ACCESS_INFO_INITIALIZER, CATALOG_CLS_INFO_RESERVED, CATALOG_CLS_INFO_SIZE, catalog_end_access_with_dir_oid(), catalog_get_dir_oid_from_cache(), catalog_get_representation_item(), catalog_put_class_info_to_record(), CATALOG_REPR_ITEM_INITIALIZER, catalog_start_access_with_dir_oid(), cls_info::ci_rep_dir, catalog_access_info::class_oid, COPY, recdes::data, catalog_access_info::dir_oid, er_errid(), ER_FAILED, er_log_debug, ER_SP_UNKNOWN_SLOTID, FREE, log_append_redo_recdes2(), log_append_undo_recdes2(), log_skip_logging(), MAX_ALIGNMENT, NO_ERROR, NULL, NULL_REPRID, log_data_addr::offset, OID_ISNULL, OLD_PAGE, PAGE_CATALOG, catalog_repr_item::page_id, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, log_data_addr::pgptr, PTR_ALIGN, REC_HOME, recdes_set_data_area(), catalog_repr_item::repr_id, RVCT_UPDATE, S_SUCCESS, catalog_repr_item::slot_id, SP_SUCCESS, spage_get_record(), spage_update(), ctid::vfid, log_data_addr::vfid, and X_LOCK.
Referenced by catalog_update(), xcache_check_recompilation_threshold(), and xlocator_assign_oid_batch().
CTID catalog_Id |
Definition at line 260 of file system_catalog.c.