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

Go to the source code of this file.

Macros

#define SQL_LOG2_NONE   0
 
#define SQL_LOG2_PLAN   1
 
#define SQL_LOG2_HISTO   2
 
#define SQL_LOG2_MAX   (SQL_LOG2_PLAN | SQL_LOG2_HISTO)
 
#define SQL_LOG2_EXEC_BEGIN(SQL_LOG2_VALUE, STMT_ID)
 
#define SQL_LOG2_EXEC_END(SQL_LOG2_VALUE, STMT_ID, RES)
 
#define SQL_LOG2_COMPILE_BEGIN(SQL_LOG2_VALUE, SQL_STMT)
 
#define SQL_LOG2_EXEC_APPEND(SQL_LOG2_VALUE, STMT_ID, RES, PLAN_FILE)
 

Functions

void sql_log2_init (char *br_name, int index, int sql_log2_value, bool log_reuse_flag)
 
char * sql_log2_get_filename (void)
 
void sql_log2_dup_stdout (void)
 
void sql_log2_restore_stdout (void)
 
void sql_log2_end (bool reset_filename_flag)
 
void sql_log2_flush (void)
 
void sql_log2_write (const char *fmt,...)
 
void sql_log2_append_file (char *file_name)
 

Macro Definition Documentation

#define SQL_LOG2_COMPILE_BEGIN (   SQL_LOG2_VALUE,
  SQL_STMT 
)
Value:
do { \
if (SQL_LOG2_VALUE) { \
sql_log2_write("compile : %s", SQL_STMT); \
} \
} while (0)
void sql_log2_write(const char *fmt,...)
Definition: cas_sql_log2.c:140
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 68 of file cas_sql_log2.h.

Referenced by fn_prepare_internal(), and ux_execute_batch().

#define SQL_LOG2_EXEC_APPEND (   SQL_LOG2_VALUE,
  STMT_ID,
  RES,
  PLAN_FILE 
)
Value:
do { \
if (SQL_LOG2_VALUE) { \
sql_log2_write("execute %d", STMT_ID); \
sql_log2_write("execute %d : %d", STMT_ID, RES); \
} \
} while (0)
void sql_log2_write(const char *fmt,...)
Definition: cas_sql_log2.c:140
if(extra_options)
Definition: dynamic_load.c:958
void sql_log2_append_file(char *file_name)
Definition: cas_sql_log2.c:165

Definition at line 75 of file cas_sql_log2.h.

Referenced by ux_execute().

#define SQL_LOG2_EXEC_BEGIN (   SQL_LOG2_VALUE,
  STMT_ID 
)
Value:
do { \
if (SQL_LOG2_VALUE) { \
if ((SQL_LOG2_VALUE) & SQL_LOG2_PLAN) { \
} \
sql_log2_write("execute %d", STMT_ID); \
if ((SQL_LOG2_VALUE) & SQL_LOG2_HISTO) { \
} \
} \
} while (0)
void histo_clear(void)
void set_optimization_level(int level)
Definition: cas_execute.c:9843
void sql_log2_dup_stdout(void)
Definition: cas_sql_log2.c:94
void sql_log2_write(const char *fmt,...)
Definition: cas_sql_log2.c:140
#define SQL_LOG2_PLAN
Definition: cas_sql_log2.h:30
if(extra_options)
Definition: dynamic_load.c:958
#define SQL_LOG2_HISTO
Definition: cas_sql_log2.h:31

Definition at line 40 of file cas_sql_log2.h.

Referenced by ux_execute(), ux_execute_all(), ux_execute_array(), and ux_execute_batch().

#define SQL_LOG2_EXEC_END (   SQL_LOG2_VALUE,
  STMT_ID,
  RES 
)
Value:
do { \
if (SQL_LOG2_VALUE) { \
if ((SQL_LOG2_VALUE) & SQL_LOG2_HISTO) { \
} \
printf("\n"); \
sql_log2_write("execute %d : %d", STMT_ID, RES); \
} \
} while (0)
void histo_print(FILE *stream)
void sql_log2_write(const char *fmt,...)
Definition: cas_sql_log2.c:140
#define NULL
Definition: freelistheap.h:34
if(extra_options)
Definition: dynamic_load.c:958
#define SQL_LOG2_HISTO
Definition: cas_sql_log2.h:31
void sql_log2_restore_stdout(void)
Definition: cas_sql_log2.c:106
void sql_log2_flush(void)
Definition: cas_sql_log2.c:132
void reset_optimization_level_as_saved(void)
Definition: cas_execute.c:9850

Definition at line 54 of file cas_sql_log2.h.

Referenced by ux_execute(), ux_execute_all(), ux_execute_array(), and ux_execute_batch().

#define SQL_LOG2_HISTO   2

Definition at line 31 of file cas_sql_log2.h.

#define SQL_LOG2_MAX   (SQL_LOG2_PLAN | SQL_LOG2_HISTO)

Definition at line 32 of file cas_sql_log2.h.

Referenced by admin_conf_change(), and broker_config_read_internal().

#define SQL_LOG2_NONE   0

Definition at line 29 of file cas_sql_log2.h.

Referenced by broker_config_read_internal().

#define SQL_LOG2_PLAN   1

Definition at line 30 of file cas_sql_log2.h.

Function Documentation

void sql_log2_append_file ( char *  file_name)

Definition at line 165 of file cas_sql_log2.c.

References NULL, and sql_log2_fp.

void sql_log2_dup_stdout ( void  )

Definition at line 94 of file cas_sql_log2.c.

References saved_fd1, and sql_log2_fp.

void sql_log2_end ( bool  reset_filename_flag)

Definition at line 118 of file cas_sql_log2.c.

References NULL, sql_log2_file, and sql_log2_fp.

Referenced by cas_main(), fn_end_tran(), process_request(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_flush ( void  )

Definition at line 132 of file cas_sql_log2.c.

char* sql_log2_get_filename ( void  )

Definition at line 84 of file cas_sql_log2.c.

References NULL, and sql_log2_file.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_init ( char *  br_name,
int  index,
int  sql_log2_value,
bool  log_reuse_flag 
)

Definition at line 53 of file cas_sql_log2.c.

References BROKER_PATH_MAX, dirname(), FID_SQL_LOG2_DIR, FID_SQL_LOG_DIR, get_cubrid_file(), log_count, NULL, sql_log2_file, and sql_log2_fp.

Referenced by cas_main(), fn_end_tran(), process_request(), and shard_cas_main().

Here is the caller graph for this function:

void sql_log2_restore_stdout ( void  )

Definition at line 106 of file cas_sql_log2.c.

References saved_fd1, and sql_log2_fp.

void sql_log2_write ( const char *  fmt,
  ... 
)

Definition at line 140 of file cas_sql_log2.c.

References NULL, and sql_log2_fp.