CUBRID Engine  latest
query_executor.c File Reference
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <search.h>
#include <sys/timeb.h>
#include "query_executor.h"
#include "binaryheap.h"
#include "porting.h"
#include "error_manager.h"
#include "partition_sr.h"
#include "query_aggregate.hpp"
#include "query_analytic.hpp"
#include "query_opfunc.h"
#include "fetch.h"
#include "dbtype.h"
#include "object_primitive.h"
#include "object_representation.h"
#include "list_file.h"
#include "extendible_hash.h"
#include "xasl_cache.h"
#include "stream_to_xasl.h"
#include "query_manager.h"
#include "query_reevaluation.hpp"
#include "replication.h"
#include "elo.h"
#include "db_elo.h"
#include "locator_sr.h"
#include "log_lsa.hpp"
#include "log_volids.hpp"
#include "xserver_interface.h"
#include "tz_support.h"
#include "session.h"
#include "db_date.h"
#include "btree_load.h"
#include "query_dump.h"
#include "db_json.hpp"
#include "string_regex.hpp"
#include "thread_entry.hpp"
#include "regu_var.hpp"
#include "xasl.h"
#include "xasl_aggregate.hpp"
#include "xasl_analytic.hpp"
#include "xasl_predicate.hpp"
#include <vector>

Go to the source code of this file.

Classes

struct  xasl_state
 
struct  groupby_dimension
 
struct  groupby_state
 
struct  analytic_function_state
 
struct  analytic_state
 
struct  ordbynum_info
 
struct  parent_pos_info
 
struct  del_lob_info
 
struct  upddel_class_info_internal
 

Macros

#define GOTO_EXIT_ON_ERROR
 
#define QPROC_MAX_GROUPED_SCAN_CNT   (4)
 
#define QPROC_SINGLE_CLASS_GROUPED_SCAN   (0)
 
#define CONNECTBY_TUPLE_INDEX_STRING_MEM   64
 
#define HASH_AGGREGATE_DEFAULT_TABLE_SIZE   1000
 
#define HASH_AGGREGATE_VH_SELECTIVITY_TUPLE_THRESHOLD   200
 
#define HASH_AGGREGATE_VH_SELECTIVITY_THRESHOLD   0.5f
 
#define QEXEC_CLEAR_AGG_LIST_VALUE(agg_list)
 
#define QEXEC_EMPTY_ACCESS_SPEC_SCAN(specp)
 
#define QEXEC_IS_MULTI_TABLE_UPDATE_DELETE(xasl)   (xasl->upd_del_class_cnt > 1 || (xasl->upd_del_class_cnt == 1 && xasl->scan_ptr != NULL))
 
#define QEXEC_SEL_UPD_USE_REEVALUATION(xasl)
 
#define QEXEC_GET_BH_TOPN_TUPLE(heap, index)   (*(TOPN_TUPLE **) BH_ELEMENT (heap, index))
 
#define QEXEC_MERGE_ADD_MERGETUPLE(thread_p, t1, t2)
 
#define QEXEC_MERGE_PVALS(pre)
 
#define QEXEC_MERGE_NEXT_SCAN(thread_p, pre, e)
 
#define QEXEC_MERGE_PREV_SCAN(thread_p, pre)
 
#define QEXEC_MERGE_NEXT_SCAN_PVALS(thread_p, pre, e)
 
#define QEXEC_MERGE_REV_SCAN_PVALS(thread_p, pre)
 
#define QEXEC_MERGE_OUTER_NEXT_SCAN(thread_p, pre, e)
 
#define QEXEC_MERGE_OUTER_PREV_SCAN(thread_p, pre)
 
#define QEXEC_MERGE_OUTER_NEXT_SCAN_PVALS(thread_p, pre, e)
 
#define QEXEC_MERGE_OUTER_PREV_SCAN_PVALS(thread_p, pre)
 
#define CTE_CURRENT_SCAN_READ_TUPLE(node)
 
#define CTE_CURR_ITERATION_LAST_TUPLE(node)
 
#define MIN_NUM_ROWS_FOR_MULTI_DELETE   20
 

Typedefs

typedef struct xasl_state XASL_STATE
 
typedef SCAN_CODE(* XSAL_SCAN_FUNC) (THREAD_ENTRY *thread_p, XASL_NODE *, XASL_STATE *, QFILE_TUPLE_RECORD *, void *)
 
typedef XSAL_SCAN_FUNCXASL_SCAN_FNC_PTR
 
typedef enum groupby_dimension_flag GROUPBY_DIMENSION_FLAG
 
typedef struct groupby_dimension GROUPBY_DIMENSION
 
typedef struct groupby_state GROUPBY_STATE
 
typedef struct analytic_function_state ANALYTIC_FUNCTION_STATE
 
typedef struct analytic_state ANALYTIC_STATE
 
typedef struct ordbynum_info ORDBYNUM_INFO
 
typedef struct parent_pos_info PARENT_POS_INFO
 
typedef struct del_lob_info DEL_LOB_INFO
 
typedef struct upddel_class_info_internal UPDDEL_CLASS_INFO_INTERNAL
 
typedef enum analytic_stage ANALYTIC_STAGE
 

Enumerations

enum  groupby_dimension_flag {
  GROUPBY_DIM_FLAG_NONE = 0, GROUPBY_DIM_FLAG_GROUP_BY = 1, GROUPBY_DIM_FLAG_ROLLUP = 2, GROUPBY_DIM_FLAG_CUBE = 4,
  GROUPBY_DIM_FLAG_SET = 8
}
 
enum  analytic_stage { ANALYTIC_INTERM_PROC = 1, ANALYTIC_GROUP_PROC }
 
enum  TOPN_STATUS { TOPN_SUCCESS, TOPN_OVERFLOW, TOPN_FAILURE }
 

Functions

static DB_LOGICAL qexec_eval_instnum_pred (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_add_composite_lock (THREAD_ENTRY *thread_p, REGU_VARIABLE_LIST reg_var_list, XASL_STATE *xasl_state, LK_COMPOSITE_LOCK *composite_lock, int upd_del_cls_cnt, OID *default_cls_oid)
 
static QPROC_TPLDESCR_STATUS qexec_generate_tuple_descriptor (THREAD_ENTRY *thread_p, QFILE_LIST_ID *list_id, VALPTR_LIST *outptr_list, VAL_DESCR *vd)
 
static int qexec_upddel_add_unique_oid_to_ehid (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_end_one_iteration (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static void qexec_failure_line (int line, XASL_STATE *xasl_state)
 
static void qexec_reset_regu_variable (REGU_VARIABLE *var)
 
static void qexec_reset_regu_variable_list (REGU_VARIABLE_LIST list)
 
static void qexec_reset_pred_expr (PRED_EXPR *pred)
 
static int qexec_clear_xasl_head (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static int qexec_clear_arith_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, ARITH_TYPE *list, bool is_final)
 
static int qexec_clear_regu_var (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, REGU_VARIABLE *regu_var, bool is_final)
 
static int qexec_clear_regu_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, REGU_VARIABLE_LIST list, bool is_final)
 
static int qexec_clear_regu_value_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, REGU_VALUE_LIST *list, bool is_final)
 
static void qexec_clear_db_val_list (QPROC_DB_VALUE_LIST list)
 
static void qexec_clear_sort_list (XASL_NODE *xasl_p, SORT_LIST *list, bool is_final)
 
static void qexec_clear_pos_desc (XASL_NODE *xasl_p, QFILE_TUPLE_VALUE_POSITION *position_descr, bool is_final)
 
static int qexec_clear_pred (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, PRED_EXPR *pr, bool is_final)
 
static int qexec_clear_access_spec_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, ACCESS_SPEC_TYPE *list, bool is_final)
 
static int qexec_clear_analytic_function_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, ANALYTIC_EVAL_TYPE *list, bool is_final)
 
static int qexec_clear_agg_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, AGGREGATE_TYPE *list, bool is_final)
 
static void qexec_clear_head_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl_list)
 
static void qexec_clear_scan_all_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl_list)
 
static void qexec_clear_all_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl_list)
 
static int qexec_clear_update_assignment (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, UPDATE_ASSIGNMENT *assignment, bool is_final)
 
static DB_LOGICAL qexec_eval_ordbynum_pred (THREAD_ENTRY *thread_p, ORDBYNUM_INFO *ordby_info)
 
static int qexec_ordby_put_next (THREAD_ENTRY *thread_p, const RECDES *recdes, void *arg)
 
static int qexec_orderby_distinct (THREAD_ENTRY *thread_p, XASL_NODE *xasl, QUERY_OPTIONS option, XASL_STATE *xasl_state)
 
static int qexec_orderby_distinct_by_sorting (THREAD_ENTRY *thread_p, XASL_NODE *xasl, QUERY_OPTIONS option, XASL_STATE *xasl_state)
 
static DB_LOGICAL qexec_eval_grbynum_pred (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate)
 
static GROUPBY_STATEqexec_initialize_groupby_state (GROUPBY_STATE *gbstate, SORT_LIST *groupby_list, PRED_EXPR *having_pred, PRED_EXPR *grbynum_pred, DB_VALUE *grbynum_val, int grbynum_flag, XASL_NODE *eptr_list, AGGREGATE_TYPE *g_agg_list, REGU_VARIABLE_LIST g_regu_list, VAL_LIST *g_val_list, OUTPTR_LIST *g_outptr_list, REGU_VARIABLE_LIST g_hk_regu_list, bool with_rollup, int hash_eligible, AGGREGATE_HASH_CONTEXT *agg_hash_context, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_VALUE_TYPE_LIST *type_list, QFILE_TUPLE_RECORD *tplrec)
 
static void qexec_clear_groupby_state (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate)
 
static int qexec_clear_agg_orderby_const_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl, bool is_final)
 
static int qexec_gby_init_group_dim (GROUPBY_STATE *gbstate)
 
static void qexec_gby_clear_group_dim (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate)
 
static void qexec_gby_agg_tuple (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, QFILE_TUPLE tpl, int peek)
 
static int qexec_hash_gby_agg_tuple (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, BUILDLIST_PROC_NODE *proc, QFILE_TUPLE_RECORD *tplrec, QFILE_TUPLE_DESCRIPTOR *tpldesc, QFILE_LIST_ID *groupby_list, bool *output_tuple)
 
static void qexec_gby_start_group_dim (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, const RECDES *recdes)
 
static void qexec_gby_start_group (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, const RECDES *recdes, int N)
 
static void qexec_gby_finalize_group_val_list (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, int N)
 
static int qexec_gby_finalize_group_dim (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, const RECDES *recdes)
 
static void qexec_gby_finalize_group (THREAD_ENTRY *thread_p, GROUPBY_STATE *gbstate, int N, bool keep_list_file)
 
static SORT_STATUS qexec_hash_gby_get_next (THREAD_ENTRY *thread_p, RECDES *recdes, void *arg)
 
static int qexec_hash_gby_put_next (THREAD_ENTRY *thread_p, const RECDES *recdes, void *arg)
 
static SORT_STATUS qexec_gby_get_next (THREAD_ENTRY *thread_p, RECDES *recdes, void *arg)
 
static int qexec_gby_put_next (THREAD_ENTRY *thread_p, const RECDES *recdes, void *arg)
 
