CUBRID Engine  latest
work_space.c File Reference
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "memory_alloc.h"
#include "area_alloc.h"
#include "message_catalog.h"
#include "memory_hash.h"
#include "error_manager.h"
#include "oid.h"
#include "work_space.h"
#include "schema_manager.h"
#include "authenticate.h"
#include "object_accessor.h"
#include "locator_cl.h"
#include "storage_common.h"
#include "system_parameter.h"
#include "set_object.h"
#include "virtual_object.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "class_object.h"
#include "environment_variable.h"
#include "db.h"
#include "transaction_cl.h"
#include "object_template.h"
#include "server_interface.h"
#include "view_transform.h"
#include "dbtype.h"

Go to the source code of this file.

Macros

#define OBJLIST_AREA_COUNT   4096
 

Functions

static MOP ws_make_mop (const OID *oid)
 
static void ws_free_mop (MOP op)
 
static void emergency_remove_dirty (MOP op)
 
static void ws_unlink_from_commit_mops_list (MOP op)
 
static int ws_map_dirty_internal (MAPFUNC function, void *args, bool classes_only)
 
static int add_class_object (MOP class_mop, MOP obj)
 
static void remove_class_object (MOP class_mop, MOP obj)
 
static int mark_instance_deleted (MOP op, void *args)
 
static void ws_clear_internal (bool clear_vmop_keys)
 
static void ws_print_oid (OID *oid)
 
static int ws_check_hash_link (int slot)
 
static void ws_insert_mop_on_hash_link (MOP mop, int slot)
 
static void ws_insert_mop_on_hash_link_with_position (MOP mop, int slot, MOP prev)
 
static void ws_examine_no_mop_has_cached_lock (void)
 
void ws_abort_transaction (void)
 
MOP ws_make_temp_mop (void)
 
void ws_free_temp_mop (MOP op)
 
MOP ws_mop_if_exists (OID *oid)
 
MOP ws_mop (const OID *oid, MOP class_mop)
 
DB_VALUEws_keys (MOP vid, unsigned int *flags)
 
MOP ws_vmop (MOP class_mop, int flags, DB_VALUE *keys)
 
bool ws_rehash_vmop (MOP mop, MOBJ classobj, DB_VALUE *newkey)
 
MOP ws_new_mop (OID *oid, MOP class_mop)
 
int ws_update_oid_and_class (MOP mop, OID *new_oid, OID *new_class_oid)
 
void ws_update_oid (MOP mop, OID *newoid)
 
void ws_disconnect_deleted_instances (MOP classop)
 
void ws_remove_resident_class (MOP classop)
 
void ws_cull_mops (void)
 
void ws_intern_instances (MOP class_mop)
 
void ws_release_instance (MOP mop)
 
void ws_release_user_instance (MOP mop)
 
void ws_dirty (MOP op)
 
void ws_clean (MOP op)
 
int ws_map_dirty (MAPFUNC function, void *args)
 
void ws_filter_dirty (void)
 
void ws_set_class (MOP inst, MOP class_mop)
 
int ws_map_class_dirty (MOP class_op, MAPFUNC function, void *args)
 
int ws_map_class (MOP class_op, MAPFUNC function, void *args)
 
void ws_mark_instances_deleted (MOP class_op)
 
void ws_add_classname (MOBJ classobj, MOP classmop, const char *cl_name)
 
void ws_drop_classname (MOBJ classobj)
 
MOP ws_find_class (const char *name)
 
int ws_init (void)
 
void ws_final (void)
 
void ws_clear (void)
 
bool ws_has_updated (void)
 
void ws_cache (MOBJ obj, MOP mop, MOP class_mop)
 
MOP ws_cache_with_oid (MOBJ obj, OID *oid, MOP class_mop)
 
void ws_decache (MOP mop)
 
void ws_decache_all_instances (MOP mop)
 
OIDws_identifier (MOP mop)
 
OIDws_identifier_with_check (MOP mop, const bool check_non_referable)
 
OIDws_oid (MOP mop)
 
MOP ws_class_mop (MOP mop)
 
int ws_chn (MOBJ obj)
 
LOCK ws_get_lock (MOP mop)
 
void ws_set_lock (MOP mop, LOCK lock)
 
int ws_pin (MOP mop, int pin)
 
void ws_pin_instance_and_class (MOP obj, int *opin, int *cpin)
 
void ws_restore_pin (MOP obj, int opin, int cpin)
 
void ws_mark_deleted (MOP mop)
 
int ws_find (MOP mop, MOBJ *obj)
 
int ws_mop_compare (MOP mop1, MOP mop2)
 
void ws_class_has_object_dependencies (MOP class_mop)
 
int ws_class_has_cached_objects (MOP class_mop)
 
void ws_clear_hints (MOP mop, bool leave_pinned)
 
void ws_clear_all_hints (bool retain_lock)
 
void ws_abort_mops (bool only_unpinned)
 
