CUBRID Engine  latest
work_space.h File Reference
#include <stdio.h>
#include "oid.h"
#include "storage_common.h"
#include "quick_fit.h"
#include "locator.h"
#include "dbtype_def.h"
Include dependency graph for work_space.h:

Go to the source code of this file.

Classes

struct  vid_info
 
union  vid_oid
 
struct  ws_repl_flush_err
 
struct  ws_repl_obj
 
struct  ws_repl_list
 
struct  ws_value_list
 
struct  db_object
 
struct  ws_memoid
 
struct  ws_object_header
 
struct  ws_statistics
 
struct  ws_mop_table_entry
 

Macros

#define IS_CLASS_MOP(mop)   (((mop)->class_mop == sm_Root_class_mop) ? 1 : 0)
 
#define IS_ROOT_MOP(mop)   (((mop) == sm_Root_class_mop) ? 1 : 0)
 
#define WS_PUT_COMMIT_MOP(mop)
 
#define WS_ISDIRTY(mop)   (ws_is_dirty (mop))
 
#define WS_SET_DIRTY(mop)
 
#define WS_RESET_DIRTY(mop)
 
#define WS_IS_DELETED(mop)   (ws_is_deleted (mop))
 
#define WS_SET_DELETED(mop)   (ws_set_deleted (mop))
 
#define WS_ISVID(mop)   ((mop)->is_vid)
 
#define WS_OID(mop)   (WS_ISVID (mop) ? (OID *) (&oid_Null_oid) : &(mop)->oid_info.oid)
 
#define WS_REAL_OID(mop)   (&(mop)->oid_info.oid)
 
#define WS_VID_INFO(mop)   ((mop)->oid_info.vid_info)
 
#define WS_CLASS_MOP(mop)   ((mop)->class_mop)
 
#define WS_SET_LOCK(mop, lock)
 
#define WS_GET_LOCK(mop)   ((mop)->lock)
 
#define WS_CHN(obj)   (((WS_OBJECT_HEADER *) (obj))->chn)
 
#define WS_ISPINNED(mop)   ((mop)->pinned)
 
#define WS_SET_NO_OBJECTS(mop)
 
#define WS_MOP_IS_NULL(mop)   (((mop == NULL) || WS_IS_DELETED (mop) || (OID_ISNULL (&(mop)->oid_info.oid) && !(mop)->is_vid)) ? 1 : 0)
 
#define WS_MOP_COMPOSITION_FETCH_BIT   0x80 /* 1000 0000 */
 
#define WS_MOP_GET_COMPOSITION_FETCH(mop)   ((mop)->composition_fetch & WS_MOP_COMPOSITION_FETCH_BIT)
 
#define WS_MOP_SET_COMPOSITION_FETCH(mop)
 
#define WS_MOP_GET_PRUNE_LEVEL(mop)   ((mop)->composition_fetch & ~WS_MOP_COMPOSITION_FETCH_BIT)
 
#define WS_MOP_SET_PRUNE_LEVEL(mop, value)
 
#define ws_free_string_and_init(str)
 
#define ml_free_and_init(list)
 
#define ws_list_free_and_init(list, function)
 
#define WS_LIST_LENGTH(lst)   ws_list_length ((DB_LIST *) (lst))
 
#define WS_LIST_FREE(lst, func)   ws_list_free ((DB_LIST *) (lst), (LFREEER) func)
 
#define WS_LIST_APPEND(lst, element)   ws_list_append ((DB_LIST **) (lst), (DB_LIST *) element)
 
#define WS_LIST_COPY(lst, copier)   ws_list_copy ((DB_LIST *) (lst), copier, NULL)
 
#define WS_LIST_REMOVE(lst, element)   ws_list_remove ((DB_LIST **) (lst), (DB_LIST *) element)
 
#define WS_LIST_NCONC(lst1, lst2)   ws_list_nconc ((DB_LIST *) (lst1), (DB_LIST *) lst2)
 
#define NLIST_FIND(lst, name)   nlist_find ((DB_NAMELIST *) (lst), name, NULL)
 

Typedefs

typedef struct vid_info VID_INFO
 
typedef enum vid_info_flag VID_INFO_FLAG
 
typedef union vid_oid VID_OID
 
typedef struct ws_repl_flush_err WS_REPL_FLUSH_ERR
 
typedef struct ws_repl_obj WS_REPL_OBJ
 
typedef struct ws_repl_list WS_REPL_LIST
 
typedef struct ws_value_list WS_VALUE_LIST
 