static int qexec_groupby (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_groupby_index (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_initialize_analytic_function_state (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state, ANALYTIC_TYPE *func_p, XASL_STATE *xasl_state)
 
static ANALYTIC_STATEqexec_initialize_analytic_state (THREAD_ENTRY *thread_p, ANALYTIC_STATE *analytic_state, ANALYTIC_TYPE *a_func_list, SORT_LIST *sort_list, REGU_VARIABLE_LIST a_regu_list, VAL_LIST *a_val_list, OUTPTR_LIST *a_outptr_list, OUTPTR_LIST *a_outptr_list_interm, bool is_last_run, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_VALUE_TYPE_LIST *type_list, QFILE_TUPLE_RECORD *tplrec)
 
static SORT_STATUS qexec_analytic_get_next (THREAD_ENTRY *thread_p, RECDES *recdes, void *arg)
 
static int qexec_analytic_put_next (THREAD_ENTRY *thread_p, const RECDES *recdes, void *arg)
 
static int qexec_analytic_eval_instnum_pred (THREAD_ENTRY *thread_p, ANALYTIC_STATE *analytic_state, ANALYTIC_STAGE stage)
 
static int qexec_analytic_start_group (THREAD_ENTRY *thread_p, XASL_STATE *xasl_state, ANALYTIC_FUNCTION_STATE *func_state, const RECDES *key, bool reinit)
 
static int qexec_analytic_finalize_group (THREAD_ENTRY *thread_p, XASL_STATE *xasl_state, ANALYTIC_FUNCTION_STATE *func_state, bool is_same_group)
 
static void qexec_analytic_add_tuple (THREAD_ENTRY *thread_p, ANALYTIC_STATE *analytic_state, QFILE_TUPLE tpl, int peek)
 
static void qexec_clear_analytic_function_state (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state)
 
static void qexec_clear_analytic_state (THREAD_ENTRY *thread_p, ANALYTIC_STATE *analytic_state)
 
static int qexec_analytic_evaluate_ntile_function (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state)
 
static int qexec_analytic_evaluate_offset_function (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state, ANALYTIC_STATE *analytic_state)
 
static int qexec_analytic_evaluate_interpolation_function (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state)
 
static int qexec_analytic_group_header_load (ANALYTIC_FUNCTION_STATE *func_state)
 
static int qexec_analytic_sort_key_header_load (ANALYTIC_FUNCTION_STATE *func_state, bool load_value)
 
static int qexec_analytic_value_advance (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state, int amount, int max_group_changes, bool ignore_nulls)
 
static int qexec_analytic_value_lookup (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state, int position, bool ignore_nulls)
 
static int qexec_analytic_group_header_next (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state)
 
static int qexec_analytic_update_group_result (THREAD_ENTRY *thread_p, ANALYTIC_STATE *analytic_state)
 
static int qexec_collection_has_null (DB_VALUE *colval)
 
static DB_VALUE_COMPARE_RESULT qexec_cmp_tpl_vals_merge (QFILE_TUPLE *left_tval, TP_DOMAIN **left_dom, QFILE_TUPLE *rght_tval, TP_DOMAIN **rght_dom, int tval_cnt)
 
static long qexec_size_remaining (QFILE_TUPLE_RECORD *tplrec1, QFILE_TUPLE_RECORD *tplrec2, QFILE_LIST_MERGE_INFO *merge_info, int k)
 
static int qexec_merge_tuple (QFILE_TUPLE_RECORD *tplrec1, QFILE_TUPLE_RECORD *tplrec2, QFILE_LIST_MERGE_INFO *merge_info, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_merge_tuple_add_list (THREAD_ENTRY *thread_p, QFILE_LIST_ID *list_id, QFILE_TUPLE_RECORD *tplrec1, QFILE_TUPLE_RECORD *tplrec2, QFILE_LIST_MERGE_INFO *merge_info, QFILE_TUPLE_RECORD *tplrec)
 
static QFILE_LIST_IDqexec_merge_list (THREAD_ENTRY *thread_p, QFILE_LIST_ID *outer_list_idp, QFILE_LIST_ID *inner_list_idp, QFILE_LIST_MERGE_INFO *merge_infop, int ls_flag)
 
static QFILE_LIST_IDqexec_merge_list_outer (THREAD_ENTRY *thread_p, SCAN_ID *outer_sid, SCAN_ID *inner_sid, QFILE_LIST_MERGE_INFO *merge_infop, PRED_EXPR *other_outer_join_pred, XASL_STATE *xasl_state, int ls_flag)
 
static int qexec_merge_listfiles (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_open_scan (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *curr_spec, VAL_LIST *val_list, VAL_DESCR *vd, bool force_select_lock, int fixed, int grouped, bool iscan_oid_order, SCAN_ID *s_id, QUERY_ID query_id, SCAN_OPERATION_TYPE scan_op_type, bool scan_immediately_stop, bool *p_mvcc_select_lock_needed)
 
static void qexec_close_scan (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *curr_spec)
 
static void qexec_end_scan (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *curr_spec)
 
static SCAN_CODE qexec_next_merge_block (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE **spec)
 
static SCAN_CODE qexec_next_scan_block (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static SCAN_CODE qexec_next_scan_block_iterations (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static SCAN_CODE qexec_execute_scan (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *ignore, XASL_SCAN_FNC_PTR next_scan_fnc)
 
static SCAN_CODE qexec_intprt_fnc (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec, XASL_SCAN_FNC_PTR next_scan_fnc)
 
static SCAN_CODE qexec_merge_fnc (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec, XASL_SCAN_FNC_PTR ignore)
 
static int qexec_setup_list_id (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static int qexec_init_upddel_ehash_files (THREAD_ENTRY *thread_p, XASL_NODE *buildlist)
 
static void qexec_destroy_upddel_ehash_files (THREAD_ENTRY *thread_p, XASL_NODE *buildlist)
 
static int qexec_execute_update (THREAD_ENTRY *thread_p, XASL_NODE *xasl, bool has_delete, XASL_STATE *xasl_state)
 
static int qexec_execute_delete (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_execute_insert (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, bool skip_aptr)
 
static int qexec_execute_merge (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_execute_build_indexes (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_execute_obj_fetch (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, SCAN_OPERATION_TYPE scan_operation_type)
 
static int qexec_execute_increment (THREAD_ENTRY *thread_p, const OID *oid, const OID *class_oid, const HFID *class_hfid, ATTR_ID attrid, int n_increment, int pruning_type)
 
static int qexec_execute_selupd_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_execute_selupd_list_find_class (THREAD_ENTRY *thread_p, XASL_NODE *xasl, VAL_DESCR *vd, OID *oid, SELUPD_LIST *selupd, OID *class_oid, HFID *class_hfid, DB_CLASS_PARTITION_TYPE *needs_pruning, bool *found)
 
static int qexec_start_connect_by_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_update_connect_by_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static void qexec_end_connect_by_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static void qexec_clear_connect_by_lists (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static int qexec_execute_connect_by (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_iterate_connect_by_results (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_check_for_cycle (THREAD_ENTRY *thread_p, OUTPTR_LIST *outptr_list, QFILE_TUPLE tpl, QFILE_TUPLE_VALUE_TYPE_LIST *type_list, QFILE_LIST_ID *list_id_p, int *iscycle)
 
static int qexec_compare_valptr_with_tuple (OUTPTR_LIST *outptr_list, QFILE_TUPLE tpl, QFILE_TUPLE_VALUE_TYPE_LIST *type_list, int *are_equal)
 
static int qexec_listfile_orderby (THREAD_ENTRY *thread_p, XASL_NODE *xasl, QFILE_LIST_ID *list_file, SORT_LIST *orderby_list, XASL_STATE *xasl_state, OUTPTR_LIST *outptr_list)
 
static int qexec_end_buildvalueblock_iterations (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static int qexec_end_mainblock_iterations (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec)
 
static void qexec_clear_mainblock_iterations (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static int qexec_execute_analytic (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, ANALYTIC_EVAL_TYPE *analytic_eval, QFILE_TUPLE_RECORD *tplrec, bool is_last)
 
static void qexec_update_btree_unique_stats_info (THREAD_ENTRY *thread_p, multi_index_unique_stats *info, const HEAP_SCANCACHE *scan_cache)
 
static int qexec_prune_spec (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *spec, VAL_DESCR *vd, SCAN_OPERATION_TYPE scan_op_type)
 
static int qexec_process_partition_unique_stats (THREAD_ENTRY *thread_p, PRUNING_CONTEXT *pcontext)
 
static int qexec_process_unique_stats (THREAD_ENTRY *thread_p, const OID *class_oid, UPDDEL_CLASS_INFO_INTERNAL *class_)
 
static SCAN_CODE qexec_init_next_partition (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *spec)
 
static int qexec_check_limit_clause (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, bool *empty_result)
 
static int qexec_execute_mainblock_internal (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, UPDDEL_CLASS_INSTANCE_LOCK_INFO *p_class_instance_lock_info)
 
static DEL_LOB_INFOqexec_create_delete_lob_info (THREAD_ENTRY *thread_p, XASL_STATE *xasl_state, UPDDEL_CLASS_INFO_INTERNAL *class_info)
 
static DEL_LOB_INFOqexec_change_delete_lob_info (THREAD_ENTRY *thread_p, XASL_STATE *xasl_state, UPDDEL_CLASS_INFO_INTERNAL *class_info, DEL_LOB_INFO **del_lob_info_list_ptr)
 
static void qexec_free_delete_lob_info_list (THREAD_ENTRY *thread_p, DEL_LOB_INFO **del_lob_info_list_ptr)
 
static const char * qexec_schema_get_type_name_from_id (DB_TYPE id)
 
static int qexec_schema_get_type_desc (DB_TYPE id, TP_DOMAIN *domain, DB_VALUE *result)
 
static int qexec_execute_build_columns (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int qexec_execute_cte (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static REGU_VARIABLEreplace_null_arith (REGU_VARIABLE *regu_var, DB_VALUE *set_dbval)
 
static REGU_VARIABLEreplace_null_dbval (REGU_VARIABLE *regu_var, DB_VALUE *set_dbval)
 
static void qexec_replace_prior_regu_vars (THREAD_ENTRY *thread_p, REGU_VARIABLE *regu, XASL_NODE *xasl)
 
static void qexec_replace_prior_regu_vars_pred (THREAD_ENTRY *thread_p, PRED_EXPR *pred, XASL_NODE *xasl)
 
static int qexec_init_index_pseudocolumn_strings (THREAD_ENTRY *thread_p, char **father_index, int *len_father_index, char **son_index, int *len_son_index)
 
static int qexec_set_pseudocolumns_val_pointers (XASL_NODE *xasl, DB_VALUE **level_valp, DB_VALUE **isleaf_valp, DB_VALUE **iscycle_valp, DB_VALUE **parent_pos_valp, DB_VALUE **index_valp)
 
static void qexec_reset_pseudocolumns_val_pointers (DB_VALUE *level_valp, DB_VALUE *isleaf_valp, DB_VALUE *iscycle_valp, DB_VALUE *parent_pos_valp, DB_VALUE *index_valp)
 
static int qexec_get_index_pseudocolumn_value_from_tuple (THREAD_ENTRY *thread_p, XASL_NODE *xasl, QFILE_TUPLE tpl, DB_VALUE **index_valp, char **index_value, int *index_len)
 
static int qexec_recalc_tuples_parent_pos_in_list (THREAD_ENTRY *thread_p, QFILE_LIST_ID *list_id_p)
 
static int qexec_remove_duplicates_for_replace (THREAD_ENTRY *thread_p, HEAP_SCANCACHE *scan_cache, HEAP_CACHE_ATTRINFO *attr_info, HEAP_CACHE_ATTRINFO *index_attr_info, const HEAP_IDX_ELEMENTS_INFO *idx_info, int op_type, int pruning_type, PRUNING_CONTEXT *pcontext, int *removed_count)
 
static int qexec_oid_of_duplicate_key_update (THREAD_ENTRY *thread_p, HEAP_SCANCACHE **pruned_partition_scan_cache, HEAP_SCANCACHE *scan_cache, HEAP_CACHE_ATTRINFO *attr_info, HEAP_CACHE_ATTRINFO *index_attr_info, const HEAP_IDX_ELEMENTS_INFO *idx_info, int needs_pruning, PRUNING_CONTEXT *pcontext, OID *unique_oid, int op_type)
 
static int qexec_execute_duplicate_key_update (THREAD_ENTRY *thread_p, ODKU_INFO *odku, HFID *hfid, VAL_DESCR *vd, int op_type, HEAP_SCANCACHE *scan_cache, HEAP_CACHE_ATTRINFO *attr_info, HEAP_CACHE_ATTRINFO *index_attr_info, HEAP_IDX_ELEMENTS_INFO *idx_info, int pruning_type, PRUNING_CONTEXT *pcontext, int *force_count)
 
static int qexec_execute_do_stmt (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state)
 
static int bf2df_str_son_index (THREAD_ENTRY *thread_p, char **son_index, char *father_index, int *len_son_index, int cnt)
 
static DB_VALUE_COMPARE_RESULT bf2df_str_compare (const unsigned char *s0, int l0, const unsigned char *s1, int l1)
 
static DB_VALUE_COMPARE_RESULT bf2df_str_cmpdisk (void *mem1, void *mem2, TP_DOMAIN *domain, int do_coercion, int total_order, int *start_colp)
 
static DB_VALUE_COMPARE_RESULT bf2df_str_cmpval (DB_VALUE *value1, DB_VALUE *value2, int do_coercion, int total_order, int *start_colp, int collation)
 
static void qexec_resolve_domains_on_sort_list (SORT_LIST *order_list, REGU_VARIABLE_LIST reference_regu_list)
 
static void qexec_resolve_domains_for_group_by (BUILDLIST_PROC_NODE *buildlist, OUTPTR_LIST *reference_out_list)
 
static int qexec_resolve_domains_for_aggregation (THREAD_ENTRY *thread_p, AGGREGATE_TYPE *agg_p, XASL_STATE *xasl_state, QFILE_TUPLE_RECORD *tplrec, REGU_VARIABLE_LIST regu_list, int *resolved)
 
static int query_multi_range_opt_check_set_sort_col (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static ACCESS_SPEC_TYPEquery_multi_range_opt_check_specs (THREAD_ENTRY *thread_p, XASL_NODE *xasl)
 
static int qexec_init_instnum_val (XASL_NODE *xasl, THREAD_ENTRY *thread_p, XASL_STATE *xasl_state)
 
static int qexec_set_class_locks (THREAD_ENTRY *thread_p, XASL_NODE *aptr_list, UPDDEL_CLASS_INFO *query_classes, int query_classes_count, UPDDEL_CLASS_INFO_INTERNAL *internal_classes)
 
static int qexec_for_update_set_class_locks (THREAD_ENTRY *thread_p, XASL_NODE *scan_list)
 
static int qexec_create_internal_classes (THREAD_ENTRY *thread_p, UPDDEL_CLASS_INFO *classes_info, int count, UPDDEL_CLASS_INFO_INTERNAL **classes)
 
static int qexec_create_mvcc_reev_assignments (THREAD_ENTRY *thread_p, XASL_NODE *aptr, bool should_delete, UPDDEL_CLASS_INFO_INTERNAL *classes, int num_classes, int num_assignments, UPDATE_ASSIGNMENT *assignments, UPDATE_MVCC_REEV_ASSIGNMENT **mvcc_reev_assigns)
 
static int prepare_mvcc_reev_data (THREAD_ENTRY *thread_p, XASL_NODE *aptr, XASL_STATE *xasl_state, int num_reev_classes, int *cond_reev_indexes, MVCC_UPDDEL_REEV_DATA *reev_data, int num_classes, UPDDEL_CLASS_INFO *classes, UPDDEL_CLASS_INFO_INTERNAL *internal_classes, int num_assigns, UPDATE_ASSIGNMENT *assigns, PRED_EXPR *cons_pred, UPDDEL_MVCC_COND_REEVAL **mvcc_reev_classes, UPDATE_MVCC_REEV_ASSIGNMENT **mvcc_reev_assigns, bool has_delete)
 
static UPDDEL_MVCC_COND_REEVALqexec_mvcc_cond_reev_set_scan_order (XASL_NODE *aptr, UPDDEL_MVCC_COND_REEVAL *reev_classes, int num_reev_classes, UPDDEL_CLASS_INFO *classes, int num_classes)
 
static void qexec_clear_internal_classes (THREAD_ENTRY *thread_p, UPDDEL_CLASS_INFO_INTERNAL *classes, int count)
 
static int qexec_upddel_setup_current_class (THREAD_ENTRY *thread_p, UPDDEL_CLASS_INFO *class_, UPDDEL_CLASS_INFO_INTERNAL *class_info, int op_type, OID *current_oid)
 
static int qexec_upddel_mvcc_set_filters (THREAD_ENTRY *thread_p, XASL_NODE *aptr_list, UPDDEL_MVCC_COND_REEVAL *mvcc_reev_class, OID *class_oid)
 
static int qexec_init_agg_hierarchy_helpers (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *spec, AGGREGATE_TYPE *aggregate_list, HIERARCHY_AGGREGATE_HELPER **helpers, int *helpers_countp)
 
static int qexec_evaluate_aggregates_optimize (THREAD_ENTRY *thread_p, AGGREGATE_TYPE *agg_list, ACCESS_SPEC_TYPE *spec, bool *is_scan_needed)
 
static int qexec_evaluate_partition_aggregates (THREAD_ENTRY *thread_p, ACCESS_SPEC_TYPE *spec, AGGREGATE_TYPE *agg_list, bool *is_scan_needed)
 
static int qexec_setup_topn_proc (THREAD_ENTRY *thread_p, XASL_NODE *xasl, VAL_DESCR *vd)
 
static BH_CMP_RESULT qexec_topn_compare (const void *left, const void *right, BH_CMP_ARG arg)
 
static BH_CMP_RESULT qexec_topn_cmpval (DB_VALUE *left, DB_VALUE *right, SORT_LIST *sort_spec)
 
static TOPN_STATUS qexec_add_tuple_to_topn (THREAD_ENTRY *thread_p, TOPN_TUPLES *sort_stop, QFILE_TUPLE_DESCRIPTOR *tpldescr)
 
static int qexec_topn_tuples_to_list_id (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, bool is_final)
 
static void qexec_clear_topn_tuple (THREAD_ENTRY *thread_p, TOPN_TUPLE *tuple, int count)
 
static int qexec_get_orderbynum_upper_bound (THREAD_ENTRY *tread_p, PRED_EXPR *pred, VAL_DESCR *vd, DB_VALUE *ubound)
 
static int qexec_analytic_evaluate_cume_dist_percent_rank_function (THREAD_ENTRY *thread_p, ANALYTIC_FUNCTION_STATE *func_state)
 
static int qexec_clear_regu_variable_list (THREAD_ENTRY *thread_p, XASL_NODE *xasl_p, REGU_VARIABLE_LIST list, bool is_final)
 
static void qexec_clear_pred_xasl (THREAD_ENTRY *thread_p, PRED_EXPR *pred)
 
static int qexec_alloc_agg_hash_context (THREAD_ENTRY *thread_p, BUILDLIST_PROC_NODE *proc, XASL_STATE *xasl_state)
 
static void qexec_free_agg_hash_context (THREAD_ENTRY *thread_p, BUILDLIST_PROC_NODE *proc)
 
static int qexec_build_agg_hkey (THREAD_ENTRY *thread_p, XASL_STATE *xasl_state, REGU_VARIABLE_LIST regu_list, QFILE_TUPLE tpl, AGGREGATE_HASH_KEY *key)
 
static int qexec_locate_agg_hentry_in_list (THREAD_ENTRY *thread_p, AGGREGATE_HASH_CONTEXT *context, AGGREGATE_HASH_KEY *key, bool *found)
 
static int qexec_get_attr_default (THREAD_ENTRY *thread_p, OR_ATTRIBUTE *attr, DB_VALUE *default_val)
 
int qexec_clear_xasl (THREAD_ENTRY *thread_p, xasl_node *xasl, bool is_final)
 
qfile_list_idqexec_get_xasl_list_id (xasl_node *xasl)
 
static int qexec_fill_sort_limit (THREAD_ENTRY *thread_p, XASL_NODE *xasl, XASL_STATE *xasl_state, int *limit_ptr)
 
int qexec_start_mainblock_iterations (THREAD_ENTRY *thread_p, xasl_node *xasl, xasl_state *xasl_state)
 
int qexec_execute_mainblock (THREAD_ENTRY *thread_p, xasl_node *xasl, xasl_state *xstate, UPDDEL_CLASS_INSTANCE_LOCK_INFO *p_class_instance_lock_info)
 
qfile_list_idqexec_execute_query (THREAD_ENTRY *thread_p, xasl_node *xasl, int dbval_cnt, const DB_VALUE *dbval_ptr, QUERY_ID query_id)
 
int qexec_clear_list_cache_by_class (THREAD_ENTRY *thread_p, const OID *class_oid)
 
void qexec_replace_prior_regu_vars_prior_expr (THREAD_ENTRY *thread_p, regu_variable_node *regu, xasl_node *xasl, xasl_node *connect_by_ptr)
 
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)
 
int qexec_get_tuple_column_value (QFILE_TUPLE tpl, int index, DB_VALUE *valp, tp_domain *domain)
 
int qexec_clear_pred_context (THREAD_ENTRY *thread_p, pred_expr_with_context *pred_filter, bool dealloc_dbvalues)
 
int qexec_clear_func_pred (THREAD_ENTRY *thread_p, func_pred *fpr)
 
int qexec_clear_partition_expression (THREAD_ENTRY *thread_p, regu_variable_node *expr)
 

Macro Definition Documentation

#define CONNECTBY_TUPLE_INDEX_STRING_MEM   64
#define CTE_CURR_ITERATION_LAST_TUPLE (   node)
Value:
((((node)->curr_spec->type == TARGET_LIST && (node)->curr_spec->s_id.type == S_LIST_SCAN)) \
? ((node)->curr_spec->s_id.s.llsid.list_id->tuple_cnt - 1) : -1)

Referenced by qexec_intprt_fnc().

#define CTE_CURRENT_SCAN_READ_TUPLE (   node)
Value:
((((node)->curr_spec->type == TARGET_LIST && (node)->curr_spec->s_id.type == S_LIST_SCAN)) \
? ((node)->curr_spec->s_id.s.llsid.lsid.curr_tplno) : -1)

Referenced by qexec_intprt_fnc().

#define HASH_AGGREGATE_DEFAULT_TABLE_SIZE   1000

Definition at line 120 of file query_executor.c.

Referenced by qexec_alloc_agg_hash_context().

#define HASH_AGGREGATE_VH_SELECTIVITY_THRESHOLD   0.5f

Definition at line 127 of file query_executor.c.

Referenced by qexec_hash_gby_agg_tuple().

#define HASH_AGGREGATE_VH_SELECTIVITY_TUPLE_THRESHOLD   200

Definition at line 124 of file query_executor.c.

Referenced by qexec_hash_gby_agg_tuple().

#define MIN_NUM_ROWS_FOR_MULTI_DELETE   20

Referenced by qexec_execute_delete().

#define QEXEC_CLEAR_AGG_LIST_VALUE (   agg_list)
Value:
do \
{ \
AGGREGATE_TYPE *agg_ptr; \
for (agg_ptr = (agg_list); agg_ptr; agg_ptr = agg_ptr->next) \
{ \
if (agg_ptr->function == PT_GROUPBY_NUM) \
continue; \
pr_clear_value (agg_ptr->accumulator.value); \
} \
} \
while (0)
if(extra_options)
Definition: dynamic_load.c:958
int pr_clear_value(DB_VALUE *value)
cubxasl::aggregate_list_node AGGREGATE_TYPE
Definition: xasl.h:144
while(1)
Definition: cnvlex.c:816
for(p=libs;*p;p++)
Definition: dynamic_load.c:968

Definition at line 130 of file query_executor.c.

Referenced by qexec_clear_groupby_state(), qexec_end_buildvalueblock_iterations(), qexec_gby_finalize_group(), and qexec_gby_start_group().

#define QEXEC_EMPTY_ACCESS_SPEC_SCAN (   specp)
Value:
((specp)->type == TARGET_CLASS \
#define ACCESS_SPEC_HFID(ptr)
Definition: xasl.h:803
int32_t fileid
Definition: dbtype_def.h:886
#define NULL_FILEID
#define NULL_VOLID
short volid
Definition: dbtype_def.h:887

Definition at line 143 of file query_executor.c.

Referenced by qexec_next_merge_block(), and qexec_next_scan_block().

#define QEXEC_GET_BH_TOPN_TUPLE (   heap,
  index 
)    (*(TOPN_TUPLE **) BH_ELEMENT (heap, index))

Definition at line 374 of file query_executor.c.

Referenced by qexec_clear_xasl(), and qexec_topn_tuples_to_list_id().

#define QEXEC_IS_MULTI_TABLE_UPDATE_DELETE (   xasl)    (xasl->upd_del_class_cnt > 1 || (xasl->upd_del_class_cnt == 1 && xasl->scan_ptr != NULL))
#define QEXEC_MERGE_ADD_MERGETUPLE (   thread_p,
  t1,
  t2 
)
Value:
do { \
if (qexec_merge_tuple_add_list((thread_p), list_idp, (t1), (t2), \
merge_infop, &tplrec) != NO_ERROR) { \
goto exit_on_error; \
} \
} while (0)
#define NO_ERROR
Definition: error_code.h:46
if(extra_options)
Definition: dynamic_load.c:958
static int qexec_merge_tuple_add_list(THREAD_ENTRY *thread_p, QFILE_LIST_ID *list_id, QFILE_TUPLE_RECORD *tplrec1, QFILE_TUPLE_RECORD *tplrec2, QFILE_LIST_MERGE_INFO *merge_info, QFILE_TUPLE_RECORD *tplrec)

Definition at line 5137 of file query_executor.c.

Referenced by qexec_merge_list(), and qexec_merge_list_outer().

#define QEXEC_MERGE_NEXT_SCAN (   thread_p,
  pre,
 
)
Value:
do { \
pre##_scan = qfile_scan_list_next((thread_p), &(pre##_sid), &(pre##_tplrec), PEEK); \
if ((e) && pre##_scan == S_END) \
goto exit_on_end; \
if (pre##_scan == S_ERROR) \
goto exit_on_error; \
} while (0)
SCAN_CODE qfile_scan_list_next(THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *scan_id_p, QFILE_TUPLE_RECORD *tuple_record_p, int peek)
Definition: list_file.c:4724
if(extra_options)
Definition: dynamic_load.c:958
#define PEEK
Definition: file_io.h:74

Definition at line 5158 of file query_executor.c.

Referenced by qexec_merge_list().

#define QEXEC_MERGE_NEXT_SCAN_PVALS (   thread_p,
  pre,
 
)
Value:
do { \
QEXEC_MERGE_NEXT_SCAN((thread_p), pre, e); \
if (pre##_scan == S_SUCCESS) { \
} \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
#define QEXEC_MERGE_PVALS(pre)
#define QEXEC_MERGE_NEXT_SCAN(thread_p, pre, e)

Definition at line 5174 of file query_executor.c.

Referenced by qexec_merge_list().

#define QEXEC_MERGE_OUTER_NEXT_SCAN (   thread_p,
  pre,
 
)
Value:
do { \
pre##_sid->qualification = QPROC_QUALIFIED_OR_NOT; /* init */ \
pre##_scan = scan_next_scan((thread_p), pre##_sid); \
if ((e) && pre##_scan == S_END) \
goto exit_on_end; \
if (pre##_scan == S_ERROR) \
goto exit_on_error; \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
SCAN_CODE scan_next_scan(THREAD_ENTRY *thread_p, SCAN_ID *s_id)

Definition at line 5191 of file query_executor.c.

Referenced by qexec_merge_list_outer().

#define QEXEC_MERGE_OUTER_NEXT_SCAN_PVALS (   thread_p,
  pre,
 
)
Value:
do { \
QEXEC_MERGE_OUTER_NEXT_SCAN((thread_p), pre, e); \
if (pre##_scan == S_SUCCESS) { \
} \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
#define QEXEC_MERGE_PVALS(pre)
#define QEXEC_MERGE_OUTER_NEXT_SCAN(thread_p, pre, e)

Definition at line 5209 of file query_executor.c.

Referenced by qexec_merge_list_outer().

#define QEXEC_MERGE_OUTER_PREV_SCAN (   thread_p,
  pre 
)
Value:
do { \
pre##_sid->qualification = QPROC_QUALIFIED_OR_NOT; /* init */ \
pre##_scan = scan_prev_scan((thread_p), pre##_sid); \
if (pre##_scan == S_ERROR) \
goto exit_on_error; \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
SCAN_CODE scan_prev_scan(THREAD_ENTRY *thread_p, SCAN_ID *s_id)

Definition at line 5201 of file query_executor.c.

Referenced by qexec_merge_list_outer().

#define QEXEC_MERGE_OUTER_PREV_SCAN_PVALS (   thread_p,
  pre 
)
Value:
do { \
if (pre##_scan == S_SUCCESS) { \
} \
} while (0)
#define QEXEC_MERGE_OUTER_PREV_SCAN(thread_p, pre)
if(extra_options)
Definition: dynamic_load.c:958
#define QEXEC_MERGE_PVALS(pre)

Definition at line 5217 of file query_executor.c.

Referenced by qexec_merge_list_outer().

#define QEXEC_MERGE_PREV_SCAN (   thread_p,
  pre 
)
Value:
do { \
pre##_scan = qfile_scan_list_prev((thread_p), &(pre##_sid), &(pre##_tplrec), PEEK); \
if (pre##_scan == S_ERROR) \
goto exit_on_error; \
} while (0)
SCAN_CODE qfile_scan_list_prev(THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *scan_id_p, QFILE_TUPLE_RECORD *tuple_record_p, int peek)
Definition: list_file.c:4738
if(extra_options)
Definition: dynamic_load.c:958
#define PEEK
Definition: file_io.h:74

Definition at line 5167 of file query_executor.c.

Referenced by qexec_merge_list().

#define QEXEC_MERGE_PVALS (   pre)
Value:
do { \
int _v; \
for (_v = 0; _v < nvals; _v++) { \
do { \
(pre##_indp)[_v], \
(pre##_valp)[_v]); \
} while (0); \
} \
} while (0)
#define QFILE_GET_TUPLE_VALUE_HEADER_POSITION(tpl, ind, valp)
Definition: query_list.h:262
for(p=libs;*p;p++)
Definition: dynamic_load.c:968

Definition at line 5145 of file query_executor.c.

Referenced by qexec_merge_list(), and qexec_merge_list_outer().

#define QEXEC_MERGE_REV_SCAN_PVALS (   thread_p,
  pre 
)
Value:
do { \
QEXEC_MERGE_PREV_SCAN((thread_p), pre); \
if (pre##_scan == S_SUCCESS) { \
} \
} while (0)
#define QEXEC_MERGE_PREV_SCAN(thread_p, pre)
if(extra_options)
Definition: dynamic_load.c:958
#define QEXEC_MERGE_PVALS(pre)

Definition at line 5182 of file query_executor.c.

Referenced by qexec_merge_list().

#define QEXEC_SEL_UPD_USE_REEVALUATION (   xasl)
Value:
((xasl) && ((xasl)->spec_list) && ((xasl)->spec_list->next == NULL) \
&& ((xasl)->spec_list->pruning_type == DB_NOT_PARTITIONED_CLASS) \
&& ((xasl)->aptr_list == NULL) && ((xasl)->scan_ptr == NULL))
#define NULL
Definition: freelistheap.h:34

Definition at line 150 of file query_executor.c.

Referenced by qexec_execute_mainblock_internal(), and qexec_execute_selupd_list().

#define QPROC_MAX_GROUPED_SCAN_CNT   (4)

Definition at line 111 of file query_executor.c.

Referenced by qexec_execute_mainblock_internal().

#define QPROC_SINGLE_CLASS_GROUPED_SCAN   (0)

Definition at line 114 of file query_executor.c.

Referenced by qexec_execute_mainblock_internal().

Typedef Documentation

Definition at line 236 of file query_executor.c.

Definition at line 372 of file query_executor.c.

Definition at line 265 of file query_executor.c.

typedef struct del_lob_info DEL_LOB_INFO

Definition at line 328 of file query_executor.c.

Definition at line 184 of file query_executor.c.

Definition at line 182 of file query_executor.c.

typedef struct groupby_state GROUPBY_STATE

Definition at line 191 of file query_executor.c.

typedef struct ordbynum_info ORDBYNUM_INFO

Definition at line 307 of file query_executor.c.

Definition at line 320 of file query_executor.c.

Definition at line 340 of file query_executor.c.

Definition at line 172 of file query_executor.c.

typedef struct xasl_state XASL_STATE

Definition at line 86 of file query_executor.c.

typedef SCAN_CODE(* XSAL_SCAN_FUNC) (THREAD_ENTRY *thread_p, XASL_NODE *, XASL_STATE *, QFILE_TUPLE_RECORD *, void *)

Definition at line 169 of file query_executor.c.

Enumeration Type Documentation

Enumerator
ANALYTIC_INTERM_PROC 
ANALYTIC_GROUP_PROC 

Definition at line 367 of file query_executor.c.

Enumerator
GROUPBY_DIM_FLAG_NONE 
GROUPBY_DIM_FLAG_GROUP_BY 
GROUPBY_DIM_FLAG_ROLLUP 
GROUPBY_DIM_FLAG_CUBE 
GROUPBY_DIM_FLAG_SET 

Definition at line 174 of file query_executor.c.

Enumerator
TOPN_SUCCESS 
TOPN_OVERFLOW 
TOPN_FAILURE 

Definition at line 376 of file query_executor.c.

Function Documentation

static DB_VALUE_COMPARE_RESULT bf2df_str_cmpdisk ( void *  mem1,
void *  mem2,
TP_DOMAIN domain,
int  do_coercion,
int  total_order,
int *  start_colp 
)
static
static DB_VALUE_COMPARE_RESULT bf2df_str_cmpval ( DB_VALUE value1,
DB_VALUE value2,
int  do_coercion,
int  total_order,
int *  start_colp,
int  collation 
)
static

Definition at line 18187 of file query_executor.c.

References bf2df_str_compare(), db_get_string(), db_get_string_size(), DB_UNK, NULL, and REINTERPRET_CAST.

Referenced by qexec_execute_connect_by().

Here is the caller graph for this function:

static DB_VALUE_COMPARE_RESULT bf2df_str_compare ( const unsigned char *  s0,
int  l0,
const unsigned char *  s1,
int  l1 
)
static

Definition at line 17966 of file query_executor.c.

References DB_EQ, DB_GT, DB_LT, and DB_UNK.

Referenced by bf2df_str_cmpdisk(), and bf2df_str_cmpval().

Here is the caller graph for this function:

static int bf2df_str_son_index ( THREAD_ENTRY thread_p,
char **  son_index,
char *  father_index,
int *  len_son_index,
int  cnt 
)
static

Definition at line 16498 of file query_executor.c.

References CONNECTBY_TUPLE_INDEX_STRING_MEM, db_private_alloc, db_private_free_and_init, ER_OUT_OF_VIRTUAL_MEMORY, NO_ERROR, NULL, and strlen.

Referenced by qexec_execute_connect_by().

Here is the caller graph for this function:

static int qexec_add_composite_lock ( THREAD_ENTRY thread_p,
REGU_VARIABLE_LIST  reg_var_list,
XASL_STATE xasl_state,
LK_COMPOSITE_LOCK composite_lock,
int  upd_del_cls_cnt,
OID default_cls_oid 
)
static
static SORT_STATUS qexec_analytic_get_next ( THREAD_ENTRY thread_p,
RECDES recdes,
void *  arg 
)
static

Definition at line 19772 of file query_executor.c.

References analytic_state::input_scan, analytic_state::input_tplrec, analytic_state::key_info, and qfile_make_sort_key().

Referenced by qexec_execute_analytic().

Here is the caller graph for this function:

static int qexec_analytic_group_header_next ( THREAD_ENTRY thread_p,
ANALYTIC_FUNCTION_STATE func_state 
)
static
static int qexec_analytic_put_next ( THREAD_ENTRY thread_p,
const RECDES recdes,
void *  arg 
)
static
static int qexec_analytic_update_group_result ( THREAD_ENTRY thread_p,
ANALYTIC_STATE analytic_state 
)
static

Definition at line 21156 of file query_executor.c.

References analytic_state::a_outptr_list, analytic_state::a_regu_list, ANALYTIC_GROUP_PROC, assert, cleanup(), analytic_function_state::curr_group_tuple_count, analytic_function_state::curr_group_tuple_count_nn, analytic_function_state::curr_sort_key_tuple_count, db_private_free_and_init, ER_FAILED, fetch_val_list(), analytic_state::func_count, analytic_function_state::func_p, analytic_state::func_state_list, cubxasl::analytic_list_node::function, analytic_function_state::group_consumed_tuples, analytic_function_state::group_list_id, analytic_function_state::group_scan_id, analytic_function_state::group_tuple_position, analytic_function_state::group_tuple_position_nn, i, cubxasl::analytic_list_node::ignore_nulls, analytic_state::interm_file, analytic_state::is_output_rec, regu_variable_list_node::next, NO_ERROR, NULL, cubxasl::analytic_list_node::out_value, analytic_state::output_file, PEEK, PT_CUME_DIST, PT_FIRST_VALUE, PT_LAG, PT_LAST_VALUE, PT_LEAD, PT_MEDIAN, PT_NTH_VALUE, PT_NTILE, PT_PERCENT_RANK, PT_PERCENTILE_CONT, PT_PERCENTILE_DISC, PT_ROW_NUMBER, qexec_analytic_eval_instnum_pred(), qexec_analytic_evaluate_cume_dist_percent_rank_function(), qexec_analytic_evaluate_interpolation_function(), qexec_analytic_evaluate_ntile_function(), qexec_analytic_evaluate_offset_function(), qexec_analytic_group_header_next(), qexec_analytic_value_advance(), qexec_insert_tuple_into_list(), qfile_close_scan(), qfile_open_list_scan(), qfile_scan_list_next(), QPROC_ANALYTIC_IS_OFFSET_FUNCTION, QPROC_IS_INTERPOLATION_FUNC, rc, S_END, S_ERROR, S_SUCCESS, qfile_tuple_record::size, analytic_function_state::sort_key_tuple_position, qfile_tuple_record::tpl, cubxasl::analytic_list_node::value, regu_variable_list_node::value, analytic_function_state::value_list_id, analytic_function_state::value_scan_id, xasl_state::vd, and analytic_state::xasl_state.

Referenced by qexec_execute_analytic().

Here is the caller graph for this function:

static int qexec_analytic_value_lookup ( THREAD_ENTRY thread_p,
ANALYTIC_FUNCTION_STATE func_state,
int  position,
bool  ignore_nulls 
)
static
static int qexec_build_agg_hkey ( THREAD_ENTRY thread_p,
XASL_STATE xasl_state,
REGU_VARIABLE_LIST  regu_list,
QFILE_TUPLE  tpl,
AGGREGATE_HASH_KEY key 
)
static
static DEL_LOB_INFO * qexec_change_delete_lob_info ( THREAD_ENTRY thread_p,
XASL_STATE xasl_state,
UPDDEL_CLASS_INFO_INTERNAL class_info,
DEL_LOB_INFO **  del_lob_info_list_ptr 
)
static

Definition at line 10140 of file query_executor.c.

References assert, del_lob_info::class_oid, upddel_class_info_internal::class_oid, del_lob_info::next, NULL, and qexec_create_delete_lob_info().

Referenced by qexec_execute_delete(), and qexec_execute_update().

Here is the caller graph for this function:

static int qexec_check_limit_clause ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
bool empty_result 
)
static
static int qexec_clear_access_spec_list ( THREAD_ENTRY thread_p,
XASL_NODE xasl_p,
ACCESS_SPEC_TYPE list,
bool  is_final 
)
static

Definition at line 1783 of file query_executor.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ACCESS_SPEC_SET_PTR, ACCESS_SPEC_SET_REGU_LIST, showstmt_spec_node::arg_list, scan_attrs::attr_cache, indx_info::btid, access_spec_node::btid, BTID_COPY, BTREE_KEY_INFO_COUNT, BTREE_NODE_INFO_COUNT, heap_page_scan_id::cache_page_info, heap_scan_id::cache_recordinfo, heap_scan_id::caches_inited, indx_scan_id::caches_inited, index_node_scan_id::caches_inited, hybrid_node::cls_node, cls_spec_node::cls_regu_list_key, cls_spec_node::cls_regu_list_pred, cls_spec_node::cls_regu_list_rest, db_private_free, heap_attrinfo_end(), HEAP_PAGE_INFO_COUNT, HEAP_RECORD_INFO_COUNT, i, access_spec_node::indexptr, hybrid_node::json_table_node, key_range::key1, key_range::key2, indx_scan_id::key_attrs, key_info::key_cnt, indx_info::key_info, indx_scan_id::key_info_regu_list, indx_scan_id::key_info_values, key_info::key_limit_l, key_info::key_limit_u, indx_scan_id::key_pred, key_info::key_ranges, hybrid_node::list_node, list_spec_node::list_regu_list_build, list_spec_node::list_regu_list_pred, list_spec_node::list_regu_list_probe, list_spec_node::list_regu_list_rest, cubxasl::json_table::spec_node::m_json_reguvar, hybrid_node::method_node, method_spec_node::method_regu_list, access_spec_node::next, index_node_scan_id::node_info_regu_list, index_node_scan_id::node_info_values, NULL, p, pr_clear_value(), heap_scan_id::pred_attrs, indx_scan_id::pred_attrs, qexec_clear_db_val_list(), qexec_clear_pred(), qexec_clear_regu_list(), qexec_clear_regu_var(), qexec_clear_xasl(), indx_scan_id::range_attrs, indx_scan_id::range_pred, scan_pred::regu_list, heap_scan_id::rest_attrs, indx_scan_id::rest_attrs, access_spec_node::s, S_CLASS_ATTR_SCAN, access_spec_node::s_dbval, S_HEAP_PAGE_SCAN, S_HEAP_SCAN, S_HEAP_SCAN_RECORD_INFO, S_INDX_KEY_INFO_SCAN, S_INDX_NODE_INFO_SCAN, S_INDX_SCAN, S_JSON_TABLE_SCAN, S_LIST_SCAN, S_METHOD_SCAN, S_SET_SCAN, S_SHOWSTMT_SCAN, S_VALUES_SCAN, hybrid_node::showstmt_node, TARGET_CLASS, TARGET_CLASS_ATTR, TARGET_JSON_TABLE, TARGET_LIST, TARGET_METHOD, TARGET_REGUVAL_LIST, TARGET_SET, TARGET_SHOWSTMT, access_spec_node::type, access_spec_node::where_key, access_spec_node::where_pred, access_spec_node::where_range, XASL_DECACHE_CLONE, XASL_IS_FLAGED, list_spec_node::xasl_node, and XASL_SET_FLAG.

Referenced by qexec_clear_xasl().

Here is the caller graph for this function:

static void qexec_clear_all_lists ( THREAD_ENTRY thread_p,
XASL_NODE xasl_list 
)
static
static void qexec_clear_connect_by_lists ( THREAD_ENTRY thread_p,
XASL_NODE xasl 
)
static
static void qexec_clear_db_val_list ( QPROC_DB_VALUE_LIST  list)
static

Definition at line 1653 of file query_executor.c.

References qproc_db_value_list::next, p, pr_clear_value(), and qproc_db_value_list::val.

Referenced by qexec_clear_access_spec_list(), and qexec_clear_xasl().

Here is the caller graph for this function:

int qexec_clear_func_pred ( THREAD_ENTRY thread_p,
func_pred fpr 
)

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().

Here is the caller graph for this function:

int qexec_clear_list_cache_by_class ( THREAD_ENTRY thread_p,
const OID class_oid 
)
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().

Here is the caller graph for this function:

static void qexec_clear_pos_desc ( XASL_NODE xasl_p,
QFILE_TUPLE_VALUE_POSITION position_descr,
bool  is_final 
)
static

Definition at line 1671 of file query_executor.c.

References qfile_tuple_value_position::dom, and qfile_tuple_value_position::original_domain.

Referenced by qexec_clear_regu_var(), and qexec_clear_sort_list().

Here is the caller graph for this function:

int qexec_clear_pred_context ( THREAD_ENTRY thread_p,
pred_expr_with_context pred_filter,
bool  dealloc_dbvalues 
)
static int qexec_clear_regu_list ( THREAD_ENTRY thread_p,
XASL_NODE xasl_p,
REGU_VARIABLE_LIST  list,
bool  is_final 
)
static
static int qexec_clear_regu_value_list ( THREAD_ENTRY thread_p,
XASL_NODE xasl_p,
REGU_VALUE_LIST list,
bool  is_final 
)
static

Definition at line 1632 of file query_executor.c.

References assert, regu_value_item::next, NULL, qexec_clear_regu_var(), regu_value_list::regu_list, and regu_value_item::value.

Referenced by qexec_clear_regu_var().

Here is the caller graph for this function:

static int qexec_clear_regu_variable_list ( THREAD_ENTRY thread_p,
XASL_NODE xasl_p,
REGU_VARIABLE_LIST  list,
bool  is_final 
)
static
static void qexec_clear_scan_all_lists ( THREAD_ENTRY thread_p,
XASL_NODE xasl_list 
)
static

Definition at line 2635 of file query_executor.c.

References xasl_node::bptr_list, xasl_node::dptr_list, xasl_node::fptr_list, NULL, qexec_clear_head_lists(), and xasl_node::scan_ptr.

Referenced by qexec_clear_all_lists().

Here is the caller graph for this function:

static void qexec_clear_sort_list ( XASL_NODE xasl_p,
SORT_LIST list,
bool  is_final 
)
static

Definition at line 1684 of file query_executor.c.

References sort_list::next, p, sort_list::pos_descr, and qexec_clear_pos_desc().

Referenced by qexec_clear_xasl().

Here is the caller graph for this function:

static void qexec_clear_topn_tuple ( THREAD_ENTRY thread_p,
TOPN_TUPLE *  tuple,
int  count 
)
static

Definition at line 24402 of file query_executor.c.

References cubregex::count(), db_private_free_and_init, i, NULL, and pr_clear_value().

Referenced by qexec_add_tuple_to_topn(), qexec_clear_xasl(), and qexec_topn_tuples_to_list_id().

Here is the caller graph for this function:

static int qexec_clear_update_assignment ( THREAD_ENTRY thread_p,
XASL_NODE xasl_p,
UPDATE_ASSIGNMENT assignment,
bool  is_final 
)
static
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().

Here is the caller graph for this function:

static DB_VALUE_COMPARE_RESULT qexec_cmp_tpl_vals_merge ( QFILE_TUPLE left_tval,
TP_DOMAIN **  left_dom,
QFILE_TUPLE rght_tval,
TP_DOMAIN **  rght_dom,
int  tval_cnt 
)
static
static int qexec_collection_has_null ( DB_VALUE colval)
static

Definition at line 4771 of file query_executor.c.

References db_get_set(), DB_IS_NULL, db_set_get(), db_set_size(), DB_VALUE_DOMAIN_TYPE, i, NO_ERROR, pr_clear_value(), and pr_is_set_type().

Referenced by qexec_cmp_tpl_vals_merge().

Here is the caller graph for this function:

static void qexec_destroy_upddel_ehash_files ( THREAD_ENTRY thread_p,
XASL_NODE buildlist 
)
static
static void qexec_end_connect_by_lists ( THREAD_ENTRY thread_p,
XASL_NODE xasl 
)
static
static int qexec_end_one_iteration ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec 
)
static

Definition at line 1101 of file query_executor.c.

References ACCESS_SPEC_CLS_OID, cubxasl::aggregate_list_node::accumulator, buildvalue_proc_node::agg_domains_resolved, buildvalue_proc_node::agg_list, xasl_node::aptr_list, ARG_FILE_LINE, assert, BUILD_SCHEMA_PROC, xasl_node::buildlist, BUILDLIST_PROC, xasl_node::buildvalue, BUILDVALUE_PROC, COMPOSITE_LOCK, DB_PAGESIZE, db_private_alloc, DB_TYPE_NULL, DB_TYPE_VARIABLE, cubxasl::aggregate_list_node::domain, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_QRY_SINGLE_TUPLE, er_set(), buildlist_proc_node::g_agg_domains_resolved, buildlist_proc_node::g_agg_list, buildlist_proc_node::g_hash_eligible, buildlist_proc_node::g_scan_regu_list, GOTO_EXIT_ON_ERROR, HS_REJECT_ALL, xasl_node::list_id, cubxasl::aggregate_list_node::next, regu_variable_list_node::next, xasl_node::next, NO_ERROR, NULL, xasl_node::outptr_list, xasl_node::proc, buildlist_proc_node::push_list_id, qdata_copy_valptr_list_to_tuple(), qdata_evaluate_aggregate_list(), qexec_add_composite_lock(), qexec_add_tuple_to_topn(), qexec_generate_tuple_descriptor(), qexec_hash_gby_agg_tuple(), QEXEC_IS_MULTI_TABLE_UPDATE_DELETE, qexec_resolve_domains_for_aggregation(), qexec_topn_tuples_to_list_id(), qexec_upddel_add_unique_oid_to_ehid(), 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, xasl_node::scan_op_type, xasl_node::selected_upd_list, qfile_tuple_record::size, xasl_node::spec_list, T_NORMAL, TOPN_FAILURE, TOPN_SUCCESS, TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION_FLAG, TP_DOMAIN_TYPE, qfile_tuple_record::tpl, qfile_list_id::tpl_descr, qfile_list_id::tuple_cnt, xasl_node::type, TYPE_CONSTANT, xasl_node::upd_del_class_cnt, valptr_list_node::valptrp, cubxasl::aggregate_accumulator::value, regu_variable_list_node::value, xasl_state::vd, XASL_IS_FLAGED, and XASL_MULTI_UPDATE_AGG.

Referenced by qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_intprt_fnc(), qexec_iterate_connect_by_results(), and qexec_merge_fnc().

Here is the caller graph for this function:

static void qexec_end_scan ( THREAD_ENTRY thread_p,
ACCESS_SPEC_TYPE curr_spec 
)
static

Definition at line 6829 of file query_executor.c.

References scan_end_scan().

Referenced by qexec_execute_connect_by(), qexec_execute_delete(), qexec_execute_insert(), qexec_execute_mainblock_internal(), and qexec_execute_update().

Here is the caller graph for this function:

static int qexec_execute_analytic ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
ANALYTIC_EVAL_TYPE analytic_eval,
QFILE_TUPLE_RECORD tplrec,
bool  is_last 
)
static

Definition at line 19273 of file query_executor.c.

References 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, ARG_FILE_LINE, ASSERT_ERROR_AND_SET, xasl_node::buildlist, analytic_state::cmp_fn, analytic_state::curr_sort_page, db_make_bigint(), db_private_free_and_init, qfile_tuple_value_type_list::domp, ER_ARG_CAN_NOT_BE_CASTED_TO_DESIRED_DOMAIN, ER_ERROR_SEVERITY, ER_FAILED, er_set(), SORTKEY_INFO::error, fcode_get_uppercase_name(), analytic_state::func_count, analytic_function_state::func_p, analytic_state::func_state_list, cubxasl::analytic_list_node::function, GOTO_EXIT_ON_ERROR, cubxasl::analytic_eval_type::head, i, analytic_state::input_recs, analytic_state::input_scan, xasl_node::instnum_val, analytic_state::interm_file, analytic_state::interm_scan, analytic_state::is_last_run, qfile_list_scan_id::keep_page_on_finish, analytic_state::key_info, cubxasl::analytic_list_node::list_id, qfile_list_scan_id::list_id, xasl_node::list_id, NO_ERROR, NO_SORT_LIMIT, NULL, NULL_PAGEID, NULL_VOLID, cubxasl::analytic_list_node::option, xasl_node::option, xasl_node::orderby_list, analytic_state::output_file, analytic_state::page_p, vpid::pageid, xasl_node::proc, Q_DISTINCT, qdata_get_valptr_type_list(), qexec_analytic_finalize_group(), qexec_analytic_get_next(), qexec_analytic_put_next(), qexec_analytic_update_group_result(), qexec_clear_analytic_state(), qexec_initialize_analytic_state(), qexec_resolve_domains_on_sort_list(), qfile_close_list(), qfile_close_scan(), qfile_compare_partial_sort_record(), qfile_copy_list_id(), qfile_destroy_list(), QFILE_FLAG_ALL, QFILE_FLAG_RESULT_FILE, qfile_free_list_id(), qfile_get_estimated_pages_for_sorting(), qfile_open_list(), qfile_open_list_scan(), QFILE_SET_FLAG, qmgr_free_old_page_and_init, xasl_state::query_id, SORT_DUP, cubxasl::analytic_eval_type::sort_list, sort_listfile(), analytic_state::state, qmgr_temp_file::tde_encrypted, qfile_list_id::tfile_vfid, qfile_list_id::tuple_cnt, qfile_list_id::type_list, SORTKEY_INFO::use_original, valptr_list_node::valptrp, vpid::volid, analytic_state::vpid, XASL_IS_FLAGED, XASL_SKIP_ORDERBY_LIST, analytic_state::xasl_state, XASL_TO_BE_CACHED, and XASL_TOP_MOST_XASL.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_build_columns ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state 
)
static

Definition at line 22620 of file query_executor.c.

References assert, ASSERT_ERROR, or_classrep::attributes, or_index::btid, BTID_IS_EQUAL, or_attribute::btids, BTREE_FOREIGN_KEY, BTREE_INDEX, BTREE_PRIMARY_KEY, BTREE_REVERSE_INDEX, BTREE_REVERSE_UNIQUE, BTREE_UNIQUE, or_classrep::class_attrs, hybrid_node::cls_node, cls_spec_node::cls_oid, tp_domain::collation_id, or_attribute::current_default_value, db_change_private_heap(), db_default_expression_string(), DB_DEFAULT_NONE, db_get_string(), DB_IS_NULL, db_make_int(), db_make_null(), db_make_string(), db_private_alloc, db_private_free_and_init, DB_TYPE_CHAR, DB_TYPE_ENUMERATION, DB_TYPE_NCHAR, db_type_to_db_domain(), DB_TYPE_VARCHAR, DB_TYPE_VARNCHAR, db_value_coerce(), or_attribute::def_order, or_default_value::default_expr, db_default_expr::default_expr_format, db_default_expr::default_expr_op, db_default_expr::default_expr_type, or_attribute::default_value, or_attribute::domain, er_errid(), ER_FAILED, error(), free_and_init, FULL_COLUMNS_SCHEMA, GOTO_EXIT_ON_ERROR, heap_classrepr_free_and_init, heap_classrepr_get(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, or_attribute::id, or_classrep::indexes, or_attribute::is_autoincrement, or_attribute::is_notnull, lang_get_collation_name(), xasl_node::list_id, or_classrep::n_attributes, or_attribute::n_btids, or_classrep::n_class_attrs, or_classrep::n_indexes, or_classrep::n_shared_attrs, db_value::need_clear, regu_variable_list_node::next, NO_ERROR, NULL, NULL_REPRID, or_attribute::on_update_expr, or_get_attrcomment(), or_get_attrname(), xasl_node::outptr_list, PEEK, pr_clear_value(), qdump_operator_type_string(), qexec_end_mainblock_iterations(), qexec_end_one_iteration(), qexec_failure_line(), qexec_get_attr_default(), qexec_schema_get_type_desc(), qexec_start_mainblock_iterations(), qfile_close_list(), qmgr_set_query_error(), xasl_state::query_id, REGU_VARIABLE_CLEAR_AT_CLONE_DECACHE, REGU_VARIABLE_IS_FLAGED(), access_spec_node::s, S_SUCCESS, cls_spec_node::schema_type, or_classrep::shared_attrs, xasl_node::spec_list, strlen, T_TO_CHAR, qfile_tuple_record::tpl, or_attribute::type, or_index::type, or_default_value::val_length, valcnv_convert_value_to_string(), valptr_list_node::valptr_cnt, valptr_list_node::valptrp, or_default_value::value, and regu_variable_list_node::value.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_build_indexes ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state 
)
static

Definition at line 21651 of file query_executor.c.

References ARG_FILE_LINE, or_index::asc_desc, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, or_function_index::attr_index_start, or_classrep::attributes, or_index::attrs_prefix_length, or_index::atts, or_index::btid, or_index::btname, btree_get_asc_desc(), btree_is_unique_type(), CATALOG_ACCESS_INFO_INITIALIZER, catalog_end_access_with_dir_oid(), catalog_free_representation_and_init, catalog_get_cardinality(), catalog_get_dir_oid_from_cache(), catalog_get_last_representation_id(), catalog_get_representation(), catalog_start_access_with_dir_oid(), catalog_access_info::class_oid, hybrid_node::cls_node, cls_spec_node::cls_oid, or_function_index::col_id, db_change_private_heap(), db_make_int(), db_make_null(), db_make_string(), db_private_free_and_init, catalog_access_info::dir_oid, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), or_function_index::expr_string, free_and_init, or_index::func_index_info, GOTO_EXIT_ON_ERROR, heap_classrepr_free_and_init, heap_classrepr_get(), heap_get_class_record(), heap_scancache_end(), heap_scancache_quick_start_root_hfid(), i, or_attribute::id, or_index::index_status, or_classrep::indexes, or_attribute::is_notnull, xasl_node::list_id, or_classrep::n_attributes, or_index::n_atts, or_classrep::n_indexes, regu_variable_list_node::next, NO_ERROR, NULL, NULL_REPRID, xasl_node::option, or_class_name(), or_get_attrname(), or_get_constraint_comment(), OR_NORMAL_INDEX, xasl_node::ordbynum_val, xasl_node::orderby_list, xasl_node::outptr_list, PEEK, pr_clear_value(), Q_DISTINCT, qexec_end_mainblock_iterations(), qexec_end_one_iteration(), qexec_failure_line(), qexec_orderby_distinct(), qexec_start_mainblock_iterations(), qfile_close_list(), qmgr_set_query_error(), xasl_state::query_id, REGU_VARIABLE_CLEAR_AT_CLONE_DECACHE, REGU_VARIABLE_IS_FLAGED(), access_spec_node::s, S_LOCK, S_SUCCESS, xasl_node::spec_list, strdup(), qfile_tuple_record::tpl, qfile_list_id::tuple_cnt, or_index::type, valptr_list_node::valptr_cnt, valptr_list_node::valptrp, regu_variable_list_node::value, XASL_IS_FLAGED, XASL_SKIP_ORDERBY_LIST, and XASL_USES_MRO.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_connect_by ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec 
)
static

Definition at line 15081 of file query_executor.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ARG_FILE_LINE, assert, bf2df_str_cmpdisk(), bf2df_str_cmpval(), bf2df_str_son_index(), xasl_node::connect_by, qfile_list_scan_id::curr_pgptr, xasl_node::curr_spec, DB_DEFAULT_PRECISION, DB_IS_NULL, db_make_bit(), db_make_int(), db_make_string(), db_private_free_and_init, qfile_tuple_value_position::dom, qfile_tuple_value_type_list::domp, ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_CYCLE_DETECTED, er_set(), eval_pred(), fetch_val_list(), GOTO_EXIT_ON_ERROR, xasl_node::if_pred, access_spec_node::indexptr, key_range::key1, key_range::key2, key_info::key_cnt, indx_info::key_info, key_info::key_ranges, xasl_node::level_val, qfile_list_scan_id::list_id, xasl_node::list_id, hybrid_node::list_node, list_spec_node::list_regu_list_probe, regu_variable_list_node::next, sort_list::next, xasl_node::next_scan_block_on, NO_ERROR, NULL, xasl_node::orderby_list, xasl_node::outptr_list, PCOL_INDEX_STRING_TUPLE_OFFSET, PCOL_ISCYCLE_TUPLE_OFFSET, PCOL_ISLEAF_TUPLE_OFFSET, PCOL_PARENTPOS_TUPLE_OFFSET, PEEK, sort_list::pos_descr, qfile_tuple_value_position::pos_no, pr_clear_value(), connectby_proc_node::prior_outptr_list, connectby_proc_node::prior_regu_list_pred, connectby_proc_node::prior_regu_list_rest, xasl_node::proc, qdata_copy_valptr_list_to_tuple(), qdata_get_valptr_type_list(), qexec_check_for_cycle(), qexec_close_scan(), qexec_end_mainblock_iterations(), qexec_end_scan(), qexec_get_index_pseudocolumn_value_from_tuple(), qexec_get_tuple_column_value(), qexec_init_index_pseudocolumn_strings(), qexec_insert_tuple_into_list(), qexec_listfile_orderby(), qexec_next_scan_block_iterations(), qexec_open_scan(), qexec_recalc_tuples_parent_pos_in_list(), qexec_replace_prior_regu_vars(), qexec_replace_prior_regu_vars_pred(), qexec_reset_pseudocolumns_val_pointers(), qexec_set_pseudocolumns_val_pointers(), qexec_start_mainblock_iterations(), qfile_add_tuple_get_pos_in_list(), qfile_close_list(), qfile_close_scan(), qfile_destroy_list(), QFILE_FREE_AND_INIT_LIST_ID, qfile_free_sort_list(), qfile_open_list(), qfile_open_list_scan(), qfile_scan_list_next(), qfile_set_tuple_column_value(), qmgr_free_old_page_and_init, xasl_state::query_id, REINTERPRET_CAST, access_spec_node::s, S_ASC, S_CLOSED, S_END, S_ERROR, sort_list::s_nulls, S_NULLS_FIRST, sort_list::s_order, S_SELECT, S_SUCCESS, scan_next_scan(), pr_type::set_cmpval_function(), pr_type::set_data_cmpdisk_function(), qfile_tuple_record::size, qfile_list_id::sort_list, xasl_node::spec_list, connectby_proc_node::start_with_list_id, qfile_list_scan_id::status, TARGET_LIST, qfile_list_id::tfile_vfid, tp_Bit_domain, tp_Integer_domain, tp_String, tp_String_domain, qfile_tuple_record::tpl, qfile_tuple_position::tpl, tp_domain::type, access_spec_node::type, V_ERROR, V_TRUE, xasl_node::val_list, valptr_list_node::valptr_cnt, regu_variable_list_node::value, xasl_state::vd, qfile_tuple_position::vpid, access_spec_node::where_key, access_spec_node::where_pred, XASL_HAS_NOCYCLE, XASL_IGNORE_CYCLES, and XASL_IS_FLAGED.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_delete ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state 
)
static

Definition at line 9603 of file query_executor.c.

References xasl_node::aptr_list, ARG_FILE_LINE, assert, del_lob_info::attr_info, bool, upddel_class_instances_lock_info::class_oid, upddel_class_info::class_oid, upddel_class_info_internal::class_oid, delete_proc_node::classes, COPY_OID, cubquery::mvcc_update_reev_data::copyarea, xasl_node::curr_spec, cubquery::mvcc_update_reev_data::curr_upddel, db_elo_delete(), db_get_elo(), db_get_oid(), DB_IS_NULL, DB_NOT_PARTITIONED_CLASS, db_private_free, db_private_free_and_init, DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_is_null(), db_value_type(), xasl_node::delete_, ER_FAILED, er_log_debug, ER_MVCC_NOT_SATISFIED_REEVALUATION, error(), GOTO_EXIT_ON_ERROR, heap_attrinfo_read_dbvalues(), heap_get_visible_version(), i, upddel_class_instances_lock_info::instances_locked, internal_classes, LC_FLUSH_DELETE, xasl_node::list_id, locator_attribute_info_force(), locator_free_copy_area(), LOG_RESULT_TOPOP_ABORT, LOG_RESULT_TOPOP_ATTACH_TO_OUTER, logtb_get_mvcc_snapshot(), MIN_NUM_ROWS_FOR_MULTI_DELETE, MULTI_ROW_DELETE, cubquery::mvcc_update_reev_data::mvcc_cond_reev_list, delete_proc_node::mvcc_reev_classes, qproc_db_value_list::next, NO_ERROR, delete_proc_node::no_logging, NULL, NULL_CHN, delete_proc_node::num_classes, delete_proc_node::num_reev_classes, upddel_class_info::num_subclasses, upddel_class_info_internal::oid, OID_EQ, db_identifier::pageid, PEEK, pr_clear_value(), prepare_mvcc_reev_data(), xasl_node::proc, qexec_change_delete_lob_info(), qexec_clear_internal_classes(), qexec_clear_list_cache_by_class(), qexec_close_scan(), qexec_create_internal_classes(), qexec_end_scan(), qexec_execute_mainblock(), qexec_failure_line(), qexec_free_delete_lob_info_list(), qexec_mvcc_cond_reev_set_scan_order(), qexec_next_scan_block_iterations(), qexec_open_scan(), qexec_process_partition_unique_stats(), qexec_process_unique_stats(), qexec_set_class_locks(), qexec_setup_list_id(), qexec_upddel_mvcc_set_filters(), qexec_upddel_setup_current_class(), QFILE_IS_LIST_CACHE_DISABLED, qmgr_add_modified_class(), xasl_state::query_id, RECDES_INITIALIZER, REPL_INFO_TYPE_RBR_NORMAL, S_END, S_ERROR, S_SELECT, S_SUCCESS, scan_next_scan(), xasl_node::scan_op_type, cubquery::mvcc_reev_data::set_update_reevaluation(), SINGLE_ROW_DELETE, db_identifier::slotid, xasl_node::spec_list, TRAN_ACTIVE, qfile_list_id::tuple_cnt, UPDATE_INPLACE_NONE, qproc_db_value_list::val, scan_id_struct::val_list, xasl_node::val_list, val_list_node::valp, xasl_state::vd, db_identifier::volid, xtran_server_end_topop(), and xtran_server_start_topop().

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_do_stmt ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state 
)
static
static int qexec_execute_duplicate_key_update ( THREAD_ENTRY thread_p,
ODKU_INFO odku,
HFID hfid,
VAL_DESCR vd,
int  op_type,
HEAP_SCANCACHE scan_cache,
HEAP_CACHE_ATTRINFO attr_info,
HEAP_CACHE_ATTRINFO index_attr_info,
HEAP_IDX_ELEMENTS_INFO idx_info,
int  pruning_type,
PRUNING_CONTEXT pcontext,
int *  force_count 
)
static
static int qexec_execute_insert ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
bool  skip_aptr 
)
static

Definition at line 10871 of file query_executor.c.

References xasl_node::aptr_list, ARG_FILE_LINE, assert, ASSERT_ERROR, insert_proc_node::att_id, odku_info::attr_info, bool, insert_proc_node::class_hfid, insert_proc_node::class_oid, log_tdes::client, insert_proc_node::cons_pred, CONST_CAST, COPY_OID, xasl_node::curr_spec, or_attribute::current_default_value, db_datetime::date, db_datetime_decode(), db_datetime_to_timestamp(), DB_DEFAULT_CURR_USER, DB_DEFAULT_CURRENTDATE, DB_DEFAULT_CURRENTDATETIME, DB_DEFAULT_CURRENTTIME, DB_DEFAULT_CURRENTTIMESTAMP, DB_DEFAULT_NONE, DB_DEFAULT_SYSDATE, DB_DEFAULT_SYSDATETIME, DB_DEFAULT_SYSTIME, DB_DEFAULT_SYSTIMESTAMP, DB_DEFAULT_UNIX_TIMESTAMP, DB_DEFAULT_USER, DB_IS_NULL, db_make_date(), db_make_datetime(), db_make_int(), db_make_null(), db_make_oid(), db_make_string(), db_make_time(), db_make_timestamp(), DB_NOT_PARTITIONED_CLASS, db_private_alloc, db_private_free_and_init, db_timestamp_encode_sys(), db_to_char(), DB_TYPE_STRING, db_unix_timestamp(), clientids::db_user, db_value_put_encoded_date(), db_value_put_encoded_time(), DB_VALUE_TYPE, or_default_value::default_expr, db_default_expr::default_expr_format, db_default_expr::default_expr_op, db_default_expr::default_expr_type, insert_proc_node::do_replace, or_attribute::domain, DOMAIN_COMPATIBLE, xasl_node::dptr_list, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_log_debug, ER_NULL_CONSTRAINT_VIOLATION, ER_OUT_OF_VIRTUAL_MEMORY, ER_REFERENCE_TO_NON_REFERABLE_NOT_ALLOWED, er_set(), error(), eval_pred(), fetch_peek_dbval(), FILE_HEAP_REUSE_SLOTS, heap_scancache::file_type, clientids::get_db_user(), clientids::get_host_name(), multi_index_unique_stats::get_map(), GOTO_EXIT_ON_ERROR, insert_proc_node::has_uniques, heap_attrinfo_clear_dbvalues(), heap_attrinfo_end(), heap_attrinfo_set(), heap_attrinfo_start(), heap_attrinfo_start_with_index(), heap_free_func_pred_unpack_info(), heap_init_func_pred_unpack_info(), heap_locate_last_attrepr(), heap_set_autoincrement_value(), HFID_COPY, clientids::host_name, i, if(), xasl_node::insert, or_attribute::is_autoincrement, IX_LOCK, lang_set_flag_from_lang(), LC_FLUSH_INSERT, xasl_node::list_id, LK_GRANTED, LK_UNCOND_LOCK, locator_attribute_info_force(), locator_end_force_scan_cache(), locator_start_force_scan_cache(), lock_object(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, LOG_RESULT_TOPOP_ABORT, LOG_RESULT_TOPOP_ATTACH_TO_OUTER, logtb_tran_update_unique_stats(), heap_scancache::m_index_stats, MULTI_ROW_INSERT, db_value::need_clear, qproc_db_value_list::next, NO_ERROR, insert_proc_node::no_logging, NULL, insert_proc_node::num_default_expr, insert_proc_node::num_val_lists, insert_proc_node::num_vals, insert_proc_node::obj_oid, insert_proc_node::odku, OID_ISNULL, oid_Root_class_oid, db_identifier::pageid, partition_clear_pruning_context(), partition_init_pruning_context(), partition_load_pruning_context(), pr_clear_value(), pr_clone_value(), prm_get_string_value(), PRM_ID_INTL_DATE_LANG, xasl_node::proc, insert_proc_node::pruning_type, qdata_copy_db_value(), qexec_clear_list_cache_by_class(), qexec_close_scan(), qexec_end_scan(), qexec_execute_duplicate_key_update(), qexec_execute_mainblock(), qexec_failure_line(), qexec_get_attr_default(), qexec_next_scan_block_iterations(), qexec_open_scan(), qexec_process_partition_unique_stats(), qexec_remove_duplicates_for_replace(), qexec_setup_list_id(), qfile_clear_list_id(), qfile_fast_val_tuple_to_list(), QFILE_IS_LIST_CACHE_DISABLED, qmgr_add_modified_class(), xasl_state::query_id, qfile_list_id::query_id, rc, REGU_VARIABLE_STRICT_TYPE_CAST, REPL_INFO_TYPE_RBR_NORMAL, S_END, S_SELECT, S_SUCCESS, scan_next_scan(), xasl_node::scan_op_type, session_begin_insert_values(), session_reset_cur_insert_id(), SINGLE_ROW_INSERT, db_identifier::slotid, xasl_node::spec_list, strlen, val_descr::sys_datetime, T_TO_CHAR, db_datetime::time, tp_domain_resolve_default(), tp_domain_resolve_value(), tp_domain_status_er_set(), TP_DOMAIN_TYPE, TP_IS_CHAR_TYPE, tp_value_cast(), TRAN_ACTIVE, qfile_list_id::tuple_cnt, tz_conv_tz_datetime_w_region(), tz_conv_tz_time_w_zone_name(), tz_get_session_local_timezone(), tz_get_session_tz_region(), tz_get_system_timezone(), tz_get_system_tz_region(), UPDATE_INPLACE_NONE, V_ERROR, V_TRUE, V_UNKNOWN, qproc_db_value_list::val, or_default_value::val_length, scan_id_struct::val_list, xasl_node::val_list, val_list_node::valp, insert_proc_node::valptr_lists, valptr_list_node::valptrp, insert_proc_node::vals, regu_variable_list_node::value, xasl_state::vd, db_identifier::volid, XASL_IS_FLAGED, XASL_LINK_TO_REGU_VARIABLE, XASL_RETURN_GENERATED_KEYS, xtran_server_end_topop(), and xtran_server_start_topop().

Referenced by qexec_execute_mainblock_internal(), and qexec_execute_merge().

Here is the caller graph for this function:

static int qexec_execute_mainblock_internal ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
UPDDEL_CLASS_INSTANCE_LOCK_INFO p_class_instance_lock_info 
)
static

Definition at line 13641 of file query_executor.c.

References buildlist_proc_node::a_eval_list, access_spec_node::access, xasl_node::after_iscan_list, buildvalue_proc_node::agg_domains_resolved, buildvalue_proc_node::agg_list, xasl_node::aptr_list, ARG_FILE_LINE, assert, BUILD_SCHEMA_PROC, xasl_node::buildlist, BUILDLIST_PROC, xasl_node::buildvalue, BUILDVALUE_PROC, CHECK_MODIFICATION_NO_RETURN, upddel_class_instances_lock_info::class_oid, hybrid_node::cls_node, cls_spec_node::cls_oid, COLUMNS_SCHEMA, COMPOSITE_LOCK, xasl_node::connect_by_ptr, CONNECTBY_PROC, CTE_PROC, xasl_node::curr_spec, db_private_alloc, db_private_free_and_init, xasl_node::delete_, DELETE_PROC, DIFFERENCE_PROC, DO_PROC, xasl_node::dptr_list, buildlist_proc_node::eptr_list, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_log_debug, ER_QPROC_INVALID_QRY_SINGLE_TUPLE, er_set(), error(), FULL_COLUMNS_SCHEMA, buildlist_proc_node::g_agg_domains_resolved, buildlist_proc_node::g_agg_list, buildlist_proc_node::g_hash_eligible, GOTO_EXIT_ON_ERROR, buildlist_proc_node::groupby_list, indx_info::groupby_skip, INDEX_SCHEMA, access_spec_node::indexptr, mergelist_proc_node::inner_xasl, xasl_node::insert, INSERT_PROC, merge_proc_node::insert_xasl, upddel_class_instances_lock_info::instances_locked, INTERSECTION_PROC, IS_ANY_INDEX_ACCESS, key_info::is_constant, xasl_node::is_single_tuple, xasl_node::iscan_oid_order, JOIN_INNER, JOIN_LEFT, JOIN_RIGHT, qfile_list_merge_info::join_type, indx_info::key_info, xasl_node::limit_offset, xasl_node::limit_row_count, xasl_node::list_id, LK_GRANTED, lock_abort_composite_lock(), lock_finalize_composite_lock(), lock_initialize_composite_lock(), lock_is_instant_lock_mode(), lock_start_instant_lock_mode(), lock_stop_instant_lock_mode(), LOG_FIND_THREAD_TRAN_INDEX, mergelist_proc_node::ls_merge, xasl_node::merge, MERGE_PROC, xasl_node::merge_spec, xasl_node::merge_val_list, xasl_node::mergelist, MERGELIST_PROC, cubxasl::aggregate_list_node::next, cubxasl::analytic_eval_type::next, access_spec_node::next, xasl_node::next, xasl_node::next_scan_block_on, NO_ERROR, NULL, OID_EQ, xasl_node::option, xasl_node::ordbynum_val, xasl_node::orderby_list, mergelist_proc_node::outer_xasl, perfmon_inc_stat(), xasl_node::proc, PSTAT_PB_NUM_FETCHES, PSTAT_PB_NUM_IOREADS, PSTAT_QM_NUM_DELETES, PSTAT_QM_NUM_INSERTS, PSTAT_QM_NUM_MJOINS, PSTAT_QM_NUM_NLJOINS, PSTAT_QM_NUM_SELECTS, PSTAT_QM_NUM_UPDATES, buildlist_proc_node::push_list_id, Q_ALL, Q_DISTINCT, qdata_get_single_tuple_from_list_id(), qexec_alloc_agg_hash_context(), qexec_check_limit_clause(), qexec_clear_connect_by_lists(), qexec_clear_head_lists(), qexec_clear_mainblock_iterations(), qexec_close_scan(), qexec_end_connect_by_lists(), qexec_end_mainblock_iterations(), qexec_end_scan(), qexec_execute_analytic(), qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_execute_connect_by(), qexec_execute_cte(), qexec_execute_delete(), qexec_execute_do_stmt(), qexec_execute_insert(), qexec_execute_mainblock(), qexec_execute_merge(), qexec_execute_scan(), qexec_execute_selupd_list(), qexec_execute_update(), qexec_failure_line(), qexec_for_update_set_class_locks(), qexec_free_agg_hash_context(), qexec_groupby(), qexec_groupby_index(), qexec_intprt_fnc(), QEXEC_IS_MULTI_TABLE_UPDATE_DELETE, qexec_iterate_connect_by_results(), qexec_merge_fnc(), qexec_open_scan(), qexec_orderby_distinct(), QEXEC_SEL_UPD_USE_REEVALUATION, qexec_start_connect_by_lists(), qexec_start_mainblock_iterations(), qfile_close_list(), qfile_copy_list_id(), qfile_is_sort_list_covered(), qmgr_set_query_error(), QPROC_MAX_GROUPED_SCAN_CNT, QPROC_NO_SINGLE_OUTER, QPROC_SINGLE_CLASS_GROUPED_SCAN, xasl_state::query_id, query_multi_range_opt_check_set_sort_col(), access_spec_node::s, S_SUCCESS, xasl_node::scan_op_type, xasl_node::scan_ptr, cls_spec_node::schema_type, xasl_node::selected_upd_list, access_spec_node::single_fetch, xasl_node::single_tuple, xasl_node::spec_list, TARGET_CLASS, TARGET_CLASS_ATTR, thread_is_on_trace(), qfile_tuple_record::tpl, TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), tsc_getticks(), qfile_list_id::tuple_cnt, access_spec_node::type, xasl_node::type, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, UNION_PROC, xasl_node::update, UPDATE_PROC, merge_proc_node::update_xasl, xasl_node::val_list, xasl_state::vd, selupd_list::wait_msecs, update_proc_node::wait_msecs, insert_proc_node::wait_msecs, delete_proc_node::wait_msecs, XASL_HAS_CONNECT_BY, XASL_IS_FLAGED, XASL_LINK_TO_REGU_VARIABLE, XASL_MULTI_UPDATE_AGG, XASL_NO_FIXED_SCAN, XASL_SKIP_ORDERBY_LIST, XASL_TOP_MOST_XASL, XASL_USES_MRO, XASL_WAIT_MSECS_NOCHANGE, and xlogtb_reset_wait_msecs().

Referenced by qexec_execute_mainblock().

Here is the caller graph for this function:

static int qexec_execute_obj_fetch ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
SCAN_OPERATION_TYPE  scan_operation_type 
)
static

Definition at line 11789 of file query_executor.c.

References ACCESS_SPEC_CLS_OID, xasl_node::aptr_list, fetch_proc_node::arg, assert, cls_spec_node::attrids_pred, cls_spec_node::attrids_rest, xasl_node::bptr_list, cls_spec_node::cache_pred, cls_spec_node::cache_rest, hybrid_node::cls_node, cls_spec_node::cls_regu_list_pred, cls_spec_node::cls_regu_list_rest, COPY, db_get_oid(), db_get_set(), DB_IS_NULL, db_set_get(), db_set_size(), DB_TYPE_OID, DB_TYPE_VOBJ, DB_VALUE_DOMAIN_TYPE, xasl_node::dptr_list, er_clear(), er_errid(), ER_FAILED, ER_HEAP_NODATA_NEWADDRESS, ER_HEAP_UNKNOWN_OBJECT, eval_pred(), xasl_node::fetch, fetch_init_val_list(), fetch_proc_node::fetch_res, fetch_val_list(), xasl_node::fptr_list, GOTO_EXIT_ON_ERROR, heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_start(), heap_scancache_end(), heap_scancache_start(), xasl_node::if_pred, IS_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_get_lock_mode_from_op_type(), locator_get_object(), lock_subclass(), logtb_get_mvcc_snapshot(), access_spec_node::next, xasl_node::next, NO_ERROR, NULL, NULL_CHN, cls_spec_node::num_attrs_pred, cls_spec_node::num_attrs_rest, OID_EQ, OID_INITIALIZER, OID_ISNULL, partition_prune_spec(), PEEK, xasl_node::proc, qdata_set_value_list_to_null(), qexec_clear_head_lists(), qexec_execute_mainblock(), fetch_proc_node::ql_flag, RECDES_INITIALIZER, access_spec_node::s, S_DOESNT_EXIST, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, SAFE_COPY_OID, xasl_node::spec_list, TARGET_CLASS, access_spec_node::type, V_ERROR, V_TRUE, V_UNKNOWN, xasl_node::val_list, xasl_state::vd, access_spec_node::where_pred, XASL_IS_FLAGED, XASL_LINK_TO_REGU_VARIABLE, and XASL_OBJFETCH_IGNORE_CLASSOID.

Referenced by qexec_execute_scan(), qexec_intprt_fnc(), and qexec_merge_fnc().

Here is the caller graph for this function:

static int qexec_execute_selupd_list ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state 
)
static

Definition at line 12440 of file query_executor.c.

References ARG_FILE_LINE, assert, ASSERT_ERROR_AND_SET, COPY, COPY_OID, db_get_int(), db_get_oid(), er_clear(), er_errid(), ER_FAILED, ER_LK_OBJECT_DL_TIMEOUT_CLASS_MSG, ER_LK_OBJECT_DL_TIMEOUT_CLASSOF_MSG, ER_LK_OBJECT_DL_TIMEOUT_SIMPLE_MSG, ER_LK_OBJECT_TIMEOUT_CLASSOF_MSG, ER_LK_OBJECT_TIMEOUT_SIMPLE_MSG, ER_LK_UNILATERALLY_ABORTED, er_log_debug, ER_MVCC_SERIALIZABLE_CONFLICT, err, fetch_peek_dbval(), cubquery::mvcc_reev_data::filter_result, heap_scancache_end(), heap_scancache_start(), cubquery::upddel_mvcc_cond_reeval::init(), regu_varlist_list_node::list, xasl_node::list_id, locator_lock_and_get_object_with_evaluation(), lock_clear_deadlock_victim(), lock_get_object_lock(), lock_is_instant_lock_mode(), lock_start_instant_lock_mode(), lock_stop_instant_lock_mode(), LOG_CHECK_LOG_APPLIER, log_does_allow_replication(), LOG_FIND_TDES(), LOG_FIND_THREAD_TRAN_INDEX, log_sysop_abort(), log_sysop_attach_to_outer(), log_sysop_commit(), log_sysop_start(), LOG_WARNING_IF_DELETED, logtb_complete_sub_mvcc(), logtb_get_mvcc_snapshot(), logtb_get_new_subtransaction_mvccid(), log_tdes::mvccinfo, selupd_list::next, regu_varlist_list_node::next, NO_ERROR, NULL, NULL_CHN, OID_AS_ARGS, OID_EQ, OID_ISNULL, oid_Root_class_oid, OID_SET_NULL, qexec_execute_increment(), qexec_execute_selupd_list_find_class(), qexec_failure_line(), QEXEC_SEL_UPD_USE_REEVALUATION, qfile_clear_list_id(), qfile_close_list(), qfile_destroy_list(), cubquery::mvcc_scan_reev_data::qualification, S_SUCCESS, xasl_node::selected_upd_list, cubquery::mvcc_scan_reev_data::set_filters(), cubquery::mvcc_reev_data::set_scan_reevaluation(), xasl_node::spec_list, T_DECR, T_INCR, qfile_list_id::tuple_cnt, TYPE_CONSTANT, TYPE_INARITH, TYPE_OUTARITH, V_TRUE, regu_variable_list_node::value, xasl_state::vd, and X_LOCK.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_execute_update ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
bool  has_delete,
XASL_STATE xasl_state 
)
static

Definition at line 8732 of file query_executor.c.

References xasl_node::aptr_list, ARG_FILE_LINE, assert, update_proc_node::assigns, cubquery::update_mvcc_reev_assignment::att_id, upddel_class_info::att_id, update_assignment::att_idx, del_lob_info::attr_info, bool, BTREE_IS_MULTI_ROW_OP, upddel_class_instances_lock_info::class_oid, upddel_class_info::class_oid, update_proc_node::classes, update_assignment::cls_idx, update_proc_node::cons_pred, update_assignment::constant, COPY_OID, cubquery::mvcc_update_reev_data::copyarea, cubquery::mvcc_update_reev_data::curr_assigns, cubquery::mvcc_update_reev_data::curr_attrinfo, cubquery::mvcc_update_reev_data::curr_extra_assign_cnt, cubquery::mvcc_update_reev_data::curr_extra_assign_reev, xasl_node::curr_spec, cubquery::mvcc_update_reev_data::curr_upddel, db_elo_delete(), db_get_elo(), db_get_int(), db_get_oid(), DB_IS_NULL, DB_NOT_PARTITIONED_CLASS, db_private_free, db_private_free_and_init, DB_TYPE_BLOB, DB_TYPE_CLOB, db_value_is_null(), db_value_type(), er_clear(), ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_UNKNOWN_OBJECT, er_log_debug, ER_MVCC_NOT_SATISFIED_REEVALUATION, ER_NULL_CONSTRAINT_VIOLATION, er_set(), error(), eval_pred(), GOTO_EXIT_ON_ERROR, upddel_class_info::has_uniques, heap_attrinfo_clear_dbvalues(), heap_attrinfo_end(), heap_attrinfo_read_dbvalues(), heap_attrinfo_set(), heap_attrinfo_start(), heap_get_visible_version(), i, upddel_class_instances_lock_info::instances_locked, internal_classes, LC_FLUSH_DELETE, LC_FLUSH_UPDATE, xasl_node::list_id, locator_attribute_info_force(), locator_free_copy_area(), LOG_RESULT_TOPOP_ABORT, LOG_RESULT_TOPOP_ATTACH_TO_OUTER, logtb_get_mvcc_snapshot(), MULTI_ROW_DELETE, MULTI_ROW_UPDATE, cubquery::mvcc_update_reev_data::mvcc_cond_reev_list, update_proc_node::mvcc_reev_classes, upddel_class_info::needs_pruning, qproc_db_value_list::next, NO_ERROR, update_proc_node::no_logging, NULL, NULL_CHN, update_proc_node::num_assigns, upddel_class_info::num_attrs, update_proc_node::num_classes, update_proc_node::num_reev_classes, upddel_class_info::num_subclasses, OID_EQ, OID_ISNULL, OID_SET_NULL, db_identifier::pageid, PEEK, prepare_mvcc_reev_data(), xasl_node::proc, qexec_change_delete_lob_info(), qexec_clear_internal_classes(), qexec_clear_list_cache_by_class(), qexec_close_scan(), qexec_create_internal_classes(), qexec_end_scan(), qexec_execute_mainblock(), qexec_failure_line(), qexec_free_delete_lob_info_list(), qexec_mvcc_cond_reev_set_scan_order(), qexec_next_scan_block_iterations(), qexec_open_scan(), qexec_process_partition_unique_stats(), qexec_process_unique_stats(), qexec_set_class_locks(), qexec_setup_list_id(), qexec_upddel_mvcc_set_filters(), qexec_upddel_setup_current_class(), QFILE_IS_LIST_CACHE_DISABLED, qmgr_add_modified_class(), xasl_state::query_id, rc, RECDES_INITIALIZER, REPL_INFO_TYPE_RBR_END, REPL_INFO_TYPE_RBR_NORMAL, REPL_INFO_TYPE_RBR_START, S_END, S_ERROR, S_SELECT, S_SUCCESS, scan_next_scan(), xasl_node::scan_op_type, cubquery::mvcc_reev_data::set_update_reevaluation(), SINGLE_ROW_DELETE, SINGLE_ROW_UPDATE, db_identifier::slotid, xasl_node::spec_list, TRAN_ACTIVE, qfile_list_id::tuple_cnt, xasl_node::update, UPDATE_INPLACE_NONE, V_ERROR, V_TRUE, V_UNKNOWN, qproc_db_value_list::val, scan_id_struct::val_list, xasl_node::val_list, val_list_node::valp, xasl_state::vd, db_identifier::volid, xtran_server_end_topop(), and xtran_server_start_topop().

Referenced by qexec_execute_mainblock_internal(), and qexec_execute_merge().

Here is the caller graph for this function:

static void qexec_failure_line ( int  line,
XASL_STATE xasl_state 
)
static
static void qexec_free_delete_lob_info_list ( THREAD_ENTRY thread_p,
DEL_LOB_INFO **  del_lob_info_list_ptr 
)
static

Definition at line 10190 of file query_executor.c.

References del_lob_info::attr_info, db_private_free, heap_attrinfo_end(), del_lob_info::next, and NULL.

Referenced by qexec_execute_delete(), and qexec_execute_update().

Here is the caller graph for this function:

static void qexec_gby_finalize_group ( THREAD_ENTRY thread_p,
GROUPBY_STATE gbstate,
int  N,
bool  keep_list_file 
)
static

Definition at line 17485 of file query_executor.c.

References cubxasl::aggregate_list_node::accumulator, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, groupby_state::composite_lock, groupby_dimension::d_agg_list, groupby_dimension::d_flag, db_make_bigint(), DB_PAGESIZE, db_private_alloc, groupby_state::eptr_list, eval_pred(), cubxasl::aggregate_list_node::function, groupby_state::g_dim, groupby_state::g_dim_levels, groupby_state::g_outptr_list, groupby_state::g_output_agg_list, GOTO_EXIT_ON_ERROR, groupby_state::grbynum_flag, groupby_state::grbynum_val, GROUPBY_DIM_FLAG_GROUP_BY, GROUPBY_DIM_FLAG_NONE, groupby_state::having_pred, cubxasl::aggregate_list_node::next, xasl_node::next, NO_ERROR, NULL, groupby_state::output_file, groupby_state::output_tplrec, pr_clear_value(), PRIM_SET_NULL(), PT_GROUPBY_NUM, qdata_copy_valptr_list_to_tuple(), qdata_finalize_aggregate_list(), qexec_add_composite_lock(), QEXEC_CLEAR_AGG_LIST_VALUE, qexec_eval_grbynum_pred(), qexec_execute_mainblock(), qexec_gby_finalize_group_val_list(), 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, SORT_PUT_STOP, groupby_state::state, T_NORMAL, qfile_tuple_record::tpl, groupby_state::upd_del_class_cnt, V_ERROR, V_TRUE, valptr_list_node::valptrp, cubxasl::aggregate_accumulator::value, xasl_state::vd, groupby_state::xasl, XASL_G_GRBYNUM_FLAG_LIMIT_GT_LT, XASL_G_GRBYNUM_FLAG_LIMIT_LT, XASL_G_GRBYNUM_FLAG_SCAN_STOP, and groupby_state::xasl_state.

Referenced by qexec_gby_finalize_group_dim().

Here is the caller graph for this function:

static SORT_STATUS qexec_gby_get_next ( THREAD_ENTRY thread_p,
RECDES recdes,
void *  arg 
)
static

Definition at line 4079 of file query_executor.c.

References groupby_state::input_scan, groupby_state::input_tpl, groupby_state::key_info, and qfile_make_sort_key().

Referenced by qexec_groupby().

Here is the caller graph for this function:

static int qexec_gby_put_next ( THREAD_ENTRY thread_p,
const RECDES recdes,
void *  arg 
)
static

Definition at line 4095 of file query_executor.c.

References cubxasl::aggregate_list_node::accumulator, cubquery::aggregate_hash_value::accumulators, groupby_state::agg_hash_context, recdes::area_size, assert, groupby_state::cmp_fn, COPY, cubquery::aggregate_hash_context::curr_part_value, groupby_state::current_key, groupby_dimension::d_agg_list, recdes::data, cubxasl::aggregate_list_node::domain, er_errid(), cubxasl::aggregate_list_node::function, groupby_state::g_dim, groupby_state::g_dim_levels, groupby_state::g_hk_regu_list, groupby_state::gby_rec, groupby_state::hash_eligible, i, groupby_state::input_recs, groupby_state::input_scan, groupby_state::key_info, qfile_list_scan_id::list_id, SORT_REC::next, cubxasl::aggregate_list_node::next, NO_ERROR, NULL, NULL_PAGEID, SORT_REC::original, vpid::pageid, cubquery::aggregate_hash_context::part_scan_code, PEEK, qdata_aggregate_accumulator_to_accumulator(), qdata_load_agg_hvalue_in_agg_list(), qexec_build_agg_hkey(), qexec_gby_agg_tuple(), qexec_gby_finalize_group_dim(), qexec_gby_start_group_dim(), qexec_locate_agg_hentry_in_list(), qfile_generate_sort_tuple(), QFILE_GET_OVERFLOW_VPID, qfile_get_tuple(), qmgr_free_old_page_and_init, qmgr_get_old_page(), SORT_REC::s, S_SUCCESS, qfile_tuple_record::size, SORT_PUT_STOP, groupby_state::state, cubquery::aggregate_hash_context::temp_key, qfile_list_id::tfile_vfid, qfile_tuple_record::tpl, cubquery::aggregate_hash_value::tuple_count, SORTKEY_INFO::use_original, vpid::volid, VPID_EQ, groupby_state::with_rollup, and groupby_state::xasl_state.

Referenced by qexec_groupby().

Here is the caller graph for this function:

static void qexec_gby_start_group_dim ( THREAD_ENTRY thread_p,
GROUPBY_STATE gbstate,
const RECDES recdes 
)
static

Definition at line 17709 of file query_executor.c.

References groupby_state::g_dim_levels, i, NULL, and qexec_gby_start_group().

Referenced by qexec_gby_put_next(), qexec_groupby(), and qexec_groupby_index().

Here is the caller graph for this function:

static int qexec_get_index_pseudocolumn_value_from_tuple ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
QFILE_TUPLE  tpl,
DB_VALUE **  index_valp,
char **  index_value,
int *  index_len 
)
static
static int qexec_groupby ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec 
)
static

Definition at line 4386 of file query_executor.c.

References cubquery::aggregate_hash_context::accumulator_domains, mht_table::act_head, hentry::act_next, buildlist_proc_node::after_groupby_list, groupby_state::agg_hash_context, ARG_FILE_LINE, assert, xasl_node::buildlist, groupby_state::cmp_fn, groupby_state::composite_lock, cubquery::aggregate_hash_context::curr_part_key, cubquery::aggregate_hash_context::curr_part_value, groupby_dimension::d_agg_list, hentry::data, DB_IS_NULL, db_make_bigint(), db_private_free_and_init, qfile_tuple_value_type_list::domp, buildlist_proc_node::eptr_list, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_MERGE_TOO_MANY_SOURCE_ROWS, er_set(), cubquery::aggregate_hash_value::first_tuple, buildlist_proc_node::g_agg_list, groupby_state::g_dim, buildlist_proc_node::g_grbynum_flag, 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_sort_regu_list, buildlist_proc_node::g_outptr_list, buildlist_proc_node::g_regu_list, buildlist_proc_node::g_val_list, buildlist_proc_node::g_with_rollup, GOTO_EXIT_ON_ERROR, buildlist_proc_node::groupby_list, groupby_state::hash_eligible, cubquery::aggregate_hash_context::hash_table, if(), groupby_state::input_recs, groupby_state::input_scan, cubquery::aggregate_hash_context::key_domains, groupby_state::key_info, qfile_list_scan_id::list_id, xasl_node::list_id, mht_count(), SORTKEY_INFO::nkeys, NO_ERROR, NO_SORT_LIMIT, NULL, NULL_VOLID, xasl_node::option, xasl_node::orderby_list, xasl_node::outptr_list, groupby_state::output_file, cubquery::aggregate_hash_context::part_list_id, cubquery::aggregate_hash_context::part_scan_code, cubquery::aggregate_hash_context::part_scan_id, PEEK, prm_get_bool_value(), PRM_ID_AGG_HASH_RESPECT_ORDER, xasl_node::proc, PSTAT_SORT_NUM_DATA_PAGES, PSTAT_SORT_NUM_IO_PAGES, Q_DISTINCT, qdata_get_valptr_type_list(), qdata_load_agg_hentry_from_list(), qdata_load_agg_hvalue_in_agg_list(), qdata_save_agg_hentry_to_list(), qdata_save_agg_htable_to_list(), qexec_clear_groupby_state(), qexec_gby_agg_tuple(), qexec_gby_finalize_group_dim(), qexec_gby_get_next(), qexec_gby_put_next(), qexec_gby_start_group_dim(), qexec_hash_gby_get_next(), qexec_hash_gby_put_next(), qexec_initialize_groupby_state(), qexec_resolve_domains_for_group_by(), qfile_close_list(), qfile_close_scan(), qfile_compare_all_sort_record(), qfile_compare_partial_sort_record(), qfile_copy_list_id(), qfile_destroy_list(), QFILE_FLAG_ALL, QFILE_FLAG_RESULT_FILE, qfile_free_list_id(), qfile_get_estimated_pages_for_sorting(), qfile_open_list(), qfile_open_list_scan(), qfile_reopen_list_as_append_mode(), QFILE_SET_FLAG, qmgr_free_old_page_and_init, xasl_state::query_id, S_END, SORT_DUP, cubquery::aggregate_hash_context::sort_key, sort_listfile(), SORT_PUT_STOP, cubquery::aggregate_hash_context::sorted_count, cubquery::aggregate_hash_context::sorted_part_list_id, groupby_state::state, qmgr_temp_file::tde_encrypted, cubquery::aggregate_hash_context::temp_dbval_array, qfile_list_id::tfile_vfid, thread_is_on_trace(), qfile_tuple_record::tpl, TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), tsc_getticks(), qfile_list_id::tuple_cnt, cubquery::aggregate_hash_value::tuple_count, cubquery::aggregate_hash_context::tuple_count, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, groupby_state::upd_del_class_cnt, xasl_node::upd_del_class_cnt, SORTKEY_INFO::use_original, XASL_G_GRBYNUM_FLAG_LIMIT_GT_LT, XASL_G_GRBYNUM_FLAG_LIMIT_LT, XASL_IS_FLAGED, XASL_IS_MERGE_QUERY, XASL_MULTI_UPDATE_AGG, XASL_SKIP_ORDERBY_LIST, XASL_TO_BE_CACHED, and XASL_TOP_MOST_XASL.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

int qexec_groupby_index ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec 
)
static

Definition at line 18809 of file query_executor.c.

References buildlist_proc_node::after_groupby_list, ARG_FILE_LINE, assert, assert_release, xasl_node::buildlist, COPY, DB_EQ, DB_GT, DB_LT, db_make_null(), DB_NEED_CLEAR, db_private_alloc, db_private_free, db_private_free_and_init, qfile_tuple_value_type_list::domp, buildlist_proc_node::eptr_list, ER_ERROR_SEVERITY, ER_FAILED, ER_MERGE_TOO_MANY_SOURCE_ROWS, er_set(), buildlist_proc_node::g_agg_list, groupby_state::g_dim_levels, buildlist_proc_node::g_grbynum_flag, buildlist_proc_node::g_grbynum_pred, buildlist_proc_node::g_grbynum_val, buildlist_proc_node::g_having_pred, buildlist_proc_node::g_outptr_list, buildlist_proc_node::g_regu_list, buildlist_proc_node::g_val_list, buildlist_proc_node::g_with_rollup, GOTO_EXIT_ON_ERROR, buildlist_proc_node::groupby_list, HS_NONE, i, groupby_state::input_recs, groupby_state::input_scan, xasl_node::list_id, regu_variable_list_node::next, sort_list::next, NO_ERROR, NULL, xasl_node::outptr_list, groupby_state::output_file, PEEK, pr_clear_value(), pr_clone_value(), xasl_node::proc, qdata_get_valptr_type_list(), qexec_clear_groupby_state(), qexec_gby_agg_tuple(), qexec_gby_finalize_group_dim(), qexec_gby_start_group_dim(), qexec_get_tuple_column_value(), qexec_initialize_groupby_state(), qfile_close_list(), qfile_close_scan(), qfile_copy_list_id(), qfile_destroy_list(), QFILE_FLAG_ALL, qfile_open_list(), qfile_open_list_scan(), qfile_scan_list_next(), QFILE_SET_FLAG, xasl_state::query_id, S_SUCCESS, SORT_PUT_STOP, groupby_state::state, thread_is_on_trace(), tp_value_compare(), qfile_tuple_record::tpl, TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), tsc_getticks(), qfile_list_id::tuple_cnt, qfile_list_id::type_list, valptr_list_node::valptrp, regu_variable_list_node::value, groupby_state::with_rollup, XASL_IS_FLAGED, and XASL_IS_MERGE_QUERY.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static int qexec_hash_gby_agg_tuple ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
BUILDLIST_PROC_NODE proc,
QFILE_TUPLE_RECORD tplrec,
QFILE_TUPLE_DESCRIPTOR tpldesc,
QFILE_LIST_ID groupby_list,
bool output_tuple 
)
static

Definition at line 3713 of file query_executor.c.

References cubquery::aggregate_hash_value::accumulators, ARG_FILE_LINE, assert, hentry::data, db_private_alloc, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), fetch_val_list(), cubquery::aggregate_hash_value::first_tuple, buildlist_proc_node::g_agg_list, buildlist_proc_node::g_func_count, buildlist_proc_node::g_hk_scan_regu_list, buildlist_proc_node::g_output_first_tuple, buildlist_proc_node::g_scan_regu_list, cubquery::aggregate_hash_context::group_count, HASH_AGGREGATE_VH_SELECTIVITY_THRESHOLD, HASH_AGGREGATE_VH_SELECTIVITY_TUPLE_THRESHOLD, cubquery::aggregate_hash_context::hash_size, cubquery::aggregate_hash_context::hash_table, HS_REJECT_ALL, if(), hentry::key, mht_table::lru_head, mht_get(), mht_put(), mht_rem(), NO_ERROR, NULL, cubquery::aggregate_hash_context::part_list_id, prm_get_bigint_value(), PRM_ID_MAX_AGG_HASH_SIZE, qdata_alloc_agg_hvalue(), qdata_copy_agg_hkey(), qdata_evaluate_aggregate_list(), qdata_free_agg_hentry(), qdata_free_agg_hkey(), qdata_free_agg_hvalue(), qdata_get_agg_hkey_size(), qdata_get_agg_hvalue_size(), qdata_save_agg_hentry_to_list(), qdata_save_agg_htable_to_list(), qexec_build_agg_hkey(), qfile_add_tuple_to_list(), qfile_save_tuple(), rc, qfile_tuple_record::size, cubquery::aggregate_hash_context::state, T_NORMAL, cubquery::aggregate_hash_context::temp_dbval_array, cubquery::aggregate_hash_context::temp_key, thread_is_on_trace(), qfile_tuple_record::tpl, qfile_tuple_descriptor::tpl_size, TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), tsc_getticks(), cubquery::aggregate_hash_value::tuple_count, cubquery::aggregate_hash_context::tuple_count, and xasl_state::vd.