void ws_decache_allxlockmops_but_norealclasses (void)
 
char * ws_copy_string (const char *str)
 
void ws_free_string (const char *str)
 
void ws_dump (FILE *fpp)
 
int ws_has_dirty_objects (MOP op, int *isvirt)
 
int ws_hide_new_old_trigger_obj (MOP op)
 
void ws_unhide_new_old_trigger_obj (MOP op)
 
bool ws_need_flush (void)
 
int ws_area_init (void)
 
void ws_area_final (void)
 
void ws_list_append (DB_LIST **root, DB_LIST *element)
 
int ws_list_remove (DB_LIST **root, DB_LIST *element)
 
int ws_list_length (DB_LIST *list)
 
void ws_list_free (DB_LIST *list, LFREEER function)
 
int ws_list_total (DB_LIST *list, LTOTALER function)
 
DB_LISTws_list_copy (DB_LIST *src, LCOPIER copier, LFREEER freeer)
 
DB_LISTws_list_nconc (DB_LIST *list1, DB_LIST *list2)
 
DB_NAMELISTnlist_find (DB_NAMELIST *list, const char *name, NLSEARCHER fcn)
 
DB_NAMELISTnlist_remove (DB_NAMELIST **root, const char *name, NLSEARCHER fcn)
 
int nlist_add (DB_NAMELIST **list, const char *name, NLSEARCHER fcn, int *added_ptr)
 
int nlist_append (DB_NAMELIST **list, const char *name, NLSEARCHER fcn, int *added_ptr)
 
void nlist_free (DB_NAMELIST *list)
 
DB_NAMELISTnlist_copy (DB_NAMELIST *list)
 
DB_NAMELISTnlist_filter (DB_NAMELIST **root, const char *name, NLSEARCHER fcn)
 
int ml_find (DB_OBJLIST *list, MOP mop)
 
int ml_add (DB_OBJLIST **list, MOP mop, int *added_ptr)
 
int ml_append (DB_OBJLIST **list, MOP mop, int *added_ptr)
 
int ml_remove (DB_OBJLIST **list, MOP mop)
 
void ml_free (DB_OBJLIST *list)
 
DB_OBJLISTml_copy (DB_OBJLIST *list)
 
int ml_size (DB_OBJLIST *list)
 
DB_OBJLISTml_ext_alloc_link (void)
 
void ml_ext_free_link (DB_OBJLIST *link)
 
void ml_ext_free (DB_OBJLIST *list)
 
DB_OBJLISTml_ext_copy (DB_OBJLIST *list)
 
int ml_ext_add (DB_OBJLIST **list, MOP mop, int *added_ptr)
 
int ws_set_ignore_error_list_for_mflush (int error_count, int *error_list)
 
void ws_set_repl_error_into_error_link (LC_COPYAREA_ONEOBJ *obj, char *content_ptr)
 
unsigned int ws_get_mvcc_snapshot_version (void)
 
void ws_increment_mvcc_snapshot_version (void)
 
bool ws_is_mop_fetched_with_current_snapshot (MOP mop)
 
void ws_set_mop_fetched_with_current_snapshot (MOP mop)
 
int ws_is_dirty (MOP mop)
 
int ws_is_deleted (MOP mop)
 
void ws_set_deleted (MOP mop)
 
bool ws_is_same_object (MOP mop1, MOP mop2)
 
WS_REPL_FLUSH_ERRws_get_repl_error_from_error_link (void)
 
void ws_clear_all_repl_errors_of_error_link (void)
 
void ws_free_repl_flush_error (WS_REPL_FLUSH_ERR *flush_err)
 
void ws_move_label_value_list (MOP dest_mop, MOP src_mop)
 
void ws_remove_label_value_from_mop (MOP mop, DB_VALUE *val)
 
int ws_add_label_value_to_mop (MOP mop, DB_VALUE *val)
 
void ws_clean_label_value_list (MOP mop)
 
void ws_init_repl_objs (void)
 
WS_REPL_OBJws_get_repl_obj_from_list (void)
 
void ws_free_repl_obj (WS_REPL_OBJ *obj)
 
void ws_clear_all_repl_objs (void)
 
int ws_add_to_repl_obj_list (OID *class_oid, char *packed_pkey_value, int packed_pkey_value_length, RECDES *recdes, int operation, bool has_index)
 

Variables

unsigned int db_on_server
 
MOP ws_Commit_mops = NULL
 
WS_MOP_TABLE_ENTRYws_Mop_table = NULL
 
unsigned int ws_Mop_table_size = 0
 
DB_OBJLISTws_Resident_classes = NULL
 
WS_STATISTICS ws_Stats = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
 
int ws_Num_dirty_mop = 0
 
static bool Ws_dirty
 
static MOP Null_object
 
static MHT_TABLEClassname_cache = NULL
 
static AREAObjlist_area = NULL
 
