CUBRID Engine  latest
load_sa_loader.cpp File Reference
#include "config.h"
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <fstream>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "authenticate.h"
#include "db.h"
#include "db_json.hpp"
#include "dbi.h"
#include "dbtype.h"
#include "elo.h"
#include "environment_variable.h"
#include "execute_schema.h"
#include "intl_support.h"
#include "language_support.h"
#include "load_db_value_converter.hpp"
#include "load_driver.hpp"
#include "load_error_handler.hpp"
#include "load_object.h"
#include "load_object_table.h"
#include "load_sa_loader.hpp"
#include "load_scanner.hpp"
#include "locator_cl.h"
#include "memory_alloc.h"
#include "message_catalog.h"
#include "network.h"
#include "object_accessor.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "porting.h"
#include "schema_manager.h"
#include "set_object.h"
#include "system_parameter.h"
#include "thread_manager.hpp"
#include "transaction_cl.h"
#include "trigger_manager.h"
#include "utility.h"
#include "work_space.h"

Go to the source code of this file.

Classes

struct  LDR_ATTDESC
 
struct  ldr_mop_tempoid_map
 
struct  ldr_mop_tempoid_maps
 
struct  ldr_context
 

Namespaces

 cubload
 

Macros

#define FILTER_OUT_ERR_INTERNAL(err, expr)   ( err = ((expr) == NO_ERROR ? NO_ERROR : er_filter_errid(false)) )
 
#define CHECK_ERR(err, expr)
 
#define CHECK_PARSE_ERR(err, expr, cont, type, str)
 
#define CHECK_PTR(err, expr)
 
#define CHECK_CONTEXT_VALIDITY(context, expr)
 
#define RETURN_IF_NOT_VALID(context)
 
#define RETURN_IF_NOT_VALID_WITH(context, ret)
 
#define CHECK_VALIDATION_ONLY(context)
 
#define GET_DOMAIN(context, domain)
 
#define CHECK_SKIP()
 
#define CHECK_SKIP_WITH(ret)
 
#define LDR_LOCKHINT_COUNT   1
 
#define MAX_DIGITS_FOR_BIGINT   19
 
#define MAX_DIGITS_FOR_INT   10
 
#define MAX_DIGITS_FOR_SHORT   5
 
#define ROUND(x)   (int)((x) > 0 ? ((x) + .5) : ((x) - .5))
 
#define PARSE_ELO_STR(str, new_len)
 
#define LDR_MOP_TEMPOID_MAPS_PRESIZE   1000
 
#define LDR_ARG_GROW_SIZE   128
 

Typedefs

typedef struct ldr_context LDR_CONTEXT
 
typedef void(* LDR_POST_COMMIT_HANDLER) (int64_t)
 
typedef void(* LDR_POST_INTERRUPT_HANDLER) (int64_t)
 
typedef int(* LDR_SETTER) (LDR_CONTEXT *, const char *, size_t, SM_ATTRIBUTE *)
 
typedef int(* LDR_ELEM) (LDR_CONTEXT *, const char *, size_t, DB_VALUE *)
 
typedef struct LDR_ATTDESC LDR_ATTDESC
 
typedef struct ldr_mop_tempoid_map LDR_MOP_TEMPOID_MAP
 
typedef struct ldr_mop_tempoid_maps LDR_MOP_TEMPOID_MAPS
 

Functions

static int ldr_start ()
 
static int ldr_destroy (LDR_CONTEXT *context, int err)
 
static int ldr_init (load_args *args)
 
static void ldr_init_driver ()
 
static int ldr_final (void)
 
static void ldr_stats (int *errors, int64_t *objects, int *defaults, int64_t *lastcommit, int *fails)
 
static int ldr_update_statistics (void)
 
static void ldr_register_post_commit_handler ()
 
static void ldr_register_post_interrupt_handler ()
 
static void ldr_signal_handler (void)
 
static void ldr_report_num_of_commits (int64_t num_committed)
 
static void ldr_get_num_of_inserted_objects (int64_t num_objects)
 
static void ldr_act_init_context (LDR_CONTEXT *context, const char *class_name, size_t len)
 
static int ldr_act_check_missing_non_null_attrs (LDR_CONTEXT *context)
 
static void ldr_act_add_attr (LDR_CONTEXT *context, const char *attr_name, size_t len)
 
static void ldr_act_set_ref_class_id (LDR_CONTEXT *context, int id)
 
static void ldr_act_set_ref_class (LDR_CONTEXT *context, char *name)
 
static void ldr_act_set_instance_id (LDR_CONTEXT *context, int id)
 
static DB_OBJECTldr_act_get_ref_class (LDR_CONTEXT *context)
 
static void ldr_act_restrict_attributes (LDR_CONTEXT *context, attribute_type type)
 
static int ldr_act_set_constructor (LDR_CONTEXT *context, const char *name)
 
static int ldr_act_add_argument (LDR_CONTEXT *context, const char *name)
 
static void ldr_act_set_skip_current_class (char *class_name, size_t size)
 
static bool ldr_is_ignore_class (const char *class_name, size_t size)
 
static void ldr_increment_err_count (LDR_CONTEXT *context, int i)
 
static void ldr_clear_err_count (LDR_CONTEXT *context)
 
static void ldr_clear_err_total (LDR_CONTEXT *context)
 
static const char * ldr_class_name (LDR_CONTEXT *context)
 
static const char * ldr_attr_name (LDR_CONTEXT *context)
 
static int select_set_domain (LDR_CONTEXT *context, TP_DOMAIN *domain, TP_DOMAIN **set_domain_ptr)
 
static int check_object_domain (LDR_CONTEXT *context, DB_OBJECT *class_, DB_OBJECT **actual_class)
 
static int check_class_domain (LDR_CONTEXT *context)
 
static void idmap_init (void)
 
static void idmap_final (void)
 
static int idmap_grow (int size)
 
static int ldr_assign_class_id (DB_OBJECT *class_, int id)
 
static DB_OBJECTldr_find_class (const char *class_name)
 
static DB_OBJECTldr_get_class_from_id (int id)
 
static void ldr_clear_context (LDR_CONTEXT *context)
 
static void ldr_clear_and_free_context (LDR_CONTEXT *context)
 
static void ldr_internal_error (LDR_CONTEXT *context)
 
static void display_error_line (int adjust)
 
static void display_error (int adjust)
 
static void ldr_invalid_class_error (LDR_CONTEXT *context)
 
static void parse_error (LDR_CONTEXT *context, DB_TYPE token_type, const char *token)
 
static int clist_init (void)
 
static void clist_final (void)
 
static int is_internal_class (DB_OBJECT *class_)
 