Referenced by qexec_end_one_iteration().

Here is the caller graph for this function:

static SORT_STATUS qexec_hash_gby_get_next ( THREAD_ENTRY thread_p,
RECDES recdes,
void *  arg 
)
static
static int qexec_hash_gby_put_next ( THREAD_ENTRY thread_p,
const RECDES recdes,
void *  arg 
)
static
static int qexec_init_index_pseudocolumn_strings ( THREAD_ENTRY thread_p,
char **  father_index,
int *  len_father_index,
char **  son_index,
int *  len_son_index 
)
static

Definition at line 16463 of file query_executor.c.

References CONNECTBY_TUPLE_INDEX_STRING_MEM, db_private_alloc, ER_OUT_OF_VIRTUAL_MEMORY, NO_ERROR, and NULL.

Referenced by qexec_execute_connect_by().

Here is the caller graph for this function:

static SCAN_CODE qexec_init_next_partition ( THREAD_ENTRY thread_p,
ACCESS_SPEC_TYPE spec 
)
static

Definition at line 7570 of file query_executor.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ACCESS_METHOD_SEQUENTIAL, ACCESS_METHOD_SEQUENTIAL_PAGE_SCAN, ACCESS_METHOD_SEQUENTIAL_RECORD_INFO, ACCESS_SPEC_CLS_OID, ACCESS_SPEC_HFID, scan_attrs::attr_cache, cls_spec_node::attrids_key, cls_spec_node::attrids_pred, cls_spec_node::attrids_range, cls_spec_node::attrids_rest, indx_info::btid, access_spec_node::btid, cls_spec_node::cache_key, heap_page_scan_id::cache_page_info, cls_spec_node::cache_pred, cls_spec_node::cache_range, heap_scan_id::cache_recordinfo, cls_spec_node::cache_reserved, cls_spec_node::cache_rest, heap_scan_id::caches_inited, indx_scan_id::caches_inited, hybrid_node::cls_node, cls_spec_node::cls_output_val_list, cls_spec_node::cls_regu_list_key, cls_spec_node::cls_regu_list_pred, cls_spec_node::cls_regu_list_range, cls_spec_node::cls_regu_list_reserved, cls_spec_node::cls_regu_list_rest, cls_spec_node::cls_regu_val_list, COPY_OID, error(), heap_attrinfo_end(), HEAP_PAGE_INFO_COUNT, HEAP_RECORD_INFO_COUNT, HFID_COPY, i, access_spec_node::indexptr, IS_ANY_INDEX_ACCESS, indx_scan_id::key_attrs, indx_scan_id::key_pred, access_spec_node::next, NO_ERROR, NULL, cls_spec_node::num_attrs_key, cls_spec_node::num_attrs_pred, cls_spec_node::num_attrs_range, cls_spec_node::num_attrs_rest, pr_clear_value(), heap_scan_id::pred_attrs, indx_scan_id::pred_attrs, scan_pred::pred_expr, qexec_reset_pred_expr(), qexec_reset_regu_variable_list(), xasl_state::query_id, indx_scan_id::range_attrs, indx_scan_id::range_pred, scan_pred::regu_list, heap_scan_id::rest_attrs, indx_scan_id::rest_attrs, access_spec_node::s, access_spec_node::s_dbval, S_END, S_ERROR, S_HEAP_PAGE_SCAN, S_HEAP_SCAN, S_HEAP_SCAN_RECORD_INFO, S_SUCCESS, scan_close_scan(), scan_end_scan(), scan_open_class_attr_scan(), scan_open_heap_page_scan(), scan_open_heap_scan(), scan_open_index_scan(), scan_start_scan(), heap_scan_id::scancache_inited, access_spec_node::single_fetch, TARGET_CLASS, TARGET_CLASS_ATTR, access_spec_node::type, xasl_state::vd, access_spec_node::where_key, access_spec_node::where_pred, and access_spec_node::where_range.

