CUBRID Engine  latest
cas_execute.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/time.h>
#include <assert.h>
#include "cas_db_inc.h"
#include "cas.h"
#include "cas_common.h"
#include "cas_execute.h"
#include "cas_network.h"
#include "cas_util.h"
#include "cas_schema_info.h"
#include "cas_log.h"
#include "cas_str_like.h"
#include "broker_filename.h"
#include "cas_sql_log2.h"
#include "tz_support.h"
#include "release_string.h"
#include "perf_monitor.h"
#include "intl_support.h"
#include "language_support.h"
#include "unicode_support.h"
#include "transaction_cl.h"
#include "authenticate.h"
#include "trigger_manager.h"
#include "system_parameter.h"
#include "schema_manager.h"
#include "object_representation.h"
#include "connection_cl.h"
#include "db_set_function.h"
#include "dbi.h"
#include "dbtype.h"
#include "memory_alloc.h"
#include "object_primitive.h"
#include "ddl_log.h"
#include "parse_tree.h"
#include "api_compat.h"

Go to the source code of this file.

Classes

struct  t_priv_table
 
struct  t_class_table
 
struct  t_attr_table
 
struct  cas_error_log_handle_context_s
 

Macros

#define QUERY_BUFFER_MAX   4096
 
#define FK_INFO_SORT_BY_PKTABLE_NAME   1
 
#define FK_INFO_SORT_BY_FKTABLE_NAME   2
 
#define STRING_APPEND(buffer_p, avail_size_holder, ...)
 
#define IS_NULL_CAS_TYPE(cas_type)   ((cas_type) == CCI_U_TYPE_NULL)
 
#define CHK_OPT_LEVEL(level)   ((level) & 0xff)
 
#define CHK_OPTIMIZATION_ENABLED(level)   (CHK_OPT_LEVEL(level) != 0)
 
#define CHK_PLAN_DUMP_ENABLED(level)   ((level) >= 0x100)
 
#define CHK_SIMPLE_DUMP(level)   ((level) & 0x100)
 
#define CHK_DETAILED_DUMP(level)   ((level) & 0x200)
 
#define CHK_OPTIMIZATION_LEVEL_VALID(level)
 
#define check_class_chn(s)   0
 

Typedefs

