CUBRID Engine
latest
|
#include "config.h"
#include <stdarg.h>
#include <string.h>
#include <signal.h>
#include <assert.h>
#include "csql.h"
#include "class_description.hpp"
#include "porting.h"
#include "memory_alloc.h"
#include "object_print.h"
#include "util_func.h"
#include "network_interface_cl.h"
#include "unicode_support.h"
#include "transaction_cl.h"
#include "trigger_description.hpp"
#include "db.h"
Go to the source code of this file.
Classes | |
struct | SESSION_CMD_TABLE |
Macros | |
#define | APPEND_MORE_LINE(indent, line) |
#define | APPEND_HEAD_LINE(head_text) |
#define | CMD_EMPTY_FLAG 0x00000000 |
#define | CMD_CHECK_CONNECT 0x00000001 |
Functions | |
static void | csql_pipe_handler (int sig_no) |
static void | csql_dump_alltran (volatile TRANS_INFO *info) |
int | csql_get_session_cmd_no (const char *input) |
void | csql_help_menu (void) |
void | csql_help_schema (const char *class_name) |
void | csql_help_trigger (const char *trigger_name) |
void | csql_help_info (const char *command, int aucommit_flag) |
void | csql_killtran (const char *argument) |
Variables | |
static jmp_buf | csql_Jmp_buf |
static SESSION_CMD_TABLE | csql_Session_cmd_table [] |
#define APPEND_HEAD_LINE | ( | head_text | ) |
Definition at line 51 of file csql_session.c.
Referenced by csql_help_schema(), and csql_help_trigger().
#define APPEND_MORE_LINE | ( | indent, | |
line | |||
) |
Definition at line 46 of file csql_session.c.
Referenced by csql_help_schema(), and csql_help_trigger().
#define CMD_CHECK_CONNECT 0x00000001 |
Definition at line 65 of file csql_session.c.
Referenced by csql_get_session_cmd_no().
#define CMD_EMPTY_FLAG 0x00000000 |
Definition at line 64 of file csql_session.c.
|
static |
Definition at line 729 of file csql_session.c.
References csql_get_message(), csql_Jmp_buf, CSQL_KILLTRAN_FORMAT, CSQL_KILLTRAN_TITLE_TEXT, csql_Output_fp, csql_Pager_cmd, csql_pclose(), csql_popen(), one_tran_info::db_user, one_tran_info::host_name, i, trans_info::num_trans, one_tran_info::process_id, one_tran_info::program_name, one_tran_info::state, trans_info::tran, tran_get_tranlist_state_name(), and one_tran_info::tran_index.
Referenced by csql_killtran().
int csql_get_session_cmd_no | ( | const char * | input | ) |
Definition at line 141 of file csql_session.c.
References ARG_FILE_LINE, CMD_CHECK_CONNECT, CSQL_ERR_SESS_CMD_AMBIGUOUS, CSQL_ERR_SESS_CMD_NOT_FOUND, CSQL_ERR_SQL_ERROR, csql_Error_code, db_Connect_status, DB_CONNECTION_STATUS_CONNECTED, ER_ERROR_SEVERITY, ER_OBJ_NO_CONNECT, er_set(), i, S_CMD_XRUN, and strlen.
Referenced by csql_do_session_cmd().
void csql_help_info | ( | const char * | command, |
int | aucommit_flag | ||
) |
Definition at line 647 of file csql_session.c.
References csql_check_server_down(), csql_display_csql_err(), csql_display_msg(), CSQL_ERR_INFO_CMD_HELP, CSQL_ERR_NO_MORE_MEMORY, csql_Error_code, csql_Output_fp, csql_Pager_cmd, csql_pclose(), csql_pipe_save, csql_popen(), csql_Scratch_text, CSQL_STAT_COMMITTED_TEXT, db_commit_transaction(), error(), help_print_info(), MSGCAT_CATALOG_CSQL, MSGCAT_CSQL_SET_CSQL, msgcat_message(), NO_ERROR, nonscr_display_error(), NULL, SCRATCH_TEXT_LEN, and strdup().
Referenced by csql_do_session_cmd().
void csql_help_menu | ( | void | ) |
Definition at line 197 of file csql_session.c.
References csql_append_more_line(), csql_display_more_lines(), CSQL_FAILURE, csql_free_more_lines(), CSQL_HELP_SESSION_CMD_TEXT, CSQL_HELP_SESSION_CMD_TITLE_TEXT, csql_Scratch_text, error(), MSGCAT_CATALOG_CSQL, MSGCAT_CSQL_SET_CSQL, msgcat_message(), nonscr_display_error(), and SCRATCH_TEXT_LEN.
Referenced by csql_do_session_cmd().
void csql_help_schema | ( | const char * | class_name | ) |
Definition at line 221 of file csql_session.c.
References APPEND_HEAD_LINE, APPEND_MORE_LINE, assert, class_description::attributes, class_description::class_attributes, class_description::class_methods, class_description::class_type, class_description::constraints, csql_display_csql_err(), csql_display_more_lines(), CSQL_ERR_CLASS_NAME_MISSED, CSQL_ERR_NO_MORE_MEMORY, CSQL_ERR_SQL_ERROR, CSQL_ERR_TOO_LONG_LINE, csql_Error_code, csql_free_more_lines(), CSQL_HELP_ATTRIBUTE_HEAD_TEXT, CSQL_HELP_CLASS_ATTRIBUTE_HEAD_TEXT, CSQL_HELP_CLASS_HEAD_TEXT, CSQL_HELP_CLASS_METHOD_HEAD_TEXT, CSQL_HELP_CONSTRAINT_HEAD_TEXT, CSQL_HELP_METHFILE_HEAD_TEXT, CSQL_HELP_METHOD_HEAD_TEXT, CSQL_HELP_NONE_TEXT, CSQL_HELP_PARTITION_HEAD_TEXT, CSQL_HELP_QUERY_SPEC_HEAD_TEXT, CSQL_HELP_RESOLUTION_HEAD_TEXT, CSQL_HELP_SCHEMA_TITLE_TEXT, CSQL_HELP_SUB_CLASS_HEAD_TEXT, CSQL_HELP_SUPER_CLASS_HEAD_TEXT, CSQL_HELP_TRIGGER_HEAD_TEXT, csql_Scratch_text, DB_MAX_IDENTIFIER_LENGTH, error(), free_and_init, class_description::init(), INTL_CODESET_UTF8, intl_identifier_fix(), lang_get_generic_unicode_norm(), LANG_SYS_CODESET, class_description::method_files, class_description::methods, MSGCAT_CATALOG_CSQL, MSGCAT_CSQL_SET_CSQL, msgcat_message(), class_description::name, NO_ERROR, nonscr_display_error(), NULL, class_description::object_id, class_description::partition, class_description::query_spec, class_description::resolutions, SCRATCH_TEXT_LEN, strlen, class_description::subs, class_description::supers, class_description::triggers, unicode_compose_string(), and unicode_string_need_compose().
Referenced by csql_do_session_cmd().
void csql_help_trigger | ( | const char * | trigger_name | ) |
Definition at line 461 of file csql_session.c.
References trigger_description::action, trigger_description::action_time, APPEND_HEAD_LINE, APPEND_MORE_LINE, assert, trigger_description::comment, trigger_description::condition, trigger_description::condition_time, csql_display_csql_err(), csql_display_more_lines(), CSQL_ERR_NO_MORE_MEMORY, CSQL_ERR_SQL_ERROR, csql_Error_code, csql_free_more_lines(), CSQL_HELP_TRIGGER_ACTION_TEXT, CSQL_HELP_TRIGGER_ACTION_TIME_TEXT, CSQL_HELP_TRIGGER_ALL_TITLE_TEXT, CSQL_HELP_TRIGGER_COMMENT_TEXT, CSQL_HELP_TRIGGER_CONDITION_TEXT, CSQL_HELP_TRIGGER_CONDITION_TIME_TEXT, CSQL_HELP_TRIGGER_EVENT_TEXT, CSQL_HELP_TRIGGER_NAME_TEXT, CSQL_HELP_TRIGGER_NONE_TITLE_TEXT, CSQL_HELP_TRIGGER_PRIORITY_TEXT, CSQL_HELP_TRIGGER_STATUS_TEXT, CSQL_HELP_TRIGGER_TITLE_TEXT, csql_Scratch_text, db_set_read_fetch_instance_version(), error(), free_and_init, trigger_description::full_event, help_free_names(), help_trigger_names(), trigger_description::init(), INTL_CODESET_UTF8, lang_get_generic_unicode_norm(), LANG_SYS_CODESET, LC_FETCH_DIRTY_VERSION, MSGCAT_CATALOG_CSQL, MSGCAT_CSQL_SET_CSQL, msgcat_message(), trigger_description::name, NO_ERROR, nonscr_display_error(), NULL, trigger_description::priority, SCRATCH_TEXT_LEN, trigger_description::status, strlen, TM_TRAN_READ_FETCH_VERSION, unicode_compose_string(), and unicode_string_need_compose().
Referenced by csql_do_session_cmd().
void csql_killtran | ( | const char * | argument | ) |
Definition at line 755 of file csql_session.c.
References csql_display_msg(), csql_dump_alltran(), CSQL_ERR_NO_MORE_MEMORY, csql_Error_code, csql_get_message(), CSQL_KILLTRAN_FORMAT, CSQL_KILLTRAN_TITLE_TEXT, csql_Output_fp, csql_pipe_handler(), csql_pipe_save, csql_Scratch_text, CSQL_STAT_KILLTRAN_FAIL_TEXT, CSQL_STAT_KILLTRAN_TEXT, one_tran_info::db_user, error(), one_tran_info::host_name, i, logtb_free_trans_info(), logtb_get_trans_info(), NO_ERROR, nonscr_display_error(), NULL, trans_info::num_trans, one_tran_info::process_id, one_tran_info::program_name, SCRATCH_TEXT_LEN, one_tran_info::state, thread_kill_tran_index(), trans_info::tran, tran_get_tranlist_state_name(), and one_tran_info::tran_index.
Referenced by csql_do_session_cmd().
|
static |
Definition at line 628 of file csql_session.c.
References csql_Jmp_buf.
Referenced by csql_killtran().
|
static |
Definition at line 58 of file csql_session.c.
Referenced by csql_dump_alltran(), and csql_pipe_handler().
|
static |
Definition at line 75 of file csql_session.c.