Referenced by qexec_next_scan_block().

Here is the caller graph for this function:

static int qexec_init_upddel_ehash_files ( THREAD_ENTRY thread_p,
XASL_NODE buildlist 
)
static
static ANALYTIC_STATE * qexec_initialize_analytic_state ( THREAD_ENTRY thread_p,
ANALYTIC_STATE analytic_state,
ANALYTIC_TYPE a_func_list,
SORT_LIST sort_list,
REGU_VARIABLE_LIST  a_regu_list,
VAL_LIST a_val_list,
OUTPTR_LIST a_outptr_list,
OUTPTR_LIST a_outptr_list_interm,
bool  is_last_run,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_VALUE_TYPE_LIST type_list,
QFILE_TUPLE_RECORD tplrec 
)
static
static GROUPBY_STATE * qexec_initialize_groupby_state ( GROUPBY_STATE gbstate,
SORT_LIST groupby_list,
PRED_EXPR having_pred,
PRED_EXPR grbynum_pred,
DB_VALUE grbynum_val,
int  grbynum_flag,
XASL_NODE eptr_list,
AGGREGATE_TYPE g_agg_list,
REGU_VARIABLE_LIST  g_regu_list,
VAL_LIST g_val_list,
OUTPTR_LIST g_outptr_list,
REGU_VARIABLE_LIST  g_hk_regu_list,
bool  with_rollup,
int  hash_eligible,
AGGREGATE_HASH_CONTEXT agg_hash_context,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_VALUE_TYPE_LIST type_list,
QFILE_TUPLE_RECORD tplrec 
)
static