typedef struct ws_memoid WS_MEMOID
 
typedef struct ws_memoidMOID
 
typedef char * MOBJ
 
typedef struct ws_object_header WS_OBJECT_HEADER
 
typedef int(* MAPFUNC) (MOP mop, void *args)
 
typedef struct ws_statistics WS_STATISTICS
 
typedef enum ws_map_status WS_MAP_STATUS
 
typedef enum ws_find_mop_status WS_FIND_MOP_STATUS
 
typedef struct ws_mop_table_entry WS_MOP_TABLE_ENTRY
 
typedef void *(* LCOPIER) (void *)
 
typedef void(* LFREEER) (void *)
 
typedef int(* LTOTALER) (void *)
 
typedef DB_C_INT(* NLSEARCHER) (const void *, const void *)
 
typedef int(* MOPFILTER) (MOP op, void *args)
 

Enumerations

enum  vid_info_flag { VID_BASE = 1, VID_UPDATABLE = 2, VID_NEW = 4, VID_INSERTING = 8 }
 
enum  ws_map_status { WS_MAP_CONTINUE = 0, WS_MAP_FAIL = 1, WS_MAP_STOP = 2, WS_MAP_SUCCESS = 3 }
 
enum  ws_find_mop_status { WS_FIND_MOP_DELETED = 0, WS_FIND_MOP_NOTDELETED = 1 }
 

Functions

void ws_abort_transaction (void)
 
int ws_init (void)
 
void ws_final (void)
 
void ws_clear (void)
 
int ws_area_init (void)
 
void ws_area_final (void)
 
MOP ws_mop (const OID *oid, MOP class_mop)
 
MOP ws_mop_if_exists (OID *oid)
 
MOP ws_vmop (MOP class_mop, int flags, DB_VALUE *keys)
 
bool ws_rehash_vmop (MOP mop, MOBJ class_obj, DB_VALUE *newkey)
 
MOP ws_new_mop (OID *oid, MOP class_mop)
 
void ws_update_oid (MOP mop, OID *newoid)
 
int ws_update_oid_and_class (MOP mop, OID *new_oid, OID *new_class_oid)
 
DB_VALUEws_keys (MOP vid, unsigned int *flags)
 
MOP ws_make_temp_mop (void)
 
void ws_free_temp_mop (MOP op)
 
void ws_dirty (MOP op)
 
int ws_is_dirty (MOP mop)
 
int ws_is_deleted (MOP mop)
 
void ws_set_deleted (MOP mop)
 
void ws_clean (MOP op)
 
int ws_map_dirty (MAPFUNC function, void *args)
 
void ws_filter_dirty (void)
 
int ws_map_class_dirty (MOP class_op, MAPFUNC function, void *args)
 
void ws_set_class (MOP inst, MOP class_mop)
 
int ws_map_class (MOP class_op, MAPFUNC function, void *args)
 
void ws_mark_instances_deleted (MOP class_op)
 
void ws_remove_resident_class (MOP class_op)
 
void ws_intern_instances (MOP class_mop)
 
void ws_release_instance (MOP class_mop)
 
void ws_release_user_instance (MOP mop)
 
void ws_disconnect_deleted_instances (MOP class_mop)
 
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 classmop)
 
MOP ws_find_class (const char *name)
 
void ws_add_classname (MOBJ classobj, MOP classmop, const char *cl_name)
 
void ws_drop_classname (MOBJ classobj)
 
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)
 
void ws_mark_deleted (MOP mop)
 
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_cull_mops (void)
 
int ws_find (MOP mop, MOBJ *obj)
 
int ws_mop_compare (MOP mop1, MOP mop2)
 
void ws_class_has_object_dependencies (MOP mop)
 
int ws_class_has_cached_objects (MOP class_mop)
 
bool ws_has_updated (void)
 
void ws_reset_authorization_cache (void)
 
void ws_clear_hints (MOP obj, 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)
 
void ws_dump (FILE *fpp)
 
char * ws_copy_string (const char *str)
 
void ws_free_string (const char *str)
 
void ws_list_free (DB_LIST *list, LFREEER function)
 
int ws_list_total (DB_LIST *list, LTOTALER function)
 
int ws_list_remove (DB_LIST **list, DB_LIST *element)
 
int ws_list_length (DB_LIST *list)
 
void ws_list_append (DB_LIST **list, DB_LIST *element)
 
DB_LISTws_list_copy (DB_LIST *list, 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 **list, const char *name, NLSEARCHER fcn)
 
