CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "db.h"
#include "load_object_table.h"
#include "memory_alloc.h"
#include "message_catalog.h"
#include "oid.h"
#include "porting.h"
#include "utility.h"
#include "work_space.h"
Go to the source code of this file.
Functions | |
CLASS_TABLE * | otable_find_class (MOP class_) |
static void | flush_class_tables () |
static void | init_instance_table (CLASS_TABLE *table) |
static int | realloc_instance_table (CLASS_TABLE *table, int newcount) |
static int | grow_instance_table (CLASS_TABLE *table, int id) |
INST_INFO * | otable_find (CLASS_TABLE *table, int id) |
int | otable_insert (CLASS_TABLE *table, OID *instance, int id) |
int | otable_reserve (CLASS_TABLE *table, OID *instance, int id) |
void | otable_class_att_ref (INST_INFO *inst) |
int | otable_update (CLASS_TABLE *table, int id) |
int | otable_map_reserved (OTABLE_MAPFUNC mapfunc, int stop_on_error) |
void | otable_set_presize (CLASS_TABLE *table, int id) |
int | otable_init (void) |
int | otable_prepare (void) |
void | otable_final (void) |
Variables | |
CLASS_TABLE * | Classes = NULL |
|
static |
Definition at line 84 of file load_object_table.c.
References free_and_init, class_table::instances, class_table::next, and NULL.
Referenced by otable_final().
|
static |
Definition at line 163 of file load_object_table.c.
References realloc_instance_table().
Referenced by otable_insert(), and otable_reserve().
|
static |
Definition at line 107 of file load_object_table.c.
References class_table::count, instance_info::flags, i, class_table::instances, instance_info::oid, and OID_SET_NULL.
Referenced by otable_prepare().
void otable_class_att_ref | ( | INST_INFO * | inst | ) |
Definition at line 272 of file load_object_table.c.
References instance_info::flags, and INST_FLAG_CLASS_ATT.
Referenced by find_instance().
void otable_final | ( | void | ) |
Definition at line 406 of file load_object_table.c.
References flush_class_tables().
Referenced by ldr_final().
INST_INFO* otable_find | ( | CLASS_TABLE * | table, |
int | id | ||
) |
Definition at line 175 of file load_object_table.c.
References class_table::count, instance_info::flags, class_table::instances, and NULL.
Referenced by find_instance(), insert_instance(), insert_meth_instance(), ldr_assign_all_perm_oids(), and ldr_reset_context().
CLASS_TABLE* otable_find_class | ( | MOP | class_ | ) |
Definition at line 49 of file load_object_table.c.
References ARG_FILE_LINE, class_table::class_, Classes, class_table::count, ER_ERROR_SEVERITY, ER_LDR_MEMORY_ERROR, er_set(), class_table::instances, class_table::next, NULL, class_table::presize, and class_table::total_inserts.
Referenced by find_instance(), and ldr_act_init_context().
int otable_init | ( | void | ) |
Definition at line 358 of file load_object_table.c.
References NO_ERROR, and NULL.
Referenced by ldr_init().
int otable_insert | ( | CLASS_TABLE * | table, |
OID * | instance, | ||
int | id | ||
) |
Definition at line 193 of file load_object_table.c.
References class_table::class_, class_table::count, db_get_class_name(), error(), instance_info::flags, grow_instance_table(), INST_FLAG_INSERTED, cubthread::instance, class_table::instances, LOADDB_MSG_REDEFINING_INSTANCE, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_LOADDB, NO_ERROR, and instance_info::oid.
Referenced by insert_instance(), and insert_meth_instance().
int otable_map_reserved | ( | OTABLE_MAPFUNC | mapfunc, |
int | stop_on_error | ||
) |
Definition at line 308 of file load_object_table.c.
References class_table::count, error(), instance_info::flags, i, INST_FLAG_RESERVED, class_table::instances, class_table::next, NO_ERROR, and NULL.
Referenced by update_default_instances_stats().
int otable_prepare | ( | void | ) |
Definition at line 382 of file load_object_table.c.
References error(), init_instance_table(), class_table::next, NO_ERROR, NULL, class_table::presize, and realloc_instance_table().
int otable_reserve | ( | CLASS_TABLE * | table, |
OID * | instance, | ||
int | id | ||
) |
Definition at line 228 of file load_object_table.c.
References class_table::class_, class_table::count, db_get_class_name(), error(), instance_info::flags, grow_instance_table(), INST_FLAG_INSERTED, INST_FLAG_RESERVED, cubthread::instance, class_table::instances, LOADDB_MSG_INSTANCE_DEFINED, LOADDB_MSG_INSTANCE_RESERVED, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_LOADDB, NO_ERROR, and instance_info::oid.
Referenced by find_instance().
void otable_set_presize | ( | CLASS_TABLE * | table, |
int | id | ||
) |
Definition at line 345 of file load_object_table.c.
References NULL, and class_table::presize.
int otable_update | ( | CLASS_TABLE * | table, |
int | id | ||
) |
Definition at line 289 of file load_object_table.c.
References class_table::count, instance_info::flags, INST_FLAG_INSERTED, class_table::instances, and NO_ERROR.
Referenced by insert_instance().
|
static |
Definition at line 125 of file load_object_table.c.
References ARG_FILE_LINE, class_table::count, er_errid(), ER_ERROR_SEVERITY, ER_LDR_MEMORY_ERROR, er_set(), instance_info::flags, i, class_table::instances, NO_ERROR, NULL, and OID_SET_NULL.
Referenced by grow_instance_table(), and otable_prepare().
CLASS_TABLE* Classes = NULL |
Definition at line 38 of file load_object_table.c.
Referenced by ldr_update_statistics(), and otable_find_class().