Definition at line 3475 of file query_executor.c.

References groupby_state::agg_hash_context, recdes::area_size, assert, xasl_node::buildlist, BUILDLIST_PROC, groupby_state::composite_lock, groupby_state::current_key, recdes::data, DB_PAGESIZE, db_private_alloc, qfile_tuple_value_position::dom, qfile_tuple_value_type_list::domp, groupby_state::eptr_list, ER_FAILED, groupby_state::g_hk_regu_list, buildlist_proc_node::g_hkey_size, groupby_state::g_outptr_list, groupby_state::g_output_agg_list, groupby_state::g_regu_list, groupby_state::g_val_list, groupby_state::gby_rec, groupby_state::grbynum_flag, groupby_state::grbynum_pred, groupby_state::grbynum_val, groupby_state::hash_eligible, groupby_state::having_pred, i, groupby_state::input_recs, groupby_state::input_scan, groupby_state::input_tpl, groupby_state::key_info, recdes::length, sort_list::next, NO_ERROR, NULL, groupby_state::output_file, groupby_state::output_tplrec, cubquery::aggregate_hash_context::part_list_id, sort_list::pos_descr, qfile_tuple_value_position::pos_no, xasl_node::proc, qexec_gby_init_group_dim(), qfile_allocate_sort_list(), qfile_free_sort_list(), qfile_initialize_sort_key_info(), sort_list::s_nulls, sort_list::s_order, qfile_tuple_record::size, cubquery::aggregate_hash_context::sort_key, groupby_state::state, qfile_tuple_record::tpl, recdes::type, xasl_node::type, qfile_list_id::type_list, groupby_state::upd_del_class_cnt, VPID_SET_NULL, groupby_state::with_rollup, groupby_state::xasl, and groupby_state::xasl_state.

