CUBRID Engine  latest
ddl_log.h File Reference
This graph shows which files directly or indirectly include this file:

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)
 

Enumerations

enum  T_LOADDB_FILE_TYPE {
  LOADDB_FILE_TYPE_NONE, LOADDB_FILE_TYPE_INPUT, LOADDB_FILE_TYPE_INDEX, LOADDB_FILE_TYPE_TRIGGER,
  LOADDB_FILE_TYPE_OBJECT, LOADDB_FILE_TYPE_SCHEMA
}
 
enum  T_CSQL_INPUT_TYPE { CSQL_INPUT_TYPE_NONE = -1, CSQL_INPUT_TYPE_FILE, CSQL_INPUT_TYPE_STRING, CSQL_INPUT_TYPE_EDITOR }
 
enum  T_APP_NAME { APP_NAME_NONE, APP_NAME_CAS, APP_NAME_CSQL, APP_NAME_LOADDB }
 

Functions

void logddl_init ()
 
void logddl_free (bool all_free)
 
void logddl_destroy ()
 
void logddl_set_app_name (T_APP_NAME app_name)
 
void logddl_set_db_name (const char *db_name)
 
void logddl_set_user_name (const char *user_name)
 
void logddl_set_ip (const char *ip_addr)
 
void logddl_set_pid (const int pid)
 
void logddl_set_br_name (const char *br_name)
 
void logddl_set_br_index (const int index)
 
void logddl_set_sql_text (char *sql_text, int len)
 
void logddl_set_stmt_type (int stmt_type)
 
void logddl_set_loaddb_file_type (T_LOADDB_FILE_TYPE file_type)
 
void logddl_set_csql_input_type (T_CSQL_INPUT_TYPE input_type)
 
void logddl_set_load_filename (const char *load_filename)
 
void logddl_set_file_line (int file_line)
 
void logddl_set_err_msg (char *msg)
 
void logddl_set_err_code (int err_number)
 
void logddl_set_start_time (struct timeval *time_val)
 
void logddl_set_msg (const char *fmt,...)
 
void logddl_set_execute_type (char type)
 
void logddl_set_commit_count (int count)
 
void logddl_write ()
 
void logddl_write_end ()
 
bool logddl_is_ddl_type (int node_type)
 
void logddl_set_commit_mode (bool mode)
 
void logddl_write_tran_str (const char *fmt,...)
 
void logddl_write_end_for_csql_fileinput (const char *fmt,...)
 
void logddl_set_logging_enabled (bool enable)
 
void logddl_set_jsp_mode (bool mode)
 
bool logddl_get_jsp_mode ()
 

Macro Definition Documentation

#define DDL_LOG_BUFFER_SIZE   (8192)
#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().

Enumeration Type Documentation

enum T_APP_NAME
Enumerator
APP_NAME_NONE 
APP_NAME_CAS 
APP_NAME_CSQL 
APP_NAME_LOADDB 

Definition at line 58 of file ddl_log.h.

Enumerator
CSQL_INPUT_TYPE_NONE 
CSQL_INPUT_TYPE_FILE 
CSQL_INPUT_TYPE_STRING 
CSQL_INPUT_TYPE_EDITOR 

Definition at line 50 of file ddl_log.h.

Enumerator
LOADDB_FILE_TYPE_NONE 
LOADDB_FILE_TYPE_INPUT 
LOADDB_FILE_TYPE_INDEX 
LOADDB_FILE_TYPE_TRIGGER 
LOADDB_FILE_TYPE_OBJECT 
LOADDB_FILE_TYPE_SCHEMA 

Definition at line 40 of file ddl_log.h.

Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void logddl_set_err_code ( int  err_number)
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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void logddl_set_start_time ( struct timeval *  time_val)
void logddl_set_stmt_type ( int  stmt_type)
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().

Here is the caller graph for this function: