CUBRID Engine
latest
|
#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"
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_INFO * | sql_list = NULL |
static int | num_sql_list = 0 |
#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().
Definition at line 231 of file broker_log_sql_list.c.
Referenced by sql_info_write(), and sql_list_make().
|
static |
Definition at line 237 of file broker_log_sql_list.c.
Referenced by sql_info_write(), and sql_list_make().
|
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().
|
static |
Definition at line 225 of file broker_log_sql_list.c.
Referenced by sql_info_add().
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().
int sql_list_make | ( | char * | list_file | ) |
Definition at line 51 of file broker_log_sql_list.c.
References comp_func(), error(), IS_NEXT_QUERY, LINE_BUF_SIZE, NULL, num_sql_list, sql_change_comp_form(), sql_info_add(), strlen, t_string_add(), t_string_clear(), t_string_free(), t_string_make(), t_string_str(), and ut_get_line().
Referenced by log_top_query().
|
static |
Definition at line 48 of file broker_log_sql_list.c.
Referenced by sql_info_add(), sql_info_write(), and sql_list_make().
|
static |
Definition at line 47 of file broker_log_sql_list.c.