Skip to content

File cas_execute.c

FileList > broker > cas_execute.c

Go to the source code of this file

  • #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_common.h"
  • #include "cas_common_execute.h"
  • #include "cas_util.h"
  • #include "cas_log.h"
  • #include "release_string.h"
  • #include "perf_monitor.h"
  • #include "transaction_cl.h"
  • #include "ddl_log.h"
  • #include "cas.h"
  • #include "cas_common_main.h"
  • #include "cas_execute.h"
  • #include "cas_schema_info.h"
  • #include "cas_str_like.h"
  • #include "broker_filename.h"
  • #include "cas_sql_log2.h"
  • #include "deduplicate_key.h"
  • #include "tz_support.h"
  • #include "intl_support.h"
  • #include "language_support.h"
  • #include "unicode_support.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 "parse_tree.h"
  • #include "dbtype.h"
  • #include "memory_alloc.h"
  • #include "object_primitive.h"
  • #include "db_session.h"
  • #include "method_callback.hpp"
  • #include "cas_optimization.h"
  • #include "cas_db_inc.h"
  • #include "cas_common_vars.h"

Classes

Type Name
struct t_attr_table
struct t_class_table
struct t_priv_table

Public Types

Type Name
typedef struct t_attr_table T_ATTR_TABLE
typedef struct t_class_table T_CLASS_TABLE
typedef int(* T_FETCH_FUNC
typedef struct t_priv_table T_PRIV_TABLE

Public Static Attributes

Type Name
char cas_db_sys_param = ""
char database_name = ""
char database_passwd = ""
char database_user = ""
T_FETCH_FUNC fetch_func = /* multi line expression */

Public Functions

Type Name
DB_VALUE * db_get_hostvars (DB_SESSION * session)
char get_set_domain (DB_DOMAIN * set_domain, int * precision, short * scale, char * db_type, char * charset)
int get_tuple_count (T_SRV_HANDLE * srv_handle)
void jsp_set_prepare_call ()
void jsp_unset_prepare_call ()
int make_bind_value (int num_bind, int argc, void ** argv, DB_VALUE ** ret_val, T_NET_BUF * net_buf, char desired_type)
void set_query_timeout (T_SRV_HANDLE * srv_handle, int query_timeout)
int ux_auto_commit (T_NET_BUF * net_buf, T_REQ_INFO * req_info)
void ux_call_info_cp_param_mode (T_SRV_HANDLE * srv_handle, char * param_mode, int num_param)
int ux_check_connection (void)
int ux_check_object (DB_OBJECT * obj, 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)
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_col_set_add (DB_COLLECTION * col, DB_VALUE * ele_val, T_NET_BUF * net_buf)
int ux_col_set_drop (DB_COLLECTION * col, DB_VALUE * ele_val, T_NET_BUF * net_buf)
void ux_col_size (DB_COLLECTION * col, T_NET_BUF * net_buf)
int ux_create_srv_handle_with_method_query_result (DB_QUERY_RESULT * result, int stmt_type, int num_column, DB_QUERY_TYPE * column_info, bool is_holdable)
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_cursor_update (T_SRV_HANDLE * srv_handle, int cursor_pos, int argc, void ** argv, T_NET_BUF * net_buf)
int ux_database_connect (char * db_name, char * db_user, char * db_passwd, char ** db_err_msg)
void ux_database_shutdown (bool request_server)
int ux_end_session (void)
int ux_end_tran (int tran_type, bool reset_con_status, bool ddl_audit_log)
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)
int ux_execute_array (T_SRV_HANDLE * srv_handle, int argc, void ** argv, 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_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)
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)
void ux_get_default_setting ()
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_parameter_info (int srv_h_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)
void ux_get_tran_setting (int * lock_wait, int * isol_level)
int ux_is_database_connected (void)
int ux_lob_new (int lob_type, T_NET_BUF * net_buf)
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_make_out_rs (DB_BIGINT query_id, T_NET_BUF * net_buf, T_REQ_INFO * req_info)
int ux_next_result (T_SRV_HANDLE * srv_handle, char flag, 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_oid_put (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)
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_set_cas_change_mode (int mode, T_NET_BUF * net_buf)
void ux_set_default_setting ()
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_session_id (const SESSION_ID session_id)

Public Static Functions

Type Name
void add_fk_info_after (T_FK_INFO_RESULT * pivot, T_FK_INFO_RESULT * pnew)
void add_fk_info_before (T_FK_INFO_RESULT * pivot, T_FK_INFO_RESULT * pnew)
T_FK_INFO_RESULT * add_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)
void add_res_data_bigint (T_NET_BUF * net_buf, DB_BIGINT value, unsigned char ext_type, int * net_size)
void add_res_data_bytes (T_NET_BUF * net_buf, const char * str, int size, unsigned char ext_type, int * net_size)
void add_res_data_date (T_NET_BUF * net_buf, short yr, short mon, short day, unsigned char ext_type, int * net_size)
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)
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)
void add_res_data_double (T_NET_BUF * net_buf, double value, unsigned char ext_type, int * net_size)
void add_res_data_float (T_NET_BUF * net_buf, float value, unsigned char ext_type, int * net_size)
void add_res_data_int (T_NET_BUF * net_buf, int value, unsigned char ext_type, int * net_size)
void add_res_data_lob_handle (T_NET_BUF * net_buf, T_LOB_HANDLE * lob, unsigned char ext_type, int * net_size)
void add_res_data_object (T_NET_BUF * net_buf, T_OBJECT * obj, unsigned char ext_type, int * net_size)
void add_res_data_short (T_NET_BUF * net_buf, short value, unsigned char ext_type, int * net_size)
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)
void add_res_data_string_safe (T_NET_BUF * net_buf, const char * str, unsigned char ext_type, unsigned char charset, int * net_size)
void add_res_data_time (T_NET_BUF * net_buf, short hh, short mm, short ss, unsigned char ext_type, int * net_size)
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)
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)
void caslob_to_dblob (T_LOB_HANDLE * cas_lob, DB_VALUE * lob)
void casobj_to_dbobj (T_OBJECT * cas_obj, DB_OBJECT ** obj)
int class_attr_info (const char * class_name, DB_ATTRIBUTE * attr, char * attr_pattern, char pat_flag, T_ATTR_TABLE * attr_table)
int class_type (DB_OBJECT * class_obj)
short constraint_dbtype_to_castype (int db_const_type)
const char * convert_db_value_to_string (DB_VALUE * value, DB_VALUE * value_string)
int create_srv_handle_with_query_result (T_QUERY_RESULT * src_q_result, DB_QUERY_TYPE * column_info, unsigned int query_seq_num)
int cur_tuple (T_QUERY_RESULT * q_result, int max_col_size, char sensitive_flag, DB_OBJECT * obj, T_NET_BUF * net_buf)
void dblob_to_caslob (DB_VALUE * lob, T_LOB_HANDLE * cas_lob)
void dbobj_to_casobj (DB_OBJECT * obj, T_OBJECT * cas_obj)
int dbval_to_net_buf (DB_VALUE * val, T_NET_BUF * net_buf, char fetch_flag, int max_col_size, char column_type_flag)
bool do_commit_after_execute (const t_srv_handle & server_handle)
short encode_ext_type_to_short (T_BROKER_VERSION client_version, unsigned char cas_type)
int execute_info_set (T_SRV_HANDLE * srv_handle, T_NET_BUF * net_buf, T_BROKER_VERSION client_version, char exec_flag)
int fetch_attribute (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)
int fetch_call (T_SRV_HANDLE * srv_handle, T_NET_BUF * net_buf, T_REQ_INFO * req_info)
int fetch_class (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)
int fetch_constraint (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)
int fetch_foreign_keys (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)
int fetch_methfile (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)
int fetch_method (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)
int fetch_not_supported (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)
int fetch_privilege (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)
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)
int fetch_trigger (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)
int get_attr_name (DB_OBJECT * obj, char *** ret_attr_name)
int get_attr_name_from_argv (int argc, void ** argv, char *** ret_attr_name)
char get_attr_type (DB_OBJECT * obj_p, char * attr_name)
char * get_backslash_escape_string (void)
int get_client_result_cache_lifetime (DB_SESSION * session, int stmt_id)
const char * get_column_default_as_string (DB_ATTRIBUTE * attr, bool * alloc)
char * get_domain_str (DB_DOMAIN * domain)
T_PREPARE_CALL_INFO * make_prepare_call_info (int num_args, int is_first_out)
bool need_reconnect_on_rctime (void)
int netval_to_dbval (void * type, void * value, DB_VALUE * db_val, T_NET_BUF * net_buf, char desired_type)
int oid_attr_info_set (T_NET_BUF * net_buf, DB_OBJECT * obj, int num_attr, char ** attr_name)
int oid_data_set (T_NET_BUF * net_buf, DB_OBJECT * obj, int attr_num, char ** attr_name)
void prepare_call_info_dbval_clear (T_PREPARE_CALL_INFO * call_info)
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)
int recompile_statement (T_SRV_HANDLE * srv_handle)
void report_abnormal_host_status (int err_code)
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)
int sch_attr_priv (T_NET_BUF * net_buf, char * class_name, char * attr_name, char pat_flag, T_SRV_HANDLE * srv_handle)
int sch_attr_with_synonym_info (T_NET_BUF * net_buf, char * class_name, char * attr_name, char pattern_flag, char flag, T_SRV_HANDLE * srv_handle)
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)
int sch_class_priv (T_NET_BUF * net_buf, char * class_name, char pat_flag, T_SRV_HANDLE * srv_handle)
void sch_constraint (T_NET_BUF * net_buf, char * class_name, void ** result)
int sch_direct_super_class (T_NET_BUF * net_buf, char * class_name, int pattern_flag, T_SRV_HANDLE * srv_handle)
int sch_exported_keys_or_cross_reference (T_NET_BUF * net_buf, bool find_cross_ref, char * pktable_name, char * fktable_name, void ** result)
int sch_imported_keys (T_NET_BUF * net_buf, char * class_name, void ** result)
void sch_methfile_info (T_NET_BUF * net_buf, char * class_name, void ** result)
void sch_method_info (T_NET_BUF * net_buf, char * class_name, char flag, void ** result)
int sch_primary_key (T_NET_BUF * net_buf, char * class_name, T_SRV_HANDLE * srv_handle)
int sch_query_execute (T_SRV_HANDLE * srv_handle, char * sql_stmt, T_NET_BUF * net_buf)
int sch_queryspec (T_NET_BUF * net_buf, char * class_name, T_SRV_HANDLE * srv_handle)
int sch_superclass (T_NET_BUF * net_buf, char * class_name, char flag, T_SRV_HANDLE * srv_handle)
void sch_trigger (T_NET_BUF * net_buf, char * class_name, char flag, void ** result)
void serialize_collection_as_string (DB_VALUE * col, char ** out)
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)
unsigned char set_extended_cas_type (T_CCI_U_TYPE u_set_type, DB_TYPE db_type)
int set_host_variables (DB_SESSION * session, int num_bind, DB_VALUE * in_values)
int set_priv_table (unsigned int class_priv, char * name, T_PRIV_TABLE * priv_table, int index)
void trigger_event_str (DB_TRIGGER_EVENT trig_event, char * buf)
void trigger_status_str (DB_TRIGGER_STATUS trig_status, char * buf)
void trigger_time_str (DB_TRIGGER_TIME trig_time, char * buf)
int ux_get_generated_keys_client_insert (T_SRV_HANDLE * srv_handle, T_NET_BUF * net_buf)
int ux_get_generated_keys_server_insert (T_SRV_HANDLE * srv_handle, T_NET_BUF * net_buf)
DB_OBJECT * ux_str_to_obj (char * str)