static unsigned int ws_MVCC_snapshot_version = 0
 
int ws_Error_ignore_list [-ER_LAST_ERROR]
 
int ws_Error_ignore_count = 0
 
static WS_REPL_FLUSH_ERRws_Repl_error_link = NULL
 
static WS_REPL_LIST ws_Repl_objs
 

Macro Definition Documentation

#define OBJLIST_AREA_COUNT   4096

Definition at line 163 of file work_space.c.

Referenced by ws_area_init().

Function Documentation

static void emergency_remove_dirty ( MOP  op)
static

Definition at line 1301 of file work_space.c.

References db_object::class_mop, db_object::dirty_link, and NULL.

Referenced by ws_cull_mops().

Here is the caller graph for this function:

static int mark_instance_deleted ( MOP  op,
void *  args 
)
static

Definition at line 2167 of file work_space.c.

References db_object::pinned, WS_MAP_CONTINUE, and WS_SET_DELETED.

Referenced by ws_mark_instances_deleted().

Here is the caller graph for this function:

int ml_add ( DB_OBJLIST **  list,
MOP  mop,
int *  added_ptr 
)
int ml_append ( DB_OBJLIST **  list,
MOP  mop,
int *  added_ptr 
)
DB_OBJLIST* ml_copy ( DB_OBJLIST list)

Definition at line 4671 of file work_space.c.

References db_ws_alloc(), ml_free(), db_objlist::next, NULL, and db_objlist::op.

Referenced by classobj_make_template(), flatten_template(), sm_delete_class_mop(), and tr_copy_schema_cache().

Here is the caller graph for this function:

DB_OBJLIST* ml_ext_alloc_link ( void  )

Definition at line 4777 of file work_space.c.

References area_alloc().

Referenced by db_get_all_chosen_classes(), ml_ext_copy(), sm_fetch_all_base_classes(), sm_fetch_all_classes(), sm_fetch_all_objects_internal(), and vid_getall_mops().

Here is the caller graph for this function:

DB_OBJLIST* ml_ext_copy ( DB_OBJLIST list)

Definition at line 4832 of file work_space.c.

References ml_ext_alloc_link(), ml_ext_free(), db_objlist::next, NULL, and db_objlist::op.

Referenced by get_schema_trigger_objects().

Here is the caller graph for this function:

void ml_ext_free_link ( DB_OBJLIST link)

Definition at line 4790 of file work_space.c.

References area_free(), NULL, and db_objlist::op.

Referenced by filter_system_classes(), filter_unrequired_classes(), and ml_ext_free().

Here is the caller graph for this function:

int ml_remove ( DB_OBJLIST **  list,
MOP  mop 
)
int ml_size ( DB_OBJLIST list)

Definition at line 4711 of file work_space.c.

References tr_schema_cache::next, db_objlist::next, NULL, db_objlist::op, and ws_list_length().

Referenced by classobj_class_size().

Here is the caller graph for this function:

int nlist_add ( DB_NAMELIST **  list,
const char *  name,
NLSEARCHER  fcn,
int *  added_ptr 
)

Definition at line 4147 of file work_space.c.

References assert, db_ws_alloc(), db_ws_free(), er_errid(), error(), db_namelist::name, db_namelist::next, nlist_find(), NO_ERROR, NULL, and ws_copy_string().

Referenced by db_namelist_add().

Here is the caller graph for this function:

DB_NAMELIST* nlist_copy ( DB_NAMELIST list)

Definition at line 4362 of file work_space.c.

References db_ws_alloc(), db_ws_free(), db_namelist::name, db_namelist::next, nlist_free(), NULL, and ws_copy_string().

Referenced by db_namelist_copy().

Here is the caller graph for this function:

DB_NAMELIST* nlist_filter ( DB_NAMELIST **  root,
const char *  name,
NLSEARCHER  fcn 
)

Definition at line 4410 of file work_space.c.

References db_namelist::name, tr_schema_cache::next, db_namelist::next, and NULL.

Referenced by prune_candidate().

Here is the caller graph for this function:

DB_NAMELIST* nlist_find ( DB_NAMELIST list,
const char *  name,
NLSEARCHER  fcn 
)

Definition at line 4066 of file work_space.c.

References db_namelist::name, db_namelist::next, and NULL.

Referenced by nlist_add().

Here is the caller graph for this function:

DB_NAMELIST* nlist_remove ( DB_NAMELIST **  root,
const char *  name,
NLSEARCHER  fcn 
)

Definition at line 4100 of file work_space.c.

References db_namelist::name, db_namelist::next, and NULL.

Referenced by db_namelist_remove().

Here is the caller graph for this function:

static void remove_class_object ( MOP  class_mop,
MOP  obj 
)
static

Definition at line 1951 of file work_space.c.

References db_object::class_link, db_object::class_mop, and NULL.

Referenced by ws_cache(), ws_cull_mops(), ws_decache(), ws_insert_mop_on_hash_link(), ws_mop(), and ws_update_oid_and_class().

