CUBRID Engine
latest
|
#include "dbtype_def.h"
#include "query_list.h"
#include "system.h"
#include "thread_compat.hpp"
#include <time.h>
Go to the source code of this file.
Classes | |
struct | upddel_class_instances_lock_info |
struct | val_descr |
Macros | |
#define | QEXEC_NULL_COMMAND_ID -1 /* Invalid command identifier */ |
Typedefs | |
using | XASL_STATE = xasl_state |
typedef struct upddel_class_instances_lock_info | UPDDEL_CLASS_INSTANCE_LOCK_INFO |
typedef struct val_descr | VAL_DESCR |
#define QEXEC_NULL_COMMAND_ID -1 /* Invalid command identifier */ |
Definition at line 55 of file query_executor.h.
typedef struct upddel_class_instances_lock_info UPDDEL_CLASS_INSTANCE_LOCK_INFO |
Definition at line 57 of file query_executor.h.
Definition at line 64 of file query_executor.h.
using XASL_STATE = xasl_state |
Definition at line 53 of file query_executor.h.
int qexec_clear_func_pred | ( | THREAD_ENTRY * | thread_p, |
func_pred * | pred_filter | ||
) |
Definition at line 21472 of file query_executor.c.
References func_pred::func_regu, NO_ERROR, and qexec_clear_regu_var().
Referenced by heap_eval_function_index(), heap_free_func_pred_unpack_info(), xbtree_load_index(), and xbtree_load_online_index().
int qexec_clear_list_cache_by_class | ( | THREAD_ENTRY * | thread_p, |
const OID * | class_oid | ||
) |
Definition at line 14984 of file query_executor.c.
References xasl_cache_ent::list_ht_no, mht_get2(), NO_ERROR, NULL, and qfile_clear_list_cache().
Referenced by locator_delete_force_internal(), locator_insert_force(), locator_update_force(), qexec_execute_delete(), qexec_execute_increment(), qexec_execute_insert(), and qexec_execute_update().
int qexec_clear_partition_expression | ( | THREAD_ENTRY * | thread_p, |
regu_variable_node * | expr | ||
) |
Definition at line 21490 of file query_executor.c.
References NO_ERROR, and qexec_clear_regu_var().
Referenced by partition_free_partition_predicate().
int qexec_clear_pred_context | ( | THREAD_ENTRY * | thread_p, |
pred_expr_with_context * | pred_filter, | ||
bool | dealloc_dbvalues | ||
) |
Definition at line 21447 of file query_executor.c.
References NO_ERROR, pred_expr_with_context::pred, qexec_clear_pred(), XASL_DECACHE_CLONE, and XASL_SET_FLAG.
Referenced by fpcache_entry_uninit(), locator_eval_filter_predicate(), xbtree_load_index(), and xbtree_load_online_index().
int qexec_clear_xasl | ( | THREAD_ENTRY * | thread_p, |
xasl_node * | xasl, | ||
bool | is_final | ||
) |
Definition at line 2130 of file query_executor.c.
References buildlist_proc_node::a_eval_list, buildlist_proc_node::a_outptr_list, buildlist_proc_node::a_outptr_list_ex, buildlist_proc_node::a_outptr_list_interm, buildlist_proc_node::a_regu_list, buildlist_proc_node::a_val_list, connectby_proc_node::after_cb_regu_list_pred, connectby_proc_node::after_cb_regu_list_rest, connectby_proc_node::after_connect_by_pred, buildlist_proc_node::after_groupby_list, xasl_node::after_iscan_list, xasl_node::after_join_pred, buildvalue_proc_node::agg_list, xasl_node::aptr_list, fetch_proc_node::arg, assert, odku_info::assignments, update_proc_node::assigns, bh_destroy(), xasl_node::bptr_list, xasl_node::buildlist, BUILDLIST_PROC, xasl_node::buildvalue, BUILDVALUE_PROC, xasl_node::connect_by, xasl_node::connect_by_ptr, CONNECTBY_PROC, odku_info::cons_pred, update_proc_node::cons_pred, xasl_node::cte, CTE_PROC, xasl_node::curr_spec, db_private_free_and_init, xasl_node::dptr_list, binary_heap::element_count, buildlist_proc_node::eptr_list, xasl_node::fetch, xasl_node::flag, xasl_node::fptr_list, buildlist_proc_node::g_agg_list, buildlist_proc_node::g_grbynum_pred, buildlist_proc_node::g_grbynum_val, buildlist_proc_node::g_hash_eligible, buildlist_proc_node::g_having_pred, buildlist_proc_node::g_hk_scan_regu_list, buildlist_proc_node::g_hk_sort_regu_list, buildlist_proc_node::g_outptr_list, buildlist_proc_node::g_regu_list, buildlist_proc_node::g_scan_regu_list, buildlist_proc_node::g_val_list, buildvalue_proc_node::grbynum_val, buildlist_proc_node::groupby_list, buildvalue_proc_node::having_pred, i, xasl_node::if_pred, xasl_node::insert, INSERT_PROC, merge_proc_node::insert_xasl, xasl_node::instnum_pred, xasl_node::instnum_val, xasl_node::iscycle_val, xasl_node::isleaf_val, xasl_node::level_val, xasl_node::limit_offset, xasl_node::limit_row_count, xasl_node::list_id, lock_abort_composite_lock(), xasl_node::merge, MERGE_PROC, xasl_node::merge_spec, xasl_node::merge_val_list, regu_variable_list_node::next, xasl_node::next, cte_proc_node::non_recursive_part, NULL, odku_info::num_assigns, update_proc_node::num_assigns, insert_proc_node::num_val_lists, OBJFETCH_PROC, insert_proc_node::odku, xasl_node::ordbynum_pred, xasl_node::ordbynum_val, xasl_node::orderby_limit, xasl_node::orderby_list, buildvalue_proc_node::outarith_list, xasl_node::outptr_list, pr_clear_value(), connectby_proc_node::prior_outptr_list, connectby_proc_node::prior_regu_list_pred, connectby_proc_node::prior_regu_list_rest, connectby_proc_node::prior_val_list, xasl_node::proc, qexec_clear_access_spec_list(), qexec_clear_agg_list(), qexec_clear_agg_orderby_const_list(), qexec_clear_analytic_function_list(), qexec_clear_arith_list(), qexec_clear_db_val_list(), qexec_clear_pred(), qexec_clear_regu_list(), qexec_clear_regu_var(), qexec_clear_sort_list(), qexec_clear_topn_tuple(), qexec_clear_update_assignment(), qexec_clear_xasl(), qexec_clear_xasl_head(), qexec_destroy_upddel_ehash_files(), qexec_free_agg_hash_context(), QEXEC_GET_BH_TOPN_TUPLE, qfile_clear_list_id(), xasl_node::query_in_progress, cte_proc_node::recursive_part, connectby_proc_node::regu_list_pred, connectby_proc_node::regu_list_rest, scan_close_scan(), scan_end_scan(), SCAN_PROC, xasl_node::scan_ptr, fetch_proc_node::set_pred, xasl_node::spec_list, connectby_proc_node::start_with_pred, xasl_node::type, xasl_node::update, UPDATE_PROC, merge_proc_node::update_xasl, xasl_node::val_list, val_list_node::valp, insert_proc_node::valptr_lists, valptr_list_node::valptrp, regu_variable_list_node::value, XASL_DECACHE_CLONE, XASL_HAS_CONNECT_BY, XASL_IS_FLAGED, and XASL_SET_FLAG.
Referenced by qexec_clear_access_spec_list(), qexec_clear_regu_var(), qexec_clear_xasl(), qexec_execute_query(), and xcache_clone_decache().
int qexec_execute_mainblock | ( | THREAD_ENTRY * | thread_p, |
xasl_node * | xasl, | ||
xasl_state * | xstate, | ||
UPDDEL_CLASS_INSTANCE_LOCK_INFO * | p_class_instance_lock_info | ||
) |
Definition at line 13517 of file query_executor.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_MAX_RECURSION_SQL_DEPTH, er_set(), error(), NO_ERROR, prm_get_integer_value(), PRM_ID_MAX_RECURSION_SQL_DEPTH, PSTAT_PB_NUM_FETCHES, PSTAT_PB_NUM_IOREADS, qexec_execute_mainblock_internal(), thread_dec_recursion_depth(), thread_get_recursion_depth(), thread_inc_recursion_depth(), thread_is_on_trace(), TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), and tsc_getticks().
Referenced by qexec_execute_cte(), qexec_execute_delete(), qexec_execute_insert(), qexec_execute_mainblock_internal(), qexec_execute_merge(), qexec_execute_obj_fetch(), qexec_execute_query(), qexec_execute_scan(), qexec_execute_update(), qexec_gby_finalize_group(), qexec_intprt_fnc(), and qexec_merge_fnc().
qfile_list_id* qexec_execute_query | ( | THREAD_ENTRY * | thread_p, |
xasl_node * | xasl, | ||
int | dbval_cnt, | ||
const DB_VALUE * | dbval_ptr, | ||
QUERY_ID | query_id | ||
) |
Definition at line 14660 of file query_executor.c.
References ARG_FILE_LINE, assert, log_tdes::client, log_tdes::client_id, db_datetime_encode(), val_descr::dbval_cnt, val_descr::dbval_ptr, val_descr::drand, envvar_get(), er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_INTERRUPTED, er_print_callstack(), ER_PT_EXECUTE, er_set(), clientids::get_db_user(), qfile_list_id::last_pgptr, xasl_node::list_id, LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, logtb_find_current_isolation(), logtb_get_mvcc_snapshot(), val_descr::lrand, NO_ERROR, NULL, prm_get_bool_value(), PRM_ID_LOG_QUERY_LISTS, qdump_print_xasl(), qexec_clear_xasl(), qexec_execute_mainblock(), qexec_get_xasl_list_id(), qfile_close_list(), QFILE_PUT_NEXT_VPID_NULL, qmgr_get_query_sql_user_text(), qmgr_get_rand_buf(), qmgr_set_query_error(), xasl_state::qp_xasl_line, xasl_state::query_id, xasl_node::query_in_progress, session_clear_trace_stats(), val_descr::sys_datetime, val_descr::sys_epochtime, thread_is_on_trace(), thread_need_clear_trace(), TRAN_REP_READ, tsc_elapsed_time_usec(), tsc_getticks(), qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, util_get_second_and_ms_since_epoch(), xasl_state::vd, val_descr::xasl_state, and xlogtb_set_interrupt().
Referenced by qmgr_process_query().
int qexec_get_tuple_column_value | ( | QFILE_TUPLE | tpl, |
int | index, | ||
DB_VALUE * | valp, | ||
tp_domain * | domain | ||
) |
Definition at line 16247 of file query_executor.c.
References pr_type::data_readval(), db_make_null(), ER_FAILED, NO_ERROR, NULL, OR_BUF_INIT, qfile_locate_tuple_value(), tp_domain::type, and V_BOUND.
Referenced by qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qexec_check_for_cycle(), qexec_execute_connect_by(), qexec_get_index_pseudocolumn_value_from_tuple(), qexec_groupby_index(), and qexec_recalc_tuples_parent_pos_in_list().
qfile_list_id* qexec_get_xasl_list_id | ( | xasl_node * | xasl | ) |
Definition at line 2743 of file query_executor.c.
References i, xasl_node::list_id, qproc_db_value_list::next, NO_ERROR, NULL, pr_clear_value(), QFILE_CLEAR_LIST_ID, qfile_clear_list_id(), qfile_copy_list_id(), QFILE_FREE_AND_INIT_LIST_ID, xasl_node::single_tuple, qproc_db_value_list::val, and val_list_node::valp.
Referenced by qexec_execute_query().
int qexec_insert_tuple_into_list | ( | THREAD_ENTRY * | thread_p, |
qfile_list_id * | list_id, | ||
valptr_list_node * | outptr_list, | ||
val_descr * | vd, | ||
qfile_tuple_record * | tplrec | ||
) |
Definition at line 16189 of file query_executor.c.
References DB_PAGESIZE, db_private_alloc, ER_FAILED, NO_ERROR, NULL, qdata_copy_valptr_list_to_tuple(), qexec_generate_tuple_descriptor(), qfile_add_tuple_to_list(), qfile_generate_tuple_into_list(), QPROC_TPLDESCR_FAILURE, QPROC_TPLDESCR_RETRY_BIG_REC, QPROC_TPLDESCR_RETRY_SET_TYPE, QPROC_TPLDESCR_SUCCESS, qfile_tuple_record::size, T_NORMAL, and qfile_tuple_record::tpl.
Referenced by btree_dump_curr_key(), qexec_analytic_add_tuple(), qexec_analytic_update_group_result(), qexec_execute_connect_by(), and qexec_update_connect_by_lists().
void qexec_replace_prior_regu_vars_prior_expr | ( | THREAD_ENTRY * | thread_p, |
regu_variable_node * | regu, | ||
xasl_node * | xasl, | ||
xasl_node * | connect_by_ptr | ||
) |
Definition at line 16029 of file query_executor.c.
References regu_variable_node::regu_data_value::arithptr, xasl_node::connect_by, regu_variable_node::regu_data_value::dbvalptr, regu_variable_node::regu_data_value::funcp, i, arith_list_node::leftptr, qproc_db_value_list::next, regu_variable_list_node::next, NULL, function_node::operand, connectby_proc_node::prior_val_list, xasl_node::proc, qexec_replace_prior_regu_vars_prior_expr(), arith_list_node::rightptr, arith_list_node::thirdptr, regu_variable_node::type, TYPE_CONSTANT, TYPE_FUNC, TYPE_INARITH, TYPE_OUTARITH, qproc_db_value_list::val, xasl_node::val_list, val_list_node::valp, regu_variable_node::value, and regu_variable_list_node::value.
Referenced by qdata_evaluate_qprior(), qexec_replace_prior_regu_vars(), and qexec_replace_prior_regu_vars_prior_expr().
int qexec_start_mainblock_iterations | ( | THREAD_ENTRY * | thread_p, |
xasl_node * | xasl, | ||
xasl_state * | xstate | ||
) |
Definition at line 12910 of file query_executor.c.
References buildlist_proc_node::a_eval_list, xasl_node::after_iscan_list, buildvalue_proc_node::agg_list, ARG_FILE_LINE, BUILD_SCHEMA_PROC, xasl_node::buildlist, BUILDLIST_PROC, xasl_node::buildvalue, BUILDVALUE_PROC, CONNECTBY_PROC, CTE_PROC, db_make_bigint(), db_make_int(), db_private_free_and_init, DIFFERENCE_PROC, qfile_tuple_value_type_list::domp, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_XASLNODE, er_set(), buildlist_proc_node::g_grbynum_val, GOTO_EXIT_ON_ERROR, buildvalue_proc_node::grbynum_val, buildlist_proc_node::groupby_list, xasl_node::instnum_val, INTERSECTION_PROC, xasl_node::iscycle_val, xasl_node::isleaf_val, xasl_node::level_val, xasl_node::list_id, MERGELIST_PROC, NO_ERROR, NULL, xasl_node::option, xasl_node::ordbynum_val, xasl_node::orderby_list, xasl_node::outptr_list, xasl_node::proc, Q_DISTINCT, qdata_get_valptr_type_list(), qdata_initialize_aggregate_list(), qexec_clear_regu_list(), qexec_destroy_upddel_ehash_files(), qexec_init_instnum_val(), qexec_init_upddel_ehash_files(), QEXEC_IS_MULTI_TABLE_UPDATE_DELETE, qexec_setup_topn_proc(), qfile_copy_list_id(), QFILE_FLAG_ALL, QFILE_FLAG_RESULT_FILE, QFILE_FREE_AND_INIT_LIST_ID, qfile_free_list_id(), qfile_open_list(), QFILE_SET_FLAG, xasl_state::query_id, xasl_node::type, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, UNION_PROC, valptr_list_node::valptrp, xasl_state::vd, XASL_HAS_CONNECT_BY, XASL_IS_FLAGED, XASL_MULTI_UPDATE_AGG, XASL_SKIP_ORDERBY_LIST, XASL_TO_BE_CACHED, and XASL_TOP_MOST_XASL.
Referenced by qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_execute_connect_by(), qexec_execute_mainblock_internal(), and qexec_merge_listfiles().