Macros

Type Name
define DBLINK_HINT "DBLINK"
define FK_INFO_SORT_BY_FKTABLE_NAME 2
define FK_INFO_SORT_BY_PKTABLE_NAME 1
define IS_NULL_CAS_TYPE (cas_type) (([**cas\_type**](broker__monitor_8c.md#function-timeout)) == CCI\_U\_TYPE\_NULL)
define QUERY_BUFFER_MAX 4096
define STRING_APPEND (buffer_p, avail_size_holder, ...) /* multi line expression */
define check_class_chn (s) 0

Public Types Documentation

typedef T_ATTR_TABLE

typedef struct t_attr_table T_ATTR_TABLE;

typedef T_CLASS_TABLE

typedef struct t_class_table T_CLASS_TABLE;

typedef T_FETCH_FUNC

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

typedef T_PRIV_TABLE

typedef struct t_priv_table T_PRIV_TABLE;

Public Static Attributes Documentation

variable cas_db_sys_param

char cas_db_sys_param[128];

variable database_name

char database_name[(32+((CUB_MAXHOSTNAMELEN+1) *2))];

variable database_passwd

char database_passwd[32];

variable database_user

char database_user[32];

variable fetch_func

T_FETCH_FUNC fetch_func[];

Public Functions Documentation

function db_get_hostvars

DB_VALUE * db_get_hostvars (
    DB_SESSION * session
) 

function get_set_domain

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

function get_tuple_count

int get_tuple_count (
    T_SRV_HANDLE * srv_handle
) 

function jsp_set_prepare_call

void jsp_set_prepare_call () 

function jsp_unset_prepare_call

void jsp_unset_prepare_call () 

function make_bind_value

int make_bind_value (
    int num_bind,
    int argc,
    void ** argv,
    DB_VALUE ** ret_val,
    T_NET_BUF * net_buf,
    char desired_type
) 

function set_query_timeout

void set_query_timeout (
    T_SRV_HANDLE * srv_handle,
    int query_timeout
) 

function ux_auto_commit

int ux_auto_commit (
    T_NET_BUF * net_buf,
    T_REQ_INFO * req_info
) 

function ux_call_info_cp_param_mode

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

function ux_check_connection

int ux_check_connection (
    void
) 

function ux_check_object

int ux_check_object (
    DB_OBJECT * obj,
    T_NET_BUF * net_buf
) 

function ux_col_get

void ux_col_get (
    DB_COLLECTION * col,
    char col_type,
    char ele_type,
    DB_DOMAIN * ele_domain,
    T_NET_BUF * net_buf
) 

function ux_col_seq_drop

int ux_col_seq_drop (
    DB_COLLECTION * col,
    int index,
    T_NET_BUF * net_buf
) 

function ux_col_seq_insert

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

function ux_col_seq_put

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

function ux_col_set_add

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

function ux_col_set_drop

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

function ux_col_size

void ux_col_size (
    DB_COLLECTION * col,
    T_NET_BUF * net_buf
) 

function ux_create_srv_handle_with_method_query_result

int ux_create_srv_handle_with_method_query_result (
    DB_QUERY_RESULT * result,
    int stmt_type,
    int num_column,
    DB_QUERY_TYPE * column_info,
    bool is_holdable
) 

function ux_cursor

int ux_cursor (
    int srv_h_id,
    int offset,
    int origin,
    T_NET_BUF * net_buf
) 

function ux_cursor_close

void ux_cursor_close (
    T_SRV_HANDLE * srv_handle
) 

function ux_cursor_update

int ux_cursor_update (
    T_SRV_HANDLE * srv_handle,
    int cursor_pos,
    int argc,
    void ** argv,
    T_NET_BUF * net_buf
) 

function ux_database_connect

int ux_database_connect (
    char * db_name,
    char * db_user,
    char * db_passwd,
    char ** db_err_msg
) 

function ux_database_shutdown

void ux_database_shutdown (
    bool request_server
) 

function ux_end_session

int ux_end_session (
    void
) 

function ux_end_tran

int ux_end_tran (
    int tran_type,
    bool reset_con_status,
    bool ddl_audit_log
) 

function ux_execute

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
) 

function ux_execute_all

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
) 

function ux_execute_array

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

function ux_execute_batch

int ux_execute_batch (
    int argc,
    void ** argv,
    T_NET_BUF * net_buf,
    T_REQ_INFO * req_info,
    char auto_commit_mode
) 

function ux_execute_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
) 