int nlist_add (DB_NAMELIST **list, const char *name, NLSEARCHER fcn, int *added)
 
int nlist_append (DB_NAMELIST **list, const char *name, NLSEARCHER fcn, int *added)
 
int nlist_find_or_append (DB_NAMELIST **list, const char *name, NLSEARCHER fcn, int *position)
 
DB_NAMELISTnlist_filter (DB_NAMELIST **root, const char *name, NLSEARCHER fcn)
 
DB_NAMELISTnlist_copy (DB_NAMELIST *list)
 
void nlist_free (DB_NAMELIST *list)
 
int ml_find (DB_OBJLIST *list, MOP mop)
 
int ml_add (DB_OBJLIST **list, MOP mop, int *added)
 
int ml_append (DB_OBJLIST **list, MOP mop, int *added)
 
int ml_remove (DB_OBJLIST **list, MOP mop)
 
void ml_free (DB_OBJLIST *list)
 
int ml_size (DB_OBJLIST *list)
 
DB_OBJLISTml_copy (DB_OBJLIST *list)
 
DB_OBJLISTml_ext_alloc_link (void)
 
void ml_ext_free_link (DB_OBJLIST *list)
 
DB_OBJLISTml_ext_copy (DB_OBJLIST *list)
 
void ml_ext_free (DB_OBJLIST *list)
 
int ml_ext_add (DB_OBJLIST **list, MOP mop, int *added)
 
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_set_ignore_error_list_for_mflush (int error_count, int *error_list)
 
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_init_repl_objs (void)
 
void ws_clear_all_repl_objs (void)
 
void ws_free_repl_obj (WS_REPL_OBJ *obj)
 
WS_REPL_OBJws_get_repl_obj_from_list (void)
 
void ws_set_repl_error_into_error_link (LC_COPYAREA_ONEOBJ *obj, char *content_ptr)
 
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)
 
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)
 
bool ws_is_same_object (MOP mop1, MOP mop2)
 
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)
 

Variables

WS_MOP_TABLE_ENTRYws_Mop_table
 
unsigned int ws_Mop_table_size
 
DB_OBJLISTws_Resident_classes
 
MOP ws_Commit_mops
 
WS_STATISTICS ws_Stats
 
int ws_Num_dirty_mop
 
int ws_Error_ignore_list [-ER_LAST_ERROR]
 
int ws_Error_ignore_count
 

Macro Definition Documentation

#define IS_CLASS_MOP (   mop)    (((mop)->class_mop == sm_Root_class_mop) ? 1 : 0)
#define IS_ROOT_MOP (   mop)    (((mop) == sm_Root_class_mop) ? 1 : 0)

Definition at line 210 of file work_space.h.

#define ml_free_and_init (   list)
Value:
do \
{ \
ml_free ((list)); \
(list) = NULL; \
} \
while (0)
void ml_free(DB_OBJLIST *list)
Definition: work_space.c:4654
#define NULL
Definition: freelistheap.h:34
while(1)
Definition: cnvlex.c:816

Definition at line 384 of file work_space.h.

Referenced by classobj_free_class().

#define NLIST_FIND (   lst,
  name 
)    nlist_find ((DB_NAMELIST *) (lst), name, NULL)
#define WS_CLASS_MOP (   mop)    ((mop)->class_mop)

Definition at line 296 of file work_space.h.

Referenced by db_object_describe(), and vid_flush_and_rehash().

#define ws_free_string_and_init (   str)
Value:
do \
{ \
ws_free_string ((str)); \
(str) = NULL; \
} \
while (0)
void ws_free_string(const char *str)
Definition: work_space.c:3480
#define NULL
Definition: freelistheap.h:34
while(1)
Definition: cnvlex.c:816

Definition at line 376 of file work_space.h.

Referenced by classobj_free_class(), and do_alter_change_col_comment().

#define WS_GET_LOCK (   mop)    ((mop)->lock)

Definition at line 308 of file work_space.h.

#define WS_ISPINNED (   mop)    ((mop)->pinned)

Definition at line 310 of file work_space.h.

Referenced by locator_mflush().

#define WS_LIST_COPY (   lst,
  copier 
)    ws_list_copy ((DB_LIST *) (lst), copier, NULL)

Definition at line 579 of file work_space.h.

#define WS_LIST_FREE (   lst,
  func 
)    ws_list_free ((DB_LIST *) (lst), (LFREEER) func)

Definition at line 575 of file work_space.h.

