CUBRID Engine  latest
unloaddb.h File Reference
#include "locator_cl.h"
Include dependency graph for unloaddb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PRINT_IDENTIFIER(s)   "[", (s), "]"
 
#define PRINT_FUNCTION_INDEX_NAME(s)   "\"", (s), "\""
 

Functions

int is_req_class (DB_OBJECT *class_)
 
int get_requested_classes (const char *input_filename, DB_OBJECT *class_list[])
 
int extract_classes_to_file (extract_context &ctxt, const char *output_filename)
 
int extract_triggers (extract_context &ctxt, print_output &output_ctx)
 
int extract_triggers_to_file (extract_context &ctxt, const char *output_filename)
 
int extract_indexes_to_file (extract_context &ctxt, const char *output_filename)
 
int extract_classes (extract_context &ctxt, print_output &schema_output_ctx)
 
int extract_objects (const char *exec_name, const char *output_dirname, const char *output_prefix)
 
int create_filename_schema (const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
 
int create_filename_trigger (const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
 
int create_filename_indexes (const char *output_dirname, const char *output_prefix, char *output_filename_p, const size_t filename_size)
 

Variables

char * database_name
 
char * input_filename
 
struct text_outputobj_out
 
int page_size
 
int cached_pages
 
int64_t est_size
 
char * hash_filename
 
int debug_flag
 
bool verbose_flag
 
bool include_references
 
bool do_schema
 
bool do_objects
 
bool ignore_err_flag
 
bool required_class_only
 
bool datafile_per_class
 
LIST_MOPSclass_table
 
DB_OBJECT ** req_class_table
 
int lo_count
 

Macro Definition Documentation

#define PRINT_FUNCTION_INDEX_NAME (   s)    "\"", (s), "\""

Definition at line 59 of file unloaddb.h.

Referenced by emit_index_def().

Function Documentation

int create_filename_indexes ( const char *  output_dirname,
const char *  output_prefix,
char *  output_filename_p,
const size_t  filename_size 
)

Definition at line 3481 of file unload_schema.c.

References create_filename(), and INDEX_SUFFIX.

Referenced by unloaddb().

Here is the caller graph for this function:

int create_filename_schema ( const char *  output_dirname,
const char *  output_prefix,
char *  output_filename_p,
const size_t  filename_size 
)

Definition at line 3467 of file unload_schema.c.

References create_filename(), and SCHEMA_SUFFIX.

Referenced by unloaddb().

Here is the caller graph for this function:

int create_filename_trigger ( const char *  output_dirname,
const char *  output_prefix,
char *  output_filename_p,
const size_t  filename_size 
)

Definition at line 3474 of file unload_schema.c.

References create_filename(), and TRIGGER_SUFFIX.

Referenced by unloaddb().

Here is the caller graph for this function:

int extract_classes_to_file ( extract_context ctxt,
const char *  output_filename 
)

Definition at line 821 of file unload_schema.c.

References extract_context::exec_name, extract_classes(), fopen_ex(), NULL, and output_file.

Referenced by unloaddb().

Here is the caller graph for this function:

int extract_indexes_to_file ( extract_context ctxt,
const char *  output_filename 
)
int extract_objects ( const char *  exec_name,
const char *  output_dirname,
const char *  output_prefix 
)

Definition at line 432 of file unload_object.c.

References all_classes_processed(), au_fetch_class(), AU_FETCH_READ, AU_SELECT, text_output::buffer, cached_pages, check_referenced_domain(), class_processed, class_referenced, class_requested, text_output::count, datafile_per_class, db_attribute_name(), DB_FETCH_READ, DB_SIZEOF, sm_attribute::domain, error(), est_size, extractobjects_cleanup(), extractobjects_term_handler(), failed_objects, fh_create(), FH_OID_KEY, fh_put(), fopen_ex(), text_output::fp, free_and_init, get_estimated_objs(), hash_filename, sm_attribute::header, HEADER_FORMAT, HFID_IS_NULL, i, ID_ATTRIBUTE, ignore_err_flag, input_filename, text_output::iosize, IS_CLASS_REFERENCED, IS_CLASS_REQUESTED, is_req_class(), locator_fetch_set(), locator_get_append_lsa(), MARK_CLASS_REFERENCED, MARK_CLASS_REQUESTED, mark_referenced_domain(), MSGCAT_CATALOG_UTILS, msgcat_message(), MSGCAT_UTIL_SET_UNLOADDB, sm_component::name_space, sm_component::next, NO_ERROR, NULL, obj_out, OBJECT_SUFFIX, log_lsa::offset, oid_compare_equals(), oid_hash(), OR_PUT_NULL_OID, sm_attribute::order_link, os_set_signal_handler(), output_filename, page_size, log_lsa::pageid, PRINT_IDENTIFIER, process_class(), prohibited_classes, text_output::ptr, required_class_only, sm_ch_heap(), sm_ch_name(), sm_is_system_class(), sm_Root_class_mop, strlen, text_print(), text_print_flush(), total_approximate_class_objects, total_objects, UNLOADDB_MSG_INVALID_CACHED_PAGE_SIZE, UNLOADDB_MSG_INVALID_CACHED_PAGES, UNLOADDB_MSG_INVALID_DIR_NAME, UNLOADDB_MSG_LOG_LSA, UNLOADDB_MSG_OBJECTS_DUMPED, UNLOADDB_MSG_OBJECTS_FAILED, unloadlog_file, verbose_flag, ws_find(), WS_IS_DELETED, and ws_oid().

Referenced by unloaddb().

Here is the caller graph for this function:

int extract_triggers ( extract_context ctxt,
print_output output_ctx 
)

Definition at line 977 of file unload_schema.c.

References assert, extract_context::classes, NO_ERROR, NULL, and tr_dump_selective_triggers().

Referenced by extract_triggers_to_file().

Here is the caller graph for this function:

int extract_triggers_to_file ( extract_context ctxt,
const char *  output_filename 
)

Definition at line 928 of file unload_schema.c.

References extract_context::exec_name, extract_triggers(), fopen_ex(), NULL, output_file, and output_filename.

Referenced by unloaddb().

Here is the caller graph for this function:

int get_requested_classes ( const char *  input_filename,
DB_OBJECT class_list[] 
)

Definition at line 1867 of file unload_object.c.

References DB_MAX_IDENTIFIER_LENGTH, error(), free_and_init, i, locator_find_class(), ltrim(), NULL, sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, sm_partitioned_class_type(), and strlen.

Referenced by unloaddb().

Here is the caller graph for this function:

int is_req_class ( DB_OBJECT class_)

Definition at line 1802 of file unload_object.c.

References req_class_table.

Referenced by extract_objects(), filter_unrequired_classes(), and set_referenced_subclasses().

Here is the caller graph for this function:

Variable Documentation

int cached_pages

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

Definition at line 45 of file unloaddb.c.

Referenced by unloaddb().

bool datafile_per_class

Definition at line 61 of file unloaddb.c.

Referenced by extract_objects(), process_object(), process_value(), and unloaddb().

int debug_flag

Definition at line 56 of file unloaddb.c.

Referenced by extractobjects_cleanup(), jsp_start_server(), process_object(), and process_value().

bool do_objects

Definition at line 69 of file unloaddb.c.

Referenced by unloaddb().

bool do_schema

Definition at line 68 of file unloaddb.c.

Referenced by unloaddb().

int64_t est_size

Definition at line 54 of file unloaddb.c.

Referenced by extract_objects(), fh_create(), mht_rehash(), and unloaddb().

char* hash_filename

Definition at line 55 of file unloaddb.c.

Referenced by extract_objects(), and unloaddb().

bool ignore_err_flag
bool include_references

Definition at line 58 of file unloaddb.c.

Referenced by process_value(), set_referenced_subclasses(), and unloaddb().

char* input_filename
int lo_count

Definition at line 65 of file unloaddb.c.

Referenced by unloaddb().

DB_OBJECT** req_class_table

Definition at line 63 of file unloaddb.c.

Referenced by is_req_class().

bool required_class_only
bool verbose_flag

Definition at line 57 of file unloaddb.c.

Referenced by compactdb(), extract_objects(), process_class(), and unloaddb().