function ux_fetch

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
) 

function ux_get_attr_type_str

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

function ux_get_class_num_objs

int ux_get_class_num_objs (
    char * class_name,
    int flag,
    T_NET_BUF * net_buf
) 

function ux_get_default_setting

void ux_get_default_setting () 

function ux_get_generated_keys

int ux_get_generated_keys (
    T_SRV_HANDLE * srv_handle,
    T_NET_BUF * net_buf
) 

function ux_get_last_insert_id

int ux_get_last_insert_id (
    T_NET_BUF * net_buf
) 

function ux_get_parameter_info

int ux_get_parameter_info (
    int srv_h_id,
    T_NET_BUF * net_buf
) 

function ux_get_query_info

int ux_get_query_info (
    int srv_h_id,
    char info_type,
    T_NET_BUF * net_buf
) 

function ux_get_row_count

int ux_get_row_count (
    T_NET_BUF * net_buf
) 

function ux_get_session_id

SESSION_ID ux_get_session_id (
    void
) 

function ux_get_tran_setting

void ux_get_tran_setting (
    int * lock_wait,
    int * isol_level
) 

function ux_is_database_connected

int ux_is_database_connected (
    void
) 

function ux_lob_new

int ux_lob_new (
    int lob_type,
    T_NET_BUF * net_buf
) 

