CUBRID Engine  latest
broker_log_util.h File Reference
#include <sys/time.h>
#include "cas_common.h"
#include "log_top_string.h"
Include dependency graph for broker_log_util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CAS_LOG_BEGIN_WITH_YEAR   1
 
#define CAS_LOG_BEGIN_WITH_MONTH   2
 
#define CAS_LOG_MSG_INDEX   22
 
#define CAS_RUN_NEW_LINE_CHAR   1
 
#define DATE_STR_LEN   21
 
#define GET_CUR_DATE_STR(BUF, LINEBUF)
 

Functions

char * ut_trim (char *)
 
void ut_tolower (char *str)
 
int ut_get_line (FILE *fp, T_STRING *t_str, char **out_str, int *lineno)
 
int is_cas_log (char *str)
 
char * get_msg_start_ptr (char *linebuf)
 
int str_to_log_date_format (char *str, char *date_format_str)
 
char * ut_get_execute_type (char *msg_p, int *prepare_flag, int *execute_flag)
 
int ut_check_log_valid_time (const char *log_date, const char *from_date, const char *to_date)
 
double ut_diff_time (struct timeval *begin, struct timeval *end)
 

Macro Definition Documentation

#define CAS_LOG_BEGIN_WITH_MONTH   2

Definition at line 39 of file broker_log_util.h.

Referenced by is_cas_log(), and log_top().

#define CAS_LOG_BEGIN_WITH_YEAR   1
#define CAS_LOG_MSG_INDEX   22

Definition at line 41 of file broker_log_util.h.

Referenced by get_msg_start_ptr(), and is_cas_log().

#define CAS_RUN_NEW_LINE_CHAR   1

Definition at line 42 of file broker_log_util.h.

Referenced by log_converter().

#define DATE_STR_LEN   21
#define GET_CUR_DATE_STR (   BUF,
  LINEBUF 
)
Value:
do { \
strncpy(BUF, LINEBUF, DATE_STR_LEN); \
BUF[DATE_STR_LEN] = '\0'; \
} while (0)
#define DATE_STR_LEN

Definition at line 46 of file broker_log_util.h.

Referenced by log_replay(), and log_top().

Function Documentation

char* get_msg_start_ptr ( char *  linebuf)

Definition at line 379 of file broker_log_util.c.

References CAS_LOG_BEGIN_WITH_YEAR, CAS_LOG_MSG_INDEX, is_cas_log(), and NULL.

Referenced by is_bind_with_size(), log_converter(), log_replay(), log_top(), and read_bind_value().

Here is the caller graph for this function:

int is_cas_log ( char *  str)
int str_to_log_date_format ( char *  str,
char *  date_format_str 
)

Definition at line 405 of file broker_log_util.c.

References DATE_VALUE_COUNT, error(), i, and str_to_int32().

Referenced by get_args().

Here is the caller graph for this function:

int ut_check_log_valid_time ( const char *  log_date,
const char *  from_date,
const char *  to_date 
)

Definition at line 480 of file broker_log_util.c.

References DATE_STR_LEN.

Referenced by log_replay().

Here is the caller graph for this function:

double ut_diff_time ( struct timeval *  begin,
struct timeval *  end 
)

Definition at line 497 of file broker_log_util.c.

Referenced by cas_runner(), log_execute(), log_replay(), process_endtran(), and process_execute().

Here is the caller graph for this function:

char* ut_get_execute_type ( char *  msg_p,
int *  prepare_flag,
int *  execute_flag 
)

Definition at line 453 of file broker_log_util.c.

References NULL.

Referenced by log_converter(), log_execute(), and log_prepare().

Here is the caller graph for this function:

int ut_get_line ( FILE *  fp,
T_STRING t_str,
char **  out_str,
int *  lineno 
)
void ut_tolower ( char *  str)

Definition at line 73 of file broker_log_util.c.

char* ut_trim ( char *  )

Definition at line 43 of file broker_log_util.c.