Referenced by qexec_groupby(), and qexec_groupby_index().

Here is the caller graph for this function:

static SCAN_CODE qexec_intprt_fnc ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec,
XASL_SCAN_FNC_PTR  next_scan_fnc 
)
static

Definition at line 7780 of file query_executor.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ACCESS_SPEC_FLAG_FOR_UPDATE, cubxasl::aggregate_list_node::accumulator, xasl_node::after_join_pred, buildvalue_proc_node::agg_list, ARG_FILE_LINE, assert, xasl_node::bptr_list, xasl_node::buildlist, BUILDLIST_PROC, xasl_node::buildvalue, BUILDVALUE_PROC, hybrid_node::cls_node, cls_spec_node::cls_regu_list_pred, xasl_node::connect_by_ptr, CTE_CURR_ITERATION_LAST_TUPLE, CTE_CURRENT_SCAN_READ_TUPLE, cubxasl::aggregate_accumulator::curr_cnt, xasl_node::curr_spec, xasl_node::dptr_list, ER_CTE_MAX_RECURSION_REACHED, ER_ERROR_SEVERITY, er_set(), error(), eval_pred(), xasl_node::fetch, fetch_proc_node::fetch_res, cubxasl::aggregate_list_node::flag_agg_optimize, access_spec_node::flags, xasl_node::fptr_list, cubxasl::aggregate_list_node::function, buildlist_proc_node::g_agg_list, xasl_node::if_pred, access_spec_node::indexptr, xasl_node::instnum_flag, xasl_node::instnum_pred, xasl_node::instnum_val, buildvalue_proc_node::is_always_false, xasl_node::max_iterations, cubxasl::aggregate_list_node::next, access_spec_node::next, xasl_node::next, xasl_node::next_scan_on, NO_ERROR, NULL, prm_get_bool_value(), PRM_ID_OPTIMIZER_ENABLE_AGGREGATE_OPTIMIZATION, xasl_node::proc, PT_COUNT_STAR, qexec_clear_all_lists(), qexec_clear_head_lists(), qexec_end_one_iteration(), qexec_eval_instnum_pred(), qexec_evaluate_aggregates_optimize(), qexec_execute_mainblock(), qexec_execute_obj_fetch(), qexec_next_scan_block_iterations(), qexec_update_connect_by_lists(), access_spec_node::s, S_END, S_ERROR, S_LIST_SCAN, S_SELECT, S_SUCCESS, S_UPDATE, SCAN_IS_INDEX_COVERED, SCAN_IS_INDEX_MRO, scan_next_scan(), xasl_node::scan_ptr, scan_reset_scan_block(), xasl_node::spec_list, TARGET_LIST, access_spec_node::type, xasl_node::type, indx_info::use_iss, V_ERROR, V_TRUE, V_UNKNOWN, xasl_state::vd, access_spec_node::where_pred, XASL_HAS_CONNECT_BY, XASL_INSTNUM_FLAG_SCAN_LAST_STOP, XASL_INSTNUM_FLAG_SCAN_STOP, XASL_IS_FLAGED, XASL_LINK_TO_REGU_VARIABLE, and XASL_NEED_SINGLE_TUPLE_SCAN.