function ux_lob_read

int ux_lob_read (
    DB_VALUE * lob_dbval,
    INT64 offset,
    int size,
    T_NET_BUF * net_buf
) 

function ux_lob_write

int ux_lob_write (
    DB_VALUE * lob_dbval,
    INT64 offset,
    int size,
    char * data,
    T_NET_BUF * net_buf
) 

function ux_make_out_rs

int ux_make_out_rs (
    DB_BIGINT query_id,
    T_NET_BUF * net_buf,
    T_REQ_INFO * req_info
) 

function ux_next_result

int ux_next_result (
    T_SRV_HANDLE * srv_handle,
    char flag,
    T_NET_BUF * net_buf,
    T_REQ_INFO * req_info
) 

function ux_oid_get

int ux_oid_get (
    int argc,
    void ** argv,
    T_NET_BUF * net_buf
) 

function ux_oid_put

int ux_oid_put (
    int argc,
    void ** argv,
    T_NET_BUF * net_buf
) 

function ux_prepare

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
) 

function ux_schema_info

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
) 

function ux_set_cas_change_mode

void ux_set_cas_change_mode (
    int mode,
    T_NET_BUF * net_buf
) 

function ux_set_default_setting

void ux_set_default_setting () 

function ux_set_isolation_level

int ux_set_isolation_level (
    int new_isol_level,
    T_NET_BUF * net_buf
) 

