File work_space.c
FileList > cubrid > src > object > work_space.c
Go to the source code of this file
#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"
#include "execute_statement.h"
Public Attributes
| Type |
Name |
| unsigned int |
db_on_server
|
| MOP |
ws_Commit_mops = [**NULL**](freelistheap_8h.md#define-null)
|
| int |
ws_Error_ignore_count = 0
|
| int |
ws_Error_ignore_list
|
| WS_MOP_TABLE_ENTRY * |
ws_Mop_table = [**NULL**](freelistheap_8h.md#define-null)
|
| unsigned int |
ws_Mop_table_size = 0
|
| int |
ws_Num_dirty_mop = 0
|
| DB_OBJLIST * |
ws_Resident_classes = [**NULL**](freelistheap_8h.md#define-null)
|
| WS_STATISTICS |
ws_Stats = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
|
Public Static Attributes
Public Functions
| Type |
Name |
| 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)
|
| int |
ml_ext_add (DB_OBJLIST ** list, MOP mop, int * added_ptr)
|
| DB_OBJLIST * |
ml_ext_alloc_link (void)
|
| DB_OBJLIST * |
ml_ext_copy (DB_OBJLIST * list)
|
| void |
ml_ext_free (DB_OBJLIST * list)
|
| void |
ml_ext_free_link (DB_OBJLIST * link)
|
| void |
ml_filter (DB_OBJLIST ** list, MOPFILTER filter, void * args)
|
| int |
ml_find (DB_OBJLIST * list, MOP mop)
|
| void |
ml_free (DB_OBJLIST * list)
|
| int |
ml_remove (DB_OBJLIST ** list, MOP mop)
|
| int |
ml_size (DB_OBJLIST * list)
|
| 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)
|
| DB_NAMELIST * |
nlist_copy (DB_NAMELIST * list)
|
| DB_NAMELIST * |
nlist_filter (DB_NAMELIST ** root, const char * name, NLSEARCHER fcn)
|
| DB_NAMELIST * |
nlist_find (DB_NAMELIST * list, const char * name, NLSEARCHER fcn)
|
| int |
nlist_find_or_append (DB_NAMELIST ** list, const char * name, NLSEARCHER fcn, int * position)
|
| void |
nlist_free (DB_NAMELIST * list)
|
| DB_NAMELIST * |
nlist_remove (DB_NAMELIST ** root, const char * name, NLSEARCHER fcn)
|
| void |
ws_abort_mops (bool only_unpinned)
|
| void |
ws_abort_transaction (void)
|
| void |
ws_add_classname (MOBJ classobj, MOP classmop, const char * cl_name)
|
| int |
ws_add_label_value_to_mop (MOP mop, DB_VALUE * val)
|
| void |
ws_area_final (void)
|
| int |
ws_area_init (void)
|
| void |
ws_cache (MOBJ obj, MOP mop, MOP class_mop)
|
| MOP |
ws_cache_with_oid (MOBJ obj, OID * oid, MOP class_mop)
|
| int |
ws_chn (MOBJ obj)
|
| int |
ws_class_has_cached_objects (MOP class_mop)
|
| void |
ws_class_has_object_dependencies (MOP class_mop)
|
| MOP |
ws_class_mop (MOP mop)
|
| void |
ws_clean (MOP op)
|
| void |
ws_clean_label_value_list (MOP mop)
|
| void |
ws_clear (void)
|
| void |
ws_clear_all_hints (bool retain_lock)
|
| void |
ws_clear_hints (MOP mop, bool leave_pinned)
|
| char * |
ws_copy_string (const char * str)
|
| void |
ws_cull_mops (void)
|
| void |
ws_decache (MOP mop)
|
| void |
ws_decache_all_instances (MOP mop)
|
| void |
ws_decache_allxlockmops_but_norealclasses (void)
|
| void |
ws_dirty (MOP op)
|
| void |
ws_disconnect_deleted_instances (MOP classop)
|
| void |
ws_drop_classname (MOBJ classobj)
|
| void |
ws_dump (FILE * fpp)
|
| void |
ws_dump_mops (void)
|
| void |
ws_filter_dirty (void)
|
| void |
ws_final (void)
|
| int |
ws_find (MOP mop, MOBJ * obj)
|
| MOP |
ws_find_class (const char * name)
|
| void |
ws_free_string (const char * str)
|
| void |
ws_free_temp_mop (MOP op)
|
| LOCK |
ws_get_lock (MOP mop)
|
| unsigned int |
ws_get_mvcc_snapshot_version (void)
|
| int |
ws_has_dirty_objects (MOP op, int * isvirt)
|
| bool |
ws_has_updated (void)
|
| int |
ws_hide_new_old_trigger_obj (MOP op)
|
| OID * |
ws_identifier (MOP mop)
|
| OID * |
ws_identifier_with_check (MOP mop, const bool check_non_referable)
|
| void |
ws_increment_mvcc_snapshot_version (void)
|
| int |
ws_init (void)
|
| void |
ws_intern_instances (MOP class_mop)
|
| int |
ws_is_deleted (MOP mop)
|
| int |
ws_is_dirty (MOP mop)
|
| bool |
ws_is_mop_fetched_with_current_snapshot (MOP mop)
|
| bool |
ws_is_same_object (MOP mop1, MOP mop2)
|
| bool |
ws_is_trigger_involved ()
|
| DB_VALUE * |
ws_keys (MOP vid, unsigned int * flags)
|
| void |
ws_list_append (DB_LIST ** root, DB_LIST * element)
|
| DB_LIST * |
ws_list_copy (DB_LIST * src, LCOPIER copier, LFREEER freeer)
|
| 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)
|
| int |
ws_list_remove (DB_LIST ** root, DB_LIST * element)
|
| int |
ws_list_total (DB_LIST * list, LTOTALER function)
|
| MOP |
ws_make_temp_mop (void)
|
| int |
ws_map (MAPFUNC function, void * args)
|
| int |
ws_map_class (MOP class_op, MAPFUNC function, void * args)
|
| int |
ws_map_class_dirty (MOP class_op, MAPFUNC function, void * args)
|
| int |
ws_map_dirty (MAPFUNC function, void * args)
|
| void |
ws_mark_deleted (MOP mop)
|
| void |
ws_mark_instances_deleted (MOP class_op)
|
| MOP |
ws_mop (const OID * oid, MOP class_mop)
|
| int |
ws_mop_compare (MOP mop1, MOP mop2)
|
| MOP |
ws_mop_if_exists (OID * oid)
|
| void |
ws_move_label_value_list (MOP dest_mop, MOP src_mop)
|
| bool |
ws_need_flush (void)
|
| MOP |
ws_new_mop (OID * oid, MOP class_mop)
|
| OID * |
ws_oid (MOP mop)
|
| int |
ws_pin (MOP mop, int pin)
|
| void |
ws_pin_instance_and_class (MOP obj, int * opin, int * cpin)
|
| bool |
ws_rehash_vmop (MOP mop, MOBJ classobj, DB_VALUE * newkey)
|
| void |
ws_release_instance (MOP mop)
|
| void |
ws_release_user_instance (MOP mop)
|
| void |
ws_remove_label_value_from_mop (MOP mop, DB_VALUE * val)
|
| void |
ws_remove_resident_class (MOP classop)
|
| void |
ws_restore_pin (MOP obj, int opin, int cpin)
|
| void |
ws_set_class (MOP inst, MOP class_mop)
|
| void |
ws_set_deleted (MOP mop)
|
| int |
ws_set_ignore_error_list_for_mflush (int error_count, int * error_list)
|
| void |
ws_set_lock (MOP mop, LOCK lock)
|
| void |
ws_set_mop_fetched_with_current_snapshot (MOP mop)
|
| void |
ws_unhide_new_old_trigger_obj (MOP op)
|
| void |
ws_update_oid (MOP mop, OID * newoid)
|
| int |
ws_update_oid_and_class (MOP mop, OID * new_oid, OID * new_class_oid)
|
| MOP |
ws_vmop (MOP class_mop, int flags, DB_VALUE * keys)
|
Public Static Functions
Macros
Public Attributes Documentation
variable db_on_server
unsigned int db_on_server;
variable ws_Commit_mops
variable ws_Error_ignore_count
int ws_Error_ignore_count;
variable ws_Error_ignore_list
int ws_Error_ignore_list[-ER_LAST_ERROR];
variable ws_Mop_table
WS_MOP_TABLE_ENTRY* ws_Mop_table;
variable ws_Mop_table_size
unsigned int ws_Mop_table_size;
variable ws_Num_dirty_mop
variable ws_Resident_classes
DB_OBJLIST* ws_Resident_classes;
variable ws_Stats
Public Static Attributes Documentation
variable Classname_cache
MHT_TABLE* Classname_cache;
variable Null_object
variable Objlist_area
variable Ws_dirty
variable ws_MVCC_snapshot_version
unsigned int ws_MVCC_snapshot_version;
Public Functions Documentation
function ml_add
int ml_add (
DB_OBJLIST ** list,
MOP mop,
int * added_ptr
)
function ml_append
int ml_append (
DB_OBJLIST ** list,
MOP mop,
int * added_ptr
)
function ml_copy
DB_OBJLIST * ml_copy (
DB_OBJLIST * list
)
function ml_ext_add
int ml_ext_add (
DB_OBJLIST ** list,
MOP mop,
int * added_ptr
)
function ml_ext_alloc_link
DB_OBJLIST * ml_ext_alloc_link (
void
)
function ml_ext_copy
DB_OBJLIST * ml_ext_copy (
DB_OBJLIST * list
)
function ml_ext_free
void ml_ext_free (
DB_OBJLIST * list
)
function ml_ext_free_link
void ml_ext_free_link (
DB_OBJLIST * link
)
function ml_filter
void ml_filter (
DB_OBJLIST ** list,
MOPFILTER filter,
void * args
)
function ml_find
int ml_find (
DB_OBJLIST * list,
MOP mop
)
function ml_free
void ml_free (
DB_OBJLIST * list
)
function ml_remove
int ml_remove (
DB_OBJLIST ** list,
MOP mop
)
function ml_size
int ml_size (
DB_OBJLIST * list
)
function nlist_add
int nlist_add (
DB_NAMELIST ** list,
const char * name,
NLSEARCHER fcn,
int * added_ptr
)
function nlist_append
int nlist_append (
DB_NAMELIST ** list,
const char * name,
NLSEARCHER fcn,
int * added_ptr
)
function nlist_copy
DB_NAMELIST * nlist_copy (
DB_NAMELIST * list
)
function nlist_filter
DB_NAMELIST * nlist_filter (
DB_NAMELIST ** root,
const char * name,
NLSEARCHER fcn
)
function nlist_find
DB_NAMELIST * nlist_find (
DB_NAMELIST * list,
const char * name,
NLSEARCHER fcn
)
function nlist_find_or_append
int nlist_find_or_append (
DB_NAMELIST ** list,
const char * name,
NLSEARCHER fcn,
int * position
)
function nlist_free
void nlist_free (
DB_NAMELIST * list
)
function nlist_remove
DB_NAMELIST * nlist_remove (
DB_NAMELIST ** root,
const char * name,
NLSEARCHER fcn
)
function ws_abort_mops
void ws_abort_mops (
bool only_unpinned
)
function ws_abort_transaction
void ws_abort_transaction (
void
)
function ws_add_classname
void ws_add_classname (
MOBJ classobj,
MOP classmop,
const char * cl_name
)
function ws_add_label_value_to_mop
int ws_add_label_value_to_mop (
MOP mop,
DB_VALUE * val
)
function ws_area_final
void ws_area_final (
void
)
function ws_area_init
int ws_area_init (
void
)
function ws_cache
void ws_cache (
MOBJ obj,
MOP mop,
MOP class_mop
)
function ws_cache_with_oid
MOP ws_cache_with_oid (
MOBJ obj,
OID * oid,
MOP class_mop
)
function ws_chn
function ws_class_has_cached_objects
int ws_class_has_cached_objects (
MOP class_mop
)
function ws_class_has_object_dependencies
void ws_class_has_object_dependencies (
MOP class_mop
)
function ws_class_mop
MOP ws_class_mop (
MOP mop
)
function ws_clean
function ws_clean_label_value_list
void ws_clean_label_value_list (
MOP mop
)
function ws_clear
function ws_clear_all_hints
void ws_clear_all_hints (
bool retain_lock
)
function ws_clear_hints
void ws_clear_hints (
MOP mop,
bool leave_pinned
)
function ws_copy_string
char * ws_copy_string (
const char * str
)
function ws_cull_mops
void ws_cull_mops (
void
)
function ws_decache
void ws_decache (
MOP mop
)
function ws_decache_all_instances
void ws_decache_all_instances (
MOP mop
)
function ws_decache_allxlockmops_but_norealclasses
void ws_decache_allxlockmops_but_norealclasses (
void
)
function ws_dirty
function ws_disconnect_deleted_instances
void ws_disconnect_deleted_instances (
MOP classop
)
function ws_drop_classname
void ws_drop_classname (
MOBJ classobj
)
function ws_dump
void ws_dump (
FILE * fpp
)
function ws_dump_mops
void ws_dump_mops (
void
)
function ws_filter_dirty
void ws_filter_dirty (
void
)
function ws_final
function ws_find
int ws_find (
MOP mop,
MOBJ * obj
)
function ws_find_class
MOP ws_find_class (
const char * name
)
function ws_free_string
void ws_free_string (
const char * str
)
function ws_free_temp_mop
void ws_free_temp_mop (
MOP op
)
function ws_get_lock
LOCK ws_get_lock (
MOP mop
)
function ws_get_mvcc_snapshot_version
unsigned int ws_get_mvcc_snapshot_version (
void
)
function ws_has_dirty_objects
int ws_has_dirty_objects (
MOP op,
int * isvirt
)
function ws_has_updated
bool ws_has_updated (
void
)
function ws_hide_new_old_trigger_obj
int ws_hide_new_old_trigger_obj (
MOP op
)
function ws_identifier
OID * ws_identifier (
MOP mop
)
function ws_identifier_with_check
OID * ws_identifier_with_check (
MOP mop,
const bool check_non_referable
)
function ws_increment_mvcc_snapshot_version
void ws_increment_mvcc_snapshot_version (
void
)
function ws_init
function ws_intern_instances
void ws_intern_instances (
MOP class_mop
)
function ws_is_deleted
int ws_is_deleted (
MOP mop
)
function ws_is_dirty
int ws_is_dirty (
MOP mop
)
function ws_is_mop_fetched_with_current_snapshot
bool ws_is_mop_fetched_with_current_snapshot (
MOP mop
)
function ws_is_same_object
bool ws_is_same_object (
MOP mop1,
MOP mop2
)
function ws_is_trigger_involved
bool ws_is_trigger_involved ()
function ws_keys
DB_VALUE * ws_keys (
MOP vid,
unsigned int * flags
)
function ws_list_append
void ws_list_append (
DB_LIST ** root,
DB_LIST * element
)
function ws_list_copy
DB_LIST * ws_list_copy (
DB_LIST * src,
LCOPIER copier,
LFREEER freeer
)
function ws_list_free
void ws_list_free (
DB_LIST * list,
LFREEER function
)
function ws_list_length
int ws_list_length (
DB_LIST * list
)
function ws_list_nconc
DB_LIST * ws_list_nconc (
DB_LIST * list1,
DB_LIST * list2
)
function ws_list_remove
int ws_list_remove (
DB_LIST ** root,
DB_LIST * element
)
function ws_list_total
int ws_list_total (
DB_LIST * list,
LTOTALER function
)
function ws_make_temp_mop
MOP ws_make_temp_mop (
void
)
function ws_map
int ws_map (
MAPFUNC function,
void * args
)
function ws_map_class
int ws_map_class (
MOP class_op,
MAPFUNC function,
void * args
)
function ws_map_class_dirty
int ws_map_class_dirty (
MOP class_op,
MAPFUNC function,
void * args
)
function ws_map_dirty
int ws_map_dirty (
MAPFUNC function,
void * args
)
function ws_mark_deleted
void ws_mark_deleted (
MOP mop
)
function ws_mark_instances_deleted
void ws_mark_instances_deleted (
MOP class_op
)
function ws_mop
MOP ws_mop (
const OID * oid,
MOP class_mop
)
function ws_mop_compare
int ws_mop_compare (
MOP mop1,
MOP mop2
)
function ws_mop_if_exists
MOP ws_mop_if_exists (
OID * oid
)
function ws_move_label_value_list
void ws_move_label_value_list (
MOP dest_mop,
MOP src_mop
)
function ws_need_flush
bool ws_need_flush (
void
)
function ws_new_mop
MOP ws_new_mop (
OID * oid,
MOP class_mop
)
function ws_oid
function ws_pin
int ws_pin (
MOP mop,
int pin
)
function ws_pin_instance_and_class
void ws_pin_instance_and_class (
MOP obj,
int * opin,
int * cpin
)
function ws_rehash_vmop
bool ws_rehash_vmop (
MOP mop,
MOBJ classobj,
DB_VALUE * newkey
)
function ws_release_instance
void ws_release_instance (
MOP mop
)
function ws_release_user_instance
void ws_release_user_instance (
MOP mop
)
function ws_remove_label_value_from_mop
void ws_remove_label_value_from_mop (
MOP mop,
DB_VALUE * val
)
function ws_remove_resident_class
void ws_remove_resident_class (
MOP classop
)
function ws_restore_pin
void ws_restore_pin (
MOP obj,
int opin,
int cpin
)
function ws_set_class
void ws_set_class (
MOP inst,
MOP class_mop
)
function ws_set_deleted
void ws_set_deleted (
MOP mop
)
function ws_set_ignore_error_list_for_mflush
int ws_set_ignore_error_list_for_mflush (
int error_count,
int * error_list
)
function ws_set_lock
void ws_set_lock (
MOP mop,
LOCK lock
)
function ws_set_mop_fetched_with_current_snapshot
void ws_set_mop_fetched_with_current_snapshot (
MOP mop
)
function ws_unhide_new_old_trigger_obj
void ws_unhide_new_old_trigger_obj (
MOP op
)
function ws_update_oid
void ws_update_oid (
MOP mop,
OID * newoid
)
function ws_update_oid_and_class
int ws_update_oid_and_class (
MOP mop,
OID * new_oid,
OID * new_class_oid
)
function ws_vmop
MOP ws_vmop (
MOP class_mop,
int flags,
DB_VALUE * keys
)
Public Static Functions Documentation
function add_class_object
static int add_class_object (
MOP class_mop,
MOP obj
)
function emergency_remove_dirty
static void emergency_remove_dirty (
MOP op
)
function mark_instance_deleted
static int mark_instance_deleted (
MOP op,
void * args
)
function remove_class_object
static void remove_class_object (
MOP class_mop,
MOP obj
)
function ws_check_hash_link
static int ws_check_hash_link (
int slot
)
function ws_clear_internal
static void ws_clear_internal (
bool clear_vmop_keys
)
function ws_describe_mop
static int ws_describe_mop (
MOP mop,
void * args
)
function ws_examine_no_mop_has_cached_lock
static void ws_examine_no_mop_has_cached_lock (
void
)
function ws_free_mop
static void ws_free_mop (
MOP op
)
function ws_insert_mop_on_hash_link
static void ws_insert_mop_on_hash_link (
MOP mop,
int slot
)
function ws_insert_mop_on_hash_link_with_position
static void ws_insert_mop_on_hash_link_with_position (
MOP mop,
int slot,
MOP prev
)
function ws_make_mop
static MOP ws_make_mop (
const OID * oid
)
function ws_map_dirty_internal
static int ws_map_dirty_internal (
MAPFUNC function,
void * args,
bool classes_only
)
function ws_print_oid
static void ws_print_oid (
OID * oid
)
function ws_unlink_from_commit_mops_list
static void ws_unlink_from_commit_mops_list (
MOP op
)
Macro Definition Documentation
define OBJLIST_AREA_COUNT
#define OBJLIST_AREA_COUNT `4096`
The documentation for this class was generated from the following file cubrid/src/object/work_space.c