Referenced by smt_reset_method_files(), and smt_reset_query_spec().

#define ws_list_free_and_init (   list,
  function 
)
Value:
do \
{ \
ws_list_free ((DB_LIST *)(list), (LFREEER)(function)); \
(list) = NULL; \
} \
while (0)
void ws_list_free(DB_LIST *list, LFREEER function)
Definition: work_space.c:3945
void(* LFREEER)(void *)
Definition: work_space.h:562
#define NULL
Definition: freelistheap.h:34
while(1)
Definition: cnvlex.c:816

Definition at line 392 of file work_space.h.

Referenced by classobj_free_class().

#define WS_LIST_LENGTH (   lst)    ws_list_length ((DB_LIST *) (lst))

Definition at line 573 of file work_space.h.

Referenced by sm_build_function_nlist().

#define WS_LIST_NCONC (   lst1,
  lst2 
)    ws_list_nconc ((DB_LIST *) (lst1), (DB_LIST *) lst2)

Definition at line 583 of file work_space.h.

Referenced by classobj_install_template(), and smt_add_attribute_to_list().

#define WS_LIST_REMOVE (   lst,
  element 
)    ws_list_remove ((DB_LIST **) (lst), (DB_LIST *) element)
#define WS_MOP_COMPOSITION_FETCH_BIT   0x80 /* 1000 0000 */

Definition at line 339 of file work_space.h.

#define WS_MOP_GET_COMPOSITION_FETCH (   mop)    ((mop)->composition_fetch & WS_MOP_COMPOSITION_FETCH_BIT)

Definition at line 341 of file work_space.h.

Referenced by locator_lock_nested().

#define WS_MOP_GET_PRUNE_LEVEL (   mop)    ((mop)->composition_fetch & ~WS_MOP_COMPOSITION_FETCH_BIT)

Definition at line 360 of file work_space.h.

Referenced by locator_lock_nested().

#define WS_MOP_IS_NULL (   mop)    (((mop == NULL) || WS_IS_DELETED (mop) || (OID_ISNULL (&(mop)->oid_info.oid) && !(mop)->is_vid)) ? 1 : 0)
#define WS_MOP_SET_COMPOSITION_FETCH (   mop)
Value:
do \
{ \
(mop)->composition_fetch |= WS_MOP_COMPOSITION_FETCH_BIT; \
} \
while (0)
#define WS_PUT_COMMIT_MOP(mop)
Definition: work_space.h:248
while(1)
Definition: cnvlex.c:816
#define WS_MOP_COMPOSITION_FETCH_BIT
Definition: work_space.h:339

Definition at line 344 of file work_space.h.

Referenced by locator_lock_nested().

#define WS_MOP_SET_PRUNE_LEVEL (   mop,
  value 
)
Value:
do \
{ \
if (value <= 0) \
{ \
(mop)->composition_fetch &= WS_MOP_COMPOSITION_FETCH_BIT; /* zero */ \
} \
{ \
(mop)->composition_fetch |= (value & ~WS_MOP_COMPOSITION_FETCH_BIT); \
} \
} \
while (0)
if(extra_options)
Definition: dynamic_load.c:958
else
while(1)
Definition: cnvlex.c:816
#define WS_MOP_COMPOSITION_FETCH_BIT
Definition: work_space.h:339

Definition at line 361 of file work_space.h.

Referenced by locator_lock_nested().

#define WS_PUT_COMMIT_MOP (   mop)
Value:
do \
{ \
if (!(mop)->commit_link) \
{ \
(mop)->commit_link = ws_Commit_mops ? ws_Commit_mops : (mop); \
ws_Commit_mops = (mop); \
} \
} \
while (0)
MOP ws_Commit_mops
Definition: work_space.c:70
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 248 of file work_space.h.

Referenced by ws_set_deleted().

#define WS_REAL_OID (   mop)    (&(mop)->oid_info.oid)
#define WS_RESET_DIRTY (   mop)
Value:
do \
{ \
if (WS_ISDIRTY(mop)) \
{ \
(mop)->dirty = 0; \
} \
} \
while (0)
int ws_Num_dirty_mop
Definition: work_space.c:107
#define WS_ISDIRTY(mop)
Definition: work_space.h:259
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 273 of file work_space.h.

Referenced by ws_clean(), ws_clear_hints(), and ws_hide_new_old_trigger_obj().

