CUBRID Engine
latest
|
#include "config.h"
#include <assert.h>
#include "porting.h"
#include "error_manager.h"
#include "parser.h"
#include "cursor.h"
#include "memory_alloc.h"
#include "memory_hash.h"
#include "parser_message.h"
#include "execute_statement.h"
#include "object_domain.h"
#include "object_primitive.h"
#include "object_template.h"
#include "work_space.h"
#include "virtual_object.h"
#include "server_interface.h"
#include "arithmetic.h"
#include "parser_support.h"
#include "view_transform.h"
#include "network_interface_cl.h"
#include "transform.h"
#include "dbtype.h"
Go to the source code of this file.
Variables | |
static MHT_TABLE * | pt_Label_table = NULL |
int do_drop_variable | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | stmt | ||
) |
Definition at line 811 of file parse_evaluate.c.
References assert, pt_statement_info::drop_variable, parser_node::info, mht_rem(), MSGCAT_RUNTIME_VAR_NOT_DEFINED, MSGCAT_SET_PARSER_RUNTIME, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, PT_DROP_VARIABLE, PT_ERRORmf, pt_free_label(), PT_NAME, and pt_drop_variable_info::var_names.
Referenced by do_execute_statement(), and do_statement().
void parser_final | ( | void | ) |
Definition at line 884 of file parse_evaluate.c.
References pt_final_packing_buf(), and pt_free_label_table().
Referenced by boot_client_all_finalize().
Definition at line 493 of file parse_evaluate.c.
References assert, db_get_object(), DB_TYPE_OBJECT, db_value_free(), DB_VALUE_TYPE, er_errid(), ER_OUT_OF_VIRTUAL_MEMORY, intl_identifier_mht_1strlowerhash(), mht_compare_identifiers_equal(), mht_create(), mht_get(), mht_put(), mht_put_data(), NO_ERROR, NULL, ws_add_label_value_to_mop(), ws_copy_string(), and ws_remove_label_value_from_mop().
Referenced by pt_associate_label_with_value_check_reference(), and pt_check_union_type_compatibility_of_values_query().
Definition at line 589 of file parse_evaluate.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_REFERENCE_TO_NON_REFERABLE_NOT_ALLOWED, er_set(), pt_associate_label_with_value(), and pt_is_reference_to_reusable_oid().
Referenced by call_method(), db_bind_parameter_name(), do_evaluate(), do_execute_select(), do_execute_session_statement(), do_get_optimization_param(), do_get_stats(), do_get_trigger(), do_get_xaction(), do_insert_template(), do_select_internal(), and jsp_call_stored_procedure().
bool pt_eval_path_expr | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | tree, | ||
DB_VALUE * | val | ||
) |
Definition at line 259 of file parse_evaluate.c.
References pt_dot_info::arg1, pt_dot_info::arg2, assert, db_attribute_default(), db_get(), db_get_class(), db_get_class_name(), db_get_object(), db_get_shared_attribute(), db_is_any_class(), db_make_null(), db_make_object(), pt_name_info::db_object, DB_TYPE_NULL, DB_TYPE_OBJECT, db_value_clone(), DB_VALUE_TYPE, pt_statement_info::dot, ER_AU_AUTHORIZATION_FAILURE, ER_AU_SELECT_FAILURE, error(), parser_node::info, is_class(), pt_name_info::meta_class, MSGCAT_RUNTIME__CAN_NOT_EVALUATE, MSGCAT_RUNTIME_IS_NOT_AUTHORIZED_ON, MSGCAT_RUNTIME_UNKNOWN_SHARED_ATTR, MSGCAT_RUNTIME_UNKNOWN_VARIABLE, MSGCAT_SET_PARSER_RUNTIME, pt_statement_info::name, NO_ERROR, parser_node::node_type, NULL, pt_name_info::original, PT_CLASSOID_ATTR, PT_DOT_, PT_ERRORf, PT_ERRORmf, PT_ERRORmf2, pt_evaluate_tree(), pt_find_value_of_label(), pt_has_error, PT_INTERNAL_ERROR, PT_META_ATTR, PT_META_CLASS, PT_NAME, PT_NORMAL, PT_OID_ATTR, PT_PARAMETER, pt_report_to_ersys(), PT_SEMANTIC, PT_SHARED, pt_short_print(), PT_TRIGGER_OID, and PT_VID_ATTR.
Referenced by pt_check_method(), pt_eval_value_path(), and pt_evaluate_tree_internal().
void pt_evaluate_tree | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | tree, | ||
DB_VALUE * | db_values, | ||
int | values_count | ||
) |
Definition at line 901 of file parse_evaluate.c.
References pt_evaluate_tree_internal().
Referenced by call_method(), do_alter_one_clause_with_template(), do_evaluate(), do_get_optimization_param(), do_get_stats(), do_rollback(), do_savepoint(), do_set_optimization_param(), do_set_sys_params(), do_set_trigger(), do_set_xaction(), get_att_default_from_def(), jsp_call_stored_procedure(), mq_evaluate_expression(), mq_update_attribute(), pt_eval_path_expr(), pt_evaluate_tree_internal(), pt_limit_to_numbering_expr(), pt_seq_value_to_db(), pt_set_value_to_db(), pt_to_regu_variable(), and update_class_attributes().
void pt_evaluate_tree_having_serial | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | tree, | ||
DB_VALUE * | db_value, | ||
int | vals_cnt | ||
) |
Definition at line 1493 of file parse_evaluate.c.
References pt_evaluate_tree_internal().
Referenced by check_default_on_update_clause(), do_alter_one_clause_with_template(), do_evaluate_insert_values(), do_replace_names_for_insert_values_pre(), do_set_session_variables(), get_att_default_from_def(), mq_evaluate_expression_having_serial(), mq_replace_virtual_oid_with_real_oid(), pt_evaluate_tree_internal(), pt_get_query_limit_from_limit(), pt_get_query_limit_from_orderby_for(), and uci_static().
|
static |
Definition at line 917 of file parse_evaluate.c.
References pt_expr_info::arg1, pt_expr_info::arg2, pt_expr_info::arg3, ARG_FILE_LINE, pt_function_info::arg_list, assert, cursor_free_self_list_id, cursor_get_tuple_value(), pt_tuple_value_info::cursor_p, parser_node::data_type, db_error_string(), db_get_int(), db_get_set(), db_get_string_codeset(), db_get_string_collation(), db_identifier(), DB_IS_NULL, db_make_multiset(), db_make_null(), db_make_sequence(), db_make_set(), db_make_varchar(), db_make_varnchar(), db_seq_create(), db_set_create_basic(), db_set_create_multi(), db_value_clear(), db_value_clone(), db_value_free(), do_call_method(), do_get_serial_cached_num(), do_insert(), do_select(), db_value::domain, ER_DB_NO_MODIFICATIONS, ER_DO_INSERT_TOO_MANY, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_msg(), ER_QPROC_CANNOT_FETCH_SERIAL, ER_QPROC_CANNOT_UPDATE_SERIAL, ER_QPROC_DB_SERIAL_NOT_FOUND, ER_QPROC_SERIAL_ALREADY_EXIST, ER_QPROC_SERIAL_RANGE_OVERFLOW, er_set(), error(), parser_node::etc, pt_statement_info::expr, F_MULTISET, F_SEQUENCE, F_SET, F_TABLE_MULTISET, F_TABLE_SEQUENCE, F_TABLE_SET, pt_statement_info::function, pt_function_info::function_type, db_domain_info::general_info, GENERATE_SERIAL, pt_tuple_value_info::index, parser_node::info, pt_statement_info::insert, pt_statement_info::insert_value, pt_insert_value_info::is_evaluated, LANG_SYS_CODESET, LANG_SYS_COLLATION, mq_translate(), MSGCAT_RUNTIME__CAN_NOT_EVALUATE, MSGCAT_SEMANTIC_OUT_OF_MEMORY, MSGCAT_SEMANTIC_SERIAL_ALREADY_EXIST, MSGCAT_SEMANTIC_SERIAL_IO_ERROR, MSGCAT_SEMANTIC_SERIAL_NOT_DEFINED, MSGCAT_SEMANTIC_SERIAL_NUM_ALLOC_INVALID, MSGCAT_SEMANTIC_SERIAL_VALUE_OVERFLOW, MSGCAT_SET_ERROR, MSGCAT_SET_PARSER_RUNTIME, MSGCAT_SET_PARSER_SEMANTIC, pt_statement_info::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, pt_expr_info::op, parser_node::or_next, pt_name_info::original, pt_insert_value_info::original_node, parser_copy_tree(), parser_free_tree(), parser_new_node(), pr_clear_value(), pr_clone_value(), pr_free_ext_value(), PT_ASSIGN, PT_BETWEEN, PT_CURRENT_VALUE, pt_db_to_type_enum(), PT_DIFFERENCE, PT_DOT_, pt_end_query(), PT_EQ, PT_ERRORc, PT_ERRORm, PT_ERRORmf, pt_eval_path_expr(), pt_evaluate_db_value_expr(), pt_evaluate_function(), pt_evaluate_tree(), pt_evaluate_tree_having_serial(), PT_EXISTS, PT_EXPR, PT_EXTRACT, PT_FROM_UNIXTIME, PT_FUNCTION, PT_FUNCTION_HOLDER, pt_get_one_tuple_from_list_id(), pt_has_error, PT_HOST_VAR, PT_INSERT, PT_INSERT_VALUE, PT_INTERNAL_ERROR, PT_INTERSECTION, pt_is_between_range_op(), pt_is_table_op(), PT_LIKE_ESCAPE, PT_LPAD, PT_LTRIM, PT_METHOD_CALL, PT_NAME, PT_NEXT_VALUE, pt_node_to_db_domain(), PT_NOT_BETWEEN, PT_OR, pt_query_to_set_table(), PT_REPLACE, pt_resolve_serial(), PT_RPAD, PT_RTRIM, PT_SELECT, pt_seq_value_to_db(), pt_set_table_to_db(), pt_set_value_to_db(), pt_short_print(), PT_SUBSTRING, PT_TRANSLATE, PT_TRIM, PT_TUPLE_VALUE, PT_TYPE_LOGICAL, PT_TYPE_NCHAR, PT_TYPE_VARCHAR, PT_TYPE_VARNCHAR, PT_UNION, PT_UNIX_TIMESTAMP, PT_VALUE, pt_value_to_db(), pt_expr_info::qualifier, parser_context::query_id, serial_get_current_value(), serial_get_next_value(), parser_context::sys_datetime, tp_domain_cache(), pt_statement_info::tuple_value, db_domain_info::general_info::type, parser_node::type_enum, pt_insert_value_info::value, and pt_insert_info::value_clauses.
Referenced by pt_evaluate_tree(), and pt_evaluate_tree_having_serial().
Definition at line 705 of file parse_evaluate.c.
References assert, DB_TYPE_OBJECT, DB_VALUE_TYPE, db_ws_alloc(), db_ws_free(), er_errid(), error(), mht_get(), mht_map(), db_namelist::name, db_namelist::next, nlist_free(), NO_ERROR, NULL, vid_flush_and_rehash_lbl(), and ws_copy_string().
Referenced by do_insert_template(), make_vmops(), pt_bind_parameter(), pt_eval_path_expr(), pt_resolve_object(), pt_to_list_key(), pt_to_regu_variable(), and pt_value_to_db().
|
static |
Definition at line 842 of file parse_evaluate.c.
References db_get_object(), DB_TYPE_OBJECT, db_value_free(), DB_VALUE_TYPE, NO_ERROR, NULL, ws_free_string(), and ws_remove_label_value_from_mop().
Referenced by do_drop_variable(), and pt_free_label_table().
void pt_free_label_table | ( | void | ) |
Definition at line 867 of file parse_evaluate.c.
References mht_destroy(), mht_map(), NULL, and pt_free_label().
Referenced by parser_final().
int pt_get_one_tuple_from_list_id | ( | PARSER_CONTEXT * | parser, |
PT_NODE * | tree, | ||
DB_VALUE * | vals, | ||
int | cnt | ||
) |
Definition at line 423 of file parse_evaluate.c.
References assert, cursor_close(), cursor_get_tuple_value_list(), cursor_next_tuple(), cursor_open(), DB_CURSOR_SUCCESS, parser_node::etc, parser_node::info, MSGCAT_RUNTIME_YIELDS_GT_ONE_ROW, MSGCAT_SET_PARSER_RUNTIME, NO_ERROR, NULL, pt_query_info::oids_included, p, parser_print_tree(), PT_ERRORmf, pt_get_select_list(), pt_statement_info::query, cursor_id::query_id, and parser_context::query_id.
Referenced by do_execute_select(), do_select_internal(), and pt_evaluate_tree_internal().
int pt_is_reference_to_reusable_oid | ( | DB_VALUE * | val | ) |
Definition at line 616 of file parse_evaluate.c.
References obj_template::classobj, db_get_class(), db_get_object(), db_get_pointer(), db_is_class(), DB_TYPE_NULL, DB_TYPE_OBJECT, DB_TYPE_POINTER, DB_VALUE_TYPE, is_class(), NO_ERROR, NULL, and sm_check_reuse_oid_class().
Referenced by assign_set_value(), check_att_domain(), pt_associate_label_with_value_check_reference(), and pt_set_host_variables().
|
static |
Definition at line 73 of file parse_evaluate.c.
References PT_EQ_ALL, PT_EQ_SOME, PT_GE_ALL, PT_GE_SOME, PT_GT_ALL, PT_GT_SOME, PT_IS_IN, PT_IS_NOT_IN, PT_LE_ALL, PT_LE_SOME, PT_LT_ALL, PT_LT_SOME, PT_NE_ALL, and PT_NE_SOME.
Referenced by pt_evaluate_tree_internal().
|
static |
Definition at line 107 of file parse_evaluate.c.
References pt_function_info::arg_list, parser_node::column_number, F_TABLE_SET, pt_statement_info::function, pt_function_info::function_type, parser_node::info, parser_node::line_number, parser_node::node_type, parser_new_node(), PT_FUNCTION, and PT_IS_QUERY_NODE_TYPE.
Referenced by pt_evaluate_tree_internal().
|
static |
Definition at line 133 of file parse_evaluate.c.
References cursor_close(), cursor_free_self_list_id, cursor_get_tuple_value_list(), cursor_next_tuple(), cursor_open(), DB_CURSOR_END, DB_CURSOR_SUCCESS, db_error_string(), db_get_set(), db_make_null(), db_seq_put(), db_set_add(), do_select(), ER_GENERIC_ERROR, error(), EXCLUDE_HIDDEN_COLUMNS, free_and_init, mq_translate(), MSGCAT_RUNTIME_OUT_OF_MEMORY, MSGCAT_SET_PARSER_SEMANTIC, NO_ERROR, NULL, parser_copy_tree(), parser_free_tree(), pr_clear_value(), pt_end_query(), PT_ERRORc, PT_ERRORmf, pt_get_select_list(), pt_length_of_select_list(), cursor_id::query_id, and parser_context::query_id.
Referenced by pt_evaluate_tree_internal().
Definition at line 52 of file parse_evaluate.c.