Skip to content

File load_db.c

FileList > cubrid > src > loaddb > load_db.c

Go to the source code of this file

  • #include "config.h"
  • #include "chartype.h"
  • #include "db.h"
  • #include "load_object.h"
  • #include "load_sa_loader.hpp"
  • #include "network_interface_cl.h"
  • #include "porting.h"
  • #include "schema_manager.h"
  • #include "schema_system_catalog_constants.h"
  • #include "utility.h"
  • #include "authenticate.h"
  • #include "ddl_log.h"
  • #include <fstream>
  • #include <thread>

Classes

Type Name
struct t_schema_file_list_info

Public Types

Type Name
typedef struct t_schema_file_list_info T_SCHEMA_FILE_LIST_INFO

Public Attributes

Type Name
const char * LOADDB_LOG_FILENAME_SUFFIX = "loaddb.log"
const int LOAD_INDEX_MIN_SORT_BUFFER_PAGES = 8192
const char * LOAD_INDEX_MIN_SORT_BUFFER_PAGES_STRING = "8192"
int interrupt_query = [**false**](broker__monitor_8c.md#function-timeout)
bool load_interrupted = [**false**](broker__monitor_8c.md#function-timeout)

Public Static Attributes

Type Name
FILE * loaddb_log_file

Public Functions

Type Name
int loaddb_dba (UTIL_FUNCTION_ARG * arg)
int loaddb_user (UTIL_FUNCTION_ARG * arg)
void print_log_msg (int verbose, const char * fmt, ...)

Public Static Functions

Type Name
void get_loaddb_args (UTIL_ARG_MAP * arg_map, load_args * args)
FILE * ldr_check_file (std::string & file_name, int & error_code)
T_SCHEMA_FILE_LIST_INFO ** ldr_check_file_list (std::string & file_name, int & num_files, int & error_code)
int ldr_compare_attribute_with_meta (char * table_name, char * meta, DB_ATTRIBUTE * attribute)
int ldr_compare_storage_order (FILE * schema_file)
void ldr_compat_serial_call_target (DB_SESSION * session)
int ldr_exec_query_from_file (const char * file_name, FILE * input_stream, int * start_line, load_args * args)
void ldr_exec_query_interrupt_handler (void)
void ldr_free_and_fclose (T_SCHEMA_FILE_LIST_INFO ** file_list, int num)
int ldr_get_start_line_no (std::string & file_name)
char * ldr_get_token (char * str, char ** out_str, char start, char end)
int ldr_load_schema_file (FILE * schema_fp, int schema_file_start_line, load_args args)
void ldr_print_error_msg (int line, int base_line, const char * file_name)
void ldr_server_load (load_args * args, int * exit_status, bool * interrupted)
int ldr_validate_object_file (const char * argv0, load_args * args)
int load_has_authorization (const std::string & class_name, DB_AUTH au_type)
int load_object_file (load_args * args, int * exit_status)
void load_usage (const char * argv0)
int loaddb_internal (UTIL_FUNCTION_ARG * arg, int dba_mode)
void print_er_msg ()
void print_stats (std::vector< cubload::stats > & stats, cubload::load_args & args, int * status)
void register_signal_handlers ()

Macros

Type Name
define fclose_and_init (fp) /* multi line expression */

Public Types Documentation

typedef T_SCHEMA_FILE_LIST_INFO

typedef struct t_schema_file_list_info T_SCHEMA_FILE_LIST_INFO;

Public Attributes Documentation

variable LOADDB_LOG_FILENAME_SUFFIX

const char* LOADDB_LOG_FILENAME_SUFFIX;

variable LOAD_INDEX_MIN_SORT_BUFFER_PAGES

const int LOAD_INDEX_MIN_SORT_BUFFER_PAGES;

variable LOAD_INDEX_MIN_SORT_BUFFER_PAGES_STRING

const char* LOAD_INDEX_MIN_SORT_BUFFER_PAGES_STRING;

variable interrupt_query

int interrupt_query;

variable load_interrupted

bool load_interrupted;

Public Static Attributes Documentation

variable loaddb_log_file

FILE* loaddb_log_file;

Public Functions Documentation

function loaddb_dba

int loaddb_dba (
    UTIL_FUNCTION_ARG * arg
) 

function loaddb_user

int loaddb_user (
    UTIL_FUNCTION_ARG * arg
) 

function print_log_msg

void print_log_msg (
    int verbose,
    const  char * fmt,
    ...
) 

Public Static Functions Documentation

function get_loaddb_args

static void get_loaddb_args (
    UTIL_ARG_MAP * arg_map,
    load_args * args
) 

function ldr_check_file

static FILE * ldr_check_file (
    std::string & file_name,
    int & error_code
) 

function ldr_check_file_list

static T_SCHEMA_FILE_LIST_INFO ** ldr_check_file_list (
    std::string & file_name,
    int & num_files,
    int & error_code
) 

function ldr_compare_attribute_with_meta

static int ldr_compare_attribute_with_meta (
    char * table_name,
    char * meta,
    DB_ATTRIBUTE * attribute
) 

function ldr_compare_storage_order

static int ldr_compare_storage_order (
    FILE * schema_file
) 

function ldr_compat_serial_call_target

static void ldr_compat_serial_call_target (
    DB_SESSION * session
) 

function ldr_exec_query_from_file

static int ldr_exec_query_from_file (
    const  char * file_name,
    FILE * input_stream,
    int * start_line,
    load_args * args
) 

function ldr_exec_query_interrupt_handler

static void ldr_exec_query_interrupt_handler (
    void
) 

function ldr_free_and_fclose

static void ldr_free_and_fclose (
    T_SCHEMA_FILE_LIST_INFO ** file_list,
    int num
) 

function ldr_get_start_line_no

static int ldr_get_start_line_no (
    std::string & file_name
) 

function ldr_get_token

static char * ldr_get_token (
    char * str,
    char ** out_str,
    char start,
    char end
) 

function ldr_load_schema_file

static int ldr_load_schema_file (
    FILE * schema_fp,
    int schema_file_start_line,
    load_args args
) 

function ldr_print_error_msg

static void ldr_print_error_msg (
    int line,
    int base_line,
    const  char * file_name
) 

function ldr_server_load

static void ldr_server_load (
    load_args * args,
    int * exit_status,
    bool * interrupted
) 

function ldr_validate_object_file

static int ldr_validate_object_file (
    const  char * argv0,
    load_args * args
) 

function load_has_authorization

static int load_has_authorization (
    const std::string & class_name,
    DB_AUTH au_type
) 

function load_object_file

static int load_object_file (
    load_args * args,
    int * exit_status
) 

function load_usage

static void load_usage (
    const  char * argv0
) 

function loaddb_internal

static int loaddb_internal (
    UTIL_FUNCTION_ARG * arg,
    int dba_mode
) 

function print_er_msg

static void print_er_msg () 

function print_stats

static void print_stats (
    std::vector< cubload::stats > & stats,
    cubload::load_args & args,
    int * status
) 

function register_signal_handlers

static void register_signal_handlers () 

Macro Definition Documentation

define fclose_and_init

#define fclose_and_init (
    fp
) `/* multi line expression */`


The documentation for this class was generated from the following file cubrid/src/loaddb/load_db.c