#define WS_SET_DIRTY (   mop)
Value:
do \
{ \
if (!WS_ISDIRTY(mop)) \
{ \
(mop)->dirty = 1; \
} \
} \
while (0)
int ws_Num_dirty_mop
Definition: work_space.c:107
#define WS_ISDIRTY(mop)
Definition: work_space.h:259
#define WS_PUT_COMMIT_MOP(mop)
Definition: work_space.h:248
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 261 of file work_space.h.

Referenced by ws_dirty(), and ws_unhide_new_old_trigger_obj().

#define WS_SET_LOCK (   mop,
  lock 
)
Value:
do \
{ \
(mop)->lock = lock; \
if (lock != NULL_LOCK) \
{ \
} \
} \
while (0)
#define WS_PUT_COMMIT_MOP(mop)
Definition: work_space.h:248
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 297 of file work_space.h.

Referenced by ws_set_lock().

#define WS_SET_NO_OBJECTS (   mop)
Value:
do \
{ \
(mop)->no_objects = 1; \
} \
while (0)
#define WS_PUT_COMMIT_MOP(mop)
Definition: work_space.h:248
while(1)
Definition: cnvlex.c:816

Definition at line 311 of file work_space.h.

Referenced by install_new_representation().

#define WS_VID_INFO (   mop)    ((mop)->oid_info.vid_info)

Typedef Documentation

typedef void*(* LCOPIER) (void *)

Definition at line 561 of file work_space.h.

typedef void(* LFREEER) (void *)

Definition at line 562 of file work_space.h.

typedef int(* LTOTALER) (void *)

Definition at line 563 of file work_space.h.

typedef int(* MAPFUNC) (MOP mop, void *args)

Definition at line 197 of file work_space.h.

typedef char* MOBJ

Definition at line 174 of file work_space.h.

typedef struct ws_memoid* MOID

Definition at line 157 of file work_space.h.

typedef int(* MOPFILTER) (MOP op, void *args)

Definition at line 620 of file work_space.h.

typedef DB_C_INT(* NLSEARCHER) (const void *, const void *)

Definition at line 599 of file work_space.h.

typedef struct vid_info VID_INFO

Definition at line 45 of file work_space.h.

Definition at line 59 of file work_space.h.

typedef union vid_oid VID_OID

Definition at line 61 of file work_space.h.

Definition at line 424 of file work_space.h.

Definition at line 413 of file work_space.h.

typedef struct ws_memoid WS_MEMOID

Definition at line 156 of file work_space.h.

Definition at line 429 of file work_space.h.

Definition at line 184 of file work_space.h.

Definition at line 68 of file work_space.h.

typedef struct ws_repl_list WS_REPL_LIST

Definition at line 91 of file work_space.h.

typedef struct ws_repl_obj WS_REPL_OBJ

Definition at line 79 of file work_space.h.

typedef struct ws_statistics WS_STATISTICS

Definition at line 219 of file work_space.h.

typedef struct ws_value_list WS_VALUE_LIST

Definition at line 99 of file work_space.h.

Enumeration Type Documentation

Enumerator
VID_BASE 
VID_UPDATABLE 
VID_NEW 
VID_INSERTING 

Definition at line 52 of file work_space.h.

Enumerator
WS_FIND_MOP_DELETED 
WS_FIND_MOP_NOTDELETED 

Definition at line 419 of file work_space.h.

Enumerator
WS_MAP_CONTINUE 
WS_MAP_FAIL 
WS_MAP_STOP 
WS_MAP_SUCCESS 

Definition at line 406 of file work_space.h.

Function Documentation

int ml_add ( DB_OBJLIST **  list,
MOP  mop,
int *  added 
)
int ml_append ( DB_OBJLIST **  list,
MOP  mop,
int *  added 
)
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 list)

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 
)

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:

int nlist_find_or_append ( DB_NAMELIST **  list,
const char *  name,
NLSEARCHER  fcn,
int *  position 
)

Referenced by nlist_append().

Here is the caller graph for this function:

DB_NAMELIST* nlist_remove ( DB_NAMELIST **  list,
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:

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:

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  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:

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  classmop)

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:

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:

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:

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 **  list,
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 list,
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 **  list,
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:

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  class_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  class_op)

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_reset_authorization_cache ( void  )
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:

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

Variable Documentation

MOP ws_Commit_mops

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().

int ws_Error_ignore_count

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

Definition at line 79 of file work_space.c.

int ws_Num_dirty_mop
DB_OBJLIST* ws_Resident_classes
WS_STATISTICS ws_Stats

Definition at line 105 of file work_space.c.