Referenced by qexec_execute_mainblock_internal().

Here is the caller graph for this function:

static QFILE_LIST_ID * qexec_merge_list_outer ( THREAD_ENTRY thread_p,
SCAN_ID outer_sid,
SCAN_ID inner_sid,
QFILE_LIST_MERGE_INFO merge_infop,
PRED_EXPR other_outer_join_pred,
XASL_STATE xasl_state,
int  ls_flag 
)
static
static UPDDEL_MVCC_COND_REEVAL * qexec_mvcc_cond_reev_set_scan_order ( XASL_NODE aptr,
UPDDEL_MVCC_COND_REEVAL reev_classes,
int  num_reev_classes,
UPDDEL_CLASS_INFO classes,
int  num_classes 
)
static
static SCAN_CODE qexec_next_merge_block ( THREAD_ENTRY thread_p,
ACCESS_SPEC_TYPE **  spec 
)
static

Definition at line 6843 of file query_executor.c.

References access_spec_node::next, NO_ERROR, NULL, QEXEC_EMPTY_ACCESS_SPEC_SCAN, S_END, S_ERROR, S_SUCCESS, scan_end_scan(), scan_next_scan_block(), and scan_start_scan().

Referenced by qexec_merge_fnc().

Here is the caller graph for this function:

static SCAN_CODE qexec_next_scan_block_iterations ( THREAD_ENTRY thread_p,
XASL_NODE xasl 
)
static
static int qexec_oid_of_duplicate_key_update ( THREAD_ENTRY thread_p,
HEAP_SCANCACHE **  pruned_partition_scan_cache,
HEAP_SCANCACHE scan_cache,
HEAP_CACHE_ATTRINFO attr_info,
HEAP_CACHE_ATTRINFO index_attr_info,
const HEAP_IDX_ELEMENTS_INFO idx_info,
int  needs_pruning,
PRUNING_CONTEXT pcontext,
OID unique_oid,
int  op_type 
)
static
static int qexec_open_scan ( THREAD_ENTRY thread_p,
ACCESS_SPEC_TYPE curr_spec,
VAL_LIST val_list,
VAL_DESCR vd,
bool  force_select_lock,
int  fixed,
int  grouped,
bool  iscan_oid_order,
SCAN_ID s_id,
QUERY_ID  query_id,
SCAN_OPERATION_TYPE  scan_op_type,
bool  scan_immediately_stop,
bool p_mvcc_select_lock_needed 
)
static