static void ldr_act_elem (LDR_CONTEXT *context, const char *str, size_t len, data_type type)
 
static void ldr_act_attr (LDR_CONTEXT *context, const char *str, size_t len, data_type type)
 
static void ldr_act_meth (LDR_CONTEXT *context, const char *str, size_t len, data_type type)
 
static int ldr_mismatch (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_ignore (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_generic (LDR_CONTEXT *context, DB_VALUE *value)
 
static int ldr_null_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_null_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_class_attr_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att, DB_VALUE *val)
 
static void ldr_act_class_attr (LDR_CONTEXT *context, const char *str, size_t len, data_type type)
 
static int ldr_sys_user_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_sys_class_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_int_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_int_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_int_db_bigint (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_int_db_int (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_int_db_short (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_str_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_str_db_char (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_str_db_varchar (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_str_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_bstr_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_bstr_db_varbit (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_xstr_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_xstr_db_varbit (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_nstr_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_nstr_db_varnchar (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_numeric_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_numeric_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_double_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_float_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_real_db_generic (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_real_db_float (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_real_db_double (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_date_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_date_db_date (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_time_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_time_db_time (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_timestamp_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_timestamp_db_timestamp (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_timestamptz_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_timestampltz_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_timestamptz_db_timestamptz (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_timestampltz_db_timestampltz (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_datetime_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_datetime_db_datetime (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_datetimetz_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_datetimeltz_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_datetimetz_db_datetimetz (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_datetimeltz_db_datetimeltz (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static void ldr_date_time_conversion_error (const char *token, DB_TYPE type)
 
static int ldr_check_date_time_conversion (const char *str, data_type type)
 
static int ldr_elo_int_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_elo_int_db_elo (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_elo_ext_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_elo_ext_db_elo (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_mop_tempoid_maps_init (void)
 
static void ldr_mop_tempoid_maps_final (void)
 
static int ldr_add_mop_tempoid_map (MOP mop, CLASS_TABLE *table, int id)
 
static int ldr_assign_all_perm_oids (void)
 
static int find_instance (LDR_CONTEXT *context, DB_OBJECT *class_, OID *oid, int id)
 
static int ldr_class_oid_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_class_oid_db_object (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_oid_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_oid_db_object (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_monetary_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_monetary_db_monetary (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_collection_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_collection_db_collection (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
static int ldr_reset_context (LDR_CONTEXT *context)
 
static void ldr_flush (LDR_CONTEXT *context)
 
static int check_commit (LDR_CONTEXT *context)
 
static void ldr_restore_pin_and_drop_obj (LDR_CONTEXT *context, bool drop_obj)
 
static int ldr_finish_context (LDR_CONTEXT *context)
 
static int ldr_refresh_attrs (LDR_CONTEXT *context)
 
static int update_default_count (CLASS_TABLE *table, OID *oid)
 
static int update_default_instances_stats (LDR_CONTEXT *context)
 
static int insert_instance (LDR_CONTEXT *context)
 
static MOP construct_instance (LDR_CONTEXT *context)
 
static int insert_meth_instance (LDR_CONTEXT *context)
 
static int add_element (void ***elements, int *count, int *max, int grow)
 
static int add_argument (LDR_CONTEXT *context)
 
static void invalid_class_id_error (LDR_CONTEXT *context, int id)
 
static int ldr_init_loader (LDR_CONTEXT *context)
 
static void ldr_abort (void)
 
static void ldr_process_object_ref (object_ref_type *ref, int type)
 
static int ldr_act_add_class_all_attrs (const char *class_name)
 
static int ldr_json_elem (LDR_CONTEXT *context, const char *str, size_t len, DB_VALUE *val)
 
static int ldr_json_db_json (LDR_CONTEXT *context, const char *str, size_t len, SM_ATTRIBUTE *att)
 
void ldr_increment_err_total ()
 
void ldr_increment_fails ()
 
void ldr_sa_load (load_args *args, int *status, bool *interrupted)
 

Variables

const std::size_t LDR_MAX_ARGS = 32
 
static LDR_MOP_TEMPOID_MAPSldr_Mop_tempoid_maps = NULL
 
static bool skip_current_class = false
 
static bool skip_current_instance = false
 
bool locator_Dont_check_foreign_key
 
static LDR_CONTEXTldr_Current_context = NULL
 
static LDR_CONTEXT ldr_Context
 
static driverldr_Driver
 
static LOCK ldr_Hint_locks [LDR_LOCKHINT_COUNT]
 
static const char * ldr_Hint_class_names [LDR_LOCKHINT_COUNT]
 
static int ldr_Hint_subclasses [LDR_LOCKHINT_COUNT]
 
static LC_PREFETCH_FLAGS ldr_Hint_flags [LDR_LOCKHINT_COUNT]
 
static LDR_ELEM elem_converter [NUM_LDR_TYPES]
 
static int64_t Total_objects = 0
 
static int64_t Last_committed_line = 0
 
static int Total_fails = 0
 
static int64_t Total_objects_loaded = 0
 
static LDR_POST_COMMIT_HANDLER ldr_post_commit_handler = NULL
 
static LDR_POST_INTERRUPT_HANDLER ldr_post_interrupt_handler = NULL
 
static int ldr_Load_interrupted = LDR_NO_INTERRUPT
 
static int ldr_Interrupt_type = LDR_NO_INTERRUPT
 
static jmp_buf * ldr_Jmp_buf_ptr = NULL
 
static jmp_buf ldr_Jmp_buf
 
static DB_OBJECT ** Id_map = NULL
 
static int Id_map_size = 0
 
static DB_OBJLISTinternal_classes = NULL
 
static DB_VALUE ldr_short_tmpl
 
static DB_VALUE ldr_int_tmpl
 
static DB_VALUE ldr_bigint_tmpl
 
static DB_VALUE ldr_char_tmpl
 
static DB_VALUE ldr_varchar_tmpl
 
static DB_VALUE ldr_float_tmpl
 
static DB_VALUE ldr_double_tmpl
 
static DB_VALUE ldr_date_tmpl
 
static DB_VALUE ldr_time_tmpl
 
static DB_VALUE ldr_timestamp_tmpl
 
static DB_VALUE ldr_timestampltz_tmpl
 
static DB_VALUE ldr_timestamptz_tmpl
 
static DB_VALUE ldr_datetime_tmpl
 
static DB_VALUE ldr_datetimeltz_tmpl
 
static DB_VALUE ldr_datetimetz_tmpl
 
static DB_VALUE ldr_blob_tmpl
 
static DB_VALUE ldr_clob_tmpl
 
static DB_VALUE ldr_bit_tmpl
 
static DB_VALUE ldr_json_tmpl
 
void(* ldr_act )(LDR_CONTEXT *context, const char *str, size_t len, data_type type) = ldr_act_attr
 

Macro Definition Documentation

#define CHECK_ERR (   err,
  expr 
)
Value:
do { \
int inner_err = (expr); \
goto error_exit; \
} \
if (inner_err != NO_ERROR && err == NO_ERROR ) { \
} \
} while (0)
#define NO_ERROR
Definition: error_code.h:46
static void display_error(int adjust)
static bool skip_current_instance
if(extra_options)
Definition: dynamic_load.c:958
#define err(fd,...)
Definition: porting.h:431
#define FILTER_OUT_ERR_INTERNAL(err, expr)

Definition at line 82 of file load_sa_loader.cpp.

Referenced by cubload::sa_class_installer::check_class(), check_commit(), construct_instance(), find_instance(), cubload::sa_object_loader::finish_line(), insert_instance(), insert_meth_instance(), ldr_act_add_argument(), ldr_act_add_attr(), ldr_act_add_class_all_attrs(), ldr_act_attr(), ldr_act_check_missing_non_null_attrs(), ldr_act_class_attr(), ldr_act_elem(), ldr_act_init_context(), ldr_act_meth(), ldr_act_set_constructor(), ldr_assign_all_perm_oids(), ldr_bstr_db_varbit(), ldr_class_attr_db_generic(), ldr_class_oid_db_object(), ldr_class_oid_elem(), ldr_date_db_date(), ldr_datetime_db_datetime(), ldr_datetimeltz_db_datetimeltz(), ldr_datetimetz_db_datetimetz(), ldr_elo_ext_db_elo(), ldr_finish_context(), ldr_generic(), ldr_int_db_bigint(), ldr_int_db_generic(), ldr_int_db_int(), ldr_int_db_short(), ldr_json_db_json(), ldr_mismatch(), ldr_monetary_db_monetary(), ldr_nstr_db_varnchar(), ldr_null_db_generic(), ldr_numeric_db_generic(), ldr_oid_db_object(), ldr_oid_elem(), ldr_real_db_double(), ldr_real_db_float(), ldr_real_db_generic(), ldr_refresh_attrs(), ldr_reset_context(), ldr_str_db_char(), ldr_str_db_varchar(), ldr_time_db_time(), ldr_timestamp_db_timestamp(), ldr_timestampltz_db_timestampltz(), ldr_timestamptz_db_timestamptz(), and ldr_xstr_db_varbit().

#define CHECK_PARSE_ERR (   err,
  expr,
  cont,
  type,
  str 
)
Value:
do { \
int inner_err = (expr); \
parse_error(cont, type, str); \
goto error_exit; \
} \
if (inner_err != NO_ERROR && err == NO_ERROR) { \
} \
} while (0)
#define NO_ERROR
Definition: error_code.h:46
static void display_error(int adjust)
static bool skip_current_instance
static void parse_error(LDR_CONTEXT *context, DB_TYPE token_type, const char *token)
if(extra_options)
Definition: dynamic_load.c:958
#define err(fd,...)
Definition: porting.h:431
#define FILTER_OUT_ERR_INTERNAL(err, expr)

Definition at line 99 of file load_sa_loader.cpp.

Referenced by ldr_act_class_attr(), ldr_bstr_elem(), ldr_date_elem(), ldr_datetime_elem(), ldr_datetimeltz_elem(), ldr_datetimetz_elem(), ldr_double_elem(), ldr_float_elem(), ldr_int_db_bigint(), ldr_int_db_int(), ldr_int_db_short(), ldr_int_elem(), ldr_monetary_elem(), ldr_numeric_elem(), ldr_real_db_double(), ldr_real_db_float(), ldr_str_db_char(), ldr_str_db_varchar(), ldr_time_elem(), ldr_timestamp_elem(), ldr_timestampltz_elem(), ldr_timestamptz_elem(), and ldr_xstr_elem().

#define CHECK_PTR (   err,
  expr 
)
Value:
do { \
if ((expr) == NULL) { \
if (err == NO_ERROR) { \
if ((err = er_errid()) == NO_ERROR) { /* need to set errid */ \
} \
} \
goto error_exit; \
} \
} while (0)
#define NO_ERROR
Definition: error_code.h:46
static void display_error(int adjust)
int er_errid(void)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
#define ER_GENERIC_ERROR
Definition: error_code.h:49
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958
#define err(fd,...)
Definition: porting.h:431
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 112 of file load_sa_loader.cpp.

Referenced by add_element(), find_instance(), insert_instance(), insert_meth_instance(), ldr_act_add_attr(), ldr_act_meth(), ldr_assign_all_perm_oids(), ldr_bstr_elem(), and ldr_xstr_elem().

#define CHECK_SKIP_WITH (   ret)
Value:
do { \
if (skip_current_class == true) { \
return (ret); \
} \
} while (0)
static bool skip_current_class
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 164 of file load_sa_loader.cpp.

Referenced by ldr_act_add_argument(), ldr_act_check_missing_non_null_attrs(), and ldr_act_set_constructor().

#define CHECK_VALIDATION_ONLY (   context)
Value:
do { \
if (context->validation_only) goto error_exit; \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 144 of file load_sa_loader.cpp.

Referenced by ldr_act_class_attr(), ldr_act_init_context(), and ldr_act_meth().

#define FILTER_OUT_ERR_INTERNAL (   err,
  expr 
)    ( err = ((expr) == NO_ERROR ? NO_ERROR : er_filter_errid(false)) )

Definition at line 79 of file load_sa_loader.cpp.

#define GET_DOMAIN (   context,
  domain 
)
Value:
do { \
if (context->collection == NULL && context->valid) \
domain = context->attrs[context->next_attr].att->domain; \
else \
domain = context->set_domain; \
} while (0)
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 149 of file load_sa_loader.cpp.

Referenced by check_class_domain(), check_object_domain(), ldr_act_class_attr(), ldr_bstr_elem(), ldr_double_elem(), ldr_float_elem(), ldr_real_db_double(), ldr_real_db_float(), and ldr_xstr_elem().

#define LDR_ARG_GROW_SIZE   128

Definition at line 471 of file load_sa_loader.cpp.

Referenced by add_argument().

#define LDR_LOCKHINT_COUNT   1

Definition at line 342 of file load_sa_loader.cpp.

#define LDR_MOP_TEMPOID_MAPS_PRESIZE   1000

Definition at line 470 of file load_sa_loader.cpp.

Referenced by ldr_add_mop_tempoid_map(), and ldr_mop_tempoid_maps_init().

#define MAX_DIGITS_FOR_BIGINT   19

Definition at line 448 of file load_sa_loader.cpp.

Referenced by ldr_int_db_bigint(), and ldr_int_elem().

#define MAX_DIGITS_FOR_INT   10

Definition at line 450 of file load_sa_loader.cpp.

Referenced by ldr_int_db_int(), and ldr_int_elem().

#define MAX_DIGITS_FOR_SHORT   5

Definition at line 451 of file load_sa_loader.cpp.

Referenced by ldr_int_db_short().

#define PARSE_ELO_STR (   str,
  new_len 
)
Value:
do \
{ \
if (str[0] == '\"') \
str++; \
new_len = (int) strlen (str); \
if (new_len && str[new_len-1] == '\"') \
new_len--; \
} \
while (0)
if(extra_options)
Definition: dynamic_load.c:958
#define strlen(s1)
Definition: intl_support.c:43
while(1)
Definition: cnvlex.c:816

Definition at line 455 of file load_sa_loader.cpp.

Referenced by ldr_elo_ext_db_elo(), and ldr_elo_ext_elem().

#define RETURN_IF_NOT_VALID (   context)
#define RETURN_IF_NOT_VALID_WITH (   context,
  ret 
)
Value:
do { \
if (!context->valid) return (ret); \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
while(1)
Definition: cnvlex.c:816

Definition at line 139 of file load_sa_loader.cpp.

Referenced by ldr_act_add_class_all_attrs(), ldr_act_check_missing_non_null_attrs(), and ldr_act_get_ref_class().

#define ROUND (   x)    (int)((x) > 0 ? ((x) + .5) : ((x) - .5))

Definition at line 453 of file load_sa_loader.cpp.

Referenced by ldr_int_db_int(), and ldr_int_db_short().

Typedef Documentation

typedef struct LDR_ATTDESC LDR_ATTDESC
typedef struct ldr_context LDR_CONTEXT

Definition at line 171 of file load_sa_loader.cpp.

typedef int(* LDR_ELEM) (LDR_CONTEXT *, const char *, size_t, DB_VALUE *)

Definition at line 177 of file load_sa_loader.cpp.

typedef void(* LDR_POST_COMMIT_HANDLER) (int64_t)

Definition at line 173 of file load_sa_loader.cpp.

typedef void(* LDR_POST_INTERRUPT_HANDLER) (int64_t)

Definition at line 174 of file load_sa_loader.cpp.

typedef int(* LDR_SETTER) (LDR_CONTEXT *, const char *, size_t, SM_ATTRIBUTE *)

Definition at line 176 of file load_sa_loader.cpp.

Function Documentation

static int add_argument ( LDR_CONTEXT context)
static

Definition at line 5742 of file load_sa_loader.cpp.

References add_element(), ldr_context::arg_count, LDR_ARG_GROW_SIZE, ldr_context::max_arg, and ldr_context::method_args.

Referenced by ldr_act_add_argument().

Here is the caller graph for this function:

static int add_element ( void ***  elements,
int *  count,
int *  max,
int  grow 
)
static

Definition at line 5698 of file load_sa_loader.cpp.

References ARG_FILE_LINE, CHECK_PTR, cubregex::count(), ER_ERROR_SEVERITY, ER_LDR_MEMORY_ERROR, er_set(), err, free_and_init, i, NO_ERROR, and NULL.

Referenced by add_argument().

Here is the caller graph for this function:

static int check_class_domain ( LDR_CONTEXT context)
static

Definition at line 1289 of file load_sa_loader.cpp.

References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_LDR_CLASS_OBJECT_REFERENCE, er_set(), err, GET_DOMAIN, NO_ERROR, NULL, and tp_Type_object.

Referenced by ldr_class_oid_elem().

Here is the caller graph for this function:

static int check_object_domain ( LDR_CONTEXT context,
DB_OBJECT class_,
DB_OBJECT **  actual_class 
)
static
static void clist_final ( void  )
static

Definition at line 1759 of file load_sa_loader.cpp.

References ml_ext_free(), and NULL.

Referenced by ldr_final().

Here is the caller graph for this function:

static int clist_init ( void  )
static

Definition at line 1709 of file load_sa_loader.cpp.

References assert, AU_AUTH_CLASS_NAME, AU_PASSWORD_CLASS_NAME, AU_ROOT_CLASS_NAME, AU_USER_CLASS_NAME, db_find_class(), er_errid(), ml_ext_add(), NO_ERROR, and NULL.

Referenced by ldr_init().

Here is the caller graph for this function:

static void idmap_final ( void  )
static

Definition at line 1335 of file load_sa_loader.cpp.

References free_and_init, Id_map_size, and NULL.

Referenced by ldr_final().

Here is the caller graph for this function:

static int idmap_grow ( int  size)
static

Definition at line 1351 of file load_sa_loader.cpp.

References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_LDR_MEMORY_ERROR, er_set(), err, free_and_init, i, Id_map, Id_map_size, NO_ERROR, and NULL.

Referenced by ldr_assign_class_id().

Here is the caller graph for this function:

static void idmap_init ( void  )
static

Definition at line 1324 of file load_sa_loader.cpp.

References Id_map_size, and NULL.

Referenced by ldr_init().

Here is the caller graph for this function:

static void invalid_class_id_error ( LDR_CONTEXT context,
int  id 
)
static
static int is_internal_class ( DB_OBJECT class_)
static

Definition at line 1771 of file load_sa_loader.cpp.

References ml_find().

Referenced by find_instance(), and ldr_act_init_context().

Here is the caller graph for this function:

static void ldr_act_add_attr ( LDR_CONTEXT context,
const char *  attr_name,
size_t  len 
)
static

Definition at line 4995 of file load_sa_loader.cpp.

References ldr_context::arg_count, ARG_FILE_LINE, LDR_ATTDESC::att, LDR_ATTDESC::attdesc, ldr_context::attr_type, ldr_context::attrs, CHECK_CONTEXT_VALIDITY, CHECK_ERR, CHECK_PTR, CHECK_SKIP, ldr_context::cls, LDR_ATTDESC::collection_domain, ldr_context::constructor, db_get_attribute_descriptor(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, DB_TYPE_VOBJ, sm_attribute::domain, ER_ERROR_SEVERITY, ER_LDR_INVALID_CLASS_ATTR, ER_LDR_MEMORY_ERROR, ER_LDR_UNEXPECTED_ARGUMENT, er_set(), err, free_and_init, sm_attribute::header, i, ID_CLASS_ATTRIBUTE, ID_SHARED_ATTRIBUTE, ldr_abort(), ldr_attr_name(), cubload::LDR_ATTRIBUTE_ANY, cubload::LDR_ATTRIBUTE_CLASS, cubload::LDR_ATTRIBUTE_SHARED, cubload::LDR_BSTR, ldr_bstr_db_varbit(), ldr_class_name(), cubload::LDR_CLASS_OID, ldr_class_oid_db_object(), cubload::LDR_COLLECTION, ldr_collection_db_collection(), cubload::LDR_DATE, ldr_date_db_date(), cubload::LDR_DATETIME, ldr_datetime_db_datetime(), cubload::LDR_DATETIMELTZ, ldr_datetimeltz_db_datetimeltz(), cubload::LDR_DATETIMETZ, ldr_datetimetz_db_datetimetz(), cubload::LDR_DOUBLE, cubload::LDR_ELO_EXT, ldr_elo_ext_db_elo(), cubload::LDR_ELO_INT, ldr_elo_int_db_elo(), cubload::LDR_FLOAT, ldr_ignore(), cubload::LDR_INT, ldr_int_db_bigint(), ldr_int_db_generic(), ldr_int_db_int(), ldr_int_db_short(), ldr_json_db_json(), ldr_mismatch(), cubload::LDR_MONETARY, ldr_monetary_db_monetary(), cubload::LDR_NSTR, ldr_nstr_db_varnchar(), cubload::LDR_NULL, ldr_null_db_generic(), cubload::LDR_NUMERIC, ldr_numeric_db_generic(), cubload::LDR_OID, ldr_oid_db_object(), ldr_real_db_double(), ldr_real_db_float(), ldr_real_db_generic(), cubload::LDR_STR, ldr_str_db_char(), ldr_str_db_generic(), ldr_str_db_varchar(), cubload::LDR_SYS_CLASS, ldr_sys_class_db_generic(), cubload::LDR_SYS_USER, ldr_sys_user_db_generic(), cubload::LDR_TIME, ldr_time_db_time(), cubload::LDR_TIMESTAMP, ldr_timestamp_db_timestamp(), cubload::LDR_TIMESTAMPLTZ, ldr_timestampltz_db_timestampltz(), cubload::LDR_TIMESTAMPTZ, ldr_timestamptz_db_timestamptz(), cubload::LDR_XSTR, ldr_xstr_db_varbit(), sm_component::name_space, NO_ERROR, NULL, sm_method_signature::num_args, ldr_context::num_attrs, NUM_LDR_TYPES, LDR_ATTDESC::parser_buf_len, LDR_ATTDESC::parser_str, LDR_ATTDESC::parser_str_len, LDR_ATTDESC::ref_class, RETURN_IF_NOT_VALID, select_set_domain(), LDR_ATTDESC::setter, sm_method::signatures, sm_get_descriptor_component(), TP_DOMAIN_TYPE, TP_IS_SET_TYPE, and ldr_context::validation_only.

Referenced by cubload::sa_class_installer::install_class(), ldr_act_add_argument(), and ldr_act_add_class_all_attrs().

Here is the caller graph for this function:

static DB_OBJECT * ldr_act_get_ref_class ( LDR_CONTEXT context)
static

Definition at line 5927 of file load_sa_loader.cpp.

References ldr_context::attrs, ldr_context::next_attr, NULL, LDR_ATTDESC::ref_class, RETURN_IF_NOT_VALID_WITH, and ldr_context::validation_only.

Referenced by ldr_process_object_ref().

Here is the caller graph for this function:

static void ldr_act_restrict_attributes ( LDR_CONTEXT context,
attribute_type  type 
)
static

Definition at line 5323 of file load_sa_loader.cpp.

References ldr_context::attr_type, CHECK_SKIP, ldr_act, ldr_act_class_attr(), RETURN_IF_NOT_VALID, and ldr_context::validation_only.

Referenced by cubload::sa_class_installer::install_class().

Here is the caller graph for this function:

static void ldr_act_set_instance_id ( LDR_CONTEXT context,
int  id 
)
static
static void ldr_act_set_ref_class ( LDR_CONTEXT context,
char *  name 
)
static
static void ldr_act_set_ref_class_id ( LDR_CONTEXT context,
int  id 
)
static
static void ldr_act_set_skip_current_class ( char *  class_name,
size_t  size 
)
static

Definition at line 6505 of file load_sa_loader.cpp.

References ldr_is_ignore_class(), print_log_msg(), skip_current_class, and ldr_context::validation_only.

Referenced by cubload::sa_class_installer::install_class().

Here is the caller graph for this function:

static int ldr_assign_class_id ( DB_OBJECT class_,
int  id 
)
static

Definition at line 1395 of file load_sa_loader.cpp.

References err, idmap_grow(), and NO_ERROR.

Referenced by cubload::sa_class_installer::check_class().

Here is the caller graph for this function:

static int ldr_bstr_db_varbit ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2790 of file load_sa_loader.cpp.

References CHECK_ERR, db_value_clear(), err, ldr_bstr_elem(), and ldr_generic().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_class_attr_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att,
DB_VALUE val 
)
static
static const char * ldr_class_name ( LDR_CONTEXT context)
static
static int ldr_class_oid_db_object ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_class_oid_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static
static void ldr_clear_err_count ( LDR_CONTEXT context)
static

Definition at line 1063 of file load_sa_loader.cpp.

References ldr_context::err_count.

Referenced by ldr_clear_context(), and ldr_reset_context().

Here is the caller graph for this function:

static void ldr_clear_err_total ( LDR_CONTEXT context)
static

Definition at line 1077 of file load_sa_loader.cpp.

References ldr_context::err_total.

Referenced by ldr_init_loader().

Here is the caller graph for this function:

static int ldr_collection_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 4404 of file load_sa_loader.cpp.

References ARG_FILE_LINE, display_error(), ER_ERROR_SEVERITY, ER_LDR_NESTED_SET, er_set(), err, and ldr_null_elem().

Referenced by ldr_init_loader().

Here is the caller graph for this function:

static int ldr_date_db_date ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_date_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3186 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_data::date, db_string_to_date(), DB_TYPE_DATE, db_value::domain, err, and NO_ERROR.

Referenced by ldr_date_db_date(), and ldr_init_loader().

Here is the caller graph for this function:

static void ldr_date_time_conversion_error ( const char *  token,
DB_TYPE  type 
)
static

Definition at line 3544 of file load_sa_loader.cpp.

References db_get_type_name(), display_error_line(), LOADDB_MSG_CONVERSION_ERROR, MSGCAT_CATALOG_UTILS, msgcat_message(), and MSGCAT_UTIL_SET_LOADDB.

Referenced by ldr_check_date_time_conversion().

Here is the caller graph for this function:

static int ldr_datetime_db_datetime ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_datetime_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3410 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_data::datetime, db_string_to_datetime(), DB_TYPE_DATETIME, db_value::domain, err, and NO_ERROR.

Referenced by ldr_datetime_db_datetime(), and ldr_init_loader().

Here is the caller graph for this function:

static int ldr_datetimeltz_db_datetimeltz ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_datetimeltz_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3477 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_data::datetime, db_string_to_datetimeltz(), DB_TYPE_DATETIMELTZ, db_value::domain, err, and NO_ERROR.

Referenced by ldr_datetimeltz_db_datetimeltz(), and ldr_init_loader().

Here is the caller graph for this function:

static int ldr_datetimetz_db_datetimetz ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_datetimetz_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3454 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_data::datetimetz, db_string_to_datetimetz(), DB_TYPE_DATETIMETZ, db_value::domain, err, and NO_ERROR.

Referenced by ldr_datetimetz_db_datetimetz(), and ldr_init_loader().

Here is the caller graph for this function:

static int ldr_destroy ( LDR_CONTEXT context,
int  err 
)
static
static int ldr_double_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static
static int ldr_elo_ext_db_elo ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_elo_int_db_elo ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 3656 of file load_sa_loader.cpp.

References assert, and ER_FAILED.

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_elo_int_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3640 of file load_sa_loader.cpp.

References assert, and ER_FAILED.

Referenced by ldr_init_loader().

Here is the caller graph for this function:

static int ldr_final ( void  )
static

Definition at line 6167 of file load_sa_loader.cpp.

References clist_final(), idmap_final(), ldr_Current_context, ldr_destroy(), ldr_mop_tempoid_maps_final(), NO_ERROR, and otable_final().

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static int ldr_float_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static
static void ldr_flush ( LDR_CONTEXT context)
static

Definition at line 4571 of file load_sa_loader.cpp.

References ldr_context::cls, ldr_context::flush_total, ldr_context::inst_count, and ws_intern_instances().

Referenced by cubload::sa_object_loader::finish_line(), and ldr_finish_context().

Here is the caller graph for this function:

static DB_OBJECT * ldr_get_class_from_id ( int  id)
static

Definition at line 1456 of file load_sa_loader.cpp.

References Id_map_size, and NULL.

Referenced by ldr_act_set_ref_class_id().

Here is the caller graph for this function:

static void ldr_get_num_of_inserted_objects ( int64_t  num_objects)
static

Definition at line 6710 of file load_sa_loader.cpp.

References Total_objects_loaded.

Referenced by ldr_register_post_interrupt_handler().

Here is the caller graph for this function:

static int ldr_ignore ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2035 of file load_sa_loader.cpp.

References ER_OBJ_DOMAIN_CONFLICT.

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static void ldr_increment_err_count ( LDR_CONTEXT context,
int  i 
)
static
void ldr_increment_err_total ( )

Definition at line 1024 of file load_sa_loader.cpp.

References ldr_context::err_total.

Referenced by cubload::error_handler::log_error_message().

Here is the caller graph for this function:

void ldr_increment_fails ( )

Definition at line 1037 of file load_sa_loader.cpp.

References Total_fails.

Referenced by cubload::error_handler::log_error_message().

Here is the caller graph for this function:

static void ldr_init_driver ( )
static

Definition at line 6185 of file load_sa_loader.cpp.

References cubthread::get_entry(), cubload::driver::initialize(), ldr_Driver, cubthread::entry::m_loaddb_driver, and NULL.

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static int ldr_init_loader ( LDR_CONTEXT context)
static

Definition at line 5947 of file load_sa_loader.cpp.

References db_datetimetz::datetime, db_datetime_encode(), DB_FETCH_CLREAD_INSTWRITE, db_make_bigint(), db_make_bit(), db_make_char(), db_make_date(), db_make_datetime(), db_make_datetimeltz(), db_make_datetimetz(), db_make_double(), db_make_elo(), db_make_float(), db_make_int(), db_make_json(), db_make_short(), db_make_time(), db_make_timestamp(), db_make_timestampltz(), db_make_timestamptz(), db_make_varchar(), DB_TYPE_BLOB, DB_TYPE_CLOB, elem_converter, err, ldr_context::flush_total, i, LANG_SYS_CODESET, LANG_SYS_COLLATION, LC_CLASS, LC_FETCH_CURRENT_VERSION, LC_PREF_FLAG_LOCK, ldr_act, ldr_act_attr(), ldr_act_init_context(), cubload::LDR_BSTR, ldr_bstr_elem(), cubload::LDR_CLASS_OID, ldr_class_oid_elem(), ldr_clear_context(), ldr_clear_err_total(), cubload::LDR_COLLECTION, ldr_collection_elem(), cubload::LDR_DATE, ldr_date_elem(), cubload::LDR_DATETIME, ldr_datetime_elem(), cubload::LDR_DATETIMELTZ, ldr_datetimeltz_elem(), cubload::LDR_DATETIMETZ, ldr_datetimetz_elem(), cubload::LDR_DOUBLE, ldr_double_elem(), cubload::LDR_ELO_EXT, ldr_elo_ext_elem(), cubload::LDR_ELO_INT, ldr_elo_int_elem(), cubload::LDR_FLOAT, ldr_float_elem(), ldr_Hint_class_names, ldr_Hint_flags, ldr_Hint_locks, ldr_Hint_subclasses, cubload::LDR_INT, ldr_int_elem(), cubload::LDR_JSON, ldr_json_elem(), cubload::LDR_MONETARY, ldr_monetary_elem(), cubload::LDR_NSTR, ldr_nstr_elem(), cubload::LDR_NULL, ldr_null_elem(), cubload::LDR_NUMERIC, ldr_numeric_elem(), cubload::LDR_OID, ldr_oid_elem(), cubload::LDR_STR, ldr_str_elem(), cubload::LDR_TIME, ldr_time_elem(), cubload::LDR_TIMESTAMP, ldr_timestamp_elem(), cubload::LDR_TIMESTAMPLTZ, ldr_timestampltz_elem(), cubload::LDR_TIMESTAMPTZ, ldr_timestamptz_elem(), cubload::LDR_XSTR, ldr_xstr_elem(), locator_fetch_mode_to_lock(), NO_ERROR, NULL, NUM_LDR_TYPES, db_timestamptz::timestamp, tm_Use_OID_preflush, Total_fails, Total_objects, db_timestamptz::tz_id, db_datetimetz::tz_id, ldr_context::valid, and ldr_context::validation_only.

Referenced by ldr_init().

Here is the caller graph for this function:

static int ldr_int_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2347 of file load_sa_loader.cpp.

References CHECK_ERR, err, ldr_generic(), and ldr_int_elem().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static void ldr_internal_error ( LDR_CONTEXT context)
static
static void ldr_invalid_class_error ( LDR_CONTEXT context)
static
static bool ldr_is_ignore_class ( const char *  class_name,
size_t  size 
)
static
static int ldr_json_db_json ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 6660 of file load_sa_loader.cpp.

References CHECK_ERR, db_make_null(), db_value_clear(), err, ldr_generic(), ldr_json_elem(), and NO_ERROR.

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_json_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 6643 of file load_sa_loader.cpp.

References assert, db_json_get_json_from_str(), db_make_json(), NO_ERROR, and NULL.

Referenced by ldr_init_loader(), and ldr_json_db_json().

Here is the caller graph for this function:

static int ldr_mismatch ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2016 of file load_sa_loader.cpp.

References ARG_FILE_LINE, CHECK_ERR, ER_ERROR_SEVERITY, ER_OBJ_DOMAIN_CONFLICT, er_set(), err, sm_attribute::header, and sm_component::name.

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_monetary_db_monetary ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static void ldr_mop_tempoid_maps_final ( void  )
static

Definition at line 3925 of file load_sa_loader.cpp.

References free_and_init, and ldr_mop_tempoid_maps::mop_tempoid_maps.

Referenced by ldr_final().

Here is the caller graph for this function:

static int ldr_nstr_db_varnchar ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2917 of file load_sa_loader.cpp.

References CHECK_ERR, err, ldr_generic(), ldr_nstr_elem(), and NO_ERROR.

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_nstr_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 2900 of file load_sa_loader.cpp.

References db_make_varnchar(), LANG_SYS_CODESET, LANG_SYS_COLLATION, NO_ERROR, and TP_FLOATING_PRECISION_VALUE.

Referenced by ldr_init_loader(), and ldr_nstr_db_varnchar().

Here is the caller graph for this function:

static int ldr_null_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 2071 of file load_sa_loader.cpp.

References db_make_null(), and NO_ERROR.

Referenced by ldr_collection_elem(), and ldr_init_loader().

Here is the caller graph for this function:

static int ldr_numeric_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2972 of file load_sa_loader.cpp.

References CHECK_ERR, err, ldr_generic(), and ldr_numeric_elem().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_numeric_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 2948 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, DB_TYPE_C_CHAR, DB_TYPE_NUMERIC, db_value_domain_init(), db_value_put(), err, and NO_ERROR.

Referenced by ldr_init_loader(), and ldr_numeric_db_generic().

Here is the caller graph for this function:

static int ldr_oid_db_object ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_real_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 3069 of file load_sa_loader.cpp.

References CHECK_ERR, err, ldr_double_elem(), and ldr_generic().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static void ldr_register_post_commit_handler ( )
static

Definition at line 6407 of file load_sa_loader.cpp.

References ldr_post_commit_handler, and ldr_report_num_of_commits().

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static void ldr_register_post_interrupt_handler ( )
static

Definition at line 6395 of file load_sa_loader.cpp.

References ldr_get_num_of_inserted_objects(), ldr_Jmp_buf, ldr_Jmp_buf_ptr, and ldr_post_interrupt_handler.

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static void ldr_report_num_of_commits ( int64_t  num_committed)
static
static void ldr_restore_pin_and_drop_obj ( LDR_CONTEXT context,
bool  drop_obj 
)
static

Definition at line 4693 of file load_sa_loader.cpp.

References ldr_context::class_pin, db_drop(), NULL, ldr_context::obj, ldr_context::obj_pin, and ws_restore_pin().

Referenced by cubload::sa_object_loader::finish_line().

Here is the caller graph for this function:

static void ldr_signal_handler ( void  )
static

Definition at line 6679 of file load_sa_loader.cpp.

References ldr_Interrupt_type, ldr_Load_interrupted, LOADDB_MSG_SIG1, MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_LOADDB, and print_log_msg().

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static void ldr_stats ( int *  errors,
int64_t *  objects,
int *  defaults,
int64_t *  lastcommit,
int *  fails 
)
static

Definition at line 6422 of file load_sa_loader.cpp.

References ldr_context::default_count, ldr_context::err_total, Last_committed_line, NULL, Total_fails, and Total_objects.

Referenced by ldr_sa_load().

Here is the caller graph for this function:

static int ldr_str_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2714 of file load_sa_loader.cpp.

References db_make_string(), and ldr_generic().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static int ldr_str_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 2551 of file load_sa_loader.cpp.

References db_make_string(), and NO_ERROR.

Referenced by ldr_init_loader().

Here is the caller graph for this function:

static int ldr_sys_class_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_sys_user_db_generic ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_time_db_time ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_time_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3230 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_string_to_time(), DB_TYPE_TIME, db_value::domain, err, NO_ERROR, and db_data::time.

Referenced by ldr_init_loader(), and ldr_time_db_time().

Here is the caller graph for this function:

static int ldr_timestamp_db_timestamp ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_timestamp_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3274 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_string_to_timestamp(), DB_TYPE_TIMESTAMP, db_value::domain, err, NO_ERROR, and db_data::utime.

Referenced by ldr_init_loader(), and ldr_timestamp_db_timestamp().

Here is the caller graph for this function:

static int ldr_timestampltz_db_timestampltz ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_timestampltz_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3341 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_string_to_timestampltz(), DB_TYPE_TIMESTAMPLTZ, db_value::domain, err, NO_ERROR, and db_data::utime.

Referenced by ldr_init_loader(), and ldr_timestampltz_db_timestampltz().

Here is the caller graph for this function:

static int ldr_timestamptz_db_timestamptz ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static
static int ldr_timestamptz_elem ( LDR_CONTEXT context,
const char *  str,
size_t  len,
DB_VALUE val 
)
static

Definition at line 3318 of file load_sa_loader.cpp.

References CHECK_PARSE_ERR, db_value::data, db_string_to_timestamptz(), DB_TYPE_TIMESTAMPTZ, db_value::domain, err, NO_ERROR, and db_data::timestamptz.

Referenced by ldr_init_loader(), and ldr_timestamptz_db_timestamptz().

Here is the caller graph for this function:

static int ldr_update_statistics ( void  )
static
static int ldr_xstr_db_varbit ( LDR_CONTEXT context,
const char *  str,
size_t  len,
SM_ATTRIBUTE att 
)
static

Definition at line 2878 of file load_sa_loader.cpp.

References CHECK_ERR, db_value_clear(), err, ldr_generic(), and ldr_xstr_elem().

Referenced by ldr_act_add_attr().

Here is the caller graph for this function:

static void parse_error ( LDR_CONTEXT context,
DB_TYPE  token_type,
const char *  token 
)
static
static int select_set_domain ( LDR_CONTEXT context,
TP_DOMAIN domain,
TP_DOMAIN **  set_domain_ptr 
)
static
static int update_default_count ( CLASS_TABLE table,
OID oid 
)
static

Definition at line 5345 of file load_sa_loader.cpp.

References ldr_context::default_count, NO_ERROR, and class_table::total_inserts.

Referenced by update_default_instances_stats().

Here is the caller graph for this function:

static int update_default_instances_stats ( LDR_CONTEXT context)
static

Definition at line 5361 of file load_sa_loader.cpp.

References ldr_context::default_count, err, otable_map_reserved(), and update_default_count().

Referenced by ldr_destroy().

Here is the caller graph for this function:

Variable Documentation

LDR_ELEM elem_converter[NUM_LDR_TYPES]
static
DB_OBJECT** Id_map = NULL
static

Definition at line 403 of file load_sa_loader.cpp.

Referenced by idmap_grow().

int Id_map_size = 0
static

Definition at line 404 of file load_sa_loader.cpp.

Referenced by idmap_final(), idmap_grow(), idmap_init(), and ldr_get_class_from_id().

DB_OBJLIST* internal_classes = NULL
static

Definition at line 412 of file load_sa_loader.cpp.

Referenced by qexec_execute_delete(), and qexec_execute_update().

int64_t Last_committed_line = 0
static

Definition at line 360 of file load_sa_loader.cpp.

Referenced by check_commit(), and ldr_stats().

DB_VALUE ldr_bigint_tmpl
static

Definition at line 429 of file load_sa_loader.cpp.

DB_VALUE ldr_bit_tmpl
static

Definition at line 444 of file load_sa_loader.cpp.

DB_VALUE ldr_blob_tmpl
static

Definition at line 442 of file load_sa_loader.cpp.

DB_VALUE ldr_char_tmpl
static

Definition at line 430 of file load_sa_loader.cpp.

DB_VALUE ldr_clob_tmpl
static

Definition at line 443 of file load_sa_loader.cpp.

LDR_CONTEXT ldr_Context
static

Definition at line 327 of file load_sa_loader.cpp.

Referenced by ldr_init(), and ldr_start().

LDR_CONTEXT* ldr_Current_context = NULL
static
DB_VALUE ldr_date_tmpl
static

Definition at line 434 of file load_sa_loader.cpp.

DB_VALUE ldr_datetime_tmpl
static

Definition at line 439 of file load_sa_loader.cpp.

DB_VALUE ldr_datetimeltz_tmpl
static

Definition at line 440 of file load_sa_loader.cpp.

DB_VALUE ldr_datetimetz_tmpl
static

Definition at line 441 of file load_sa_loader.cpp.

DB_VALUE ldr_double_tmpl
static

Definition at line 433 of file load_sa_loader.cpp.

driver* ldr_Driver
static

Definition at line 330 of file load_sa_loader.cpp.

Referenced by ldr_init_driver(), and ldr_sa_load().

DB_VALUE ldr_float_tmpl
static

Definition at line 432 of file load_sa_loader.cpp.

const char* ldr_Hint_class_names[LDR_LOCKHINT_COUNT]
static

Definition at line 344 of file load_sa_loader.cpp.

Referenced by ldr_find_class(), and ldr_init_loader().

LC_PREFETCH_FLAGS ldr_Hint_flags[LDR_LOCKHINT_COUNT]
static

Definition at line 346 of file load_sa_loader.cpp.

Referenced by ldr_find_class(), and ldr_init_loader().

LOCK ldr_Hint_locks[LDR_LOCKHINT_COUNT]
static

Definition at line 343 of file load_sa_loader.cpp.

Referenced by ldr_find_class(), and ldr_init_loader().

int ldr_Hint_subclasses[LDR_LOCKHINT_COUNT]
static

Definition at line 345 of file load_sa_loader.cpp.

Referenced by ldr_find_class(), and ldr_init_loader().

DB_VALUE ldr_int_tmpl
static

Definition at line 428 of file load_sa_loader.cpp.

int ldr_Interrupt_type = LDR_NO_INTERRUPT
static

Definition at line 389 of file load_sa_loader.cpp.

Referenced by ldr_sa_load(), and ldr_signal_handler().

jmp_buf ldr_Jmp_buf
static

Definition at line 392 of file load_sa_loader.cpp.

Referenced by ldr_register_post_interrupt_handler(), and ldr_sa_load().

jmp_buf* ldr_Jmp_buf_ptr = NULL
static
DB_VALUE ldr_json_tmpl
static

Definition at line 445 of file load_sa_loader.cpp.

int ldr_Load_interrupted = LDR_NO_INTERRUPT
static

Definition at line 388 of file load_sa_loader.cpp.

Referenced by check_commit(), and ldr_signal_handler().

const std::size_t LDR_MAX_ARGS = 32

Definition at line 76 of file load_sa_loader.cpp.

Referenced by construct_instance().

LDR_MOP_TEMPOID_MAPS* ldr_Mop_tempoid_maps = NULL
static

Definition at line 243 of file load_sa_loader.cpp.

LDR_POST_COMMIT_HANDLER ldr_post_commit_handler = NULL
static

Definition at line 369 of file load_sa_loader.cpp.

Referenced by check_commit(), and ldr_register_post_commit_handler().

LDR_POST_INTERRUPT_HANDLER ldr_post_interrupt_handler = NULL
static
DB_VALUE ldr_short_tmpl
static

Definition at line 427 of file load_sa_loader.cpp.

DB_VALUE ldr_time_tmpl
static

Definition at line 435 of file load_sa_loader.cpp.

DB_VALUE ldr_timestamp_tmpl
static

Definition at line 436 of file load_sa_loader.cpp.

DB_VALUE ldr_timestampltz_tmpl
static

Definition at line 437 of file load_sa_loader.cpp.

DB_VALUE ldr_timestamptz_tmpl
static

Definition at line 438 of file load_sa_loader.cpp.

DB_VALUE ldr_varchar_tmpl
static

Definition at line 431 of file load_sa_loader.cpp.

bool locator_Dont_check_foreign_key

Definition at line 120 of file locator_sr.c.

Referenced by ldr_sa_load().

bool skip_current_class = false
static
bool skip_current_instance = false
static
int Total_fails = 0
static

Definition at line 361 of file load_sa_loader.cpp.

Referenced by ldr_increment_fails(), ldr_init_loader(), ldr_start(), and ldr_stats().

int64_t Total_objects = 0
static
int64_t Total_objects_loaded = 0
static

Definition at line 362 of file load_sa_loader.cpp.

Referenced by ldr_get_num_of_inserted_objects(), and ldr_sa_load().