typedef int(* T_FETCH_FUNC) (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
typedef struct t_priv_table T_PRIV_TABLE
 
typedef struct t_class_table T_CLASS_TABLE
 
typedef struct t_attr_table T_ATTR_TABLE
 
typedef struct cas_error_log_handle_context_s CAS_ERROR_LOG_HANDLE_CONTEXT
 

Enumerations

enum  STATEMENT_STATUS {
  NONE_TOKENS, SQL_STYLE_COMMENT, C_STYLE_COMMENT, CPP_STYLE_COMMENT,
  SINGLE_QUOTED_STRING, DOUBLE_QUOTED_STRING
}
 

Functions

void histo_print (FILE *stream)
 
void histo_clear (void)
 
void set_query_timeout (T_SRV_HANDLE *srv_handle, int query_timeout)
 
static int netval_to_dbval (void *type, void *value, DB_VALUE *db_val, T_NET_BUF *net_buf, char desired_type)
 
static int cur_tuple (T_QUERY_RESULT *q_result, int max_col_size, char sensitive_flag, DB_OBJECT *obj, T_NET_BUF *net_buf)
 
static int dbval_to_net_buf (DB_VALUE *val, T_NET_BUF *net_buf, char fetch_flag, int max_col_size, char column_type_flag)
 
static void dbobj_to_casobj (DB_OBJECT *obj, T_OBJECT *cas_obj)
 
static void casobj_to_dbobj (T_OBJECT *cas_obj, DB_OBJECT **obj)
 
static void dblob_to_caslob (DB_VALUE *lob, T_LOB_HANDLE *cas_lob)
 
static void caslob_to_dblob (T_LOB_HANDLE *cas_lob, DB_VALUE *lob)
 
static int get_attr_name (DB_OBJECT *obj, char ***ret_attr_name)
 
static int get_attr_name_from_argv (int argc, void **argv, char ***ret_attr_name)
 
static int oid_attr_info_set (T_NET_BUF *net_buf, DB_OBJECT *obj, int num_attr, char **attr_name)
 
static int oid_data_set (T_NET_BUF *net_buf, DB_OBJECT *obj, int attr_num, char **attr_name)
 
static int prepare_column_list_info_set (DB_SESSION *session, char prepare_flag, T_QUERY_RESULT *q_result, T_NET_BUF *net_buf, T_BROKER_VERSION client_version)
 
static void prepare_column_info_set (T_NET_BUF *net_buf, char ut, short scale, int prec, char charset, const char *col_name, const char *default_value, char auto_increment, char unique_key, char primary_key, char reverse_index, char reverse_unique, char foreign_key, char shared, const char *attr_name, const char *class_name, char nullable, T_BROKER_VERSION client_version)
 
static void set_column_info (T_NET_BUF *net_buf, char ut, short scale, int prec, char charset, const char *col_name, const char *attr_name, const char *class_name, char is_non_null, T_BROKER_VERSION client_version)
 
static int fetch_result (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_class (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_attribute (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_method (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_methfile (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_constraint (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_trigger (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_privilege (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static int fetch_foreign_keys (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
 
static void add_res_data_bytes (T_NET_BUF *net_buf, const char *str, int size, unsigned char ext_type, int *net_size)
 
static void add_res_data_string (T_NET_BUF *net_buf, const char *str, int size, unsigned char ext_type, unsigned char charset, int *net_size)
 
static void add_res_data_string_safe (T_NET_BUF *net_buf, const char *str, unsigned char ext_type, unsigned char charset, int *net_size)
 
static void add_res_data_int (T_NET_BUF *net_buf, int value, unsigned char ext_type, int *net_size)
 
static void add_res_data_bigint (T_NET_BUF *net_buf, DB_BIGINT value, unsigned char ext_type, int *net_size)
 
static void add_res_data_short (T_NET_BUF *net_buf, short value, unsigned char ext_type, int *net_size)
 
static void add_res_data_float (T_NET_BUF *net_buf, float value, unsigned char ext_type, int *net_size)
 
static void add_res_data_double (T_NET_BUF *net_buf, double value, unsigned char ext_type, int *net_size)
 
static void add_res_data_timestamp (T_NET_BUF *net_buf, short yr, short mon, short day, short hh, short mm, short ss, unsigned char ext_type, int *net_size)
 
static void add_res_data_timestamptz (T_NET_BUF *net_buf, short yr, short mon, short day, short hh, short mm, short ss, char *tz_str, unsigned char ext_type, int *net_size)
 
static void add_res_data_datetime (T_NET_BUF *net_buf, short yr, short mon, short day, short hh, short mm, short ss, short ms, unsigned char ext_type, int *net_size)
 
static void add_res_data_datetimetz (T_NET_BUF *net_buf, short yr, short mon, short day, short hh, short mm, short ss, short ms, char *tz_str, unsigned char ext_type, int *net_size)
 
static void add_res_data_time (T_NET_BUF *net_buf, short hh, short mm, short ss, unsigned char ext_type, int *net_size)
 
static void add_res_data_date (T_NET_BUF *net_buf, short yr, short mon, short day, unsigned char ext_type, int *net_size)
 
static void add_res_data_object (T_NET_BUF *net_buf, T_OBJECT *obj, unsigned char ext_type, int *net_size)
 
static void add_res_data_lob_handle (T_NET_BUF *net_buf, T_LOB_HANDLE *lob, unsigned char ext_type, int *net_size)
 
static void trigger_event_str (DB_TRIGGER_EVENT trig_event, char *buf)
 
static void trigger_status_str (DB_TRIGGER_STATUS trig_status, char *buf)
 
static void trigger_time_str (DB_TRIGGER_TIME trig_time, char *buf)
 
static int get_num_markers (char *stmt)
 
static char * consume_tokens (char *stmt, STATEMENT_STATUS stmt_status)
 
static char get_stmt_type (char *stmt)
 
static int execute_info_set (T_SRV_HANDLE *srv_handle, T_NET_BUF *net_buf, T_BROKER_VERSION client_version, char exec_flag)
 
static char get_attr_type (DB_OBJECT *obj_p, char *attr_name)
 
static char * get_domain_str (DB_DOMAIN *domain)
 
static DB_OBJECTux_str_to_obj (char *str)
 
static int sch_class_info (T_NET_BUF *net_buf, char *class_name, char pattern_flag, char flag, T_SRV_HANDLE *, T_BROKER_VERSION client_version)
 
static int sch_attr_info (T_NET_BUF *net_buf, char *class_name, char *attr_name, char pattern_flag, char flag, T_SRV_HANDLE *)
 
static int sch_queryspec (T_NET_BUF *net_buf, char *class_name, T_SRV_HANDLE *)
 
static void sch_method_info (T_NET_BUF *net_buf, char *class_name, char flag, void **result)
 
static void sch_methfile_info (T_NET_BUF *net_buf, char *class_name, void **result)
 
static int sch_superclass (T_NET_BUF *net_buf, char *class_name, char flag, T_SRV_HANDLE *srv_handle)
 
static void sch_constraint (T_NET_BUF *net_buf, char *class_name, void **result)
 
static void sch_trigger (T_NET_BUF *net_buf, char *class_name, char flag, void **result)
 
static int sch_class_priv (T_NET_BUF *net_buf, char *class_name, char pat_flag, T_SRV_HANDLE *srv_handle)
 
static int sch_attr_priv (T_NET_BUF *net_buf, char *class_name, char *attr_name, char pat_flag, T_SRV_HANDLE *srv_handle)
 
static int sch_direct_super_class (T_NET_BUF *net_buf, char *class_name, int pattern_flag, T_SRV_HANDLE *srv_handle)
 
static int sch_imported_keys (T_NET_BUF *net_buf, char *class_name, void **result)
 
static int sch_exported_keys_or_cross_reference (T_NET_BUF *net_buf, bool find_cross_ref, char *pktable_name, char *fktable_name, void **result)
 
static int class_type (DB_OBJECT *class_obj)
 
static int class_attr_info (const char *class_name, DB_ATTRIBUTE *attr, char *attr_pattern, char pat_flag, T_ATTR_TABLE *attr_table)
 
static int set_priv_table (unsigned int class_priv, char *name, T_PRIV_TABLE *priv_table, int index)
 
static int sch_query_execute (T_SRV_HANDLE *srv_handle, char *sql_stmt, T_NET_BUF *net_buf)
 
static int sch_primary_key (T_NET_BUF *net_buf, char *class_name, T_SRV_HANDLE *srv_handle)
 
static short constraint_dbtype_to_castype (int db_const_type)
 
static T_PREPARE_CALL_INFOmake_prepare_call_info (int num_args, int is_first_out)
 
static void prepare_call_info_dbval_clear (T_PREPARE_CALL_INFO *call_info)
 
static int fetch_call (T_SRV_HANDLE *srv_handle, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
static int create_srv_handle_with_query_result (T_QUERY_RESULT *src_q_result, DB_QUERY_TYPE *column_info, unsigned int query_seq_num)
 
static int get_client_result_cache_lifetime (DB_SESSION *session, int stmt_id)
 
static bool has_stmt_result_set (char stmt_type)
 
static bool check_auto_commit_after_getting_result (T_SRV_HANDLE *srv_handle)
 
static const char * convert_db_value_to_string (DB_VALUE *value, DB_VALUE *value_string)
 
static void serialize_collection_as_string (DB_VALUE *col, char **out)
 
static void add_fk_info_before (T_FK_INFO_RESULT *pivot, T_FK_INFO_RESULT *pnew)
 
static void add_fk_info_after (T_FK_INFO_RESULT *pivot, T_FK_INFO_RESULT *pnew)
 
static T_FK_INFO_RESULTadd_fk_info_result (T_FK_INFO_RESULT *fk_res, const char *pktable_name, const char *pkcolumn_name, const char *fktable_name, const char *fkcolumn_name, short key_seq, SM_FOREIGN_KEY_ACTION update_action, SM_FOREIGN_KEY_ACTION delete_action, const char *fk_name, const char *pk_name, int sort_by)
 
static char * get_backslash_escape_string (void)
 
static void update_query_execution_count (T_APPL_SERVER_INFO *as_info_p, char stmt_type)
 
static bool need_reconnect_on_rctime (void)
 
static void report_abnormal_host_status (int err_code)
 
static int set_host_variables (DB_SESSION *session, int num_bind, DB_VALUE *in_values)
 
static unsigned char set_extended_cas_type (T_CCI_U_TYPE u_set_type, DB_TYPE db_type)
 
static short encode_ext_type_to_short (T_BROKER_VERSION client_version, unsigned char cas_type)
 
static int ux_get_generated_keys_server_insert (T_SRV_HANDLE *srv_handle, T_NET_BUF *net_buf)
 
static int ux_get_generated_keys_client_insert (T_SRV_HANDLE *srv_handle, T_NET_BUF *net_buf)
 
static bool do_commit_after_execute (const t_srv_handle &server_handle)
 
int ux_check_connection (void)
 
SESSION_ID ux_get_session_id (void)
 
void ux_set_session_id (const SESSION_ID session_id)
 
int ux_database_connect (char *db_name, char *db_user, char *db_passwd, char **db_err_msg)
 
int ux_is_database_connected (void)
 
void ux_get_default_setting ()
 
void ux_get_system_parameter (const char *param, bool *value)
 
void ux_set_default_setting ()
 
void ux_database_shutdown ()
 
int ux_prepare (char *sql_stmt, int flag, char auto_commit_mode, T_NET_BUF *net_buf, T_REQ_INFO *req_info, unsigned int query_seq_num)
 
int ux_end_tran (int tran_type, bool reset_con_status)
 
int ux_end_session (void)
 
int ux_get_row_count (T_NET_BUF *net_buf)
 
int ux_get_last_insert_id (T_NET_BUF *net_buf)
 
int ux_execute (T_SRV_HANDLE *srv_handle, char flag, int max_col_size, int max_row, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info, CACHE_TIME *clt_cache_time, int *clt_cache_reusable)
 
int ux_execute_all (T_SRV_HANDLE *srv_handle, char flag, int max_col_size, int max_row, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info, CACHE_TIME *clt_cache_time, int *clt_cache_reusable)
 
DB_VALUEdb_get_hostvars (DB_SESSION *session)
 
void jsp_set_prepare_call ()
 
void jsp_unset_prepare_call ()
 
int ux_execute_call (T_SRV_HANDLE *srv_handle, char flag, int max_col_size, int max_row, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info, CACHE_TIME *clt_cache_time, int *clt_cache_reusable)
 
int ux_next_result (T_SRV_HANDLE *srv_handle, char flag, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
int ux_execute_batch (int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info, char auto_commit_mode)
 
int ux_execute_array (T_SRV_HANDLE *srv_handle, int argc, void **argv, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
void ux_get_tran_setting (int *lock_wait, int *isol_level)
 
int ux_set_isolation_level (int new_isol_level, T_NET_BUF *net_buf)
 
void ux_set_lock_timeout (int lock_timeout)
 
void ux_set_cas_change_mode (int mode, T_NET_BUF *net_buf)
 
int ux_fetch (T_SRV_HANDLE *srv_handle, int cursor_pos, int fetch_count, char fetch_flag, int result_set_index, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
int ux_oid_get (int argc, void **argv, T_NET_BUF *net_buf)
 
int ux_cursor (int srv_h_id, int offset, int origin, T_NET_BUF *net_buf)
 
int ux_cursor_update (T_SRV_HANDLE *srv_handle, int cursor_pos, int argc, void **argv, T_NET_BUF *net_buf)
 
void ux_cursor_close (T_SRV_HANDLE *srv_handle)
 
int ux_get_db_version (T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
int ux_get_class_num_objs (char *class_name, int flag, T_NET_BUF *net_buf)
 
void ux_col_get (DB_COLLECTION *col, char col_type, char ele_type, DB_DOMAIN *ele_domain, T_NET_BUF *net_buf)
 
void ux_col_size (DB_COLLECTION *col, T_NET_BUF *net_buf)
 
int ux_col_set_drop (DB_COLLECTION *col, DB_VALUE *ele_val, T_NET_BUF *net_buf)
 
int ux_col_set_add (DB_COLLECTION *col, DB_VALUE *ele_val, T_NET_BUF *net_buf)
 
int ux_col_seq_drop (DB_COLLECTION *col, int index, T_NET_BUF *net_buf)
 
int ux_col_seq_insert (DB_COLLECTION *col, int index, DB_VALUE *ele_val, T_NET_BUF *net_buf)
 
int ux_col_seq_put (DB_COLLECTION *col, int index, DB_VALUE *ele_val, T_NET_BUF *net_buf)
 
int ux_oid_put (int argc, void **argv, T_NET_BUF *net_buf)
 
char get_set_domain (DB_DOMAIN *set_domain, int *precision, short *scale, char *db_type, char *charset)
 
int make_bind_value (int num_bind, int argc, void **argv, DB_VALUE **ret_val, T_NET_BUF *net_buf, char desired_type)
 
int ux_get_attr_type_str (char *class_name, char *attr_name, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
int ux_get_query_info (int srv_h_id, char info_type, T_NET_BUF *net_buf)
 
int ux_get_parameter_info (int srv_h_id, T_NET_BUF *net_buf)
 
int ux_check_object (DB_OBJECT *obj, T_NET_BUF *net_buf)
 
void ux_free_result (void *res)
 
char ux_db_type_to_cas_type (int db_type)
 
void ux_set_utype_for_enum (char u_type)
 
void ux_set_utype_for_timestamptz (char u_type)
 
void ux_set_utype_for_datetimetz (char u_type)
 
void ux_set_utype_for_timestampltz (char u_type)
 
void ux_set_utype_for_datetimeltz (char u_type)
 
void ux_set_utype_for_json (char u_type)
 
int ux_schema_info (int schema_type, char *arg1, char *arg2, char flag, T_NET_BUF *net_buf, T_REQ_INFO *req_info, unsigned int query_seq_num)
 
void ux_prepare_call_info_free (T_PREPARE_CALL_INFO *call_info)
 
void ux_call_info_cp_param_mode (T_SRV_HANDLE *srv_handle, char *param_mode, int num_param)
 
static const char * get_column_default_as_string (DB_ATTRIBUTE *attr, bool *alloc)
 
void release_all_fk_info_results (T_FK_INFO_RESULT *fk_res)
 
void * jsp_get_db_result_set (int h_id)
 
void jsp_srv_handle_free (int h_id)
 
static int ux_use_sp_out (int srv_h_id)
 
int ux_get_generated_keys (T_SRV_HANDLE *srv_handle, T_NET_BUF *net_buf)
 
int ux_make_out_rs (int srv_h_id, T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
int ux_auto_commit (T_NET_BUF *net_buf, T_REQ_INFO *req_info)
 
void cas_set_db_connect_status (int status)
 
int cas_get_db_connect_status (void)
 
void cas_log_error_handler (unsigned int eid)
 
void cas_log_error_handler_begin (void)
 
void cas_log_error_handler_end (void)
 
void cas_log_error_handler_clear (void)
 
char * cas_log_error_handler_asprint (char *buf, size_t bufsz, bool clear)
 
int get_tuple_count (T_SRV_HANDLE *srv_handle)
 
void set_optimization_level (int level)
 
void reset_optimization_level_as_saved (void)
 
int ux_lob_new (int lob_type, T_NET_BUF *net_buf)
 
int ux_lob_write (DB_VALUE *lob_dbval, INT64 offset, int size, char *data, T_NET_BUF *net_buf)
 
int ux_lob_read (DB_VALUE *lob_dbval, INT64 offset, int size, T_NET_BUF *net_buf)
 

Variables

static char cas_u_type []
 
static T_FETCH_FUNC fetch_func []
 
static char database_name [MAX_HA_DBINFO_LENGTH] = ""
 
static char database_user [SRV_CON_DBUSER_SIZE] = ""
 
static char database_passwd [SRV_CON_DBPASSWD_SIZE] = ""
 
static char cas_db_sys_param [128] = ""
 
static int saved_Optimization_level = -1
 
static CAS_ERROR_LOG_HANDLE_CONTEXTcas_EHCTX = NULL
 

Macro Definition Documentation

#define check_class_chn (   s)    0

Definition at line 299 of file cas_execute.c.

#define CHK_DETAILED_DUMP (   level)    ((level) & 0x200)

Definition at line 141 of file cas_execute.c.

#define CHK_OPT_LEVEL (   level)    ((level) & 0xff)

Definition at line 137 of file cas_execute.c.

#define CHK_OPTIMIZATION_ENABLED (   level)    (CHK_OPT_LEVEL(level) != 0)

Definition at line 138 of file cas_execute.c.

#define CHK_OPTIMIZATION_LEVEL_VALID (   level)
Value:
|| (level == 0))
#define CHK_OPTIMIZATION_ENABLED(level)
Definition: cas_execute.c:138
#define CHK_PLAN_DUMP_ENABLED(level)
Definition: cas_execute.c:139

Definition at line 142 of file cas_execute.c.

Referenced by reset_optimization_level_as_saved().

#define CHK_PLAN_DUMP_ENABLED (   level)    ((level) >= 0x100)

Definition at line 139 of file cas_execute.c.

#define CHK_SIMPLE_DUMP (   level)    ((level) & 0x100)

Definition at line 140 of file cas_execute.c.

#define FK_INFO_SORT_BY_FKTABLE_NAME   2

Definition at line 88 of file cas_execute.c.

Referenced by sch_exported_keys_or_cross_reference().

#define FK_INFO_SORT_BY_PKTABLE_NAME   1

Definition at line 87 of file cas_execute.c.

Referenced by add_fk_info_result(), and sch_imported_keys().

#define IS_NULL_CAS_TYPE (   cas_type)    ((cas_type) == CCI_U_TYPE_NULL)

Definition at line 131 of file cas_execute.c.

Referenced by prepare_column_list_info_set(), and ux_make_out_rs().

#define QUERY_BUFFER_MAX   4096
#define STRING_APPEND (   buffer_p,
  avail_size_holder,
  ... 
)
Value:
do { \
if (avail_size_holder > 0) { \
int n = snprintf (buffer_p, avail_size_holder, __VA_ARGS__); \
if (n > 0) { \
if (n < avail_size_holder) { \
buffer_p += n; avail_size_holder -= n; \
} else { \
buffer_p += (avail_size_holder - 1); \
avail_size_holder = 0; \
} \
} \
} \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 101 of file cas_execute.c.

Referenced by get_domain_str(), sch_attr_info(), sch_class_info(), sch_direct_super_class(), and sch_primary_key().

Typedef Documentation

typedef struct t_attr_table T_ATTR_TABLE

Definition at line 165 of file cas_execute.c.

typedef struct t_class_table T_CLASS_TABLE

Definition at line 158 of file cas_execute.c.

typedef int(* T_FETCH_FUNC) (T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)

Definition at line 148 of file cas_execute.c.

typedef struct t_priv_table T_PRIV_TABLE

Definition at line 150 of file cas_execute.c.

Enumeration Type Documentation

Enumerator
NONE_TOKENS 
SQL_STYLE_COMMENT 
C_STYLE_COMMENT 
CPP_STYLE_COMMENT 
SINGLE_QUOTED_STRING 
DOUBLE_QUOTED_STRING 

Definition at line 90 of file cas_execute.c.

Function Documentation

static void add_fk_info_after ( T_FK_INFO_RESULT pivot,
T_FK_INFO_RESULT pnew 
)
static

Definition at line 8494 of file cas_execute.c.

References assert, t_fk_info_result::next, NULL, and t_fk_info_result::prev.

Referenced by add_fk_info_result().

Here is the caller graph for this function:

static void add_fk_info_before ( T_FK_INFO_RESULT pivot,
T_FK_INFO_RESULT pnew 
)
static

Definition at line 8481 of file cas_execute.c.

References assert, t_fk_info_result::next, NULL, and t_fk_info_result::prev.

Referenced by add_fk_info_result().

Here is the caller graph for this function:

static void add_res_data_bigint ( T_NET_BUF net_buf,
DB_BIGINT  value,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6514 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_bigint(), net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), NET_BUF_TYPE_SIZE, NET_SIZE_BIGINT, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_bytes ( T_NET_BUF net_buf,
const char *  str,
int  size,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6434 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_str(), NET_BUF_TYPE_SIZE, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_date ( T_NET_BUF net_buf,
short  yr,
short  mon,
short  day,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6747 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_short(), NET_BUF_TYPE_SIZE, NET_SIZE_DATE, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_datetime ( T_NET_BUF net_buf,
short  yr,
short  mon,
short  day,
short  hh,
short  mm,
short  ss,
short  ms,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6659 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_short(), NET_BUF_TYPE_SIZE, NET_SIZE_DATETIME, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_datetimetz ( T_NET_BUF net_buf,
short  yr,
short  mon,
short  day,
short  hh,
short  mm,
short  ss,
short  ms,
char *  tz_str,
unsigned char  ext_type,
int *  net_size 
)
static
static void add_res_data_double ( T_NET_BUF net_buf,
double  value,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6577 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_double(), net_buf_cp_int(), NET_BUF_TYPE_SIZE, NET_SIZE_DOUBLE, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_float ( T_NET_BUF net_buf,
float  value,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6556 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_float(), net_buf_cp_int(), NET_BUF_TYPE_SIZE, NET_SIZE_FLOAT, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf(), and fetch_trigger().

Here is the caller graph for this function:

static void add_res_data_int ( T_NET_BUF net_buf,
int  value,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6493 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), NET_BUF_TYPE_SIZE, NET_SIZE_INT, and NULL.

Referenced by dbval_to_net_buf(), fetch_attribute(), and fetch_constraint().

Here is the caller graph for this function:

static void add_res_data_lob_handle ( T_NET_BUF net_buf,
T_LOB_HANDLE lob,
unsigned char  ext_type,
int *  net_size 
)
static
static void add_res_data_object ( T_NET_BUF net_buf,
T_OBJECT obj,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6770 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_object(), NET_BUF_TYPE_SIZE, NET_SIZE_INT, NET_SIZE_OBJECT, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_short ( T_NET_BUF net_buf,
short  value,
unsigned char  ext_type,
int *  net_size 
)
static
static void add_res_data_string ( T_NET_BUF net_buf,
const char *  str,
int  size,
unsigned char  ext_type,
unsigned char  charset,
int *  net_size 
)
static
static void add_res_data_string_safe ( T_NET_BUF net_buf,
const char *  str,
unsigned char  ext_type,
unsigned char  charset,
int *  net_size 
)
static

Definition at line 6479 of file cas_execute.c.

References add_res_data_string(), NULL, and strlen.

Referenced by fetch_foreign_keys().

Here is the caller graph for this function:

static void add_res_data_time ( T_NET_BUF net_buf,
short  hh,
short  mm,
short  ss,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6724 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_short(), NET_BUF_TYPE_SIZE, NET_SIZE_INT, NET_SIZE_TIME, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_timestamp ( T_NET_BUF net_buf,
short  yr,
short  mon,
short  day,
short  hh,
short  mm,
short  ss,
unsigned char  ext_type,
int *  net_size 
)
static

Definition at line 6598 of file cas_execute.c.

References CAS_SCHEMA_DEFAULT_CHARSET, net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_cp_short(), NET_BUF_TYPE_SIZE, NET_SIZE_INT, NET_SIZE_TIMESTAMP, and NULL.

Referenced by dbval_to_net_buf().

Here is the caller graph for this function:

static void add_res_data_timestamptz ( T_NET_BUF net_buf,
short  yr,
short  mon,
short  day,
short  hh,
short  mm,
short  ss,
char *  tz_str,
unsigned char  ext_type,
int *  net_size 
)
static
int cas_get_db_connect_status ( void  )

Definition at line 9705 of file cas_execute.c.

References db_get_connect_status().

Referenced by process_request(), ux_database_connect(), and ux_end_tran().

Here is the caller graph for this function:

void cas_log_error_handler ( unsigned int  eid)

Definition at line 9712 of file cas_execute.c.

References eid, cas_error_log_handle_context_s::from, NULL, and cas_error_log_handle_context_s::to.

Referenced by cas_log_error_handler_begin().

Here is the caller graph for this function:

char* cas_log_error_handler_asprint ( char *  buf,
size_t  bufsz,
bool  clear 
)

Definition at line 9780 of file cas_execute.c.

References cas_error_log_handle_context_s::from, NULL, and cas_error_log_handle_context_s::to.

Referenced by get_error_log_eids().

Here is the caller graph for this function:

void cas_log_error_handler_begin ( void  )

Definition at line 9733 of file cas_execute.c.

References cas_log_error_handler(), db_register_error_log_handler(), cas_error_log_handle_context_s::from, NULL, and cas_error_log_handle_context_s::to.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

void cas_log_error_handler_clear ( void  )

Definition at line 9767 of file cas_execute.c.

References cas_error_log_handle_context_s::from, NULL, and cas_error_log_handle_context_s::to.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

void cas_log_error_handler_end ( void  )

Definition at line 9756 of file cas_execute.c.

References db_register_error_log_handler(), and NULL.

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

void cas_set_db_connect_status ( int  status)

Definition at line 9699 of file cas_execute.c.

References db_set_connect_status().

Referenced by cas_main(), err_msg_set(), and shard_cas_main().

Here is the caller graph for this function:

static void caslob_to_dblob ( T_LOB_HANDLE cas_lob,
DB_VALUE lob 
)
static
static void casobj_to_dbobj ( T_OBJECT cas_obj,
DB_OBJECT **  obj 
)
static
static bool check_auto_commit_after_getting_result ( T_SRV_HANDLE srv_handle)
static
static int class_type ( DB_OBJECT class_obj)
static

Definition at line 8143 of file cas_execute.c.

References db_is_system_class(), db_is_vclass(), DBMS_ERROR_INDICATOR, error(), and ERROR_INFO_SET.

Referenced by emit_schema(), fetch_class(), locator_mflush(), sch_superclass(), vid_getall_mops(), and ws_has_dirty_objects().

Here is the caller graph for this function:

static short constraint_dbtype_to_castype ( int  db_const_type)
static

Definition at line 8864 of file cas_execute.c.

References DB_CONSTRAINT_REVERSE_UNIQUE, and DB_CONSTRAINT_UNIQUE.

Referenced by fetch_constraint().

Here is the caller graph for this function:

static char * consume_tokens ( char *  stmt,
STATEMENT_STATUS  stmt_status 
)
static

Definition at line 6958 of file cas_execute.c.

References C_STYLE_COMMENT, cas_default_no_backslash_escapes, CPP_STYLE_COMMENT, DOUBLE_QUOTED_STRING, p, SINGLE_QUOTED_STRING, and SQL_STYLE_COMMENT.

Referenced by get_num_markers().

Here is the caller graph for this function:

static const char * convert_db_value_to_string ( DB_VALUE value,
DB_VALUE value_string 
)
static

Definition at line 9961 of file cas_execute.c.

References db_get_char(), db_get_nchar(), DB_TYPE_NCHAR, db_type_to_db_domain(), DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_coerce(), db_value_type(), err, and NULL.

Referenced by serialize_collection_as_string().

Here is the caller graph for this function:

static int cur_tuple ( T_QUERY_RESULT q_result,
int  max_col_size,
char  sensitive_flag,
DB_OBJECT obj,
T_NET_BUF net_buf 
)
static
DB_VALUE* db_get_hostvars ( DB_SESSION session)

Definition at line 1562 of file db_vdb.c.

Referenced by ux_execute_all(), and ux_execute_call().

Here is the caller graph for this function:

static void dblob_to_caslob ( DB_VALUE lob,
T_LOB_HANDLE cas_lob 
)
static
static int dbval_to_net_buf ( DB_VALUE val,
T_NET_BUF net_buf,
char  fetch_flag,
int  max_col_size,
char  column_type_flag 
)
static

Definition at line 4486 of file cas_execute.c.

References add_res_data_bigint(), add_res_data_bytes(), add_res_data_date(), add_res_data_datetime(), add_res_data_datetimetz(), add_res_data_double(), add_res_data_float(), add_res_data_int(), add_res_data_lob_handle(), add_res_data_object(), add_res_data_short(), add_res_data_string(), add_res_data_time(), add_res_data_timestamp(), add_res_data_timestamptz(), CAS_ER_NO_MORE_MEMORY, CAS_ERROR_INDICATOR, CAS_SCHEMA_DEFAULT_CHARSET, t_net_buf::client_version, db_datetimetz::datetime, db_col_domain(), db_date_decode(), db_datetime_decode(), db_datetime_encode(), db_get_bigint(), db_get_bit(), db_get_char(), db_get_date(), db_get_datetime(), db_get_datetimetz(), db_get_double(), db_get_enum_codeset(), db_get_enum_string(), db_get_enum_string_size(), db_get_float(), db_get_int(), db_get_json_raw_body(), db_get_nchar(), db_get_object(), db_get_resultset(), db_get_set(), db_get_short(), db_get_string_codeset(), db_get_string_size(), db_get_time(), db_get_timestamp(), db_get_timestamptz(), db_private_free, db_set_free(), db_set_get(), db_set_size(), db_time_decode(), db_timestamp_decode_ses(), db_timestamp_decode_w_tz_id(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_ENUMERATION, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_JSON, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_RESULTSET, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SMALLINT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, db_type_to_db_domain(), DB_TYPE_VARBIT, DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_clear(), db_value_coerce(), db_value_get_monetary_amount_as_double(), db_value_is_null(), db_value_type(), dblob_to_caslob(), dbobj_to_casobj(), DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, er_clear(), ER_QPROC_TIME_UNDERFLOW, err, ERROR_INFO_SET, FREE, FREE_MEM, get_set_domain(), i, INTL_CODESET_UTF8, lang_get_generic_unicode_norm(), MALLOC, net_buf_cp_byte(), net_buf_cp_cas_type_and_charset(), net_buf_cp_int(), net_buf_overwrite_int(), NET_SIZE_INT, NO_ERROR, NULL, PROTOCOL_V7, set_extended_cas_type(), strlen, db_timestamptz::timestamp, TP_IS_SET_TYPE, tz_create_session_tzid_for_datetime(), tz_create_session_tzid_for_timestamp(), db_timestamptz::tz_id, db_datetimetz::tz_id, tz_id_to_str(), tz_utc_datetimetz_to_local(), unicode_decompose_string(), unicode_string_need_decompose(), ut_trim(), and ux_db_type_to_cas_type().

Referenced by cur_tuple(), fetch_call(), oid_data_set(), ux_col_get(), ux_get_generated_keys_client_insert(), ux_get_generated_keys_server_insert(), and ux_get_last_insert_id().

Here is the caller graph for this function:

static bool do_commit_after_execute ( const t_srv_handle server_handle)
static

Definition at line 10366 of file cas_execute.c.

References assert, t_srv_handle::auto_commit_mode, t_srv_handle::has_result_set, tran_was_latest_query_aborted(), tran_was_latest_query_committed(), and TRUE.

Referenced by ux_execute(), and ux_execute_all().

Here is the caller graph for this function:

static short encode_ext_type_to_short ( T_BROKER_VERSION  client_version,
unsigned char  cas_type 
)
static

Definition at line 10336 of file cas_execute.c.

References assert, CAS_TYPE_FIRST_BYTE_PROTOCOL_MASK, DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, and PROTOCOL_V7.

Referenced by fetch_attribute().

Here is the caller graph for this function:

static int fetch_result ( T_SRV_HANDLE srv_handle,
int  cursor_pos,
int  fetch_count,
char  fetch_flag,
int  result_set_idx,
T_NET_BUF net_buf,
T_REQ_INFO req_info 
)
static
static int get_attr_name ( DB_OBJECT obj,
char ***  ret_attr_name 
)
static

Definition at line 5160 of file cas_execute.c.

References CAS_ER_NO_MORE_MEMORY, CAS_ERROR_INDICATOR, db_attribute_name(), db_attribute_next(), db_get_attributes(), ERROR_INFO_SET, MALLOC, NULL, and REALLOC.

Referenced by ux_oid_get().

Here is the caller graph for this function:

static int get_attr_name_from_argv ( int  argc,
void **  argv,
char ***  ret_attr_name 
)
static

Definition at line 5196 of file cas_execute.c.

References CAS_ER_NO_MORE_MEMORY, CAS_ER_OBJECT, CAS_ERROR_INDICATOR, ERROR_INFO_SET, FREE_MEM, i, MALLOC, net_arg_get_str(), and NULL.

Referenced by ux_oid_get().

Here is the caller graph for this function:

static char get_attr_type ( DB_OBJECT obj_p,
char *  attr_name 
)
static

Definition at line 7338 of file cas_execute.c.

References db_attribute_domain(), db_get_attribute(), DB_TYPE_NULL, get_set_domain(), NULL, TP_DOMAIN_TYPE, and TP_IS_SET_TYPE.

Referenced by ux_cursor_update(), and ux_oid_put().

Here is the caller graph for this function:

static char * get_backslash_escape_string ( void  )
static

Definition at line 10084 of file cas_execute.c.

References prm_get_bool_value(), and PRM_ID_NO_BACKSLASH_ESCAPES.

Referenced by sch_attr_info(), sch_class_info(), and sch_direct_super_class().

Here is the caller graph for this function:

static int get_client_result_cache_lifetime ( DB_SESSION session,
int  stmt_id 
)
static
static int get_num_markers ( char *  stmt)
static

Definition at line 6916 of file cas_execute.c.

References C_STYLE_COMMENT, cas_default_ansi_quotes, consume_tokens(), CPP_STYLE_COMMENT, DOUBLE_QUOTED_STRING, p, SINGLE_QUOTED_STRING, and SQL_STYLE_COMMENT.

Referenced by ux_prepare().

Here is the caller graph for this function:

char get_set_domain ( DB_DOMAIN set_domain,
int *  precision,
short *  scale,
char *  db_type,
char *  charset 
)
static char get_stmt_type ( char *  stmt)
static

Definition at line 7024 of file cas_execute.c.

References CUBRID_MAX_STMT_TYPE, CUBRID_STMT_CALL, CUBRID_STMT_DELETE, CUBRID_STMT_EVALUATE, CUBRID_STMT_INSERT, and CUBRID_STMT_UPDATE.

Referenced by ux_prepare().

Here is the caller graph for this function:

int get_tuple_count ( T_SRV_HANDLE srv_handle)

Definition at line 9834 of file cas_execute.c.

References t_srv_handle::q_result, and t_query_result::tuple_count.

Referenced by fn_execute_array(), and fn_execute_internal().

Here is the caller graph for this function:

static bool has_stmt_result_set ( char  stmt_type)
static

Definition at line 9666 of file cas_execute.c.

References CUBRID_STMT_CALL, CUBRID_STMT_EVALUATE, CUBRID_STMT_GET_STATS, and CUBRID_STMT_SELECT.

Referenced by fetch_result(), ux_execute(), ux_execute_all(), and ux_next_result().

Here is the caller graph for this function:

void histo_clear ( void  )

Definition at line 8958 of file network_interface_cl.c.

Referenced by csql_do_session_cmd().

Here is the caller graph for this function:

void histo_print ( FILE *  stream)

Definition at line 8930 of file network_interface_cl.c.

Referenced by csql_do_session_cmd().

Here is the caller graph for this function:

void* jsp_get_db_result_set ( int  h_id)

Definition at line 3075 of file jsp_cl.c.

Referenced by create_srv_handle_with_query_result(), and ux_use_sp_out().

Here is the caller graph for this function:

void jsp_set_prepare_call ( )

Definition at line 3048 of file jsp_cl.c.

Referenced by ux_execute_all(), and ux_execute_call().

Here is the caller graph for this function:

void jsp_srv_handle_free ( int  h_id)

Definition at line 3089 of file jsp_cl.c.

Referenced by create_srv_handle_with_query_result(), and ux_use_sp_out().

Here is the caller graph for this function:

void jsp_unset_prepare_call ( )

Definition at line 3061 of file jsp_cl.c.

Referenced by ux_execute_all(), and ux_execute_call().

Here is the caller graph for this function:

int make_bind_value ( int  num_bind,
int  argc,
void **  argv,
DB_VALUE **  ret_val,
T_NET_BUF net_buf,
char  desired_type 
)
static T_PREPARE_CALL_INFO * make_prepare_call_info ( int  num_args,
int  is_first_out 
)
static
static bool need_reconnect_on_rctime ( void  )
static

Definition at line 10128 of file cas_execute.c.

References as_info, t_shm_appl_server::cas_rctime, db_need_reconnect(), t_appl_server_info::last_connect_time, NULL, and shm_appl.

Referenced by ux_end_tran().

Here is the caller graph for this function:

static int netval_to_dbval ( void *  type,
void *  value,
DB_VALUE db_val,
T_NET_BUF net_buf,
char  desired_type 
)
static

Definition at line 3892 of file cas_execute.c.

References assert, CAS_ER_NO_MORE_MEMORY, CAS_ER_TYPE_CONVERSION, CAS_ER_UNKNOWN_U_TYPE, CAS_ERROR_INDICATOR, caslob_to_dblob(), db_date_encode(), db_datetime_encode(), db_get_currency_default(), db_json_val_from_str(), db_make_bigint(), db_make_bit(), db_make_date(), db_make_datetime(), db_make_datetimetz(), db_make_double(), db_make_float(), db_make_int(), db_make_monetary(), db_make_nchar(), db_make_null(), db_make_object(), db_make_sequence(), db_make_set(), db_make_short(), db_make_time(), db_make_timestamp(), db_make_timestamptz(), db_make_varchar(), db_seq_create(), db_seq_insert(), db_set_add(), db_set_create_basic(), db_set_create_multi(), db_string_put_cs_and_collation(), db_time_encode(), db_timestamp_encode_ses(), DB_TYPE_C_CHAR, DB_TYPE_DATE, DB_TYPE_JSON, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, db_type_to_db_domain(), DB_TYPE_VARNCHAR, db_value_clear(), db_value_clone(), db_value_coerce(), db_value_domain_init(), db_value_put(), DBMS_ERROR_INDICATOR, ER_INVALID_CHAR, ER_TP_CANT_COERCE, ERROR_INFO_SET, ERROR_INFO_SET_WITH_MSG, FALSE, intl_char_count(), intl_check_string(), INTL_CODESET_UTF8, INTL_UTF8_VALID, LANG_COERCIBLE_CODESET, lang_get_client_charset(), lang_get_client_collation(), lang_get_generic_unicode_norm(), db_value::need_clear, net_arg_get_bigint(), net_arg_get_char, net_arg_get_date(), net_arg_get_datetime(), net_arg_get_datetimetz(), net_arg_get_dbobject(), net_arg_get_double(), net_arg_get_float(), net_arg_get_int(), net_arg_get_lob_handle(), net_arg_get_short(), net_arg_get_size(), net_arg_get_str(), net_arg_get_time(), net_arg_get_timestamp(), net_arg_get_timestamptz(), NET_SIZE_INT, NO_ERROR, NULL, p, strlen, TRUE, tz_create_datetimetz(), tz_create_timestamptz(), tz_get_session_tz_region(), unicode_compose_string(), unicode_string_need_compose(), ut_trim(), ux_check_object(), and ux_str_to_obj().

Referenced by make_bind_value().

Here is the caller graph for this function:

static int oid_attr_info_set ( T_NET_BUF net_buf,
DB_OBJECT obj,
int  num_attr,
char **  attr_name 
)
static
static int oid_data_set ( T_NET_BUF net_buf,
DB_OBJECT obj,
int  attr_num,
char **  attr_name 
)
static

Definition at line 5311 of file cas_execute.c.

References db_get(), db_make_null(), db_value_clear(), dbval_to_net_buf(), and i.

Referenced by ux_oid_get().

Here is the caller graph for this function:

static void prepare_call_info_dbval_clear ( T_PREPARE_CALL_INFO call_info)
static
static void prepare_column_info_set ( T_NET_BUF net_buf,
char  ut,
short  scale,
int  prec,
char  charset,
const char *  col_name,
const char *  default_value,
char  auto_increment,
char  unique_key,
char  primary_key,
char  reverse_index,
char  reverse_unique,
char  foreign_key,
char  shared,
const char *  attr_name,
const char *  class_name,
char  nullable,
T_BROKER_VERSION  client_version 
)
static

Definition at line 3658 of file cas_execute.c.

References CAS_MAKE_VER, net_buf_column_info_set(), net_buf_cp_byte(), net_buf_cp_int(), net_buf_cp_str(), NULL, and strlen.

Referenced by prepare_column_list_info_set(), and set_column_info().

Here is the caller graph for this function:

static int prepare_column_list_info_set ( DB_SESSION session,
char  prepare_flag,
T_QUERY_RESULT q_result,
T_NET_BUF net_buf,
T_BROKER_VERSION  client_version 
)
static
void reset_optimization_level_as_saved ( void  )

Definition at line 9850 of file cas_execute.c.

References CHK_OPTIMIZATION_LEVEL_VALID, PRM_ID_OPTIMIZATION_LEVEL, prm_set_integer_value(), and saved_Optimization_level.

Referenced by fn_get_query_info(), and ux_execute().

Here is the caller graph for this function:

static int sch_attr_info ( T_NET_BUF net_buf,
char *  class_name,
char *  attr_name,
char  pattern_flag,
char  flag,
T_SRV_HANDLE srv_handle 
)
static

Definition at line 7649 of file cas_execute.c.

References get_backslash_escape_string(), net_buf_cp_int(), NULL, QUERY_BUFFER_MAX, sch_query_execute(), schema_attr_meta(), STRING_APPEND, and ut_tolower().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static int sch_attr_priv ( T_NET_BUF net_buf,
char *  class_name,
char *  attr_name,
char  pat_flag,
T_SRV_HANDLE srv_handle 
)
static
static int sch_class_info ( T_NET_BUF net_buf,
char *  class_name,
char  pattern_flag,
char  flag,
T_SRV_HANDLE srv_handle,
T_BROKER_VERSION  client_version 
)
static
static int sch_class_priv ( T_NET_BUF net_buf,
char *  class_name,
char  pat_flag,
T_SRV_HANDLE srv_handle 
)
static
static void sch_constraint ( T_NET_BUF net_buf,
char *  class_name,
void **  result 
)
static
static int sch_direct_super_class ( T_NET_BUF net_buf,
char *  class_name,
int  pattern_flag,
T_SRV_HANDLE srv_handle 
)
static

Definition at line 8382 of file cas_execute.c.

References get_backslash_escape_string(), net_buf_cp_int(), NULL, QUERY_BUFFER_MAX, sch_query_execute(), schema_directsuper_meta(), STRING_APPEND, and ut_tolower().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static void sch_methfile_info ( T_NET_BUF net_buf,
char *  class_name,
void **  result 
)
static

Definition at line 7772 of file cas_execute.c.

References db_find_class(), db_get_method_files(), db_methfile_next(), net_buf_cp_int(), NULL, and schema_methodfile_meta().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static void sch_method_info ( T_NET_BUF net_buf,
char *  class_name,
char  flag,
void **  result 
)
static

Definition at line 7742 of file cas_execute.c.

References db_find_class(), db_get_class_methods(), db_get_methods(), db_method_next(), net_buf_cp_int(), NULL, and schema_method_meta().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static int sch_primary_key ( T_NET_BUF net_buf,
char *  class_name,
T_SRV_HANDLE srv_handle 
)
static

Definition at line 8422 of file cas_execute.c.

References db_find_class(), net_buf_cp_int(), NULL, QUERY_BUFFER_MAX, sch_query_execute(), schema_primarykey_meta(), STRING_APPEND, and ut_tolower().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static int sch_queryspec ( T_NET_BUF net_buf,
char *  class_name,
T_SRV_HANDLE srv_handle 
)
static

Definition at line 7718 of file cas_execute.c.

References net_buf_cp_int(), NULL, sch_query_execute(), schema_query_spec_meta(), and ut_tolower().

Referenced by ux_schema_info().

Here is the caller graph for this function:

static void sch_trigger ( T_NET_BUF net_buf,
char *  class_name,
char  flag,
void **  result 
)
static
static void serialize_collection_as_string ( DB_VALUE col,
char **  out 
)
static

Definition at line 9996 of file cas_execute.c.

References convert_db_value_to_string(), db_get_collection, db_set_get(), db_set_size(), db_value_clear(), db_value_type(), FREE, i, MALLOC, NO_ERROR, NULL, strlen, and TP_IS_SET_TYPE.

Referenced by get_column_default_as_string().

Here is the caller graph for this function:

static void set_column_info ( T_NET_BUF net_buf,
char  ut,
short  scale,
int  prec,
char  charset,
const char *  col_name,
const char *  attr_name,
const char *  class_name,
char  is_non_null,
T_BROKER_VERSION  client_version 
)
static
static unsigned char set_extended_cas_type ( T_CCI_U_TYPE  u_set_type,
DB_TYPE  db_type 
)
static
static int set_host_variables ( DB_SESSION session,
int  num_bind,
DB_VALUE in_values 
)
static
void set_optimization_level ( int  level)

Definition at line 9843 of file cas_execute.c.

References prm_get_integer_value(), PRM_ID_OPTIMIZATION_LEVEL, prm_set_integer_value(), and saved_Optimization_level.

Referenced by cas_log_query_info_init(), and ux_execute().

Here is the caller graph for this function:

static int set_priv_table ( unsigned int  class_priv,
char *  name,
T_PRIV_TABLE priv_table,
int  index 
)
static

Definition at line 8273 of file cas_execute.c.

References t_priv_table::class_name, t_priv_table::grant, i, and t_priv_table::priv.

Referenced by sch_attr_priv(), and sch_class_priv().

Here is the caller graph for this function:

void set_query_timeout ( T_SRV_HANDLE srv_handle,
int  query_timeout 
)
static void trigger_event_str ( DB_TRIGGER_EVENT  trig_event,
char *  buf 
)
static
static void trigger_status_str ( DB_TRIGGER_STATUS  trig_status,
char *  buf 
)
static

Definition at line 6874 of file cas_execute.c.

References TR_STATUS_ACTIVE, TR_STATUS_INACTIVE, and TR_STATUS_INVALID.

Referenced by fetch_trigger().

Here is the caller graph for this function:

static void trigger_time_str ( DB_TRIGGER_TIME  trig_time,
char *  buf 
)
static

Definition at line 6895 of file cas_execute.c.

References TR_TIME_AFTER, TR_TIME_BEFORE, and TR_TIME_DEFERRED.

Referenced by fetch_trigger().

Here is the caller graph for this function:

void ux_call_info_cp_param_mode ( T_SRV_HANDLE srv_handle,
char *  param_mode,
int  num_param 
)

Definition at line 3645 of file cas_execute.c.

References NULL, t_prepare_call_info::num_args, t_prepare_call_info::param_mode, and t_srv_handle::prepare_call_info.

Referenced by fn_execute_internal().

Here is the caller graph for this function:

int ux_check_object ( DB_OBJECT obj,
T_NET_BUF net_buf 
)

Definition at line 3421 of file cas_execute.c.

References CAS_ER_OBJECT, CAS_ERROR_INDICATOR, db_error_code(), db_is_instance(), DBMS_ERROR_INDICATOR, er_clear(), ERROR_INFO_SET, and NULL.

Referenced by fn_collection(), fn_oid(), netval_to_dbval(), ux_oid_get(), and ux_oid_put().

Here is the caller graph for this function:

void ux_col_get ( DB_COLLECTION col,
char  col_type,
char  ele_type,
DB_DOMAIN ele_domain,
T_NET_BUF net_buf 
)
int ux_col_seq_drop ( DB_COLLECTION col,
int  index,
T_NET_BUF net_buf 
)

Definition at line 2986 of file cas_execute.c.

References db_seq_drop(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, net_buf_cp_int(), NET_BUF_ERR_SET, and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

int ux_col_seq_insert ( DB_COLLECTION col,
int  index,
DB_VALUE ele_val,
T_NET_BUF net_buf 
)

Definition at line 3006 of file cas_execute.c.

References db_seq_insert(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, net_buf_cp_int(), NET_BUF_ERR_SET, and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

int ux_col_seq_put ( DB_COLLECTION col,
int  index,
DB_VALUE ele_val,
T_NET_BUF net_buf 
)

Definition at line 3026 of file cas_execute.c.

References db_seq_put(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, net_buf_cp_int(), NET_BUF_ERR_SET, and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

int ux_col_set_add ( DB_COLLECTION col,
DB_VALUE ele_val,
T_NET_BUF net_buf 
)

Definition at line 2966 of file cas_execute.c.

References db_set_add(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, net_buf_cp_int(), NET_BUF_ERR_SET, and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

int ux_col_set_drop ( DB_COLLECTION col,
DB_VALUE ele_val,
T_NET_BUF net_buf 
)

Definition at line 2946 of file cas_execute.c.

References db_set_drop(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, net_buf_cp_int(), NET_BUF_ERR_SET, and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

void ux_col_size ( DB_COLLECTION col,
T_NET_BUF net_buf 
)

Definition at line 2927 of file cas_execute.c.

References db_col_size(), net_buf_cp_int(), and NULL.

Referenced by fn_collection().

Here is the caller graph for this function:

int ux_cursor ( int  srv_h_id,
int  offset,
int  origin,
T_NET_BUF net_buf 
)
void ux_cursor_close ( T_SRV_HANDLE srv_handle)
int ux_database_connect ( char *  db_name,
char *  db_user,
char *  db_passwd,
char **  db_err_msg 
)

Definition at line 461 of file cas_execute.c.

References t_shm_appl_server::access_mode, ARG_FILE_LINE, as_info, au_login(), t_shm_appl_server::cache_user_info, CAS_ERROR_INDICATOR, cas_get_db_connect_status(), cas_log_debug(), t_shm_appl_server::connect_order, t_appl_server_info::database_host, t_appl_server_info::database_name, database_name, database_passwd, database_user, db_clear_host_connected(), DB_CLIENT_TYPE_BROKER, DB_CLIENT_TYPE_READ_ONLY_BROKER, DB_CLIENT_TYPE_RO_BROKER_REPLICA_ONLY, DB_CLIENT_TYPE_RW_BROKER_REPLICA_ONLY, DB_CLIENT_TYPE_SLAVE_ONLY_BROKER, DB_CLIENT_TYPE_SO_BROKER_REPLICA_ONLY, db_disable_trigger(), db_enable_trigger(), db_error_string(), db_find_or_create_session(), db_get_host_connected(), db_restart_ex(), db_set_connect_order(), db_set_max_num_delayed_hosts_lookup(), db_set_preferred_hosts(), DBMS_ERROR_INDICATOR, er_clear(), ERROR_INFO_SET, ERROR_INFO_SET_WITH_MSG, t_appl_server_info::force_reconnect, t_appl_server_info::last_connect_time, t_shm_appl_server::max_num_delayed_hosts_lookup, NULL, OFF, p, t_shm_appl_server::preferred_hosts, program_name, READ_ONLY_ACCESS_MODE, t_shm_appl_server::replica_only_flag, report_abnormal_host_status(), shm_appl, SLAVE_ONLY_ACCESS_MODE, strlen, t_shm_appl_server::trigger_action_flag, ux_database_connect(), ux_database_shutdown(), and ux_get_default_setting().

Referenced by cas_main(), process_request(), shard_cas_main(), ux_check_connection(), and ux_database_connect().

Here is the caller graph for this function:

char ux_db_type_to_cas_type ( int  db_type)

Definition at line 3458 of file cas_execute.c.

References cas_u_type, and DB_TYPE_LAST.

Referenced by dbval_to_net_buf(), fn_collection(), get_set_domain(), set_extended_cas_type(), ux_get_generated_keys_client_insert(), and ux_get_generated_keys_server_insert().

Here is the caller graph for this function:

int ux_end_session ( void  )

Definition at line 1070 of file cas_execute.c.

References db_end_session().

Referenced by cas_main(), and shard_cas_main().

Here is the caller graph for this function:

int ux_execute ( T_SRV_HANDLE srv_handle,
char  flag,
int  max_col_size,
int  max_row,
int  argc,
void **  argv,
T_NET_BUF net_buf,
T_REQ_INFO req_info,
CACHE_TIME clt_cache_time,
int *  clt_cache_reusable 
)

Definition at line 1126 of file cas_execute.c.

References as_info, t_srv_handle::auto_commit_mode, CAS_ER_STMT_POOLING, CAS_ERROR_INDICATOR, cas_log_query_info_init(), cas_log_query_plan_file(), t_req_info::client_version, CUBRID_STMT_SELECT, t_srv_handle::cur_result, t_srv_handle::cur_result_index, t_appl_server_info::cur_sql_log2, db_check_single_query(), db_compile_statement(), DB_CURSOR_END, db_error_code(), db_execute_and_keep_statement(), db_get_cacheinfo(), db_get_statement_type(), db_is_client_cache_reusable(), db_open_buffer(), db_query_seek_tuple(), db_query_set_copy_tplvalue(), db_query_tuple_count(), db_session_set_holdable(), db_session_set_return_generated_keys(), db_session_set_xasl_cache_pinned(), db_set_client_cache_time(), db_set_statement_auto_commit(), DB_TYPE_NULL, db_value_clear(), DBMS_ERROR_INDICATOR, do_commit_after_execute(), DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, ER_HEAP_UNKNOWN_OBJECT, ER_QPROC_INVALID_XASLNODE, ERROR_INFO_SET, ERROR_INFO_SET_FORCE, errors_in_transaction, execute_info_set(), FALSE, FREE_MEM, get_client_result_cache_lifetime(), t_srv_handle::has_result_set, has_stmt_result_set(), hm_qresult_end(), hm_session_free(), i, t_srv_handle::id, if(), t_srv_handle::is_from_current_transaction, t_query_result::is_holdable, t_srv_handle::is_holdable, t_srv_handle::is_pooled, t_srv_handle::is_prepared, make_bind_value(), t_srv_handle::max_col_size, t_srv_handle::max_row, t_req_info::need_auto_commit, net_buf_cp_byte(), net_buf_cp_int(), NET_BUF_ERR_SET, NO_ERROR, NULL, t_appl_server_info::num_holdable_results, t_srv_handle::num_markers, t_srv_handle::num_q_result, prepare_column_list_info_set(), t_srv_handle::prepare_flag, PROTOCOL_V2, PROTOCOL_V5, t_srv_handle::q_result, t_srv_handle::query_info_flag, reset_optimization_level_as_saved(), t_query_result::result, t_srv_handle::session, set_host_variables(), set_optimization_level(), shm_shard_id, SQL_LOG2_EXEC_APPEND, SQL_LOG2_EXEC_BEGIN, SQL_LOG2_EXEC_END, t_srv_handle::sql_stmt, t_query_result::stmt_id, t_query_result::stmt_type, TRAN_AUTOCOMMIT, TRAN_AUTOROLLBACK, TRUE, t_query_result::tuple_count, update_query_execution_count(), t_srv_handle::use_plan_cache, and t_srv_handle::use_query_cache.

Referenced by fn_execute_internal().

Here is the caller graph for this function:

int ux_execute_all ( T_SRV_HANDLE srv_handle,
char  flag,
int  max_col_size,
int  max_row,
int  argc,
void **  argv,
T_NET_BUF net_buf,
T_REQ_INFO req_info,
CACHE_TIME clt_cache_time,
int *  clt_cache_reusable 
)

Definition at line 1437 of file cas_execute.c.

References as_info, t_srv_handle::auto_commit_mode, BROKER_PATH_MAX, CAS_ER_NO_MORE_MEMORY, CAS_ER_STMT_POOLING, CAS_ERROR_INDICATOR, t_req_info::client_version, CUBRID_STMT_SELECT, t_srv_handle::cur_result, t_srv_handle::cur_result_index, t_appl_server_info::cur_sql_log2, db_abort_to_savepoint(), db_check_single_query(), db_compile_statement(), DB_CURSOR_END, db_error_code(), db_execute_and_keep_statement(), db_get_cacheinfo(), db_get_hostvars(), db_get_statement_type(), db_is_client_cache_reusable(), db_open_buffer(), db_query_end(), db_query_seek_tuple(), db_query_set_copy_tplvalue(), db_query_tuple_count(), db_rewind_statement(), db_savepoint_transaction(), db_session_set_holdable(), db_session_set_return_generated_keys(), db_session_set_xasl_cache_pinned(), db_set_client_cache_time(), db_set_statement_auto_commit(), db_statement_count(), DB_TYPE_NULL, db_value_clear(), DBMS_ERROR_INDICATOR, do_commit_after_execute(), DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, ER_HEAP_UNKNOWN_OBJECT, ER_QPROC_INVALID_XASLNODE, ERROR_INFO_SET, ERROR_INFO_SET_FORCE, errors_in_transaction, execute_info_set(), FALSE, FREE_MEM, get_client_result_cache_lifetime(), t_srv_handle::has_result_set, has_stmt_result_set(), hm_qresult_clear(), hm_qresult_end(), hm_session_free(), i, if(), t_srv_handle::is_from_current_transaction, t_query_result::is_holdable, t_srv_handle::is_holdable, t_srv_handle::is_pooled, t_srv_handle::is_prepared, jsp_set_prepare_call(), jsp_unset_prepare_call(), make_bind_value(), t_srv_handle::max_col_size, t_srv_handle::max_row, t_req_info::need_auto_commit, net_buf_cp_byte(), net_buf_cp_int(), NET_BUF_ERR_SET, NO_ERROR, NULL, t_appl_server_info::num_holdable_results, t_srv_handle::num_markers, t_srv_handle::num_q_result, prepare_column_list_info_set(), t_srv_handle::prepare_flag, PROTOCOL_V2, PROTOCOL_V5, t_srv_handle::q_result, t_srv_handle::query_info_flag, REALLOC, t_query_result::result, t_srv_handle::session, set_host_variables(), shm_shard_id, SQL_LOG2_EXEC_BEGIN, SQL_LOG2_EXEC_END, t_srv_handle::sql_stmt, t_query_result::stmt_id, t_query_result::stmt_type, TRAN_AUTOCOMMIT, TRAN_AUTOROLLBACK, TRUE, t_query_result::tuple_count, update_query_execution_count(), t_srv_handle::use_plan_cache, and t_srv_handle::use_query_cache.

Referenced by fn_execute_internal().

Here is the caller graph for this function:

int ux_execute_array ( T_SRV_HANDLE srv_handle,
int  argc,
void **  argv,
T_NET_BUF net_buf,
T_REQ_INFO req_info 
)

Definition at line 2200 of file cas_execute.c.

References as_info, t_srv_handle::auto_commit_mode, CAS_ER_SRV_HANDLE, CAS_ERROR_INDICATOR, t_req_info::client_version, CUBRID_STMT_INSERT, t_appl_server_info::cur_sql_log2, db_abort_transaction(), db_close_session(), db_commit_transaction(), db_compile_statement(), db_error_code(), db_error_string(), db_execute_and_keep_statement(), db_get_cacheinfo(), db_get_object(), db_get_statement_type(), db_make_null(), db_open_buffer(), db_query_end(), db_query_get_tuple_value(), db_query_set_copy_tplvalue(), db_session_set_xasl_cache_pinned(), db_set_statement_auto_commit(), DB_TYPE_NULL, db_value_clear(), DBMS_ERROR_INDICATOR, dbobj_to_casobj(), DOES_CLIENT_UNDERSTAND_THE_PROTOCOL, ER_INTERRUPTED, ER_IS_ABORTED_DUE_TO_DEADLOCK, ER_IS_SERVER_DOWN_ERROR, ERROR_INFO_SET, errors_in_transaction, FALSE, FREE_MEM, hm_qresult_end(), hm_session_free(), i, t_srv_handle::is_prepared, make_bind_value(), net_buf_cp_int(), net_buf_cp_object(), net_buf_cp_str(), NET_BUF_ERR_SET, net_buf_overwrite_int(), NO_ERROR, NULL, t_srv_handle::num_markers, t_srv_handle::prepare_flag, PROTOCOL_V3, PROTOCOL_V5, t_srv_handle::q_result, t_srv_handle::schema_type, t_srv_handle::session, set_host_variables(), shm_shard_id, SQL_LOG2_EXEC_BEGIN, SQL_LOG2_EXEC_END, t_srv_handle::sql_stmt, t_query_result::stmt_id, strlen, TRUE, update_query_execution_count(), t_srv_handle::use_plan_cache, and t_srv_handle::use_query_cache.

Referenced by fn_execute_array().

Here is the caller graph for this function:

int ux_execute_batch ( int  argc,
void **  argv,
T_NET_BUF net_buf,
T_REQ_INFO req_info,
char  auto_commit_mode 
)
int ux_execute_call ( T_SRV_HANDLE srv_handle,
char  flag,
int  max_col_size,
int  max_row,
int  argc,
void **  argv,
T_NET_BUF net_buf,
T_REQ_INFO req_info,
CACHE_TIME clt_cache_time,
int *  clt_cache_reusable 
)
int ux_fetch ( T_SRV_HANDLE srv_handle,
int  cursor_pos,
int  fetch_count,
char  fetch_flag,
int  result_set_index,
T_NET_BUF net_buf,
T_REQ_INFO req_info 
)
void ux_free_result ( void *  res)

Definition at line 3452 of file cas_execute.c.

References db_query_end().

Referenced by hm_qresult_end(), and ux_cursor_close().

Here is the caller graph for this function:

int ux_get_attr_type_str ( char *  class_name,
char *  attr_name,
T_NET_BUF net_buf,
T_REQ_INFO req_info 
)
int ux_get_class_num_objs ( char *  class_name,
int  flag,
T_NET_BUF net_buf 
)
int ux_get_db_version ( T_NET_BUF net_buf,
T_REQ_INFO req_info 
)

Definition at line 2833 of file cas_execute.c.

References net_buf_cp_byte(), net_buf_cp_int(), net_buf_cp_str(), NULL, p, rel_build_number(), and strlen.

Referenced by fn_get_db_version().

Here is the caller graph for this function:

int ux_get_generated_keys ( T_SRV_HANDLE srv_handle,
T_NET_BUF net_buf 
)
int ux_get_last_insert_id ( T_NET_BUF net_buf)
int ux_get_query_info ( int  srv_h_id,
char  info_type,
T_NET_BUF net_buf 
)
int ux_get_row_count ( T_NET_BUF net_buf)
SESSION_ID ux_get_session_id ( void  )

Definition at line 449 of file cas_execute.c.

References db_get_session_id().

void ux_get_system_parameter ( const char *  param,
bool value 
)

Definition at line 654 of file cas_execute.c.

References db_get_system_parameters(), NO_ERROR, NULL, and p.

Referenced by ux_get_default_setting().

Here is the caller graph for this function:

void ux_get_tran_setting ( int *  lock_wait,
int *  isol_level 
)

Definition at line 2476 of file cas_execute.c.

References tran_get_tran_settings().

Referenced by fn_get_db_parameter(), set_db_parameter(), ux_get_default_setting(), and ux_set_default_setting().

Here is the caller graph for this function:

int ux_is_database_connected ( void  )

Definition at line 622 of file cas_execute.c.

References database_name.

Referenced by fn_end_tran(), process_request(), and ux_check_connection().

Here is the caller graph for this function:

int ux_lob_read ( DB_VALUE lob_dbval,
INT64  offset,
int  size,
T_NET_BUF net_buf 
)
int ux_lob_write ( DB_VALUE lob_dbval,
INT64  offset,
int  size,
char *  data,
T_NET_BUF net_buf 
)
int ux_oid_get ( int  argc,
void **  argv,
T_NET_BUF net_buf 
)
int ux_prepare ( char *  sql_stmt,
int  flag,
char  auto_commit_mode,
T_NET_BUF net_buf,
T_REQ_INFO req_info,
unsigned int  query_seq_num 
)

Definition at line 729 of file cas_execute.c.

References ALLOC_COPY, t_srv_handle::auto_commit_mode, CAS_ER_HOLDABLE_NOT_ALLOWED, CAS_ER_INVALID_CALL_STMT, CAS_ER_NO_MORE_MEMORY, CAS_ERROR_INDICATOR, cas_log_query_info_init(), t_req_info::client_version, CUBRID_MAX_STMT_TYPE, CUBRID_STMT_CALL, t_srv_handle::cur_result, t_srv_handle::cur_result_index, db_close_session(), db_compile_statement(), db_error_code(), db_get_cacheinfo(), db_get_statement_type(), db_include_oid(), db_open_buffer(), DB_ROW_OIDS, db_session_set_xasl_cache_pinned(), DBMS_ERROR_INDICATOR, ER_PT_SEMANTIC, ERROR_INFO_SET, errors_in_transaction, FALSE, FREE_MEM, get_client_result_cache_lifetime(), get_num_markers(), get_stmt_type(), hm_new_srv_handle(), hm_qresult_clear(), hm_srv_handle_free(), t_srv_handle::id, t_srv_handle::is_holdable, t_srv_handle::is_prepared, t_srv_handle::is_updatable, logddl_set_stmt_type(), make_prepare_call_info(), t_req_info::need_auto_commit, net_buf_cp_byte(), net_buf_cp_int(), NET_BUF_ERR_SET, parser_node::node_type, NULL, t_srv_handle::num_markers, t_srv_handle::num_q_result, t_srv_handle::prepare_call_info, prepare_column_list_info_set(), t_srv_handle::prepare_flag, t_srv_handle::q_result, t_srv_handle::query_info_flag, t_srv_handle::schema_type, t_srv_handle::session, t_srv_handle::sql_stmt, db_session::statements, t_query_result::stmt_id, t_query_result::stmt_type, TRAN_AUTOROLLBACK, TRUE, t_srv_handle::use_plan_cache, t_srv_handle::use_query_cache, and ut_trim().

Referenced by fn_prepare_internal().

Here is the caller graph for this function:

void ux_prepare_call_info_free ( T_PREPARE_CALL_INFO call_info)
void ux_set_cas_change_mode ( int  mode,
T_NET_BUF net_buf 
)

Definition at line 2519 of file cas_execute.c.

References as_info, t_appl_server_info::cas_change_mode, CAS_CHANGE_MODE_UNKNOWN, mode, net_buf_cp_int(), and NULL.

Referenced by fn_set_cas_change_mode().

Here is the caller graph for this function:

void ux_set_default_setting ( void  )
int ux_set_isolation_level ( int  new_isol_level,
T_NET_BUF net_buf 
)

Definition at line 2496 of file cas_execute.c.

References db_set_isolation(), DBMS_ERROR_INDICATOR, ERROR_INFO_SET, errors_in_transaction, and NET_BUF_ERR_SET.

Referenced by fn_set_db_parameter(), set_db_parameter(), and ux_set_default_setting().

Here is the caller graph for this function:

void ux_set_lock_timeout ( int  lock_timeout)

Definition at line 2513 of file cas_execute.c.

References tran_reset_wait_times().

Referenced by fn_set_db_parameter(), set_db_parameter(), and ux_set_default_setting().

Here is the caller graph for this function:

void ux_set_session_id ( const SESSION_ID  session_id)

Definition at line 455 of file cas_execute.c.

References db_set_session_id().

void ux_set_utype_for_datetimeltz ( char  u_type)

Definition at line 3494 of file cas_execute.c.

References cas_u_type, and DB_TYPE_DATETIMELTZ.

Referenced by process_request().

Here is the caller graph for this function:

void ux_set_utype_for_datetimetz ( char  u_type)

Definition at line 3482 of file cas_execute.c.

References cas_u_type, and DB_TYPE_DATETIMETZ.

Referenced by process_request().

Here is the caller graph for this function:

void ux_set_utype_for_enum ( char  u_type)

Definition at line 3470 of file cas_execute.c.

References cas_u_type, and DB_TYPE_ENUMERATION.

Referenced by process_request().

Here is the caller graph for this function:

void ux_set_utype_for_json ( char  u_type)

Definition at line 3500 of file cas_execute.c.

References cas_u_type, and DB_TYPE_JSON.

Referenced by process_request().

Here is the caller graph for this function:

void ux_set_utype_for_timestampltz ( char  u_type)

Definition at line 3488 of file cas_execute.c.

References cas_u_type, and DB_TYPE_TIMESTAMPLTZ.

Referenced by process_request().

Here is the caller graph for this function:

void ux_set_utype_for_timestamptz ( char  u_type)

Definition at line 3476 of file cas_execute.c.

References cas_u_type, and DB_TYPE_TIMESTAMPTZ.

Referenced by process_request().

Here is the caller graph for this function:

static DB_OBJECT * ux_str_to_obj ( char *  str)
static

Definition at line 7528 of file cas_execute.c.

References db_is_instance(), db_object(), NULL, db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.

Referenced by netval_to_dbval().

Here is the caller graph for this function:

Variable Documentation

char cas_db_sys_param[128] = ""
static

Definition at line 390 of file cas_execute.c.

Referenced by ux_get_default_setting(), and ux_set_default_setting().

CAS_ERROR_LOG_HANDLE_CONTEXT* cas_EHCTX = NULL
static

Definition at line 403 of file cas_execute.c.

char database_passwd[SRV_CON_DBPASSWD_SIZE] = ""
static

Definition at line 389 of file cas_execute.c.

Referenced by ux_check_connection(), ux_database_connect(), and ux_database_shutdown().

char database_user[SRV_CON_DBUSER_SIZE] = ""
static
T_FETCH_FUNC fetch_func[]
static
Initial value:
= {
}
static int fetch_constraint(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5975
static int fetch_foreign_keys(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:6371
static int fetch_privilege(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:6267
static int fetch_attribute(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5591
static int fetch_method(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5797
static int fetch_class(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5530
static int fetch_result(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5332
static int fetch_trigger(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:6073
static int fetch_methfile(T_SRV_HANDLE *, int, int, char, int, T_NET_BUF *, T_REQ_INFO *)
Definition: cas_execute.c:5907

Definition at line 364 of file cas_execute.c.

Referenced by cubmonitor::monitor::add_registration(), cubmonitor::counter_timer_statistic< A, T >::register_to_monitor(), cubmonitor::counter_timer_max_statistic< A, T, M >::register_to_monitor(), and ux_fetch().

int saved_Optimization_level = -1
static

Definition at line 391 of file cas_execute.c.

Referenced by reset_optimization_level_as_saved(), and set_optimization_level().