Here is the caller graph for this function:

void ws_abort_transaction ( void  )

Definition at line 201 of file work_space.c.

References ARG_FILE_LINE, db_Disable_modifications, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), and tran_unilaterally_abort().

Referenced by area_create(), and ws_make_mop().

Here is the caller graph for this function:

void ws_add_classname ( MOBJ  classobj,
MOP  classmop,
const char *  cl_name 
)

Definition at line 2212 of file work_space.c.

References mht_get(), mht_put(), mht_rem(), NULL, and sm_ch_name().

Referenced by locator_prepare_rename_class(), and ws_cache().

Here is the caller graph for this function:

int ws_add_label_value_to_mop ( MOP  mop,
DB_VALUE val 
)

Definition at line 5237 of file work_space.c.

References assert, db_ws_alloc(), er_errid(), db_object::label_value_list, ws_value_list::next, NO_ERROR, NULL, and ws_value_list::val.

Referenced by pt_associate_label_with_value().

Here is the caller graph for this function:

int ws_add_to_repl_obj_list ( OID class_oid,
char *  packed_pkey_value,
int  packed_pkey_value_length,
RECDES recdes,
int  operation,
bool  has_index 
)
void ws_area_final ( void  )

Definition at line 3840 of file work_space.c.

References area_destroy(), and NULL.

Referenced by ws_init().

Here is the caller graph for this function:

int ws_area_init ( void  )

Definition at line 3823 of file work_space.c.

References area_create(), assert, er_errid(), NO_ERROR, NULL, and OBJLIST_AREA_COUNT.

Referenced by ws_init().

Here is the caller graph for this function:

MOP ws_cache_with_oid ( MOBJ  obj,
OID oid,
MOP  class_mop 
)

Definition at line 2675 of file work_space.c.

References NULL, ws_cache(), and ws_mop().

Referenced by locator_add_class(), and locator_add_instance().

Here is the caller graph for this function:

static int ws_check_hash_link ( int  slot)
static

Definition at line 366 of file work_space.c.

References assert, db_object::hash_link, ws_mop_table_entry::head, NO_ERROR, NULL, oid_compare(), p, ws_mop_table_entry::tail, and WS_OID.

Referenced by ws_cull_mops(), ws_mop(), ws_new_mop(), ws_rehash_vmop(), ws_update_oid(), and ws_vmop().

Here is the caller graph for this function:

int ws_class_has_cached_objects ( MOP  class_mop)

Definition at line 3180 of file work_space.c.

References db_object::class_link, db_object::hash_link, NULL, db_object::object, WS_MAP_CONTINUE, WS_MAP_FAIL, WS_MAP_SUCCESS, and ws_Mop_table_size.

Referenced by install_new_representation().

Here is the caller graph for this function:

void ws_class_has_object_dependencies ( MOP  class_mop)

Definition at line 3166 of file work_space.c.

References db_object::no_objects, and NULL.

Referenced by access_object(), construct_instance(), create_template_object(), find_shared_attribute(), ldr_reset_context(), obj_locate_attribute(), obj_set_att(), and ws_cache().

Here is the caller graph for this function:

void ws_clean ( MOP  op)

Definition at line 1681 of file work_space.c.

References db_object::pinned, ws_statistics::pinned_cleanings, and WS_RESET_DIRTY.

Referenced by locator_mflush(), vid_flush_instance(), and ws_decache().

Here is the caller graph for this function:

void ws_clean_label_value_list ( MOP  mop)

Definition at line 5301 of file work_space.c.

References db_ws_free(), db_object::label_value_list, ws_value_list::next, NULL, and ws_value_list::val.

Referenced by ws_free_mop().

Here is the caller graph for this function:

void ws_clear ( void  )

Definition at line 2526 of file work_space.c.

References ws_clear_internal().

Referenced by tran_abort(), tran_internal_abort_upto_savepoint(), and ws_final().

Here is the caller graph for this function:

void ws_clear_all_repl_errors_of_error_link ( void  )

Definition at line 5096 of file work_space.c.

References ws_repl_flush_err::error_link, tr_schema_cache::next, NULL, and ws_free_repl_flush_error().

Referenced by la_flush_repl_items(), and ws_final().

Here is the caller graph for this function:

void ws_clear_all_repl_objs ( void  )

Definition at line 5377 of file work_space.c.

References ws_repl_list::head, ws_repl_obj::next, NULL, ws_repl_list::num_items, ws_repl_list::tail, and ws_free_repl_obj().

Referenced by la_flush_repl_items(), and la_shutdown().

Here is the caller graph for this function:

static void ws_clear_internal ( bool  clear_vmop_keys)
static

Definition at line 2495 of file work_space.c.

References db_object::deleted, db_object::hash_link, db_object::is_vid, db_object::lock, NULL, NULL_LOCK, pr_clear_value(), ws_decache(), ws_filter_dirty(), ws_Mop_table_size, and WS_VID_INFO.