function ux_set_lock_timeout

void ux_set_lock_timeout (
    int lock_timeout
) 

function ux_set_session_id

void ux_set_session_id (
    const  SESSION_ID session_id
) 

Public Static Functions Documentation

function add_fk_info_after

static void add_fk_info_after (
    T_FK_INFO_RESULT * pivot,
    T_FK_INFO_RESULT * pnew
) 

function add_fk_info_before

static void add_fk_info_before (
    T_FK_INFO_RESULT * pivot,
    T_FK_INFO_RESULT * pnew
) 

function add_fk_info_result

static T_FK_INFO_RESULT * add_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
) 

function add_res_data_bigint

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

function add_res_data_bytes

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

function add_res_data_date

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

function add_res_data_datetime

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
) 

function add_res_data_datetimetz

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
) 

function add_res_data_double

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

function add_res_data_float

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

function add_res_data_int

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

function add_res_data_lob_handle

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

function add_res_data_object

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

function add_res_data_short

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

function add_res_data_string

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
) 

function add_res_data_string_safe

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
) 

function add_res_data_time

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

function add_res_data_timestamp

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
) 

function add_res_data_timestamptz

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
) 

function caslob_to_dblob

static void caslob_to_dblob (
    T_LOB_HANDLE * cas_lob,
    DB_VALUE * lob
) 

