CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include "porting.h"
#include "authenticate.h"
#include "db.h"
#include "extract_schema.hpp"
#include "message_catalog.h"
#include "environment_variable.h"
#include "printer.hpp"
#include "schema_manager.h"
#include "locator_cl.h"
#include "unloaddb.h"
#include "load_object.h"
#include "utility.h"
#include "util_func.h"
Go to the source code of this file.
Functions | |
static void | unload_usage (const char *argv0) |
int | unloaddb (UTIL_FUNCTION_ARG *arg) |
Variables | |
char * | database_name = NULL |
const char * | output_dirname = NULL |
char * | input_filename = NULL |
FILE * | output_file = NULL |
TEXT_OUTPUT | object_output = { NULL, NULL, 0, 0, NULL } |
TEXT_OUTPUT * | obj_out = &object_output |
int | page_size = 4096 |
int | cached_pages = 100 |
int64_t | est_size = 0 |
char * | hash_filename = NULL |
int | debug_flag = 0 |
bool | verbose_flag = false |
bool | include_references = false |
bool | required_class_only = false |
bool | datafile_per_class = false |
LIST_MOPS * | class_table = NULL |
DB_OBJECT ** | req_class_table = NULL |
int | lo_count = 0 |
char * | output_prefix = NULL |
bool | do_schema = false |
bool | do_objects = false |
bool | ignore_err_flag = false |
|
static |
Definition at line 77 of file unloaddb.c.
References basename(), MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_GENERIC_INVALID_ARGUMENT, MSGCAT_UTIL_SET_UNLOADDB, and util_log_write_errid().
Referenced by unloaddb().
int unloaddb | ( | UTIL_FUNCTION_ARG * | arg | ) |
Definition at line 93 of file unloaddb.c.
References UTIL_FUNCTION_ARG::arg_map, UTIL_FUNCTION_ARG::argv0, au_fetch_class(), AU_FETCH_READ, AU_RESTORE, AU_SAVE_AND_ENABLE, AU_SELECT, cached_pages, extract_context::clear_schema_workspace(), UTIL_FUNCTION_ARG::command_name, create_filename_indexes(), create_filename_schema(), create_filename_trigger(), database_name, datafile_per_class, DB_CLIENT_TYPE_ADMIN_UTILITY, db_error_code(), db_error_string(), DB_FETCH_READ, db_restart_ex(), db_set_lock_timeout(), db_shutdown(), DB_SIZEOF, extract_context::do_auth, do_objects, do_schema, ER_AU_INVALID_PASSWORD, er_init(), ER_NEVER_EXIT, error(), est_size, extract_context::exec_name, extract_classes_to_file(), extract_indexes_to_file(), extract_objects(), extract_triggers_to_file(), FOLLOW_ATTRIBUTE_ORDER, FOLLOW_STORAGE_ORDER, free_and_init, get_requested_classes(), hash_filename, i, ignore_err_flag, include_references, input_filename, lo_count, locator_decache_all_lock_instances(), locator_free_list_mops(), locator_get_all_mops(), MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_GENERIC_INVALID_ARGUMENT, MSGCAT_UTIL_GENERIC_NO_MEM, MSGCAT_UTIL_SET_UNLOADDB, NO_ERROR, NULL, list_mops::num, OPTION_STRING_TABLE, output_dirname, output_prefix, PRINT_AND_LOG_ERR_MSG, prm_get_bool_value(), prm_get_integer_value(), prm_get_name(), PRM_ID_JAVA_STORED_PROCEDURE, PRM_ID_UNLOADDB_IGNORE_ERROR, PRM_ID_UNLOADDB_LOCK_TIMEOUT, required_class_only, sm_ch_name(), sm_Root_class_mop, extract_context::storage_order, sysprm_set_force(), UNLOAD_CACHED_PAGES_S, UNLOAD_DATA_ONLY_S, UNLOAD_DATAFILE_PER_CLASS_S, UNLOAD_ESTIMATED_SIZE_S, UNLOAD_HASH_FILE_S, UNLOAD_INCLUDE_REFERENCE_S, UNLOAD_INPUT_CLASS_FILE_S, UNLOAD_INPUT_CLASS_ONLY_S, UNLOAD_KEEP_STORAGE_ORDER_S, UNLOAD_LO_COUNT_S, UNLOAD_OUTPUT_PATH_S, UNLOAD_OUTPUT_PREFIX_S, UNLOAD_PASSWORD_S, UNLOAD_SCHEMA_ONLY_S, unload_usage(), UNLOAD_USE_DELIMITER_S, UNLOAD_USER_S, UNLOAD_VERBOSE_S, UNLOADDB_MSG_PASSWORD_PROMPT, util_log_write_errid(), util_log_write_errstr(), utility_get_option_bool_value(), utility_get_option_int_value(), utility_get_option_string_table_size(), utility_get_option_string_value(), verbose_flag, and ws_find().
int cached_pages = 100 |
Definition at line 53 of file unloaddb.c.
Referenced by extract_objects(), fh_create(), and unloaddb().
Definition at line 62 of file unloaddb.c.
Referenced by fetch_class().
char* database_name = NULL |
Definition at line 45 of file unloaddb.c.
Referenced by unloaddb().
bool datafile_per_class = false |
Definition at line 61 of file unloaddb.c.
Referenced by extract_objects(), process_object(), process_value(), and unloaddb().
int debug_flag = 0 |
Definition at line 56 of file unloaddb.c.
Referenced by extractobjects_cleanup(), jsp_start_server(), process_object(), and process_value().
bool do_objects = false |
Definition at line 69 of file unloaddb.c.
Referenced by unloaddb().
bool do_schema = false |
Definition at line 68 of file unloaddb.c.
Referenced by unloaddb().
int64_t est_size = 0 |
Definition at line 54 of file unloaddb.c.
Referenced by extract_objects(), fh_create(), mht_rehash(), and unloaddb().
char* hash_filename = NULL |
Definition at line 55 of file unloaddb.c.
Referenced by extract_objects(), and unloaddb().
bool ignore_err_flag = false |
Definition at line 70 of file unloaddb.c.
Referenced by extract_objects(), process_class(), process_object(), process_set(), process_value(), and unloaddb().
bool include_references = false |
Definition at line 58 of file unloaddb.c.
Referenced by process_value(), set_referenced_subclasses(), and unloaddb().
char* input_filename = NULL |
Definition at line 47 of file unloaddb.c.
Referenced by compactdb(), extract_objects(), get_ordered_classes(), process_value(), set_referenced_subclasses(), and unloaddb().
int lo_count = 0 |
Definition at line 65 of file unloaddb.c.
Referenced by unloaddb().
TEXT_OUTPUT* obj_out = &object_output |
Definition at line 51 of file unloaddb.c.
Referenced by extract_objects(), extractobjects_cleanup(), process_class(), process_object(), process_set(), and process_value().
TEXT_OUTPUT object_output = { NULL, NULL, 0, 0, NULL } |
Definition at line 49 of file unloaddb.c.
Definition at line 46 of file unloaddb.c.
Referenced by unloaddb().
FILE* output_file = NULL |
Definition at line 48 of file unloaddb.c.
Referenced by createdb(), deletedb(), diagdb(), extract_classes_to_file(), extract_indexes_to_file(), extract_triggers_to_file(), lockdb(), paramdump(), plandump(), spacedb(), statdump(), and vacuumdb().
char* output_prefix = NULL |
Definition at line 67 of file unloaddb.c.
Referenced by unloaddb().
int page_size = 4096 |
Definition at line 52 of file unloaddb.c.
Referenced by cursor_get_list_file_page(), extract_objects(), fh_create(), fileio_format(), fileio_get_number_of_partition_free_pages(), fileio_get_number_of_volume_pages(), find_valid_page_size(), la_init_recdes_pool(), qfile_get_list_file_page(), qmgr_prepare_and_execute_query(), sqfile_get_list_file_page(), sqmgr_execute_query(), and sqmgr_prepare_and_execute_query().
Definition at line 63 of file unloaddb.c.
Referenced by is_req_class().
bool required_class_only = false |
Definition at line 60 of file unloaddb.c.
Referenced by extract_classes(), extract_objects(), get_ordered_classes(), process_value(), and unloaddb().
bool verbose_flag = false |
Definition at line 57 of file unloaddb.c.
Referenced by compactdb(), extract_objects(), process_class(), and unloaddb().