Referenced by ws_clear(), and ws_final().

Here is the caller graph for this function:

char* ws_copy_string ( const char *  str)

Definition at line 3457 of file work_space.c.

References db_ws_alloc(), NULL, and strlen.

Referenced by add_resolution(), au_get_user_name(), au_user_name(), classobj_cache_not_null_constraints(), classobj_copy_attribute(), classobj_copy_default_expr(), classobj_copy_methfile(), classobj_copy_method(), classobj_copy_method_signature(), classobj_copy_partition_info(), classobj_init_attribute(), classobj_init_method(), classobj_make_attribute(), classobj_make_class(), classobj_make_constraint(), classobj_make_method(), classobj_make_method_file(), classobj_make_method_signature(), classobj_make_query_spec(), classobj_make_resolution(), classobj_make_template(), db_get_database_comments(), db_get_database_name(), db_get_database_version(), disk_to_attribute(), disk_to_methsig(), do_add_attribute(), do_alter_change_col_comment(), do_change_att_schema_only(), flatten_template(), get_string(), make_component_from_candidate(), nlist_add(), nlist_append(), nlist_copy(), pt_associate_label_with_value(), pt_find_value_of_label(), pt_node_to_partition_info(), sm_build_function_nlist(), sm_expand_method_files(), sm_get_method_source_file(), sm_rename_class(), sm_set_class_comment(), sm_split_loader_commands(), smt_add_attribute_any(), smt_change_attribute(), smt_change_method_implementation(), smt_rename_any(), smt_rename_method_file(), smt_set_loader_commands(), tr_trigger_action(), tr_trigger_attribute(), tr_trigger_comment(), tr_trigger_condition(), tr_trigger_name(), and tran_add_savepoint().

void ws_decache_all_instances ( MOP  mop)

Definition at line 2765 of file work_space.c.

References db_object::class_link, db_object::class_mop, db_objlist::next, NULL, db_objlist::op, sm_Root_class_mop, and ws_decache().

Referenced by cubload::sa_object_loader::finish_line(), ws_cache(), and ws_decache().

Here is the caller graph for this function:

void ws_decache_allxlockmops_but_norealclasses ( void  )
void ws_drop_classname ( MOBJ  classobj)

Definition at line 2247 of file work_space.c.

References mht_rem(), NULL, and sm_ch_name().

Referenced by locator_prepare_rename_class(), ws_cache(), and ws_decache().

Here is the caller graph for this function:

static void ws_examine_no_mop_has_cached_lock ( void  )
static

Definition at line 5271 of file work_space.c.

References assert, db_object::class_link, db_object::hash_link, db_object::lock, db_objlist::next, NULL, NULL_LOCK, db_objlist::op, and ws_Mop_table_size.

Referenced by ws_abort_mops(), and ws_clear_all_hints().

Here is the caller graph for this function:

void ws_filter_dirty ( void  )
MOP ws_find_class ( const char *  name)

Definition at line 2278 of file work_space.c.

References mht_get().

Referenced by do_create_partition(), locator_add_class(), locator_find_class_by_name(), locator_lockhint_classes(), and locator_prepare_rename_class().

Here is the caller graph for this function:

static void ws_free_mop ( MOP  op)
static
void ws_free_repl_flush_error ( WS_REPL_FLUSH_ERR flush_err)

Definition at line 5115 of file work_space.c.

References assert, db_value_clear(), ws_repl_flush_err::error_msg, free_and_init, NULL, and ws_repl_flush_err::pkey_value.

Referenced by la_flush_repl_items(), and ws_clear_all_repl_errors_of_error_link().

Here is the caller graph for this function:

void ws_free_repl_obj ( WS_REPL_OBJ obj)

Definition at line 5361 of file work_space.c.

References assert, free_and_init, NULL, and ws_repl_obj::packed_pkey_value.

Referenced by locator_repl_mflush(), and ws_clear_all_repl_objs().

Here is the caller graph for this function:

void ws_free_temp_mop ( MOP  op)

Definition at line 356 of file work_space.c.

References db_object::is_temp, NULL, ws_statistics::temp_mops_freed, and ws_free_mop().

Referenced by free_temp_object().

Here is the caller graph for this function:

unsigned int ws_get_mvcc_snapshot_version ( void  )

Definition at line 4976 of file work_space.c.

References ws_MVCC_snapshot_version.

Referenced by sm_virtual_queries(), and ws_make_mop().

Here is the caller graph for this function:

WS_REPL_FLUSH_ERR* ws_get_repl_error_from_error_link ( void  )

Definition at line 5075 of file work_space.c.

References ws_repl_flush_err::error_link, NULL, and ws_Repl_error_link.

Referenced by la_flush_repl_items().

Here is the caller graph for this function:

WS_REPL_OBJ* ws_get_repl_obj_from_list ( void  )