function casobj_to_dbobj

static void casobj_to_dbobj (
    T_OBJECT * cas_obj,
    DB_OBJECT ** obj
) 

function class_attr_info

static int class_attr_info (
    const  char * class_name,
    DB_ATTRIBUTE * attr,
    char * attr_pattern,
    char pat_flag,
    T_ATTR_TABLE * attr_table
) 

function class_type

static int class_type (
    DB_OBJECT * class_obj
) 

function constraint_dbtype_to_castype

static short constraint_dbtype_to_castype (
    int db_const_type
) 

function convert_db_value_to_string

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

function create_srv_handle_with_query_result

static int create_srv_handle_with_query_result (
    T_QUERY_RESULT * src_q_result,
    DB_QUERY_TYPE * column_info,
    unsigned  int query_seq_num
) 

function cur_tuple

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

function dblob_to_caslob

static void dblob_to_caslob (
    DB_VALUE * lob,
    T_LOB_HANDLE * cas_lob
) 

function dbobj_to_casobj

static void dbobj_to_casobj (
    DB_OBJECT * obj,
    T_OBJECT * cas_obj
) 

function dbval_to_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
) 

function do_commit_after_execute

static bool do_commit_after_execute (
    const  t_srv_handle & server_handle
) 

function encode_ext_type_to_short

static short encode_ext_type_to_short (
    T_BROKER_VERSION client_version,
    unsigned  char cas_type
) 

function execute_info_set

static int execute_info_set (
    T_SRV_HANDLE * srv_handle,
    T_NET_BUF * net_buf,
    T_BROKER_VERSION client_version,
    char exec_flag
) 

function fetch_attribute

static int fetch_attribute (
    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
) 

function fetch_call

static int fetch_call (
    T_SRV_HANDLE * srv_handle,
    T_NET_BUF * net_buf,
    T_REQ_INFO * req_info
) 

function fetch_class

static int fetch_class (
    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
) 

function fetch_constraint

static int fetch_constraint (
    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
) 

function fetch_foreign_keys

static int fetch_foreign_keys (
    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
) 

function fetch_methfile

static int fetch_methfile (
    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
) 

function fetch_method

static int fetch_method (
    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
) 

function fetch_not_supported

static int fetch_not_supported (
    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
) 

function fetch_privilege

static int fetch_privilege (
    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
) 

function fetch_result

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
) 

function fetch_trigger

static int fetch_trigger (
    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
) 

function get_attr_name

static int get_attr_name (
    DB_OBJECT * obj,
    char *** ret_attr_name
) 

function get_attr_name_from_argv

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

function get_attr_type

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

function get_backslash_escape_string

static char * get_backslash_escape_string (
    void
) 

function get_client_result_cache_lifetime

static int get_client_result_cache_lifetime (
    DB_SESSION * session,
    int stmt_id
) 

function get_column_default_as_string

static const  char * get_column_default_as_string (
    DB_ATTRIBUTE * attr,
    bool * alloc
) 

