CUBRID Engine
latest
|
#include "config.h"
#include <assert.h>
#include <sys/socket.h>
#include "authenticate.h"
#include "error_manager.h"
#include "memory_alloc.h"
#include "dbtype.h"
#include "parser.h"
#include "object_domain.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "db.h"
#include "object_accessor.h"
#include "set_object.h"
#include "locator_cl.h"
#include "transaction_cl.h"
#include "schema_manager.h"
#include "numeric_opfunc.h"
#include "jsp_cl.h"
#include "system_parameter.h"
#include "network_interface_cl.h"
#include "unicode_support.h"
#include "jsp_comm.h"
Go to the source code of this file.
Classes | |
struct | db_arg_list |
struct | SP_ARGS |
Macros | |
#define | INADDR_NONE 0xffffffff |
#define | PT_NODE_SP_NAME(node) ((node)->info.sp.name->info.name.original) |
#define | PT_NODE_SP_TYPE(node) ((node)->info.sp.type) |
#define | PT_NODE_SP_RETURN_TYPE(node) ((node)->info.sp.ret_type->info.name.original) |
#define | PT_NODE_SP_JAVA_METHOD(node) ((node)->info.sp.java_method->info.value.data_value.str->bytes) |
#define | PT_NODE_SP_COMMENT(node) |
#define | PT_NODE_SP_ARG_COMMENT(node) |
#define | MAX_ARG_COUNT 64 |
#define | MAX_CALL_COUNT 16 |
#define | SAVEPOINT_ADD_STORED_PROC "ADDSTOREDPROC" |
#define | SAVEPOINT_CREATE_STORED_PROC "CREATESTOREDPROC" |
Typedefs | |
typedef struct db_arg_list | DB_ARG_LIST |
Functions | |
static SP_TYPE_ENUM | jsp_map_pt_misc_to_sp_type (PT_MISC_TYPE pt_enum) |
static int | jsp_map_pt_misc_to_sp_mode (PT_MISC_TYPE pt_enum) |
static int | jsp_get_argument_count (const SP_ARGS *sp_args) |
static int | jsp_add_stored_procedure_argument (MOP *mop_p, const char *sp_name, const char *arg_name, int index, PT_TYPE_ENUM data_type, PT_MISC_TYPE mode, const char *arg_comment) |
static char * | jsp_check_stored_procedure_name (const char *str) |
static int | jsp_add_stored_procedure (const char *name, const PT_MISC_TYPE type, const PT_TYPE_ENUM ret_type, PT_NODE *param_list, const char *java_method, const char *comment) |
static int | drop_stored_procedure (const char *name, PT_MISC_TYPE expected_type) |
static int | jsp_get_value_size (DB_VALUE *value) |
static int | jsp_get_argument_size (DB_ARG_LIST *args) |
static char * | jsp_pack_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_int_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_bigint_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_short_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_float_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_double_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_numeric_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_string_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_date_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_time_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_timestamp_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_datetime_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_set_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_object_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_monetary_argument (char *buffer, DB_VALUE *value) |
static char * | jsp_pack_null_argument (char *buffer) |
static char * | jsp_unpack_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_int_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_bigint_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_short_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_float_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_double_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_numeric_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_string_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_date_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_time_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_timestamp_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_set_value (char *buffer, int type, DB_VALUE *retval) |
static char * | jsp_unpack_object_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_monetary_value (char *buffer, DB_VALUE *retval) |
static char * | jsp_unpack_resultset (char *buffer, DB_VALUE *retval) |
int | libcas_main (SOCKET fd) |
void * | libcas_get_db_result_set (int h_id) |
void | libcas_srv_handle_free (int h_id) |
static int | jsp_send_call_request (const SOCKET sockfd, const SP_ARGS *sp_args) |
static int | jsp_alloc_response (const SOCKET sockfd, char *&buffer) |
static int | jsp_receive_response (const SOCKET sockfd, const SP_ARGS *sp_args) |
static int | jsp_receive_result (char *&buffer, char *&ptr, const SP_ARGS *sp_args) |
static int | jsp_receive_error (char *&buffer, char *&ptr, const SP_ARGS *sp_args) |
static int | jsp_execute_stored_procedure (const SP_ARGS *args) |
static int | jsp_do_call_stored_procedure (DB_VALUE *returnval, DB_ARG_LIST *args, const char *name) |
void | jsp_init (void) |
void | jsp_close_connection (void) |
MOP | jsp_find_stored_procedure (const char *name) |
int | jsp_is_exist_stored_procedure (const char *name) |
int | jsp_get_return_type (const char *name) |
int | jsp_call_stored_procedure (PARSER_CONTEXT *parser, PT_NODE *statement) |
int | jsp_drop_stored_procedure (PARSER_CONTEXT *parser, PT_NODE *statement) |
int | jsp_create_stored_procedure (PARSER_CONTEXT *parser, PT_NODE *statement) |
int | jsp_alter_stored_procedure (PARSER_CONTEXT *parser, PT_NODE *statement) |
int | jsp_send_destroy_request_all () |
int | jsp_send_destroy_request (const SOCKET sockfd) |
static char * | jsp_unpack_datetime_value (char *buffer, DB_VALUE *retval) |
int | jsp_call_from_server (DB_VALUE *returnval, DB_VALUE **argarray, const char *name, const int arg_cnt) |
void | jsp_set_prepare_call (void) |
void | jsp_unset_prepare_call (void) |
void * | jsp_get_db_result_set (int h_id) |
void | jsp_srv_handle_free (int h_id) |
Variables | |
static SOCKET | sock_fds [MAX_CALL_COUNT] = { INVALID_SOCKET } |
static int | server_port = -1 |
static int | call_cnt = 0 |
static bool | is_prepare_call [MAX_CALL_COUNT] |
bool | ssl_client |
#define MAX_ARG_COUNT 64 |
Definition at line 84 of file jsp_cl.c.
Referenced by jsp_create_stored_procedure().
#define MAX_CALL_COUNT 16 |
Definition at line 85 of file jsp_cl.c.
Referenced by jsp_execute_stored_procedure(), jsp_init(), and jsp_send_destroy_request_all().
#define PT_NODE_SP_ARG_COMMENT | ( | node | ) |
Definition at line 80 of file jsp_cl.c.
Referenced by jsp_add_stored_procedure().
#define PT_NODE_SP_COMMENT | ( | node | ) |
Definition at line 76 of file jsp_cl.c.
Referenced by jsp_alter_stored_procedure(), and jsp_create_stored_procedure().
#define PT_NODE_SP_JAVA_METHOD | ( | node | ) | ((node)->info.sp.java_method->info.value.data_value.str->bytes) |
Definition at line 73 of file jsp_cl.c.
Referenced by jsp_create_stored_procedure().
#define PT_NODE_SP_NAME | ( | node | ) | ((node)->info.sp.name->info.name.original) |
Definition at line 64 of file jsp_cl.c.
Referenced by jsp_create_stored_procedure().
#define PT_NODE_SP_RETURN_TYPE | ( | node | ) | ((node)->info.sp.ret_type->info.name.original) |
#define PT_NODE_SP_TYPE | ( | node | ) | ((node)->info.sp.type) |
Definition at line 67 of file jsp_cl.c.
Referenced by jsp_alter_stored_procedure(), jsp_create_stored_procedure(), and jsp_drop_stored_procedure().
#define SAVEPOINT_ADD_STORED_PROC "ADDSTOREDPROC" |
Definition at line 86 of file jsp_cl.c.
Referenced by jsp_add_stored_procedure().
#define SAVEPOINT_CREATE_STORED_PROC "CREATESTOREDPROC" |
Definition at line 87 of file jsp_cl.c.
Referenced by jsp_create_stored_procedure().
typedef struct db_arg_list DB_ARG_LIST |
|
static |
Definition at line 1152 of file jsp_cl.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), Au_user, db_get(), db_get_int(), db_get_object(), db_get_set(), db_make_null(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_DROP_NOT_ALLOWED, ER_SP_INVALID_TYPE, err, error(), i, jsp_find_stored_procedure(), jsp_map_pt_misc_to_sp_type(), NO_ERROR, NULL, obj_delete(), pr_clear_value(), set_get_element(), SP_ATTR_ARG_COUNT, SP_ATTR_ARGS, SP_ATTR_OWNER, SP_ATTR_SP_TYPE, SP_TYPE_FUNCTION, and ws_is_same_object().
Referenced by jsp_create_stored_procedure(), and jsp_drop_stored_procedure().
|
static |
Definition at line 941 of file jsp_cl.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, Au_user, db_find_class(), db_make_int(), db_make_object(), db_make_sequence(), db_make_string(), dbt_abort_object(), dbt_create_object_internal(), dbt_finish_object(), dbt_put_internal(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_CANNOT_INPUT_RESULTSET, ER_SP_INVAILD_JAVA_METHOD, err, error(), free_and_init, i, parser_node::info, jsp_add_stored_procedure_argument(), jsp_check_stored_procedure_name(), jsp_map_pt_misc_to_sp_type(), locator_flush_instance(), pt_stored_proc_param_info::mode, pt_stored_proc_param_info::name, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, obj_delete(), pt_name_info::original, pr_clear_value(), PT_NODE_SP_ARG_COMMENT, PT_OUTPUT, pt_type_enum_to_db(), PT_TYPE_RESULTSET, SAVEPOINT_ADD_STORED_PROC, set_create_sequence(), set_free(), set_put_element(), SP_ATTR_ARG_COUNT, SP_ATTR_ARGS, SP_ATTR_COMMENT, SP_ATTR_LANG, SP_ATTR_NAME, SP_ATTR_OWNER, SP_ATTR_RETURN_TYPE, SP_ATTR_SP_TYPE, SP_ATTR_TARGET, SP_CLASS_NAME, SP_LANG_JAVA, pt_statement_info::sp_param, tran_abort_upto_system_savepoint(), tran_system_savepoint(), and parser_node::type_enum.
Referenced by jsp_create_stored_procedure().
|
static |
Definition at line 802 of file jsp_cl.c.
References assert, AU_DISABLE, AU_ENABLE, db_find_class(), db_make_int(), db_make_string(), dbt_abort_object(), dbt_create_object_internal(), dbt_finish_object(), dbt_put_internal(), er_errid(), err, error(), jsp_map_pt_misc_to_sp_mode(), locator_flush_instance(), NO_ERROR, NULL, obj_delete(), pr_clear_value(), pt_type_enum_to_db(), SP_ARG_CLASS_NAME, SP_ATTR_ARG_COMMENT, SP_ATTR_ARG_NAME, SP_ATTR_DATA_TYPE, SP_ATTR_INDEX_OF_NAME, SP_ATTR_MODE, and SP_ATTR_NAME.
Referenced by jsp_add_stored_procedure().
Definition at line 2657 of file jsp_cl.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SP_NETWORK_ERROR, jsp_readn(), NO_ERROR, and ntohl().
Referenced by jsp_receive_response().
int jsp_alter_stored_procedure | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 598 of file jsp_cl.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), Au_user, CHECK_MODIFICATION_ERROR, pt_stored_proc_info::comment, db_find_user(), db_get(), db_get_int(), db_make_null(), db_make_object(), db_make_string(), ER_AU_DBA_ONLY, ER_BLOCK_DDL_STMT, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_SP_INVALID_TYPE, err, error(), parser_node::info, jsp_find_stored_procedure(), jsp_map_pt_misc_to_sp_type(), pt_stored_proc_info::name, pt_statement_info::name, NO_ERROR, NULL, obj_set(), pt_name_info::original, pt_stored_proc_info::owner, pr_clear_value(), prm_get_bool_value(), PRM_ID_BLOCK_DDL_STATEMENT, PT_NODE_SP_COMMENT, PT_NODE_SP_TYPE, pt_statement_info::sp, SP_ATTR_COMMENT, SP_ATTR_OWNER, SP_ATTR_SP_TYPE, and SP_TYPE_FUNCTION.
Referenced by do_execute_statement(), and do_statement().
int jsp_call_from_server | ( | DB_VALUE * | returnval, |
DB_VALUE ** | argarray, | ||
const char * | name, | ||
const int | arg_cnt | ||
) |
Definition at line 2999 of file jsp_cl.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, i, jsp_do_call_stored_procedure(), db_arg_list::next, NO_ERROR, and NULL.
Referenced by method_invoke_for_server(), and method_receive_results_for_stand_alone().
int jsp_call_stored_procedure | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 326 of file jsp_cl.c.
References ARG_FILE_LINE, pt_method_call_info::arg_list, db_make_null(), db_value_clear(), db_value_copy(), er_errid(), ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_WARNING_SEVERITY, error(), parser_node::etc, free_and_init, parser_node::info, jsp_do_call_stored_procedure(), pt_statement_info::method_call, pt_method_call_info::method_name, pt_statement_info::name, db_arg_list::next, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, pt_associate_label_with_value_check_reference(), pt_evaluate_tree(), pt_has_error, PT_IS_CONST, PT_NAME, pt_report_to_ersys(), PT_SEMANTIC, pt_value_to_db(), pt_method_call_info::to_return_var, and db_arg_list::val.
Referenced by do_call_method().
|
static |
Definition at line 916 of file jsp_cl.c.
References NULL, sm_downcase_name(), SM_MAX_IDENTIFIER_LENGTH, and strdup().
Referenced by jsp_add_stored_procedure(), and jsp_find_stored_procedure().
void jsp_close_connection | ( | void | ) |
Definition at line 209 of file jsp_cl.c.
References INVALID_SOCKET, IS_INVALID_SOCKET, jsp_disconnect_server(), and sock_fds.
Referenced by boot_shutdown_client(), and jsp_execute_stored_procedure().
int jsp_create_stored_procedure | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 500 of file jsp_cl.c.
References ARG_FILE_LINE, CHECK_MODIFICATION_ERROR, drop_stored_procedure(), ER_BLOCK_DDL_STMT, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_set(), ER_SP_ALREADY_EXIST, ER_SP_INVALID_NAME, ER_SP_TOO_MANY_ARG_COUNT, err, parser_node::info, jsp_add_stored_procedure(), jsp_is_exist_stored_procedure(), MAX_ARG_COUNT, parser_node::next, NO_ERROR, NULL, pt_stored_proc_info::or_replace, p, pt_stored_proc_info::param_list, prm_get_bool_value(), PRM_ID_BLOCK_DDL_STATEMENT, PT_NODE_SP_COMMENT, PT_NODE_SP_JAVA_METHOD, PT_NODE_SP_NAME, PT_NODE_SP_TYPE, PT_SP_FUNCTION, PT_TYPE_NONE, pt_stored_proc_info::ret_type, SAVEPOINT_CREATE_STORED_PROC, pt_statement_info::sp, tran_abort_upto_system_savepoint(), and tran_system_savepoint().
Referenced by do_execute_statement(), and do_statement().
|
static |
Definition at line 2861 of file jsp_cl.c.
References SP_ARGS::arg_count, ARG_FILE_LINE, SP_ARGS::arg_mode, SP_ARGS::arg_type, SP_ARGS::args, assert, AU_DISABLE, AU_ENABLE, AU_RESTORE, AU_SAVE_AND_ENABLE, call_cnt, db_get(), db_get_int(), db_get_object(), db_get_set(), db_get_string(), db_make_null(), DB_TYPE_RESULTSET, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_CANNOT_RETURN_RESULTSET, ER_SP_INVAILD_JAVA_METHOD, ER_SP_INVALID_PARAM_COUNT, err, error(), i, is_prepare_call, jsp_execute_stored_procedure(), jsp_find_stored_procedure(), jsp_get_argument_count(), mode, SP_ARGS::name, NO_ERROR, pr_clear_value(), SP_ARGS::return_type, SP_ARGS::returnval, set_get_element(), SP_ATTR_ARG_COUNT, SP_ATTR_ARGS, SP_ATTR_DATA_TYPE, SP_ATTR_MODE, SP_ATTR_RETURN_TYPE, and SP_ATTR_TARGET.
Referenced by jsp_call_from_server(), and jsp_call_stored_procedure().
int jsp_drop_stored_procedure | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | statement | ||
) |
Definition at line 451 of file jsp_cl.c.
References ARG_FILE_LINE, CHECK_MODIFICATION_ERROR, drop_stored_procedure(), ER_BLOCK_DDL_STMT, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_INVALID_NAME, err, i, if(), parser_node::info, pt_stored_proc_info::name, pt_statement_info::name, parser_node::next, NO_ERROR, NULL, pt_name_info::original, p, prm_get_bool_value(), PRM_ID_BLOCK_DDL_STATEMENT, PT_NODE_SP_TYPE, and pt_statement_info::sp.
Referenced by do_execute_statement(), and do_statement().
Definition at line 2762 of file jsp_cl.c.
References ARG_FILE_LINE, call_cnt, er_clear(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_NETWORK_ERROR, ER_SP_NOT_RUNNING_JVM, ER_SP_TOO_MANY_NESTED_CALL, error(), INVALID_SOCKET, IS_INVALID_SOCKET, is_prepare_call, jsp_close_connection(), jsp_connect_server(), jsp_disconnect_server(), jsp_get_server_port(), jsp_receive_response(), jsp_send_call_request(), jsp_send_destroy_request(), MAX_CALL_COUNT, mode, NO_ERROR, server_port, sock_fd, sock_fds, and ssl_client.
Referenced by jsp_do_call_stored_procedure().
Definition at line 227 of file jsp_cl.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, db_find_class(), db_find_unique(), db_make_string(), er_clear(), er_errid(), ER_OBJ_OBJECT_NOT_FOUND, er_set(), ER_SP_NOT_EXIST, ER_WARNING_SEVERITY, free_and_init, jsp_check_stored_procedure_name(), NULL, SP_ATTR_NAME, and SP_CLASS_NAME.
Referenced by au_change_sp_owner_method(), drop_stored_procedure(), jsp_alter_stored_procedure(), jsp_do_call_stored_procedure(), jsp_get_return_type(), and jsp_is_exist_stored_procedure().
Definition at line 774 of file jsp_cl.c.
References SP_ARGS::args, cubregex::count(), db_arg_list::next, NULL, and p.
Referenced by jsp_do_call_stored_procedure(), and jsp_send_call_request().
|
static |
Definition at line 1350 of file jsp_cl.c.
References jsp_get_value_size(), db_arg_list::next, NULL, p, and db_arg_list::val.
Referenced by jsp_send_call_request().
void* jsp_get_db_result_set | ( | int | h_id | ) |
Definition at line 3075 of file jsp_cl.c.
References libcas_get_db_result_set().
Referenced by create_srv_handle_with_query_result(), and ux_use_sp_out().
int jsp_get_return_type | ( | const char * | name | ) |
Definition at line 287 of file jsp_cl.c.
References assert, AU_DISABLE, AU_ENABLE, db_get(), db_get_int(), er_errid(), err, jsp_find_stored_procedure(), NO_ERROR, NULL, and SP_ATTR_RETURN_TYPE.
Referenced by pt_make_method_call().
|
static |
Definition at line 1252 of file jsp_cl.c.
References db_get_set(), db_get_string(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_VARBIT, DB_TYPE_VARNCHAR, DB_VALUE_TYPE, i, NO_ERROR, NULL, numeric_db_value_print(), NUMERIC_MAX_STRING_SIZE, or_packed_string_length(), pr_clear_value(), set_get_element(), and set_size().
Referenced by jsp_get_argument_size().
void jsp_init | ( | void | ) |
Definition at line 185 of file jsp_cl.c.
References call_cnt, i, INVALID_SOCKET, is_prepare_call, MAX_CALL_COUNT, and sock_fds.
Referenced by boot_restart_client().
int jsp_is_exist_stored_procedure | ( | const char * | name | ) |
Definition at line 267 of file jsp_cl.c.
References er_clear(), jsp_find_stored_procedure(), and NULL.
Referenced by jsp_create_stored_procedure(), pt_bind_names(), pt_check_method(), and pt_make_method_call().
|
static |
Definition at line 749 of file jsp_cl.c.
References PT_INPUT, PT_NOPUT, PT_OUTPUT, SP_MODE_IN, SP_MODE_INOUT, and SP_MODE_OUT.
Referenced by jsp_add_stored_procedure_argument().
|
static |
Definition at line 728 of file jsp_cl.c.
References PT_SP_PROCEDURE, SP_TYPE_FUNCTION, and SP_TYPE_PROCEDURE.
Referenced by drop_stored_procedure(), jsp_add_stored_procedure(), and jsp_alter_stored_procedure().
|
static |
Definition at line 1804 of file jsp_cl.c.
References DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_VARBIT, DB_TYPE_VARNCHAR, DB_VALUE_TYPE, jsp_pack_bigint_argument(), jsp_pack_date_argument(), jsp_pack_datetime_argument(), jsp_pack_double_argument(), jsp_pack_float_argument(), jsp_pack_int_argument(), jsp_pack_monetary_argument(), jsp_pack_null_argument(), jsp_pack_numeric_argument(), jsp_pack_object_argument(), jsp_pack_set_argument(), jsp_pack_short_argument(), jsp_pack_string_argument(), jsp_pack_time_argument(), jsp_pack_timestamp_argument(), and or_pack_int().
Referenced by jsp_pack_set_argument(), and jsp_send_call_request().
|
static |
Definition at line 1395 of file jsp_cl.c.
References db_get_bigint(), OR_BIGINT_SIZE, or_pack_int(), and OR_PUT_BIGINT.
Referenced by jsp_pack_argument().
|
static |
Definition at line 1565 of file jsp_cl.c.
References db_date_decode(), db_get_date(), and or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1656 of file jsp_cl.c.
References db_datetime_decode(), db_get_datetime(), min, and or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1463 of file jsp_cl.c.
References db_get_double(), OR_DOUBLE_SIZE, or_pack_int(), and OR_PUT_DOUBLE().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1440 of file jsp_cl.c.
References db_get_float(), or_pack_float(), and or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1373 of file jsp_cl.c.
References db_get_int(), and or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1761 of file jsp_cl.c.
References db_monetary::amount, db_get_monetary(), OR_DOUBLE_SIZE, or_pack_int(), and OR_PUT_DOUBLE().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1784 of file jsp_cl.c.
References or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1487 of file jsp_cl.c.
References numeric_db_value_print(), NUMERIC_MAX_STRING_SIZE, and or_pack_string().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1726 of file jsp_cl.c.
References db_get_object(), NULL, oid_Null_oid, or_pack_int(), or_pack_short(), db_identifier::pageid, db_identifier::slotid, db_identifier::volid, and WS_OID.
Referenced by jsp_pack_argument().
|
static |
Definition at line 1688 of file jsp_cl.c.
References db_get_set(), i, jsp_pack_argument(), NO_ERROR, or_pack_int(), pr_clear_value(), set_get_element(), and set_size().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1417 of file jsp_cl.c.
References db_get_short(), or_pack_int(), and or_pack_short().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1509 of file jsp_cl.c.
References assert, db_get_string(), db_get_string_codeset(), db_private_alloc, db_private_free, INTL_CODESET_UTF8, lang_get_generic_unicode_norm(), NULL, or_pack_string(), strlen, unicode_decompose_string(), and unicode_string_need_decompose().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1593 of file jsp_cl.c.
References db_get_time(), db_time_decode(), min, and or_pack_int().
Referenced by jsp_pack_argument().
|
static |
Definition at line 1621 of file jsp_cl.c.
References db_date_decode(), db_get_timestamp(), db_time_decode(), db_timestamp_decode_ses(), min, and or_pack_int().
Referenced by jsp_pack_argument().
Definition at line 2725 of file jsp_cl.c.
References ARG_FILE_LINE, assert, db_get_string(), db_make_null(), db_value_clear(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_EXECUTE_ERROR, jsp_unpack_value(), NO_ERROR, NULL, and SP_ARGS::returnval.
Referenced by jsp_receive_response().
Definition at line 2579 of file jsp_cl.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, er_set(), ER_SP_NETWORK_ERROR, free_and_init, jsp_alloc_response(), jsp_readn(), jsp_receive_error(), jsp_receive_result(), libcas_main(), NO_ERROR, ntohl(), NULL, or_unpack_int(), SP_CODE_ERROR, SP_CODE_INTERNAL_JDBC, SP_CODE_RESULT, tran_begin_libcas_function(), and tran_end_libcas_function().
Referenced by jsp_execute_stored_procedure().
Definition at line 2685 of file jsp_cl.c.
References SP_ARGS::arg_mode, SP_ARGS::args, assert, db_value_clear(), db_value_clone(), er_errid(), i, jsp_unpack_value(), db_arg_list::next, NO_ERROR, NULL, SP_ARGS::returnval, SP_MODE_OUT, and db_arg_list::val.
Referenced by jsp_receive_response().
Definition at line 1901 of file jsp_cl.c.
References ARG_FILE_LINE, SP_ARGS::arg_mode, SP_ARGS::arg_type, SP_ARGS::args, er_errid(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_SP_NETWORK_ERROR, free_and_init, i, jsp_get_argument_count(), jsp_get_argument_size(), jsp_pack_argument(), jsp_writen(), SP_ARGS::name, db_arg_list::next, NO_ERROR, NULL, or_pack_int(), or_pack_string_with_length(), or_packed_string_length(), p, SP_ARGS::return_type, SP_CODE_INVOKE, strlen, and db_arg_list::val.
Referenced by jsp_execute_stored_procedure().
Definition at line 1979 of file jsp_cl.c.
References ARG_FILE_LINE, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_SP_NETWORK_ERROR, jsp_readn(), jsp_writen(), libcas_main(), mode, NO_ERROR, ntohl(), OR_ALIGNED_BUF, OR_ALIGNED_BUF_START, OR_INT_SIZE, or_pack_int(), SP_CODE_DESTROY, ssl_client, tran_begin_libcas_function(), and tran_end_libcas_function().
Referenced by jsp_execute_stored_procedure(), and jsp_send_destroy_request_all().
int jsp_send_destroy_request_all | ( | ) |
Definition at line 1963 of file jsp_cl.c.
References i, INVALID_SOCKET, IS_INVALID_SOCKET, jsp_disconnect_server(), jsp_send_destroy_request(), MAX_CALL_COUNT, NO_ERROR, and sock_fds.
Referenced by csql_execute_statements(), and fn_execute_internal().
void jsp_set_prepare_call | ( | void | ) |
Definition at line 3048 of file jsp_cl.c.
References call_cnt, and is_prepare_call.
Referenced by ux_execute_all(), and ux_execute_call().
void jsp_srv_handle_free | ( | int | h_id | ) |
Definition at line 3089 of file jsp_cl.c.
References libcas_srv_handle_free().
Referenced by create_srv_handle_with_query_result(), and ux_use_sp_out().
|
static |
Definition at line 2051 of file jsp_cl.c.
References db_make_bigint(), OR_BIGINT_SIZE, OR_GET_BIGINT, and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2226 of file jsp_cl.c.
References db_string_to_date(), db_value_put_encoded_date(), NO_ERROR, NULL, or_unpack_string_nocopy(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2319 of file jsp_cl.c.
References db_make_datetime(), db_string_to_datetime(), NO_ERROR, NULL, or_unpack_string_nocopy(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2116 of file jsp_cl.c.
References db_make_double(), OR_DOUBLE_SIZE, OR_GET_DOUBLE, and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2094 of file jsp_cl.c.
References db_make_float(), or_unpack_float(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2029 of file jsp_cl.c.
References db_make_int(), or_unpack_int(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2426 of file jsp_cl.c.
References DB_CURRENCY_DEFAULT, db_make_monetary(), NO_ERROR, NULL, OR_DOUBLE_SIZE, OR_GET_DOUBLE, and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2138 of file jsp_cl.c.
References lang_get_client_charset(), NO_ERROR, NULL, numeric_coerce_string_to_num(), or_unpack_string_nocopy(), strlen, and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2399 of file jsp_cl.c.
References db_make_object(), NULL, or_unpack_int(), or_unpack_short(), db_identifier::pageid, db_identifier::slotid, db_identifier::volid, and ws_mop().
Referenced by jsp_unpack_value().
|
static |
Definition at line 2458 of file jsp_cl.c.
References db_make_resultset(), or_unpack_int(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2350 of file jsp_cl.c.
References db_make_multiset(), db_make_sequence(), db_make_set(), DB_TYPE_MULTISET, DB_TYPE_SEQUENCE, DB_TYPE_SET, i, jsp_unpack_value(), NO_ERROR, NULL, or_unpack_int(), pr_clear_value(), set_add_element(), set_create(), and set_free().
Referenced by jsp_unpack_value().
|
static |
Definition at line 2072 of file jsp_cl.c.
References db_make_short(), or_unpack_short(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2162 of file jsp_cl.c.
References ARG_FILE_LINE, assert, db_make_string(), db_private_alloc, db_private_free, db_string_put_cs_and_collation(), ER_ERROR_SEVERITY, ER_INVALID_CHAR, er_set(), intl_check_string(), INTL_CODESET_UTF8, INTL_UTF8_VALID, lang_get_client_charset(), lang_get_client_collation(), lang_get_generic_unicode_norm(), db_value::need_clear, NULL, or_unpack_string(), strlen, unicode_compose_string(), unicode_string_need_compose(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2257 of file jsp_cl.c.
References db_string_to_time(), db_value_put_encoded_time(), NO_ERROR, NULL, or_unpack_string_nocopy(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2288 of file jsp_cl.c.
References db_make_timestamp(), db_string_to_timestamp(), NO_ERROR, NULL, or_unpack_string_nocopy(), and db_arg_list::val.
Referenced by jsp_unpack_value().
|
static |
Definition at line 2480 of file jsp_cl.c.
References db_make_null(), DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, 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_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_VARBIT, DB_TYPE_VARNCHAR, jsp_unpack_bigint_value(), jsp_unpack_date_value(), jsp_unpack_datetime_value(), jsp_unpack_double_value(), jsp_unpack_float_value(), jsp_unpack_int_value(), jsp_unpack_monetary_value(), jsp_unpack_numeric_value(), jsp_unpack_object_value(), jsp_unpack_resultset(), jsp_unpack_set_value(), jsp_unpack_short_value(), jsp_unpack_string_value(), jsp_unpack_time_value(), jsp_unpack_timestamp_value(), and or_unpack_int().
Referenced by jsp_receive_error(), jsp_receive_result(), and jsp_unpack_set_value().
void jsp_unset_prepare_call | ( | void | ) |
Definition at line 3061 of file jsp_cl.c.
References call_cnt, and is_prepare_call.
Referenced by ux_execute_all(), and ux_execute_call().
void* libcas_get_db_result_set | ( | int | h_id | ) |
int libcas_main | ( | SOCKET | fd | ) |
Referenced by cas_main(), jsp_receive_response(), and jsp_send_destroy_request().
void libcas_srv_handle_free | ( | int | h_id | ) |
|
static |
Definition at line 110 of file jsp_cl.c.
Referenced by jsp_do_call_stored_procedure(), jsp_execute_stored_procedure(), jsp_init(), jsp_set_prepare_call(), and jsp_unset_prepare_call().
|
static |
Definition at line 111 of file jsp_cl.c.
Referenced by jsp_do_call_stored_procedure(), jsp_execute_stored_procedure(), jsp_init(), jsp_set_prepare_call(), and jsp_unset_prepare_call().
|
static |
Definition at line 109 of file jsp_cl.c.
Referenced by jsp_execute_stored_procedure().
|
static |
Definition at line 107 of file jsp_cl.c.
Referenced by jsp_close_connection(), jsp_execute_stored_procedure(), jsp_init(), and jsp_send_destroy_request_all().
bool ssl_client |
Definition at line 81 of file cas_ssl.c.
Referenced by cas_init_ssl(), jsp_execute_stored_procedure(), and jsp_send_destroy_request().