Definition at line 5335 of file work_space.c.

References assert, ws_repl_list::head, ws_repl_obj::next, NULL, ws_repl_list::num_items, and ws_repl_list::tail.

Referenced by locator_repl_mflush().

Here is the caller graph for this function:

int ws_has_dirty_objects ( MOP  op,
int *  isvirt 
)

Definition at line 3752 of file work_space.c.

References class_type(), db_object::dirty_link, Null_object, db_object::object, SM_VCLASS_CT, and WS_IS_DELETED.

Referenced by pt_flush_classes(), and vid_allflush().

Here is the caller graph for this function:

bool ws_has_updated ( void  )

Definition at line 2536 of file work_space.c.

References Ws_dirty, and ws_filter_dirty().

Referenced by do_execute_select(), do_execute_session_statement(), pt_flush_class_and_null_xasl(), tran_has_updated(), and tran_is_active_and_has_updated().

Here is the caller graph for this function:

int ws_hide_new_old_trigger_obj ( MOP  op)

Definition at line 3765 of file work_space.c.

References db_object::dirty, db_object::is_temp, db_object::is_vid, db_object::pinned, and WS_RESET_DIRTY.

Referenced by pt_exec_trigger_stmt().

Here is the caller graph for this function:

OID* ws_identifier_with_check ( MOP  mop,
const bool  check_non_referable 
)
void ws_increment_mvcc_snapshot_version ( void  )

Definition at line 4987 of file work_space.c.

References ws_MVCC_snapshot_version.

Referenced by db_invalidate_mvcc_snapshot_before_statement(), tran_abort(), and tran_commit().

Here is the caller graph for this function:

void ws_init_repl_objs ( void  )

Definition at line 5323 of file work_space.c.

References ws_repl_list::head, NULL, ws_repl_list::num_items, and ws_repl_list::tail.

Referenced by la_init().

Here is the caller graph for this function:

static void ws_insert_mop_on_hash_link ( MOP  mop,
int  slot 
)
static

Definition at line 415 of file work_space.c.

References db_object::hash_link, ws_mop_table_entry::head, NULL, oid_compare(), p, remove_class_object(), ws_mop_table_entry::tail, ws_decache(), WS_ISVID, and WS_OID.

Referenced by ws_new_mop(), ws_rehash_vmop(), ws_update_oid(), and ws_vmop().

Here is the caller graph for this function:

static void ws_insert_mop_on_hash_link_with_position ( MOP  mop,
int  slot,
MOP  prev 
)
static

Definition at line 517 of file work_space.c.

References db_object::hash_link, ws_mop_table_entry::head, NULL, and ws_mop_table_entry::tail.

Referenced by ws_mop().

Here is the caller graph for this function:

void ws_intern_instances ( MOP  class_mop)

Definition at line 1548 of file work_space.c.

References DECACHE, locator_flush_all_instances(), NO_ERROR, ws_cull_mops(), and ws_filter_dirty().

Referenced by ldr_flush().

Here is the caller graph for this function:

int ws_is_deleted ( MOP  mop)

Definition at line 5037 of file work_space.c.

References db_object::deleted.

int ws_is_dirty ( MOP  mop)

Definition at line 5025 of file work_space.c.

References db_object::dirty.

bool ws_is_mop_fetched_with_current_snapshot ( MOP  mop)

Definition at line 5000 of file work_space.c.

References db_object::mvcc_snapshot_version, and ws_MVCC_snapshot_version.

Referenced by locator_can_skip_fetch_from_server().

Here is the caller graph for this function:

DB_VALUE* ws_keys ( MOP  vid,
unsigned int *  flags 
)

Definition at line 726 of file work_space.c.

References vid_info::flags, db_object::is_vid, vid_info::keys, NULL, and WS_VID_INFO.

Referenced by ws_free_mop().

Here is the caller graph for this function:

void ws_list_append ( DB_LIST **  root,
DB_LIST element 
)

Definition at line 3869 of file work_space.c.

References db_list::next, and NULL.

DB_LIST* ws_list_copy ( DB_LIST src,
LCOPIER  copier,
LFREEER  freeer 
)

Definition at line 3985 of file work_space.c.

References db_list::next, NULL, and ws_list_free().

Referenced by classobj_copy_method_signature(), and classobj_init_method().

Here is the caller graph for this function:

void ws_list_free ( DB_LIST list,
LFREEER  function 
)
int ws_list_length ( DB_LIST list)
DB_LIST* ws_list_nconc ( DB_LIST list1,
DB_LIST list2 
)

Definition at line 4028 of file work_space.c.

References db_list::next, and NULL.

int ws_list_remove ( DB_LIST **  root,
DB_LIST element 
)

Definition at line 3891 of file work_space.c.

References db_list::next, and NULL.

int ws_list_total ( DB_LIST list,
LTOTALER  function 
)

Definition at line 3964 of file work_space.c.

