CUBRID Engine
latest
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <unistd.h>
#include "cas_db_inc.h"
#include "cas_execute.h"
#include "cas.h"
#include "cas_common.h"
#include "cas_handle.h"
#include "cas_log.h"
Go to the source code of this file.
Macros | |
#define | SRV_HANDLE_ALLOC_SIZE 256 |
Functions | |
static void | srv_handle_content_free (T_SRV_HANDLE *srv_handle) |
static void | col_update_info_free (T_QUERY_RESULT *q_result) |
static void | srv_handle_rm_tmp_file (int h_id, T_SRV_HANDLE *srv_handle) |
int | hm_new_srv_handle (T_SRV_HANDLE **new_handle, unsigned int seq_num) |
T_SRV_HANDLE * | hm_find_srv_handle (int h_id) |
void | hm_srv_handle_free (int h_id) |
void | hm_srv_handle_free_all (bool free_holdable) |
void | hm_srv_handle_unset_prepare_flag_all (void) |
void | hm_srv_handle_qresult_end_all (bool end_holdable) |
void | hm_qresult_clear (T_QUERY_RESULT *q_result) |
void | hm_qresult_end (T_SRV_HANDLE *srv_handle, char free_flag) |
void | hm_session_free (T_SRV_HANDLE *srv_handle) |
void | hm_col_update_info_clear (T_COL_UPDATE_INFO *col_update_info) |
int | hm_srv_handle_get_current_count (void) |
Variables | |
static T_SRV_HANDLE ** | srv_handle_table = NULL |
static int | max_srv_handle = 0 |
static int | max_handle_id = 0 |
static int | current_handle_count = 0 |
#define SRV_HANDLE_ALLOC_SIZE 256 |
Definition at line 48 of file cas_handle.c.
Referenced by hm_new_srv_handle().
|
static |
Definition at line 457 of file cas_handle.c.
References t_col_update_info::attr_name, t_col_update_info::class_name, t_query_result::col_updatable, t_query_result::col_update_info, FALSE, FREE_MEM, i, and t_query_result::num_column.
Referenced by hm_qresult_end().
void hm_col_update_info_clear | ( | T_COL_UPDATE_INFO * | col_update_info | ) |
Definition at line 402 of file cas_handle.c.
Referenced by prepare_column_list_info_set().
T_SRV_HANDLE* hm_find_srv_handle | ( | int | h_id | ) |
Definition at line 144 of file cas_handle.c.
References max_srv_handle, and NULL.
Referenced by cas_main(), fn_close_req_handle(), fn_cursor_close(), fn_cursor_update(), fn_execute_array(), fn_execute_internal(), fn_fetch(), fn_get_generated_keys(), fn_next_result(), fn_prepare_and_execute(), fn_prepare_internal(), ux_cursor(), ux_get_parameter_info(), ux_get_query_info(), and ux_make_out_rs().
int hm_new_srv_handle | ( | T_SRV_HANDLE ** | new_handle, |
unsigned int | seq_num | ||
) |
Definition at line 62 of file cas_handle.c.
References as_info, CAS_ER_MAX_PREPARED_STMT_COUNT_EXCEEDED, CAS_ER_NO_MORE_MEMORY, CAS_ERROR_INDICATOR, cas_shard_flag, t_appl_server_info::cur_statement_pooling, current_handle_count, ERROR_INFO_SET, i, t_srv_handle::id, t_srv_handle::is_from_current_transaction, t_srv_handle::is_holdable, t_srv_handle::is_pooled, MALLOC, max_handle_id, t_shm_appl_server::max_prepared_stmt_count, max_srv_handle, NULL, OFF, t_srv_handle::query_seq_num, REALLOC, shm_appl, SRV_HANDLE_ALLOC_SIZE, t_srv_handle::use_plan_cache, and t_srv_handle::use_query_cache.
Referenced by create_srv_handle_with_query_result(), fn_get_query_info(), ux_prepare(), and ux_schema_info().
void hm_qresult_clear | ( | T_QUERY_RESULT * | q_result | ) |
Definition at line 308 of file cas_handle.c.
Referenced by create_srv_handle_with_query_result(), sch_query_execute(), ux_execute_all(), and ux_prepare().
void hm_qresult_end | ( | T_SRV_HANDLE * | srv_handle, |
char | free_flag | ||
) |
Definition at line 314 of file cas_handle.c.
References as_info, col_update_info_free(), t_query_result::column_info, t_srv_handle::cur_result, t_srv_handle::cur_result_index, db_query_format_free(), FREE_MEM, t_srv_handle::has_result_set, i, t_query_result::is_holdable, NULL, t_appl_server_info::num_holdable_results, t_srv_handle::num_q_result, t_srv_handle::q_result, t_query_result::result, t_srv_handle::session, TRUE, and ux_free_result().
Referenced by hm_srv_handle_qresult_end_all(), srv_handle_content_free(), ux_execute(), ux_execute_all(), ux_execute_array(), and ux_execute_call().
void hm_session_free | ( | T_SRV_HANDLE * | srv_handle | ) |
Definition at line 386 of file cas_handle.c.
References db_close_session(), NULL, and t_srv_handle::session.
Referenced by srv_handle_content_free(), ux_execute(), ux_execute_all(), and ux_execute_array().
void hm_srv_handle_free | ( | int | h_id | ) |
Definition at line 155 of file cas_handle.c.
References t_srv_handle::classes, t_srv_handle::classes_chn, current_handle_count, FREE_MEM, max_srv_handle, NULL, srv_handle_content_free(), and srv_handle_rm_tmp_file().
Referenced by cas_main(), create_srv_handle_with_query_result(), fn_close_req_handle(), fn_get_query_info(), fn_prepare_and_execute(), fn_prepare_internal(), ux_prepare(), and ux_schema_info().
void hm_srv_handle_free_all | ( | bool | free_holdable | ) |
Definition at line 186 of file cas_handle.c.
References as_info, current_handle_count, FREE_MEM, i, t_srv_handle::is_holdable, max_handle_id, NULL, t_appl_server_info::num_holdable_results, srv_handle_content_free(), and srv_handle_rm_tmp_file().
Referenced by cas_free(), cas_main(), shard_cas_main(), and ux_end_tran().
int hm_srv_handle_get_current_count | ( | void | ) |
Definition at line 494 of file cas_handle.c.
References current_handle_count.
Referenced by shard_cas_main().
void hm_srv_handle_qresult_end_all | ( | bool | end_holdable | ) |
Definition at line 246 of file cas_handle.c.
References FALSE, hm_qresult_end(), i, t_srv_handle::is_from_current_transaction, t_srv_handle::is_holdable, t_srv_handle::is_pooled, max_handle_id, NULL, and t_srv_handle::schema_type.
Referenced by hm_srv_handle_unset_prepare_flag_all(), and ux_end_tran().
void hm_srv_handle_unset_prepare_flag_all | ( | void | ) |
Definition at line 226 of file cas_handle.c.
References FALSE, hm_srv_handle_qresult_end_all(), i, t_srv_handle::is_prepared, max_handle_id, and NULL.
|
static |
Definition at line 408 of file cas_handle.c.
References t_srv_handle::cur_result, db_objlist_free(), FREE_MEM, hm_qresult_end(), hm_session_free(), if(), NULL, t_srv_handle::prepare_call_info, release_all_fk_info_results(), t_srv_handle::schema_type, t_srv_handle::session, t_srv_handle::sql_stmt, TRUE, and ux_prepare_call_info_free().
Referenced by hm_srv_handle_free(), and hm_srv_handle_free_all().
|
static |
Definition at line 477 of file cas_handle.c.
References cas_log_query_plan_file(), NULL, p, t_srv_handle::query_info_flag, and TRUE.
Referenced by hm_srv_handle_free(), and hm_srv_handle_free_all().
|
static |
Definition at line 58 of file cas_handle.c.
Referenced by hm_new_srv_handle(), hm_srv_handle_free(), hm_srv_handle_free_all(), and hm_srv_handle_get_current_count().
|
static |
Definition at line 56 of file cas_handle.c.
Referenced by hm_new_srv_handle(), hm_srv_handle_free_all(), hm_srv_handle_qresult_end_all(), and hm_srv_handle_unset_prepare_flag_all().
|
static |
Definition at line 55 of file cas_handle.c.
Referenced by hm_find_srv_handle(), hm_new_srv_handle(), and hm_srv_handle_free().
|
static |
Definition at line 54 of file cas_handle.c.