CUBRID Engine  latest
broker_log_sql_list.c File Reference
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include <string.h>
#include "cas_common.h"
#include "broker_log_sql_list.h"
#include "broker_log_util.h"
#include "log_top_string.h"
Include dependency graph for broker_log_sql_list.c:

Go to the source code of this file.

Macros

#define IS_NEXT_QUERY(STR)   (strncmp(STR, "=================", 10) == 0)
 
#define LINE_BUF_SIZE   10000
 

Functions

static void sql_info_init (T_SQL_INFO *sql_info)
 
static int sql_info_add (const char *sql, char *sql_tag)
 
static int comp_func (const void *arg1, const void *arg2)
 
static void sql_change_comp_form (char *src, char *dest)
 
int sql_list_make (char *list_file)
 
int sql_info_write (char *src_sql, char *q_name, FILE *fp)
 

Variables

static T_SQL_INFOsql_list = NULL
 
static int num_sql_list = 0
 

Macro Definition Documentation

#define IS_NEXT_QUERY (   STR)    (strncmp(STR, "=================", 10) == 0)

Definition at line 38 of file broker_log_sql_list.c.

Referenced by sql_list_make().

#define LINE_BUF_SIZE   10000

Definition at line 40 of file broker_log_sql_list.c.

Referenced by sql_list_make().

Function Documentation

static int comp_func ( const void *  arg1,
const void *  arg2 
)
static

Definition at line 231 of file broker_log_sql_list.c.

Referenced by sql_info_write(), and sql_list_make().

Here is the caller graph for this function:

static void sql_change_comp_form ( char *  src,
char *  dest 
)
static

Definition at line 237 of file broker_log_sql_list.c.

References p, and ut_trim().

Referenced by sql_info_write(), and sql_list_make().

Here is the caller graph for this function:

static int sql_info_add ( const char *  sql,
char *  sql_tag 
)
static

Definition at line 172 of file broker_log_sql_list.c.

References t_sql_info::filename, i, NULL, t_sql_info::num_file, num_sql_list, REALLOC, t_sql_info::sql, sql_info_init(), and strdup().

Referenced by sql_list_make().

Here is the caller graph for this function:

static void sql_info_init ( T_SQL_INFO sql_info)
static

Definition at line 225 of file broker_log_sql_list.c.

Referenced by sql_info_add().

Here is the caller graph for this function:

int sql_info_write ( char *  src_sql,
char *  q_name,
FILE *  fp 
)

Definition at line 136 of file broker_log_sql_list.c.

References comp_func(), t_sql_info::filename, FREE_MEM, i, NULL, t_sql_info::num_file, num_sql_list, t_sql_info::sql, sql_change_comp_form(), and strdup().

Referenced by query_info_print().

Here is the caller graph for this function:

int sql_list_make ( char *  list_file)

Variable Documentation

int num_sql_list = 0
static

Definition at line 48 of file broker_log_sql_list.c.

Referenced by sql_info_add(), sql_info_write(), and sql_list_make().

T_SQL_INFO* sql_list = NULL
static

Definition at line 47 of file broker_log_sql_list.c.