References db_list::next, and NULL.

Referenced by classobj_attribute_size(), classobj_class_size(), classobj_domain_size(), classobj_method_arg_size(), classobj_method_signature_size(), and classobj_method_size().

Here is the caller graph for this function:

MOP ws_make_temp_mop ( void  )

Definition at line 336 of file work_space.c.

References db_object::is_temp, NULL, ws_statistics::temp_mops_allocated, and ws_make_mop().

Referenced by make_temp_object().

Here is the caller graph for this function:

int ws_map_class_dirty ( MOP  class_op,
MAPFUNC  function,
void *  args 
)
int ws_map_dirty ( MAPFUNC  function,
void *  args 
)

Definition at line 1849 of file work_space.c.

References ws_map_dirty_internal().

Referenced by locator_all_flush(), locator_assign_all_permanent_oids(), locator_flush_class(), and locator_internal_flush_instance().

Here is the caller graph for this function:

static int ws_map_dirty_internal ( MAPFUNC  function,
void *  args,
bool  classes_only 
)
static
void ws_mark_deleted ( MOP  mop)

Definition at line 3081 of file work_space.c.

References db_object::pinned, ws_dirty(), and WS_SET_DELETED.

Referenced by locator_remove_class(), locator_remove_instance(), and vid_rem_instance().

Here is the caller graph for this function:

void ws_mark_instances_deleted ( MOP  class_op)

Definition at line 2192 of file work_space.c.

References mark_instance_deleted(), NULL, and ws_map_class().

Referenced by sm_delete_class_mop().

Here is the caller graph for this function:

MOP ws_mop ( const OID oid,
MOP  class_mop 
)

Definition at line 614 of file work_space.c.

References add_class_object(), ARG_FILE_LINE, assert, db_object::class_mop, ER_ERROR_SEVERITY, er_set(), ER_WS_CANT_INSTALL_NULL_OID, db_object::hash_link, NO_ERROR, NULL, oid_compare(), OID_ISNULL, OID_PSEUDO_KEY, remove_class_object(), sm_Root_class_mop, ws_mop_table_entry::tail, ws_check_hash_link(), ws_free_mop(), ws_insert_mop_on_hash_link_with_position(), ws_make_mop(), ws_Mop_table_size, and WS_OID.

Referenced by allocate_foreign_key(), btree_load_index(), classobj_copy_constraint_like(), cursor_fetch_oids(), db_get_foreign_key_ref_class(), db_object(), object_printer::describe_constraint(), disk_to_domain2(), do_on_duplicate_key_update(), do_replace_into(), drop_foreign_key_ref_internal(), emit_foreign_key(), find_unique(), is_class(), jsp_unpack_object_value(), la_flush_repl_items(), ldr_oid_elem(), ldr_reset_context(), locator_add_root(), locator_cache_have_object(), locator_cache_lock_lockhint_classes(), locator_cache_not_have_object(), locator_demote_class_lock(), locator_find_class_by_oid(), locator_lock_class_of_instance(), locator_lock_nested(), locator_lock_set(), locator_lockhint_classes(), locator_mflush_force(), locator_save_nested_mops(), locator_set_chn_classes_objects(), mr_data_readval_object(), mr_getmem_object(), obj_find_object_by_cons_and_key(), obj_find_object_by_pkey(), orp_oid_get_classname(), pt_make_regu_constant(), sch_exported_keys_or_cross_reference(), setof_mop_to_setof_vobj(), sm_drop_cascade_foreign_key(), sm_init(), sm_save_constraint_info(), smt_rename_any(), swizzle_value(), tp_domain_select(), tp_swizzle_oid(), unpack_domain(), unpack_domain_2(), vid_decode_object(), vid_oid_to_object(), ws_cache_with_oid(), ws_update_oid_and_class(), and ws_vmop().

int ws_mop_compare ( MOP  mop1,
MOP  mop2 
)

Definition at line 3144 of file work_space.c.

References oid_compare(), and WS_OID.

Referenced by locator_is_root(), sm_find_subclass_in_hierarchy(), tr_validate_schema_cache(), update_object_tuple(), and ws_print_oid().

Here is the caller graph for this function:

MOP ws_mop_if_exists ( OID oid)
void ws_move_label_value_list ( MOP  dest_mop,
MOP  src_mop 
)
bool ws_need_flush ( void  )

Definition at line 3813 of file work_space.c.

References ws_Num_dirty_mop.

Referenced by do_execute_insert(), do_execute_merge(), do_execute_select(), tran_flush_to_commit(), and tran_savepoint_internal().

Here is the caller graph for this function:

void ws_pin_instance_and_class ( MOP  obj,
int *  opin,
int *  cpin 
)

Definition at line 3020 of file work_space.c.

References db_object::class_mop, NULL, db_object::pinned, and sm_Root_class_mop.

Referenced by construct_instance(), ldr_reset_context(), obj_get_att(), and obj_set_att().