Definition at line 6442 of file query_executor.c.

References access_spec_node::access, ACCESS_METHOD_INDEX, ACCESS_METHOD_INDEX_KEY_INFO, ACCESS_METHOD_INDEX_NODE_INFO, ACCESS_METHOD_SEQUENTIAL, ACCESS_METHOD_SEQUENTIAL_PAGE_SCAN, ACCESS_METHOD_SEQUENTIAL_RECORD_INFO, ACCESS_SPEC_CLS_OID, ACCESS_SPEC_CONNECT_BY_LIST_ID, ACCESS_SPEC_FLAG_FOR_UPDATE, ACCESS_SPEC_HFID, ACCESS_SPEC_LIST_ID, ACCESS_SPEC_METHOD_LIST_ID, ACCESS_SPEC_METHOD_SIG_LIST, ACCESS_SPEC_RLIST_VALPTR_LIST, ACCESS_SPEC_SET_PTR, ACCESS_SPEC_SET_REGU_LIST, ACCESS_SPEC_XASL_NODE, ARG_FILE_LINE, showstmt_spec_node::arg_list, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, cls_spec_node::attrids_key, cls_spec_node::attrids_pred, cls_spec_node::attrids_range, cls_spec_node::attrids_rest, cls_spec_node::cache_key, cls_spec_node::cache_pred, cls_spec_node::cache_range, cls_spec_node::cache_reserved, cls_spec_node::cache_rest, hybrid_node::cls_node, cls_spec_node::cls_output_val_list, cls_spec_node::cls_regu_list_key, cls_spec_node::cls_regu_list_pred, cls_spec_node::cls_regu_list_range, cls_spec_node::cls_regu_list_reserved, cls_spec_node::cls_regu_list_rest, cls_spec_node::cls_regu_val_list, DB_PARTITIONED_CLASS, db_private_free, ER_ERROR_SEVERITY, ER_QPROC_INVALID_XASLNODE, er_set(), access_spec_node::flags, list_spec_node::hash_list_scan_yn, access_spec_node::indexptr, hybrid_node::list_node, list_spec_node::list_regu_list_build, list_spec_node::list_regu_list_pred, list_spec_node::list_regu_list_probe, list_spec_node::list_regu_list_rest, mvcc_is_mvcc_disabled_class(), NO_ERROR, NULL, cls_spec_node::num_attrs_key, cls_spec_node::num_attrs_pred, cls_spec_node::num_attrs_range, cls_spec_node::num_attrs_rest, OID_CACHE_COLLATION_CLASS_ID, OID_CACHE_HA_APPLY_INFO_CLASS_ID, oid_check_cached_class_oid(), oid_is_serial(), perfmon_inc_stat(), access_spec_node::pruning_type, PSTAT_QM_NUM_ISCANS, qexec_prune_spec(), access_spec_node::s, access_spec_node::s_dbval, S_DELETE, S_HEAP_PAGE_SCAN, S_HEAP_SCAN, S_HEAP_SCAN_RECORD_INFO, S_INDX_KEY_INFO_SCAN, S_INDX_NODE_INFO_SCAN, S_INDX_SCAN, S_UPDATE, scan_id_struct::scan_immediately_stop, scan_open_class_attr_scan(), scan_open_heap_page_scan(), scan_open_heap_scan(), scan_open_index_key_info_scan(), scan_open_index_node_info_scan(), scan_open_index_scan(), scan_open_json_table_scan(), scan_open_list_scan(), scan_open_method_scan(), scan_open_set_scan(), scan_open_showstmt_scan(), scan_open_values_scan(), showstmt_spec_node::show_type, hybrid_node::showstmt_node, access_spec_node::single_fetch, TARGET_CLASS, TARGET_CLASS_ATTR, TARGET_JSON_TABLE, TARGET_LIST, TARGET_METHOD, TARGET_REGUVAL_LIST, TARGET_SET, TARGET_SHOWSTMT, access_spec_node::type, access_spec_node::where_key, access_spec_node::where_pred, and access_spec_node::where_range.

Referenced by qexec_execute_connect_by(), qexec_execute_delete(), qexec_execute_insert(), qexec_execute_mainblock_internal(), qexec_execute_update(), and qexec_merge_listfiles().

Here is the caller graph for this function:

static int qexec_orderby_distinct ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
QUERY_OPTIONS  option,
XASL_STATE xasl_state 
)
static
static int qexec_orderby_distinct_by_sorting ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
QUERY_OPTIONS  option,
XASL_STATE xasl_state 
)
static

Definition at line 3187 of file query_executor.c.

References buildlist_proc_node::a_eval_list, buildlist_proc_node::a_outptr_list, xasl_node::buildlist, BUILDLIST_PROC, db_private_alloc, db_private_free_and_init, qfile_tuple_value_position::dom, qfile_tuple_value_type_list::domp, ER_FAILED, error(), buildlist_proc_node::g_outptr_list, GOTO_EXIT_ON_ERROR, buildlist_proc_node::groupby_list, i, access_spec_node::indexptr, xasl_node::list_id, regu_variable_list_node::next, sort_list::next, NO_ERROR, NO_SORT_LIMIT, NULL, ordbynum_info::ordbynum_flag, xasl_node::ordbynum_flag, ordbynum_info::ordbynum_pos, ordbynum_info::ordbynum_pos_cnt, ordbynum_info::ordbynum_pred, xasl_node::ordbynum_pred, ordbynum_info::ordbynum_val, xasl_node::ordbynum_val, xasl_node::orderby_list, xasl_node::outptr_list, sort_list::pos_descr, qfile_tuple_value_position::pos_no, xasl_node::proc, Q_DISTINCT, qexec_fill_sort_limit(), qexec_ordby_put_next(), qexec_resolve_domains_on_sort_list(), qfile_allocate_sort_list(), QFILE_FLAG_ALL, QFILE_FLAG_DISTINCT, QFILE_FLAG_RESULT_FILE, qfile_free_sort_list(), qfile_is_sort_list_covered(), QFILE_SET_FLAG, qfile_sort_list_with_func(), ordbynum_info::reserved, S_ASC, S_DESC, sort_list::s_nulls, S_NULLS_FIRST, S_NULLS_LAST, sort_list::s_order, qfile_list_id::sort_list, xasl_node::spec_list, xasl_node::type, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, TYPE_ORDERBY_NUM, indx_info::use_desc_index, valptr_list_node::valptrp, regu_variable_list_node::value, XASL_IS_FLAGED, ordbynum_info::xasl_state, XASL_TO_BE_CACHED, and XASL_TOP_MOST_XASL.

Referenced by qexec_orderby_distinct().

Here is the caller graph for this function:

static int qexec_remove_duplicates_for_replace ( THREAD_ENTRY thread_p,
HEAP_SCANCACHE scan_cache,
HEAP_CACHE_ATTRINFO attr_info,
HEAP_CACHE_ATTRINFO index_attr_info,
const HEAP_IDX_ELEMENTS_INFO idx_info,
int  op_type,
int  pruning_type,
PRUNING_CONTEXT pcontext,
int *  removed_count 
)
static
static void qexec_replace_prior_regu_vars ( THREAD_ENTRY thread_p,
REGU_VARIABLE regu,
XASL_NODE xasl 
)
static
static void qexec_reset_pseudocolumns_val_pointers ( DB_VALUE level_valp,
DB_VALUE isleaf_valp,
DB_VALUE iscycle_valp,
DB_VALUE parent_pos_valp,
DB_VALUE index_valp 
)
static

Definition at line 16755 of file query_executor.c.

References pr_clear_value().

Referenced by qexec_execute_connect_by().

Here is the caller graph for this function:

static void qexec_reset_regu_variable ( REGU_VARIABLE var)
static
static void qexec_reset_regu_variable_list ( REGU_VARIABLE_LIST  list)
static

Definition at line 7398 of file query_executor.c.

References regu_variable_list_node::next, NULL, qexec_reset_regu_variable(), and regu_variable_list_node::value.

Referenced by qexec_init_next_partition(), and qexec_reset_regu_variable().

Here is the caller graph for this function:

static int qexec_resolve_domains_for_aggregation ( THREAD_ENTRY thread_p,
AGGREGATE_TYPE agg_p,
XASL_STATE xasl_state,
QFILE_TUPLE_RECORD tplrec,
REGU_VARIABLE_LIST  regu_list,
int *  resolved 
)
static

Definition at line 18520 of file query_executor.c.

References cubxasl::aggregate_list_node::accumulator, ARG_FILE_LINE, assert, db_change_private_heap(), DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, DB_DOUBLE_DECIMAL_PRECISION, DB_IS_NULL, db_make_double(), DB_MAX_NUMERIC_PRECISION, DB_TYPE_BIGINT, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DATETIMELTZ, DB_TYPE_DATETIMETZ, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_TIMESTAMPLTZ, DB_TYPE_TIMESTAMPTZ, DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, db_value_domain_init(), DB_VALUE_DOMAIN_TYPE, DB_VALUE_SCALE, DB_VALUE_TYPE, cubxasl::aggregate_list_node::domain, DOMAIN_COMPATIBLE, ER_ARG_CAN_NOT_BE_CASTED_TO_DESIRED_DOMAIN, ER_ERROR_SEVERITY, ER_FAILED, er_set(), error(), F_BENCHMARK, fcode_get_uppercase_name(), fetch_peek_dbval(), fetch_val_list(), cubxasl::aggregate_list_node::function, cubxasl::aggregate_list_node::next, NO_ERROR, NULL, cubxasl::aggregate_list_node::operands, cubxasl::aggregate_list_node::opr_dbtype, pr_clear_value(), PT_AGG_BIT_AND, PT_AGG_BIT_OR, PT_AGG_BIT_XOR, PT_AVG, PT_COUNT, PT_COUNT_STAR, PT_CUME_DIST, PT_GROUP_CONCAT, PT_GROUPBY_NUM, PT_JSON_ARRAYAGG, PT_JSON_OBJECTAGG, PT_MAX, PT_MEDIAN, PT_MIN, PT_PERCENT_RANK, PT_PERCENTILE_CONT, PT_PERCENTILE_DISC, PT_STDDEV, PT_STDDEV_POP, PT_STDDEV_SAMP, PT_SUM, PT_VAR_POP, PT_VAR_SAMP, PT_VARIANCE, REGU_VARIABLE_CLEAR_AT_CLONE_DECACHE, REGU_VARIABLE_IS_FLAGED(), tp_domain::scale, TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION_FLAG, tp_domain_resolve(), tp_domain_resolve_default(), tp_domain_resolve_value(), TP_DOMAIN_TYPE, tp_Double_domain, tp_Integer_domain, TP_IS_CHAR_TYPE, TP_IS_NUMERIC_TYPE, tp_Json_domain, tp_Null_domain, tp_value_cast(), qfile_tuple_record::tpl, TYPE_CONSTANT, TYPE_DBVAL, TYPE_FUNC, TYPE_INARITH, cubxasl::aggregate_accumulator::value, regu_variable_list_node::value, cubxasl::aggregate_accumulator::value2, and xasl_state::vd.

Referenced by qexec_end_one_iteration().

Here is the caller graph for this function:

static void qexec_resolve_domains_for_group_by ( BUILDLIST_PROC_NODE buildlist,
OUTPTR_LIST reference_out_list 
)
static

Definition at line 18258 of file query_executor.c.

References cubxasl::aggregate_list_node::accumulator, cubquery::aggregate_hash_context::accumulator_domains, assert, DB_DEFAULT_PRECISION, DB_DEFAULT_SCALE, db_string_put_cs_and_collation(), DB_TYPE_VARCHAR, DB_TYPE_VARIABLE, db_value_domain_init(), DB_VALUE_TYPE, cubxasl::aggregate_list_node::domain, qfile_tuple_value_type_list::domp, cubxasl::aggregate_list_node::function, buildlist_proc_node::g_agg_list, buildlist_proc_node::g_func_count, buildlist_proc_node::g_hash_eligible, buildlist_proc_node::g_hk_sort_regu_list, buildlist_proc_node::g_hkey_size, buildlist_proc_node::g_outptr_list, buildlist_proc_node::g_regu_list, buildlist_proc_node::g_val_list, buildlist_proc_node::groupby_list, i, if(), cubquery::aggregate_hash_context::key_domains, cubxasl::aggregate_list_node::next, qproc_db_value_list::next, regu_variable_list_node::next, NULL, cubxasl::aggregate_list_node::operands, cubxasl::aggregate_list_node::opr_dbtype, cubquery::aggregate_hash_context::part_list_id, PT_AGG_BIT_AND, PT_AGG_BIT_OR, PT_AGG_BIT_XOR, PT_AVG, PT_COUNT, PT_GROUP_CONCAT, PT_JSON_ARRAYAGG, PT_JSON_OBJECTAGG, PT_MAX, PT_MIN, PT_STDDEV, PT_STDDEV_POP, PT_STDDEV_SAMP, PT_SUM, PT_VAR_POP, PT_VAR_SAMP, PT_VARIANCE, qexec_resolve_domains_on_sort_list(), QPROC_IS_INTERPOLATION_FUNC, cubquery::aggregate_hash_context::sorted_part_list_id, TP_DOMAIN_CODESET, TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION, TP_DOMAIN_COLLATION_FLAG, tp_domain_resolve_default(), TP_DOMAIN_TYPE, tp_Integer_domain, tp_Null_domain, TP_TYPE_HAS_COLLATION, TYPE_CONSTANT, qfile_list_id::type_list, TYPE_POSITION, qproc_db_value_list::val, val_list_node::valp, valptr_list_node::valptrp, cubxasl::aggregate_accumulator::value, and regu_variable_list_node::value.

Referenced by qexec_groupby().

Here is the caller graph for this function:

int qexec_start_mainblock_iterations ( THREAD_ENTRY thread_p,
xasl_node xasl,
xasl_state xasl_state 
)

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().

Here is the caller graph for this function:

static BH_CMP_RESULT qexec_topn_compare ( const void *  left,
const void *  right,
BH_CMP_ARG  arg 
)
static

Definition at line 24022 of file query_executor.c.

References BH_EQ, cmp, sort_list::next, NULL, sort_list::pos_descr, qfile_tuple_value_position::pos_no, and qexec_topn_cmpval().

Referenced by qexec_setup_topn_proc().

Here is the caller graph for this function:

static int qexec_topn_tuples_to_list_id ( THREAD_ENTRY thread_p,
XASL_NODE xasl,
XASL_STATE xasl_state,
bool  is_final 
)
static
static void qexec_update_btree_unique_stats_info ( THREAD_ENTRY thread_p,
multi_index_unique_stats info,
const HEAP_SCANCACHE scan_cache 
)
static

Definition at line 9477 of file query_executor.c.

References assert, heap_scancache::m_index_stats, and NULL.

Referenced by qexec_process_unique_stats(), and qexec_upddel_setup_current_class().

Here is the caller graph for this function:

static int qexec_upddel_mvcc_set_filters ( THREAD_ENTRY thread_p,
XASL_NODE aptr_list,
UPDDEL_MVCC_COND_REEVAL mvcc_reev_class,
OID class_oid 
)
static
static ACCESS_SPEC_TYPE * query_multi_range_opt_check_specs ( THREAD_ENTRY thread_p,
XASL_NODE xasl 
)
static
static REGU_VARIABLE * replace_null_arith ( REGU_VARIABLE regu_var,
DB_VALUE set_dbval 
)
static

Definition at line 15017 of file query_executor.c.

References NULL, and replace_null_dbval().

Referenced by replace_null_dbval().

Here is the caller graph for this function:

static REGU_VARIABLE * replace_null_dbval ( REGU_VARIABLE regu_var,
DB_VALUE set_dbval 
)
static

Definition at line 15054 of file query_executor.c.

References NULL, replace_null_arith(), TYPE_DBVAL, TYPE_INARITH, and TYPE_OUTARITH.

Referenced by replace_null_arith().

Here is the caller graph for this function: