CUBRID Engine
latest
|
Go to the source code of this file.
Macros | |
#define | LOGDDL_RUN_EXECUTE_FUNC (1) |
#define | LOGDDL_RUN_EXECUTE_BATCH_FUNC (2) |
#define | LOGDDL_MSG_AUTO_COMMIT "auto_commit" |
#define | LOGDDL_MSG_AUTO_ROLLBACK "auto_rollback" |
#define | LOGDDL_TRAN_TYPE_COMMIT "COMMIT" |
#define | LOGDDL_TRAN_TYPE_ROLLBACK "ROLLBACK" |
#define | DDL_LOG_BUFFER_SIZE (8192) |
#define DDL_LOG_BUFFER_SIZE (8192) |
Definition at line 38 of file ddl_log.h.
Referenced by csql_execute_statements(), logddl_create_log_msg(), logddl_write(), logddl_write_end_for_csql_fileinput(), and logddl_write_tran_str().
#define LOGDDL_MSG_AUTO_COMMIT "auto_commit" |
Definition at line 32 of file ddl_log.h.
Referenced by csql_execute_statements().
#define LOGDDL_MSG_AUTO_ROLLBACK "auto_rollback" |
Definition at line 33 of file ddl_log.h.
Referenced by csql_execute_statements().
#define LOGDDL_RUN_EXECUTE_BATCH_FUNC (2) |
Definition at line 30 of file ddl_log.h.
Referenced by logddl_create_log_msg(), and ux_execute_batch().
#define LOGDDL_RUN_EXECUTE_FUNC (1) |
Definition at line 29 of file ddl_log.h.
Referenced by logddl_free(), logddl_init(), and logddl_write_end().
#define LOGDDL_TRAN_TYPE_COMMIT "COMMIT" |
Definition at line 35 of file ddl_log.h.
Referenced by csql_do_session_cmd(), csql_execute_statements(), and csql_exit_session().
#define LOGDDL_TRAN_TYPE_ROLLBACK "ROLLBACK" |
Definition at line 36 of file ddl_log.h.
Referenced by csql_do_session_cmd(), csql_execute_statements(), and csql_exit_session().
enum T_APP_NAME |
enum T_CSQL_INPUT_TYPE |
enum T_LOADDB_FILE_TYPE |
void logddl_destroy | ( | ) |
Definition at line 185 of file ddl_log.c.
References t_ddl_audit_handle::err_msg, FREE_MEM, NULL, and t_ddl_audit_handle::sql_text.
Referenced by cas_free(), csql(), and loaddb_internal().
void logddl_free | ( | bool | all_free | ) |
Definition at line 143 of file ddl_log.c.
References t_ddl_audit_handle::auto_commit_mode, t_ddl_audit_handle::commit_count, t_ddl_audit_handle::copy_filename, t_ddl_audit_handle::copy_fullpath, t_ddl_audit_handle::csql_input_type, CSQL_INPUT_TYPE_NONE, ddl_logging_enabled, t_ddl_audit_handle::elapsed_time, t_ddl_audit_handle::err_code, t_ddl_audit_handle::err_msg, t_ddl_audit_handle::execute_type, t_ddl_audit_handle::file_line_number, FREE_MEM, is_executed_ddl_for_csql, is_executed_ddl_for_trans, t_ddl_audit_handle::jsp_mode, t_ddl_audit_handle::load_filename, t_ddl_audit_handle::loaddb_file_type, LOADDB_FILE_TYPE_NONE, t_ddl_audit_handle::log_filepath, logddl_init(), LOGDDL_RUN_EXECUTE_FUNC, t_ddl_audit_handle::msg, NULL, t_ddl_audit_handle::sql_text, t_ddl_audit_handle::stmt_type, and t_ddl_audit_handle::str_qry_exec_begin_time.
Referenced by csql_execute_statements(), fn_con_close(), logddl_write_end(), logddl_write_end_for_csql_fileinput(), and logddl_write_tran_str().
bool logddl_get_jsp_mode | ( | ) |
Definition at line 440 of file ddl_log.c.
References t_ddl_audit_handle::jsp_mode.
Referenced by csql_execute_statements(), and process_request().
void logddl_init | ( | ) |
Definition at line 119 of file ddl_log.c.
References t_ddl_audit_handle::csql_input_type, CSQL_INPUT_TYPE_NONE, t_ddl_audit_handle::err_msg, t_ddl_audit_handle::execute_type, FREE_MEM, t_ddl_audit_handle::loaddb_file_type, LOADDB_FILE_TYPE_NONE, LOGDDL_RUN_EXECUTE_FUNC, MALLOC, NULL, t_ddl_audit_handle::sql_text, and t_ddl_audit_handle::stmt_type.
Referenced by cas_main(), csql(), loaddb_internal(), and logddl_free().
bool logddl_is_ddl_type | ( | int | node_type | ) |
Definition at line 1330 of file ddl_log.c.
References PT_ALTER, PT_ALTER_INDEX, PT_ALTER_SERIAL, PT_ALTER_STORED_PROCEDURE, PT_ALTER_TRIGGER, PT_ALTER_USER, PT_CREATE_ENTITY, PT_CREATE_INDEX, PT_CREATE_SERIAL, PT_CREATE_STORED_PROCEDURE, PT_CREATE_TRIGGER, PT_CREATE_USER, PT_DROP, PT_DROP_INDEX, PT_DROP_SERIAL, PT_DROP_STORED_PROCEDURE, PT_DROP_TRIGGER, PT_DROP_USER, PT_GRANT, PT_REMOVE_TRIGGER, PT_RENAME, PT_RENAME_TRIGGER, PT_REVOKE, PT_TRUNCATE, and PT_UPDATE_STATS.
Referenced by logddl_is_exist_ddl_stmt(), logddl_set_stmt_type(), logddl_write(), and logddl_write_end().
void logddl_set_app_name | ( | T_APP_NAME | app_name | ) |
Definition at line 196 of file ddl_log.c.
References t_ddl_audit_handle::app_name, and ddl_logging_enabled.
Referenced by cas_main(), csql(), and loaddb_internal().
void logddl_set_br_index | ( | const int | index | ) |
Definition at line 259 of file ddl_log.c.
References t_ddl_audit_handle::br_index, and ddl_logging_enabled.
Referenced by cas_main().
void logddl_set_br_name | ( | const char * | br_name | ) |
Definition at line 250 of file ddl_log.c.
References t_ddl_audit_handle::br_name, BROKER_NAME_LEN, ddl_logging_enabled, and NULL.
Referenced by cas_main().
void logddl_set_commit_count | ( | int | count | ) |
Definition at line 413 of file ddl_log.c.
References t_ddl_audit_handle::commit_count, cubregex::count(), and ddl_logging_enabled.
Referenced by ldr_exec_query_from_file().
void logddl_set_commit_mode | ( | bool | mode | ) |
Definition at line 422 of file ddl_log.c.
References t_ddl_audit_handle::auto_commit_mode, ddl_logging_enabled, and mode.
Referenced by csql_do_session_cmd(), csql_execute_statements(), fn_execute_batch(), fn_execute_internal(), fn_prepare_internal(), and start_csql().
void logddl_set_csql_input_type | ( | T_CSQL_INPUT_TYPE | input_type | ) |
Definition at line 317 of file ddl_log.c.
References t_ddl_audit_handle::csql_input_type, and ddl_logging_enabled.
Referenced by csql_execute_statements().
void logddl_set_db_name | ( | const char * | db_name | ) |
Definition at line 205 of file ddl_log.c.
References t_ddl_audit_handle::db_name, ddl_logging_enabled, and NULL.
Referenced by cas_main(), csql(), and loaddb_internal().
void logddl_set_err_code | ( | int | err_number | ) |
Definition at line 361 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::err_code.
Referenced by csql_execute_statements(), fn_execute_internal(), fn_prepare_internal(), ldr_exec_query_from_file(), loaddb_internal(), and ux_execute_batch().
void logddl_set_err_msg | ( | char * | msg | ) |
Definition at line 344 of file ddl_log.c.
References ALLOC_COPY, ddl_logging_enabled, t_ddl_audit_handle::err_msg, FREE_MEM, logddl_remove_char(), and NULL.
Referenced by nonscr_display_error().
void logddl_set_execute_type | ( | char | type | ) |
Definition at line 404 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::execute_type.
Referenced by ux_execute_batch().
void logddl_set_file_line | ( | int | file_line | ) |
Definition at line 335 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::file_line_number.
Referenced by csql_execute_statements(), and ldr_exec_query_from_file().
void logddl_set_ip | ( | const char * | ip_addr | ) |
Definition at line 232 of file ddl_log.c.
References ddl_logging_enabled, t_ddl_audit_handle::ip_addr, and NULL.
Referenced by cas_main(), and csql().
void logddl_set_jsp_mode | ( | bool | mode | ) |
Definition at line 431 of file ddl_log.c.
References ddl_logging_enabled, t_ddl_audit_handle::jsp_mode, and mode.
Referenced by cas_main().
void logddl_set_load_filename | ( | const char * | load_filename | ) |
Definition at line 326 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::load_filename.
Referenced by csql_execute_statements(), and loaddb_internal().
void logddl_set_loaddb_file_type | ( | T_LOADDB_FILE_TYPE | file_type | ) |
Definition at line 308 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::loaddb_file_type.
Referenced by loaddb_internal().
void logddl_set_logging_enabled | ( | bool | enable | ) |
Definition at line 995 of file ddl_log.c.
References ddl_logging_enabled.
Referenced by cas_main(), csql(), csql_execute_statements(), and loaddb_internal().
void logddl_set_msg | ( | const char * | fmt, |
... | |||
) |
Definition at line 392 of file ddl_log.c.
References DDL_LOG_MSG, ddl_logging_enabled, and t_ddl_audit_handle::msg.
Referenced by csql_execute_statements(), ldr_exec_query_from_file(), ux_auto_commit(), and ux_execute_batch().
void logddl_set_pid | ( | const int | pid | ) |
Definition at line 241 of file ddl_log.c.
References ddl_logging_enabled, and t_ddl_audit_handle::pid.
Referenced by cas_main(), csql(), and loaddb_internal().
void logddl_set_sql_text | ( | char * | sql_text, |
int | len | ||
) |
Definition at line 268 of file ddl_log.c.
References ddl_logging_enabled, FREE_MEM, MALLOC, NULL, and t_ddl_audit_handle::sql_text.
Referenced by csql_execute_statements(), fn_execute_array(), fn_execute_internal(), fn_prepare_internal(), and ux_execute_batch().
void logddl_set_start_time | ( | struct timeval * | time_val | ) |
Definition at line 370 of file ddl_log.c.
References ddl_logging_enabled, logddl_get_time_string(), NULL, t_ddl_audit_handle::qry_exec_begin_time, and t_ddl_audit_handle::str_qry_exec_begin_time.
Referenced by cas_main(), csql_execute_statements(), ldr_exec_query_from_file(), net_read_int_keep_con_auto(), and net_read_process().
void logddl_set_stmt_type | ( | int | stmt_type | ) |
Definition at line 291 of file ddl_log.c.
References ddl_logging_enabled, is_executed_ddl_for_csql, is_executed_ddl_for_trans, logddl_is_ddl_type(), NULL, and t_ddl_audit_handle::stmt_type.
Referenced by csql_execute_statements(), fn_execute_internal(), ux_execute_batch(), and ux_prepare().
void logddl_set_user_name | ( | const char * | user_name | ) |
Definition at line 223 of file ddl_log.c.
References ddl_logging_enabled, NULL, and t_ddl_audit_handle::user_name.
Referenced by cas_main(), csql(), and loaddb_internal().
void logddl_write | ( | ) |
Definition at line 706 of file ddl_log.c.
References t_ddl_audit_handle::app_name, APP_NAME_CSQL, APP_NAME_LOADDB, t_ddl_audit_handle::copy_filename, t_ddl_audit_handle::copy_fullpath, t_ddl_audit_handle::csql_input_type, CSQL_INPUT_TYPE_FILE, DDL_LOG_BUFFER_SIZE, ddl_logging_enabled, t_ddl_audit_handle::load_filename, t_ddl_audit_handle::loaddb_file_type, LOADDB_FILE_TYPE_INDEX, LOADDB_FILE_TYPE_SCHEMA, LOADDB_FILE_TYPE_TRIGGER, t_ddl_audit_handle::log_filepath, logddl_backup(), logddl_create_log_msg(), logddl_file_copy(), logddl_is_ddl_type(), logddl_make_copy_dir(), logddl_make_copy_filename(), logddl_open(), NULL, prm_get_bigint_value(), PRM_ID_DDL_AUDIT_LOG_SIZE, t_ddl_audit_handle::stmt_type, and strlen.
Referenced by logddl_write_end(), and ux_execute_batch().
void logddl_write_end | ( | ) |
Definition at line 668 of file ddl_log.c.
References t_ddl_audit_handle::app_name, APP_NAME_LOADDB, ddl_logging_enabled, t_ddl_audit_handle::execute_type, t_ddl_audit_handle::loaddb_file_type, LOADDB_FILE_TYPE_INDEX, LOADDB_FILE_TYPE_SCHEMA, LOADDB_FILE_TYPE_TRIGGER, logddl_free(), logddl_is_ddl_type(), LOGDDL_RUN_EXECUTE_FUNC, logddl_write(), NULL, prm_get_bool_value(), PRM_ID_DDL_AUDIT_LOG, and t_ddl_audit_handle::stmt_type.
Referenced by csql_execute_statements(), loaddb_internal(), process_request(), and ux_execute_batch().
void logddl_write_end_for_csql_fileinput | ( | const char * | fmt, |
... | |||
) |
Definition at line 917 of file ddl_log.c.
References t_ddl_audit_handle::app_name, APP_NAME_CSQL, t_ddl_audit_handle::copy_filename, t_ddl_audit_handle::copy_fullpath, t_ddl_audit_handle::csql_input_type, CSQL_INPUT_TYPE_FILE, DDL_LOG_BUFFER_SIZE, DDL_LOG_MSG, ddl_logging_enabled, is_executed_ddl_for_csql, t_ddl_audit_handle::load_filename, t_ddl_audit_handle::log_filepath, logddl_backup(), logddl_create_log_msg(), logddl_file_copy(), logddl_free(), logddl_get_time_string(), logddl_make_copy_dir(), logddl_make_copy_filename(), logddl_open(), t_ddl_audit_handle::msg, NULL, prm_get_bigint_value(), PRM_ID_DDL_AUDIT_LOG_SIZE, t_ddl_audit_handle::str_qry_exec_begin_time, and strlen.
Referenced by csql_execute_statements().
void logddl_write_tran_str | ( | const char * | fmt, |
... | |||
) |
Definition at line 807 of file ddl_log.c.
References t_ddl_audit_handle::app_name, APP_NAME_CAS, APP_NAME_CSQL, t_ddl_audit_handle::auto_commit_mode, t_ddl_audit_handle::copy_filename, t_ddl_audit_handle::copy_fullpath, t_ddl_audit_handle::csql_input_type, CSQL_INPUT_TYPE_FILE, DDL_LOG_BUFFER_SIZE, DDL_LOG_MSG, ddl_logging_enabled, t_ddl_audit_handle::ip_addr, is_executed_ddl_for_trans, t_ddl_audit_handle::load_filename, t_ddl_audit_handle::log_filepath, logddl_backup(), logddl_file_copy(), logddl_free(), logddl_get_time_string(), logddl_make_copy_dir(), logddl_make_copy_filename(), logddl_open(), t_ddl_audit_handle::msg, NULL, t_ddl_audit_handle::pid, prm_get_bigint_value(), PRM_ID_DDL_AUDIT_LOG_SIZE, t_ddl_audit_handle::str_qry_exec_begin_time, strlen, and t_ddl_audit_handle::user_name.
Referenced by csql_do_session_cmd(), csql_execute_statements(), csql_exit_session(), and fn_end_tran().