Here is the caller graph for this function:

void ws_release_instance ( MOP  mop)

Definition at line 1565 of file work_space.c.

References NULL, and db_object::released.

Referenced by insert_meth_instance(), ldr_reset_context(), and ws_release_user_instance().

Here is the caller graph for this function:

void ws_release_user_instance ( MOP  mop)

Definition at line 1579 of file work_space.c.

References db_object::class_mop, db_is_system_class(), and ws_release_instance().

Referenced by la_apply_insert_log(), la_apply_update_log(), and la_create_repl_filter().

Here is the caller graph for this function:

void ws_remove_label_value_from_mop ( MOP  mop,
DB_VALUE val 
)

Definition at line 5182 of file work_space.c.

References db_ws_free(), db_object::label_value_list, ws_value_list::next, NULL, and ws_value_list::val.

Referenced by pt_associate_label_with_value(), and pt_free_label().

Here is the caller graph for this function:

void ws_remove_resident_class ( MOP  classop)

Definition at line 1277 of file work_space.c.

References ml_remove(), sm_Root_class_mop, and ws_disconnect_deleted_instances().

Referenced by sm_delete_class_mop(), and ws_cull_mops().

Here is the caller graph for this function:

void ws_restore_pin ( MOP  obj,
int  opin,
int  cpin 
)

Definition at line 3052 of file work_space.c.

References db_object::class_mop, NULL, and db_object::pinned.

Referenced by ldr_restore_pin_and_drop_obj(), obj_get_att(), and obj_set_att().

Here is the caller graph for this function:

void ws_set_class ( MOP  inst,
MOP  class_mop 
)

Definition at line 1997 of file work_space.c.

References add_class_object(), and db_object::class_mop.

Referenced by locator_lock_class_of_instance().

Here is the caller graph for this function:

void ws_set_deleted ( MOP  mop)

Definition at line 5051 of file work_space.c.

References db_object::deleted, and WS_PUT_COMMIT_MOP.

int ws_set_ignore_error_list_for_mflush ( int  error_count,
int *  error_list 
)

Definition at line 4927 of file work_space.c.

References NO_ERROR, ws_Error_ignore_count, and ws_Error_ignore_list.

Referenced by er_filter_fileset().

Here is the caller graph for this function:

void ws_set_mop_fetched_with_current_snapshot ( MOP  mop)

Definition at line 5013 of file work_space.c.

References db_object::mvcc_snapshot_version, and ws_MVCC_snapshot_version.

Referenced by locator_cache_have_object(), locator_cache_lock(), and locator_cache_lock_set().

Here is the caller graph for this function:

void ws_unhide_new_old_trigger_obj ( MOP  op)

Definition at line 3800 of file work_space.c.

References db_object::is_temp, db_object::is_vid, db_object::pinned, and WS_SET_DIRTY.

Referenced by pt_exec_trigger_stmt().

Here is the caller graph for this function:

static void ws_unlink_from_commit_mops_list ( MOP  op)
static

Definition at line 1342 of file work_space.c.

References assert, db_object::commit_link, tr_schema_cache::next, NULL, and ws_Commit_mops.

Referenced by ws_cull_mops(), and ws_free_mop().

Here is the caller graph for this function:

int ws_update_oid_and_class ( MOP  mop,
OID new_oid,
OID new_class_oid 
)

Variable Documentation

MHT_TABLE* Classname_cache = NULL
static

Definition at line 137 of file work_space.c.

unsigned int db_on_server

Definition at line 91 of file network_interface_cl.c.

Referenced by ws_pin().

AREA* Objlist_area = NULL
static

Definition at line 144 of file work_space.c.

MOP ws_Commit_mops = NULL

Definition at line 70 of file work_space.c.

Referenced by ws_abort_mops(), ws_clear_all_hints(), and ws_unlink_from_commit_mops_list().

bool Ws_dirty
static

Definition at line 116 of file work_space.c.

Referenced by ws_final(), ws_has_updated(), ws_init(), and ws_map_dirty_internal().

int ws_Error_ignore_count = 0

Definition at line 161 of file work_space.c.

Referenced by locator_mflush_force(), and ws_set_ignore_error_list_for_mflush().

int ws_Error_ignore_list[-ER_LAST_ERROR]

Definition at line 160 of file work_space.c.

Referenced by locator_mflush_force(), and ws_set_ignore_error_list_for_mflush().

WS_MOP_TABLE_ENTRY* ws_Mop_table = NULL

Definition at line 79 of file work_space.c.

int ws_Num_dirty_mop = 0
WS_REPL_FLUSH_ERR* ws_Repl_error_link = NULL
static
WS_REPL_LIST ws_Repl_objs
static

Definition at line 167 of file work_space.c.

DB_OBJLIST* ws_Resident_classes = NULL
WS_STATISTICS ws_Stats = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }

Definition at line 105 of file work_space.c.