function get_domain_str

static char * get_domain_str (
    DB_DOMAIN * domain
) 

function make_prepare_call_info

static T_PREPARE_CALL_INFO * make_prepare_call_info (
    int num_args,
    int is_first_out
) 

function need_reconnect_on_rctime

static bool need_reconnect_on_rctime (
    void
) 

function netval_to_dbval

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

function oid_attr_info_set

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

function oid_data_set

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

function prepare_call_info_dbval_clear

static void prepare_call_info_dbval_clear (
    T_PREPARE_CALL_INFO * call_info
) 

function prepare_column_list_info_set

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
) 

function recompile_statement

static int recompile_statement (
    T_SRV_HANDLE * srv_handle
) 

function report_abnormal_host_status

static void report_abnormal_host_status (
    int err_code
) 

function sch_attr_info

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
) 

function sch_attr_priv

static int sch_attr_priv (
    T_NET_BUF * net_buf,
    char * class_name,
    char * attr_name,
    char pat_flag,
    T_SRV_HANDLE * srv_handle
) 

function sch_attr_with_synonym_info

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

function sch_class_info

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
) 

function sch_class_priv

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

function sch_constraint

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

function sch_direct_super_class

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

function sch_exported_keys_or_cross_reference

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
) 

function sch_imported_keys

static int sch_imported_keys (
    T_NET_BUF * net_buf,
    char * class_name,
    void ** result
) 

function sch_methfile_info

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

function sch_method_info

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

function sch_primary_key

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

function sch_query_execute

static int sch_query_execute (
    T_SRV_HANDLE * srv_handle,
    char * sql_stmt,
    T_NET_BUF * net_buf
) 

function sch_queryspec

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

function sch_superclass

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

function sch_trigger

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

function serialize_collection_as_string

static void serialize_collection_as_string (
    DB_VALUE * col,
    char ** out
) 

function set_column_info

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
) 

function set_extended_cas_type

static unsigned  char set_extended_cas_type (
    T_CCI_U_TYPE u_set_type,
    DB_TYPE db_type
) 

function set_host_variables

static int set_host_variables (
    DB_SESSION * session,
    int num_bind,
    DB_VALUE * in_values
) 

function set_priv_table

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

function trigger_event_str

static void trigger_event_str (
    DB_TRIGGER_EVENT trig_event,
    char * buf
) 

function trigger_status_str

static void trigger_status_str (
    DB_TRIGGER_STATUS trig_status,
    char * buf
) 

function trigger_time_str

static void trigger_time_str (
    DB_TRIGGER_TIME trig_time,
    char * buf
) 

function ux_get_generated_keys_client_insert

static int ux_get_generated_keys_client_insert (
    T_SRV_HANDLE * srv_handle,
    T_NET_BUF * net_buf
) 

function ux_get_generated_keys_server_insert

static int ux_get_generated_keys_server_insert (
    T_SRV_HANDLE * srv_handle,
    T_NET_BUF * net_buf
) 

function ux_str_to_obj

static DB_OBJECT * ux_str_to_obj (
    char * str
) 

Macro Definition Documentation

#define DBLINK_HINT `"DBLINK"`

define FK_INFO_SORT_BY_FKTABLE_NAME

#define FK_INFO_SORT_BY_FKTABLE_NAME `2`

define FK_INFO_SORT_BY_PKTABLE_NAME

#define FK_INFO_SORT_BY_PKTABLE_NAME `1`

define IS_NULL_CAS_TYPE

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

define QUERY_BUFFER_MAX

#define QUERY_BUFFER_MAX `4096`

define STRING_APPEND

#define STRING_APPEND (
    buffer_p,
    avail_size_holder,
    ...
) `/* multi line expression */`

define check_class_chn

#define check_class_chn (
    s
) `0`


The documentation for this class was generated from the following file cubrid/src/broker/cas_execute.c