CUBRID Engine  latest
scan_manager.c File Reference
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "jansson.h"
#include "error_manager.h"
#include "heap_file.h"
#include "fetch.h"
#include "list_file.h"
#include "set_scan.h"
#include "system_parameter.h"
#include "btree_load.h"
#include "perf_monitor.h"
#include "query_manager.h"
#include "query_evaluator.h"
#include "query_opfunc.h"
#include "query_reevaluation.hpp"
#include "regu_var.hpp"
#include "locator_sr.h"
#include "log_lsa.hpp"
#include "object_primitive.h"
#include "object_representation.h"
#include "dbtype.h"
#include "xasl_predicate.hpp"
#include "xasl.h"

Go to the source code of this file.

Classes

struct  iss_range_details
 
struct  rop_range_struct
 

Macros

#define pthread_mutex_init(a, b)
 
#define pthread_mutex_destroy(a)
 
#define pthread_mutex_lock(a)   0
 
#define pthread_mutex_unlock(a)
 
#define UT_CAST_TO_NULL_HEAP_OID(hfidp, oidp)
 
#define GET_NTH_OID(oid_setp, n)   ((OID *)((OID *)(oid_setp) + (n)))
 
#define SCAN_ISCAN_OID_BUF_LIST_DEFAULT_SIZE   10
 

Typedefs

typedef struct iss_range_details ISS_RANGE_DETAILS
 
typedef int QPROC_KEY_VAL_FU(KEY_VAL_RANGE *key_vals, int key_cnt)
 
typedef SCAN_CODE(* QP_SCAN_FUNC) (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 

Enumerations

enum  ROP_TYPE {
  ROP_NA, ROP_EQ, ROP_GE, ROP_GT,
  ROP_GT_INF, ROP_GT_ADJ, ROP_LE, ROP_LT,
  ROP_LT_INF, ROP_LT_ADJ
}
 
enum  OBJECT_GET_STATUS { OBJ_GET_WITHOUT_LOCK = 0, OBJ_REPEAT_GET_WITH_LOCK = 1, OBJ_GET_WITH_LOCK_COMPLETE = 2 }
 

Functions

static void scan_init_scan_pred (SCAN_PRED *scan_pred_p, regu_variable_list_node *regu_list, PRED_EXPR *pred_expr, PR_EVAL_FNC pr_eval_fnc)
 
static void scan_init_scan_attrs (SCAN_ATTRS *scan_attrs_p, int num_attrs, ATTR_ID *attr_ids, HEAP_CACHE_ATTRINFO *attr_cache)
 
static int scan_init_indx_coverage (THREAD_ENTRY *thread_p, int coverage_enabled, valptr_list_node *output_val_list, regu_variable_list_node *regu_val_list, VAL_DESCR *vd, QUERY_ID query_id, int max_key_len, int func_index_col_id, INDX_COV *indx_cov)
 
static int scan_alloc_oid_list (BTREE_ISCAN_OID_LIST **oid_list_p)
 
static int scan_alloc_iscan_oid_buf_list (BTREE_ISCAN_OID_LIST **oid_list)
 
static void scan_free_iscan_oid_buf_list (BTREE_ISCAN_OID_LIST *oid_list)
 
static void rop_to_range (RANGE *range, ROP_TYPE left, ROP_TYPE right)
 
static void range_to_rop (ROP_TYPE *left, ROP_TYPE *rightk, RANGE range)
 
static ROP_TYPE compare_val_op (DB_VALUE *val1, ROP_TYPE op1, DB_VALUE *val2, ROP_TYPE op2, int num_index_term)
 
static int key_val_compare (const void *p1, const void *p2)
 
static int eliminate_duplicated_keys (KEY_VAL_RANGE *key_vals, int key_cnt)
 
static int merge_key_ranges (KEY_VAL_RANGE *key_vals, int key_cnt)
 
static int reverse_key_list (KEY_VAL_RANGE *key_vals, int key_cnt)
 
static int check_key_vals (KEY_VAL_RANGE *key_vals, int key_cnt, QPROC_KEY_VAL_FU *chk_fn)
 
static int scan_dbvals_to_midxkey (THREAD_ENTRY *thread_p, DB_VALUE *retval, bool *indexal, TP_DOMAIN *btree_domainp, int num_term, REGU_VARIABLE *func, VAL_DESCR *vd, int key_minmax, bool is_iss, DB_VALUE *fetched_values)
 
static int scan_regu_key_to_index_key (THREAD_ENTRY *thread_p, KEY_RANGE *key_ranges, KEY_VAL_RANGE *key_val_range, INDX_SCAN_ID *iscan_id, TP_DOMAIN *btree_domainp, VAL_DESCR *vd)
 
static int scan_get_index_oidset (THREAD_ENTRY *thread_p, SCAN_ID *s_id, DB_BIGINT *key_limit_upper, DB_BIGINT *key_limit_lower)
 
static void scan_init_scan_id (SCAN_ID *scan_id, bool force_select_lock, SCAN_OPERATION_TYPE scan_op_type, int fixed, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd)
 
static int scan_init_index_key_limit (THREAD_ENTRY *thread_p, INDX_SCAN_ID *isidp, KEY_INFO *key_infop, VAL_DESCR *vd)
 
static SCAN_CODE scan_next_scan_local (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_heap_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_heap_page_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_class_attr_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_index_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_index_key_info_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_index_node_info_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_index_lookup_heap (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, INDX_SCAN_ID *isidp, FILTER_INFO *data_filter, TRAN_ISOLATION isolation)
 
static SCAN_CODE scan_next_list_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_showstmt_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_set_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_json_table_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_value_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_method_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_handle_single_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id, QP_SCAN_FUNC next_scan)
 
static SCAN_CODE scan_prev_scan_local (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static void resolve_domains_on_list_scan (LLIST_SCAN_ID *llsidp, val_list_node *ref_val_list)
 
static void resolve_domain_on_regu_operand (REGU_VARIABLE *regu_var, val_list_node *ref_val_list, QFILE_TUPLE_VALUE_TYPE_LIST *p_type_list)
 
static int scan_init_multi_range_optimization (THREAD_ENTRY *thread_p, MULTI_RANGE_OPT *multi_range_opt, bool use_range_opt, int max_size)
 
static int scan_dump_key_into_tuple (THREAD_ENTRY *thread_p, INDX_SCAN_ID *iscan_id, DB_VALUE *key, OID *oid, QFILE_TUPLE_RECORD *tplrec)
 
static int scan_save_range_details (INDX_SCAN_ID *isidp_src, ISS_RANGE_DETAILS *rdp_dest)
 
static int scan_restore_range_details (ISS_RANGE_DETAILS *rdp_src, INDX_SCAN_ID *isidp_dest)
 
static SCAN_CODE scan_get_next_iss_value (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, INDX_SCAN_ID *isidp)
 
static SCAN_CODE call_get_next_index_oidset (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, INDX_SCAN_ID *isidp, bool should_go_to_next_value)
 
static int scan_key_compare (DB_VALUE *val1, DB_VALUE *val2, int num_index_term)
 
static SCAN_CODE scan_build_hash_list_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_next_hash_list_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
static SCAN_CODE scan_hash_probe_next (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, QFILE_TUPLE *tuple)
 
static HASH_METHOD check_hash_list_scan (LLIST_SCAN_ID *llsidp, int *val_cnt, int hash_list_scan_yn)
 
int scan_init_iss (INDX_SCAN_ID *isidp)
 
void scan_init_index_scan (INDX_SCAN_ID *isidp, struct btree_iscan_oid_list *oid_list, MVCC_SNAPSHOT *mvcc_snapshot)
 
void scan_init_filter_info (FILTER_INFO *filter_info_p, SCAN_PRED *scan_pred, SCAN_ATTRS *scan_attrs, val_list_node *val_list, VAL_DESCR *val_descr, OID *class_oid, int btree_num_attrs, ATTR_ID *btree_attr_ids, int *num_vstr_ptr, ATTR_ID *vstr_ids)
 
static void scan_free_oid_list (BTREE_ISCAN_OID_LIST *oid_list_p)
 
int scan_open_heap_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, bool mvcc_select_lock_needed, SCAN_OPERATION_TYPE scan_op_type, int fixed, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, OID *cls_oid, HFID *hfid, regu_variable_list_node *regu_list_pred, PRED_EXPR *pr, regu_variable_list_node *regu_list_rest, int num_attrs_pred, ATTR_ID *attrids_pred, HEAP_CACHE_ATTRINFO *cache_pred, int num_attrs_rest, ATTR_ID *attrids_rest, HEAP_CACHE_ATTRINFO *cache_rest, SCAN_TYPE scan_type, DB_VALUE **cache_recordinfo, regu_variable_list_node *regu_list_recordinfo)
 
int scan_open_heap_page_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, val_list_node *val_list, VAL_DESCR *vd, OID *cls_oid, HFID *hfid, PRED_EXPR *pr, SCAN_TYPE scan_type, DB_VALUE **cache_page_info, regu_variable_list_node *regu_list_page_info)
 
int scan_open_class_attr_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, OID *cls_oid, HFID *hfid, regu_variable_list_node *regu_list_pred, PRED_EXPR *pr, regu_variable_list_node *regu_list_rest, int num_attrs_pred, ATTR_ID *attrids_pred, HEAP_CACHE_ATTRINFO *cache_pred, int num_attrs_rest, ATTR_ID *attrids_rest, HEAP_CACHE_ATTRINFO *cache_rest)
 
int scan_open_index_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, bool mvcc_select_lock_needed, SCAN_OPERATION_TYPE scan_op_type, int fixed, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, indx_info *indx_info, OID *cls_oid, HFID *hfid, regu_variable_list_node *regu_list_key, PRED_EXPR *pr_key, regu_variable_list_node *regu_list_pred, PRED_EXPR *pr, regu_variable_list_node *regu_list_rest, PRED_EXPR *pr_range, regu_variable_list_node *regu_list_range, valptr_list_node *output_val_list, regu_variable_list_node *regu_val_list, int num_attrs_key, ATTR_ID *attrids_key, HEAP_CACHE_ATTRINFO *cache_key, int num_attrs_pred, ATTR_ID *attrids_pred, HEAP_CACHE_ATTRINFO *cache_pred, int num_attrs_rest, ATTR_ID *attrids_rest, HEAP_CACHE_ATTRINFO *cache_rest, int num_attrs_range, ATTR_ID *attrids_range, HEAP_CACHE_ATTRINFO *cache_range, bool iscan_oid_order, QUERY_ID query_id)
 
int scan_open_index_key_info_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, val_list_node *val_list, VAL_DESCR *vd, indx_info *indx_info, OID *cls_oid, HFID *hfid, PRED_EXPR *pr, valptr_list_node *output_val_list, bool iscan_oid_order, QUERY_ID query_id, DB_VALUE **key_info_values, regu_variable_list_node *key_info_regu_list)
 
int scan_open_index_node_info_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, val_list_node *val_list, VAL_DESCR *vd, indx_info *indx_info, PRED_EXPR *pr, DB_VALUE **node_info_values, regu_variable_list_node *node_info_regu_list)
 
int scan_open_list_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, QFILE_LIST_ID *list_id, regu_variable_list_node *regu_list_pred, PRED_EXPR *pr, regu_variable_list_node *regu_list_rest, regu_variable_list_node *regu_list_build, regu_variable_list_node *regu_list_probe, int hash_list_scan_yn)
 
int scan_open_showstmt_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, PRED_EXPR *pr, SHOWSTMT_TYPE show_type, regu_variable_list_node *arg_list)
 
int scan_open_values_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, valptr_list_node *valptr_list)
 
int scan_open_set_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, REGU_VARIABLE *set_ptr, regu_variable_list_node *regu_list_pred, PRED_EXPR *pr)
 
int scan_open_json_table_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, PRED_EXPR *pr)
 
int scan_open_method_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id, int grouped, QPROC_SINGLE_FETCH single_fetch, DB_VALUE *join_dbval, val_list_node *val_list, VAL_DESCR *vd, QFILE_LIST_ID *list_id, method_sig_list *meth_sig_list)
 
int scan_start_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
SCAN_CODE scan_reset_scan_block (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
SCAN_CODE scan_next_scan_block (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
void scan_end_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
void scan_close_scan (THREAD_ENTRY *thread_p, SCAN_ID *scan_id)
 
SCAN_CODE scan_next_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
SCAN_CODE scan_prev_scan (THREAD_ENTRY *thread_p, SCAN_ID *s_id)
 
void scan_save_scan_pos (SCAN_ID *s_id, SCAN_POS *scan_pos)
 
SCAN_CODE scan_jump_scan_pos (THREAD_ENTRY *thread_p, SCAN_ID *s_id, SCAN_POS *scan_pos)
 
int scan_initialize (void)
 
void scan_finalize (void)
 

Variables

static int rv
 
struct rop_range_struct rop_range_table []
 
static const int rop_range_table_size = sizeof (rop_range_table) / sizeof (struct rop_range_struct)
 
static BTREE_ISCAN_OID_LISTscan_Iscan_oid_buf_list = NULL
 
static int scan_Iscan_oid_buf_list_count = 0
 

Macro Definition Documentation

#define GET_NTH_OID (   oid_setp,
 
)    ((OID *)((OID *)(oid_setp) + (n)))

Definition at line 73 of file scan_manager.c.

Referenced by scan_next_index_scan().

#define pthread_mutex_destroy (   a)

Definition at line 55 of file scan_manager.c.

#define pthread_mutex_init (   a,
 
)

Definition at line 54 of file scan_manager.c.

#define pthread_mutex_lock (   a)    0

Definition at line 56 of file scan_manager.c.

Referenced by scan_alloc_iscan_oid_buf_list(), and scan_free_iscan_oid_buf_list().

#define pthread_mutex_unlock (   a)

Definition at line 57 of file scan_manager.c.

Referenced by scan_alloc_iscan_oid_buf_list(), and scan_free_iscan_oid_buf_list().

#define SCAN_ISCAN_OID_BUF_LIST_DEFAULT_SIZE   10

Definition at line 139 of file scan_manager.c.

Referenced by scan_initialize().

#define UT_CAST_TO_NULL_HEAP_OID (   hfidp,
  oidp 
)
Value:
do \
{ \
(oidp)->pageid = NULL_PAGEID; \
(oidp)->volid = (hfidp)->vfid.volid; \
(oidp)->slotid = NULL_SLOTID; \
} \
while (0)
#define NULL_SLOTID
#define NULL_PAGEID
while(1)
Definition: cnvlex.c:816

Definition at line 64 of file scan_manager.c.

Referenced by scan_open_class_attr_scan(), scan_open_heap_scan(), and scan_start_scan().

Typedef Documentation

Definition at line 81 of file scan_manager.c.

typedef SCAN_CODE(* QP_SCAN_FUNC) (THREAD_ENTRY *thread_p, SCAN_ID *s_id)

Definition at line 92 of file scan_manager.c.

typedef int QPROC_KEY_VAL_FU(KEY_VAL_RANGE *key_vals, int key_cnt)

Definition at line 91 of file scan_manager.c.

Enumeration Type Documentation

Enumerator
OBJ_GET_WITHOUT_LOCK 
OBJ_REPEAT_GET_WITH_LOCK 
OBJ_GET_WITH_LOCK_COMPLETE 

Definition at line 5100 of file scan_manager.c.

enum ROP_TYPE
Enumerator
ROP_NA 
ROP_EQ 
ROP_GE 
ROP_GT 
ROP_GT_INF 
ROP_GT_ADJ 
ROP_LE 
ROP_LT 
ROP_LT_INF 
ROP_LT_ADJ 

Definition at line 94 of file scan_manager.c.

Function Documentation

static SCAN_CODE call_get_next_index_oidset ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
INDX_SCAN_ID isidp,
bool  should_go_to_next_value 
)
static
static int check_key_vals ( KEY_VAL_RANGE key_vals,
int  key_cnt,
QPROC_KEY_VAL_FU chk_fn 
)
static

Definition at line 1468 of file scan_manager.c.

References iss_range_details::key_cnt, and key_val_compare().

Referenced by scan_get_index_oidset().

Here is the caller graph for this function:

static ROP_TYPE compare_val_op ( DB_VALUE val1,
ROP_TYPE  op1,
DB_VALUE val2,
ROP_TYPE  op2,
int  num_index_term 
)
static

Definition at line 1208 of file scan_manager.c.

References DB_EQ, DB_GT, DB_LT, rc, ROP_EQ, ROP_GE, ROP_GT, ROP_GT_ADJ, ROP_GT_INF, ROP_LE, ROP_LT, ROP_LT_ADJ, ROP_LT_INF, ROP_NA, and scan_key_compare().

Referenced by merge_key_ranges().

Here is the caller graph for this function:

static int eliminate_duplicated_keys ( KEY_VAL_RANGE key_vals,
int  key_cnt 
)
static
static int key_val_compare ( const void *  p1,
const void *  p2 
)
static

Definition at line 1285 of file scan_manager.c.

References assert_release, and scan_key_compare().

Referenced by check_key_vals().

Here is the caller graph for this function:

static int merge_key_ranges ( KEY_VAL_RANGE key_vals,
int  key_cnt 
)
static
static void range_to_rop ( ROP_TYPE left,
ROP_TYPE rightk,
RANGE  range 
)
static

Definition at line 1119 of file scan_manager.c.

References i, rop_range_struct::left, rop_range_struct::right, ROP_NA, rop_range_table, and rop_range_table_size.

Referenced by merge_key_ranges().

Here is the caller graph for this function:

static void resolve_domain_on_regu_operand ( REGU_VARIABLE regu_var,
val_list_node ref_val_list,
QFILE_TUPLE_VALUE_TYPE_LIST p_type_list 
)
static

Definition at line 7443 of file scan_manager.c.

References assert, qfile_tuple_value_type_list::domp, qproc_db_value_list::next, NULL, TYPE_CONSTANT, qproc_db_value_list::val, and val_list_node::valp.

Referenced by resolve_domains_on_list_scan().

Here is the caller graph for this function:

static int reverse_key_list ( KEY_VAL_RANGE key_vals,
int  key_cnt 
)
static

Definition at line 7321 of file scan_manager.c.

References i, and iss_range_details::key_cnt.

Referenced by scan_get_index_oidset().

Here is the caller graph for this function:

static void rop_to_range ( RANGE range,
ROP_TYPE  left,
ROP_TYPE  right 
)
static

Definition at line 1094 of file scan_manager.c.

References i, NA_NA, rop_range_struct::range, rop_range_table, and rop_range_table_size.

Referenced by merge_key_ranges().

Here is the caller graph for this function:

static int scan_alloc_iscan_oid_buf_list ( BTREE_ISCAN_OID_LIST **  oid_list)
static

Definition at line 1003 of file scan_manager.c.

References assert, ASSERT_ERROR, btree_iscan_oid_list::next_list, NO_ERROR, NULL, pthread_mutex_lock, pthread_mutex_unlock, rv, scan_alloc_oid_list(), and scan_Iscan_oid_buf_list.

Referenced by scan_open_index_scan().

Here is the caller graph for this function:

static int scan_alloc_oid_list ( BTREE_ISCAN_OID_LIST **  oid_list_p)
static

Definition at line 946 of file scan_manager.c.

References ARG_FILE_LINE, assert, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), free_and_init, ISCAN_OID_BUFFER_CAPACITY, NO_ERROR, NULL, and OR_OID_SIZE.

Referenced by scan_alloc_iscan_oid_buf_list(), and scan_initialize().

Here is the caller graph for this function:

void scan_close_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id 
)

Definition at line 4719 of file scan_manager.c.

References showstmt_scan_id::arg_values, indx_scan_id::bt_attr_ids, indx_scan_id::bt_attrs_prefix_length, indx_scan_id::bt_num_attrs, multi_range_opt::buffer, indx_scan_id::copy_buf, db_private_free_and_init, qfile_tuple_value_type_list::domp, indx_scan_id::fetched_values, hash_list_scan::hash_list_scan_yn, hash_list_scan::hash_table, llist_scan_id::hlsid, i, range_opt_item::index_value, indx_scan_id::indx_cov, multi_range_opt::is_desc_order, scan_id_struct::isid, indx_scan_id::key_vals, indx_cov::list_id, llist_scan_id::list_id, scan_id_struct::llsid, indx_cov::lsid, method_close_scan(), mht_clear_hls(), mht_destroy_hls(), mht_dump_hls(), indx_scan_id::multi_range_opt, NULL, indx_scan_id::oid_list, showstmt_scan_id::out_values, qfile_list_id::page_cnt, pr_clear_value(), qdata_free_hscan_entry(), qdata_free_hscan_key(), qdata_print_hash_scan_entry(), qfile_close_list(), qfile_close_scan(), qfile_destroy_list(), QFILE_FREE_AND_INIT_LIST_ID, scan_id_struct::s, S_CLASS_ATTR_SCAN, S_CLOSED, S_HEAP_PAGE_SCAN, S_HEAP_SCAN, S_HEAP_SCAN_RECORD_INFO, S_INDX_SCAN, S_JSON_TABLE_SCAN, S_LIST_SCAN, S_METHOD_SCAN, S_SET_SCAN, S_SHOWSTMT_SCAN, S_VALUES_SCAN, va_scan_id::scan_buf, scan_free_iscan_oid_buf_list(), multi_range_opt::size, multi_range_opt::sort_att_idx, multi_range_opt::sort_col_dom, scan_id_struct::status, scan_id_struct::stsid, hash_list_scan::temp_key, hash_list_scan::temp_new_key, multi_range_opt::top_n_items, qfile_tuple_record::tpl, indx_cov::tplrec, multi_range_opt::tplrec, qfile_list_id::tuple_cnt, scan_id_struct::type, indx_cov::type_list, scan_id_struct::vaid, hash_scan_key::val_count, and indx_scan_id::vstr_ids.

Referenced by qexec_clear_xasl(), qexec_close_scan(), qexec_init_next_partition(), and qexec_merge_fnc().

Here is the caller graph for this function:

void scan_finalize ( void  )

Definition at line 7294 of file scan_manager.c.

References btree_iscan_oid_list::next_list, NULL, scan_free_oid_list(), and scan_Iscan_oid_buf_list.

Referenced by qmgr_finalize(), and scan_initialize().

Here is the caller graph for this function:

static void scan_free_iscan_oid_buf_list ( BTREE_ISCAN_OID_LIST oid_list)
static

Definition at line 1062 of file scan_manager.c.

References MAX_NTRANS, btree_iscan_oid_list::next_list, pthread_mutex_lock, pthread_mutex_unlock, rv, scan_free_oid_list(), and scan_Iscan_oid_buf_list.

Referenced by scan_close_scan(), and scan_open_index_scan().

Here is the caller graph for this function:

static void scan_free_oid_list ( BTREE_ISCAN_OID_LIST oid_list_p)
static

Definition at line 985 of file scan_manager.c.

References assert, free_and_init, NULL, and btree_iscan_oid_list::oidp.

Referenced by scan_finalize(), and scan_free_iscan_oid_buf_list().

Here is the caller graph for this function:

static int scan_get_index_oidset ( THREAD_ENTRY thread_p,
SCAN_ID s_id,
DB_BIGINT key_limit_upper,
DB_BIGINT key_limit_lower 
)
static

Definition at line 2194 of file scan_manager.c.

References ARG_FILE_LINE, assert, assert_release, indx_scan_id::bt_attr_ids, indx_scan_id::bt_attrs_prefix_length, indx_scan_id::bt_num_attrs, indx_scan_id::bt_scan, indx_info::btid, btree_scan::btid_int, BTREE_END_OF_SCAN, btree_prepare_bts(), btree_range_scan(), btree_range_scan_select_visible_oids(), check_key_vals(), indx_scan_id::cls_oid, multi_range_opt::cnt, indx_scan_id::curr_keyno, db_make_null(), db_private_free_and_init, eliminate_duplicated_keys(), er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_XASLNODE, er_set(), indx_info::func_idx_col_id, filter_info::func_idx_col_id, GE_INF, GE_LE, indx_info::groupby_desc, indx_info::groupby_skip, GT_INF, i, range_opt_item::index_value, indx_scan_id::indx_cov, indx_scan_id::indx_info, INF_INF, INF_LE, INF_LT, key_val_range::is_truncated, indx_scan_id::iscan_oid_order, scan_id_struct::isid, key_val_range::key1, key_val_range::key2, indx_scan_id::key_attrs, key_info::key_cnt, iss_range_details::key_cnt, indx_scan_id::key_cnt, indx_info::key_info, key_info::key_limit_reset, indx_scan_id::key_limit_upper, indx_scan_id::key_pred, key_info::key_ranges, iss_range_details::key_ranges, btid_int::key_type, indx_scan_id::key_vals, merge_key_ranges(), indx_scan_id::multi_range_opt, btree_scan::n_oids_read_last_iteration, NA_NA, indx_scan_id::need_count_only, regu_variable_list_node::next, NO_ERROR, NULL, key_val_range::num_index_term, indx_scan_id::num_vstr, oid_compare(), indx_scan_id::oid_list, btree_iscan_oid_list::oidp, indx_scan_id::oids_count, indx_info::orderby_desc, indx_info::orderby_skip, p, pr_clear_value(), PRIM_SET_NULL(), btree_scan::qualified_keys, scan_stats::qualified_keys, R_KEY, R_KEYLIST, R_RANGE, R_RANGELIST, key_val_range::range, key_range::range, indx_info::range_type, btree_scan::read_keys, scan_stats::read_keys, indx_cov::regu_val_list, reverse_key_list(), scan_id_struct::s, scan_init_filter_info(), scan_init_index_key_limit(), scan_regu_key_to_index_key(), scan_id_struct::scan_stats, thread_is_on_trace(), multi_range_opt::top_n_items, multi_range_opt::use, scan_id_struct::val_list, regu_variable_list_node::value, scan_id_struct::vd, and indx_scan_id::vstr_ids.

Referenced by call_get_next_index_oidset(), scan_get_next_iss_value(), and scan_next_scan_block().

Here is the caller graph for this function:

static SCAN_CODE scan_get_next_iss_value ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
INDX_SCAN_ID isidp 
)
static

Definition at line 384 of file scan_manager.c.

References ARG_FILE_LINE, assert_release, indx_scan_id::bt_scan, btree_scan::btid_int, indx_scan_id::curr_keyno, index_skip_scan::current_op, db_value::data, DB_IS_NULL, db_make_null(), DB_TYPE_MIDXKEY, DB_VALUE_DOMAIN_TYPE, regu_variable_node::domain, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), regu_variable_node::regu_data_value::funcp, GT_INF, i, INF_INF, INF_LT, tp_domain::is_desc, scan_id_struct::isid, indx_scan_id::iss, ISS_OP_DO_RANGE_SEARCH, ISS_OP_GET_FIRST_KEY, ISS_OP_NONE, ISS_OP_SEARCH_NEXT_DISTINCT_KEY, key_range::key1, key_range::key2, iss_range_details::key_cnt, iss_range_details::key_pred, iss_range_details::key_ranges, btid_int::key_type, db_data::midxkey, NO_ERROR, NULL, indx_scan_id::oids_count, function_node::operand, iss_range_details::part_key_desc, pr_clear_value(), pr_clone_value(), scan_pred::pr_eval_fnc, pr_midxkey_get_element_nocopy(), scan_pred::pred_expr, R_RANGE, key_range::range, iss_range_details::range_type, scan_pred::regu_list, scan_id_struct::s, S_END, S_ERROR, S_SUCCESS, scan_get_index_oidset(), scan_restore_range_details(), scan_save_range_details(), tp_domain::setdomain, index_skip_scan::skipped_range, tp_domain_resolve_default(), TP_DOMAIN_TYPE, regu_variable_node::type, TYPE_DBVAL, TYPE_FUNC, index_skip_scan::use, btree_scan::use_desc_index, regu_variable_node::value, and regu_variable_list_node::value.

Referenced by call_get_next_index_oidset().

Here is the caller graph for this function:

static void scan_init_scan_attrs ( SCAN_ATTRS scan_attrs_p,
int  num_attrs,
ATTR_ID attr_ids,
HEAP_CACHE_ATTRINFO attr_cache 
)
static

Definition at line 646 of file scan_manager.c.

References assert, scan_attrs::attr_cache, scan_attrs::attr_ids, NULL, and scan_attrs::num_attrs.

Referenced by scan_open_class_attr_scan(), scan_open_heap_scan(), and scan_open_index_scan().

Here is the caller graph for this function:

static int scan_key_compare ( DB_VALUE val1,
DB_VALUE val2,
int  num_index_term 
)
static
static SCAN_CODE scan_next_heap_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id 
)
static

Definition at line 5114 of file scan_manager.c.

References assert, scan_attrs::attr_cache, heap_scan_id::cache_recordinfo, heap_scan_id::cls_oid, COPY, COPY_OID, heap_scan_id::curr_oid, recdes::data, DB_NEED_CLEAR, scan_id_struct::direction, er_clear(), er_errid(), ER_HEAP_UNKNOWN_OBJECT, eval_data_filter(), fetch_val_list(), cubquery::mvcc_reev_data::filter_result, scan_id_struct::fixed, scan_id_struct::grouped, heap_attrinfo_read_dbvalues(), heap_does_exist(), heap_next(), heap_next_record_info(), heap_prev(), heap_prev_record_info(), heap_scanrange_next(), heap_scan_id::hfid, scan_id_struct::hsid, cubquery::upddel_mvcc_cond_reeval::init(), LK_COND_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_lock_and_get_object_with_evaluation(), lock_hold_object_instant(), lock_object(), lock_unlock_object_donot_move_to_non2pl(), LOG_FIND_THREAD_TRAN_INDEX, LOG_WARNING_IF_DELETED, logtb_find_isolation(), LSA_COPY(), mvcc_is_mvcc_disabled_class(), scan_id_struct::mvcc_select_lock_needed, regu_variable_list_node::next, NO_ERROR, NULL, NULL_CHN, NULL_LOCK, OBJ_GET_WITH_LOCK_COMPLETE, OBJ_GET_WITHOUT_LOCK, OBJ_REPEAT_GET_WITH_LOCK, oid_is_serial(), OLD_PAGE, p, heap_scancache::page_watcher, PEEK, pgbuf_get_lsa(), pgbuf_get_vpid(), PGBUF_LATCH_READ, pgbuf_ordered_fix, pgbuf_ordered_unfix, pgbuf_page_has_changed(), pgbuf_watcher::pgptr, pr_clear_value(), heap_scan_id::pred_attrs, QPROC_NOT_QUALIFIED, QPROC_QUALIFIED, QPROC_QUALIFIED_OR_NOT, cubquery::mvcc_scan_reev_data::qualification, scan_id_struct::qualification, scan_stats::qualified_rows, scan_stats::read_rows, RECDES_INITIALIZER, heap_scan_id::recordinfo_regu_list, scan_pred::regu_list, heap_scan_id::rest_attrs, heap_scan_id::rest_regu_list, scan_id_struct::s, S_DELETE, S_DOESNT_EXIST, S_END, S_ERROR, S_FORWARD, S_HEAP_SCAN, S_HEAP_SCAN_RECORD_INFO, S_LOCK, S_SUCCESS, S_UPDATE, heap_scan_id::scan_cache, scan_init_filter_info(), scan_id_struct::scan_op_type, heap_scan_id::scan_pred, filter_info::scan_pred, heap_scan_id::scan_range, scan_id_struct::scan_stats, cubquery::mvcc_scan_reev_data::set_filters(), cubquery::mvcc_reev_data::set_scan_reevaluation(), TRAN_READ_COMMITTED, scan_id_struct::type, V_ERROR, V_FALSE, V_TRUE, filter_info::val_list, scan_id_struct::val_list, regu_variable_list_node::value, scan_id_struct::vd, VPID_ISNULL, VPID_SET_NULL, and X_LOCK.

Referenced by scan_next_scan_local().

Here is the caller graph for this function:

static SCAN_CODE scan_next_index_lookup_heap ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
INDX_SCAN_ID isidp,
FILTER_INFO data_filter,
TRAN_ISOLATION  isolation 
)
static

Definition at line 6004 of file scan_manager.c.

References ARG_FILE_LINE, assert, ASSERT_ERROR, scan_attrs::attr_cache, indx_info::btid, indx_scan_id::cls_oid, indx_scan_id::curr_oidp, recdes::data, er_clear(), er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_LC_INCONSISTENT_BTREE_ENTRY_TYPE2, er_set(), eval_data_filter(), fetch_val_list(), vfid::fileid, cubquery::mvcc_reev_data::filter_result, scan_id_struct::fixed, free_and_init, heap_attrinfo_read_dbvalues(), heap_does_exist(), heap_get_class_name(), heap_get_indexinfo_of_btid(), heap_get_visible_version(), indx_scan_id::indx_cov, indx_scan_id::indx_info, cubquery::upddel_mvcc_cond_reeval::init(), LK_COND_LOCK, LK_GRANTED, LK_UNCOND_LOCK, locator_lock_and_get_object_with_evaluation(), lock_hold_object_instant(), lock_object(), lock_unlock_object_donot_move_to_non2pl(), LOG_FIND_THREAD_TRAN_INDEX, LOG_WARNING_IF_DELETED, logtb_find_isolation(), indx_cov::lsid, indx_scan_id::multi_range_opt, mvcc_is_mvcc_disabled_class(), scan_id_struct::mvcc_select_lock_needed, NO_ERROR, NULL, NULL_CHN, NULL_LOCK, oid_is_serial(), OID_ISNULL, heap_scancache::page_watcher, db_identifier::pageid, PEEK, pgbuf_ordered_unfix, pgbuf_watcher::pgptr, qfile_scan_list_next(), cubquery::mvcc_scan_reev_data::qualification, scan_id_struct::qualification, RECDES_INITIALIZER, indx_scan_id::rest_attrs, indx_scan_id::rest_regu_list, btid::root_pageid, S_DELETE, S_DOESNT_EXIST, S_END, S_ERROR, S_LOCK, S_SNAPSHOT_NOT_SATISFIED, S_SUCCESS, S_SUCCESS_CHN_UPTODATE, S_UPDATE, indx_scan_id::scan_cache, SCAN_IS_INDEX_COVERED, scan_id_struct::scan_op_type, cubquery::mvcc_scan_reev_data::set_filters(), cubquery::mvcc_reev_data::set_scan_reevaluation(), db_identifier::slotid, TRAN_READ_COMMITTED, update_logical_result(), multi_range_opt::use, V_ERROR, V_FALSE, V_TRUE, scan_id_struct::val_list, scan_id_struct::vd, btid::vfid, vfid::volid, db_identifier::volid, and X_LOCK.

Referenced by scan_next_index_scan().

Here is the caller graph for this function:

static SCAN_CODE scan_next_index_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id 
)
static

Definition at line 5660 of file scan_manager.c.

References ARG_FILE_LINE, assert, assert_release, indx_scan_id::bt_scan, BTREE_END_OF_SCAN, call_get_next_index_oidset(), indx_scan_id::cls_oid, multi_range_opt::cnt, indx_scan_id::curr_oidno, indx_scan_id::curr_oidp, index_skip_scan::current_op, scan_stats::data_qualified_rows, scan_id_struct::direction, DISK_INVALID, scan_stats::elapsed_lookup, ER_ERROR_SEVERITY, ER_QPROC_UNKNOWN_CRSPOS, er_set(), fetch_val_list(), GET_NTH_OID, scan_id_struct::grouped, HEAP_ISVALID_OID, range_opt_item::index_value, indx_scan_id::indx_cov, indx_scan_id::indx_info, range_opt_item::inst_oid, scan_id_struct::isid, indx_scan_id::iss, ISS_OP_NONE, indx_scan_id::key_limit_upper, scan_stats::key_qualified_rows, indx_cov::list_id, logtb_find_current_isolation(), indx_cov::lsid, indx_scan_id::multi_range_opt, scan_stats::multi_range_opt, scan_id_struct::mvcc_select_lock_needed, indx_scan_id::need_count_only, NO_ERROR, NULL, OID_ISNULL, indx_scan_id::oid_list, btree_iscan_oid_list::oidp, indx_scan_id::oids_count, PEEK, perfmon_inc_stat(), scan_id_struct::position, indx_scan_id::pred_attrs, PSTAT_BT_NUM_COVERED, PSTAT_BT_NUM_NONCOVERED, qfile_close_list(), qfile_close_scan(), qfile_destroy_list(), QFILE_FREE_AND_INIT_LIST_ID, qfile_open_list(), qfile_open_list_scan(), qfile_scan_list_next(), indx_cov::query_id, R_KEY, R_KEYLIST, R_RANGE, R_RANGELIST, indx_info::range_type, indx_cov::regu_val_list, scan_id_struct::s, S_AFTER, S_BEFORE, S_DOESNT_EXIST, S_END, S_ERROR, S_FORWARD, S_ON, S_SUCCESS, scan_dump_key_into_tuple(), scan_init_filter_info(), SCAN_IS_INDEX_COVERED, scan_next_index_lookup_heap(), indx_scan_id::scan_pred, scan_id_struct::scan_stats, qfile_tuple_record::size, multi_range_opt::sort_att_idx, thread_is_on_trace(), multi_range_opt::top_n_items, qfile_tuple_record::tpl, multi_range_opt::tplrec, TSC_ADD_TIMEVAL, tsc_elapsed_time_usec(), tsc_getticks(), indx_cov::type_list, multi_range_opt::use, index_skip_scan::use, scan_id_struct::val_list, and scan_id_struct::vd.

Referenced by scan_next_scan_local().

Here is the caller graph for this function:

static SCAN_CODE scan_next_json_table_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id 
)
static

Definition at line 6729 of file scan_manager.c.

References ASSERT_ERROR, scan_id_struct::jtid, cubscan::json_table::scanner::next_scan(), NO_ERROR, scan_id_struct::s, and S_ERROR.

Referenced by scan_next_scan_local().

Here is the caller graph for this function:

SCAN_CODE scan_next_scan ( THREAD_ENTRY thread_p,
SCAN_ID s_id 
)
int scan_open_class_attr_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
OID cls_oid,
HFID hfid,
regu_variable_list_node regu_list_pred,
PRED_EXPR pr,
regu_variable_list_node regu_list_rest,
int  num_attrs_pred,
ATTR_ID attrids_pred,
HEAP_CACHE_ATTRINFO cache_pred,
int  num_attrs_rest,
ATTR_ID attrids_rest,
HEAP_CACHE_ATTRINFO cache_rest 
)
int scan_open_heap_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
bool  mvcc_select_lock_needed,
SCAN_OPERATION_TYPE  scan_op_type,
int  fixed,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
OID cls_oid,
HFID hfid,
regu_variable_list_node regu_list_pred,
PRED_EXPR pr,
regu_variable_list_node regu_list_rest,
int  num_attrs_pred,
ATTR_ID attrids_pred,
HEAP_CACHE_ATTRINFO cache_pred,
int  num_attrs_rest,
ATTR_ID attrids_rest,
HEAP_CACHE_ATTRINFO cache_rest,
SCAN_TYPE  scan_type,
DB_VALUE **  cache_recordinfo,
regu_variable_list_node regu_list_recordinfo 
)
int scan_open_index_key_info_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
val_list_node val_list,
VAL_DESCR vd,
indx_info indx_info,
OID cls_oid,
HFID hfid,
PRED_EXPR pr,
valptr_list_node output_val_list,
bool  iscan_oid_order,
QUERY_ID  query_id,
DB_VALUE **  key_info_values,
regu_variable_list_node key_info_regu_list 
)

Definition at line 3386 of file scan_manager.c.

References assert, indx_scan_id::bt_attr_ids, indx_scan_id::bt_num_attrs, indx_scan_id::bt_scan, indx_scan_id::bt_type, indx_info::btid, btree_scan::btid_int, btree_get_root_header(), btree_glean_root_header_info(), BTREE_INIT_SCAN, indx_scan_id::cls_oid, indx_scan_id::copy_buf, indx_scan_id::copy_buf_len, COPY_OID, indx_scan_id::curr_keyno, indx_scan_id::curr_oidno, indx_scan_id::curr_oidp, db_private_alloc, db_private_free_and_init, DB_TYPE_NULL, qfile_tuple_value_type_list::domp, er_errid(), ER_FAILED, eval_fnc(), heap_get_indexinfo_of_btid(), indx_scan_id::hfid, indx_scan_id::indx_cov, indx_scan_id::indx_info, btree_scan::is_btid_int_valid, indx_scan_id::iscan_oid_order, scan_id_struct::isid, indx_scan_id::key_cnt, indx_info::key_info, indx_scan_id::key_info_regu_list, indx_scan_id::key_info_values, indx_scan_id::key_vals, indx_cov::list_id, indx_cov::lsid, btree_node_header::max_key_len, indx_scan_id::multi_range_opt, NO_ERROR, btree_root_header::node, NULL, indx_scan_id::num_vstr, indx_scan_id::oid_list, OLD_PAGE, indx_scan_id::one_range, vpid::pageid, pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, prm_get_bool_value(), PRM_ID_ORACLE_STYLE_EMPTY_STRING, QFILE_FREE_AND_INIT_LIST_ID, QPROC_NO_SINGLE_INNER, btid::root_pageid, scan_id_struct::s, S_INDX_KEY_INFO_SCAN, S_SELECT, scan_init_index_key_limit(), scan_init_indx_coverage(), scan_init_iss(), scan_init_scan_id(), scan_init_scan_pred(), indx_scan_id::scan_pred, indx_scan_id::scancache_inited, btid_int::sys_btid, qfile_tuple_record::tpl, indx_cov::tplrec, scan_id_struct::type, indx_cov::type_list, multi_range_opt::use, btid::vfid, vpid::volid, vfid::volid, and indx_scan_id::vstr_ids.

Referenced by qexec_open_scan().

Here is the caller graph for this function:

int scan_open_index_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
bool  mvcc_select_lock_needed,
SCAN_OPERATION_TYPE  scan_op_type,
int  fixed,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
indx_info indx_info,
OID cls_oid,
HFID hfid,
regu_variable_list_node regu_list_key,
PRED_EXPR pr_key,
regu_variable_list_node regu_list_pred,
PRED_EXPR pr,
regu_variable_list_node regu_list_rest,
PRED_EXPR pr_range,
regu_variable_list_node regu_list_range,
valptr_list_node output_val_list,
regu_variable_list_node regu_val_list,
int  num_attrs_key,
ATTR_ID attrids_key,
HEAP_CACHE_ATTRINFO cache_key,
int  num_attrs_pred,
ATTR_ID attrids_pred,
HEAP_CACHE_ATTRINFO cache_pred,
int  num_attrs_rest,
ATTR_ID attrids_rest,
HEAP_CACHE_ATTRINFO cache_rest,
int  num_attrs_range,
ATTR_ID attrids_range,
HEAP_CACHE_ATTRINFO cache_range,
bool  iscan_oid_order,
QUERY_ID  query_id 
)

Definition at line 3019 of file scan_manager.c.

References assert, indx_scan_id::bt_attr_ids, indx_scan_id::bt_attrs_prefix_length, indx_scan_id::bt_num_attrs, indx_scan_id::bt_scan, indx_scan_id::bt_type, indx_info::btid, btree_scan::btid_int, btree_get_root_header(), btree_glean_root_header_info(), BTREE_INIT_SCAN, btree_iscan_oid_list::capacity, indx_scan_id::cls_oid, indx_scan_id::copy_buf, indx_scan_id::copy_buf_len, COPY_OID, indx_info::coverage, scan_stats::covered_index, indx_scan_id::curr_keyno, indx_scan_id::curr_oidno, indx_scan_id::curr_oidp, DB_INT32_MAX, db_make_null(), db_private_alloc, db_private_free_and_init, DB_TYPE_MIDXKEY, DB_TYPE_NULL, DBVAL_BUFSIZE, qfile_tuple_value_type_list::domp, EQ_NA, er_errid(), ER_FAILED, eval_fnc(), indx_scan_id::fetched_values, heap_get_indexinfo_of_btid(), indx_scan_id::hfid, indx_info::ils_prefix_len, indx_scan_id::indx_cov, indx_scan_id::indx_info, btree_scan::is_btid_int_valid, ISCAN_OID_BUFFER_COUNT, indx_scan_id::iscan_oid_order, scan_id_struct::isid, indx_scan_id::key_attrs, key_info::key_cnt, indx_scan_id::key_cnt, indx_info::key_info, indx_scan_id::key_limit_lower, key_info::key_limit_reset, indx_scan_id::key_limit_upper, indx_scan_id::key_pred, key_info::key_ranges, btid_int::key_type, indx_scan_id::key_vals, indx_cov::list_id, scan_stats::loose_index_scan, indx_cov::lsid, btree_node_header::max_key_len, btree_iscan_oid_list::max_oid_cnt, indx_scan_id::multi_range_opt, scan_stats::multi_range_opt, btree_iscan_oid_list::next_list, NO_ERROR, btree_root_header::node, NULL, indx_scan_id::num_vstr, btree_iscan_oid_list::oid_cnt, indx_scan_id::oid_list, btree_iscan_oid_list::oidp, OLD_PAGE, indx_scan_id::one_range, PAGE_BTREE, vpid::pageid, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_READ, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, indx_scan_id::pred_attrs, prm_get_bool_value(), PRM_ID_ORACLE_STYLE_EMPTY_STRING, QFILE_FREE_AND_INIT_LIST_ID, QSTR_IS_ANY_CHAR_OR_BIT, key_range::range, indx_scan_id::range_attrs, indx_scan_id::range_pred, indx_scan_id::rest_attrs, indx_scan_id::rest_regu_list, btid::root_pageid, scan_id_struct::s, S_INDX_SCAN, S_SELECT, scan_alloc_iscan_oid_buf_list(), scan_free_iscan_oid_buf_list(), scan_init_index_key_limit(), scan_init_indx_coverage(), scan_init_iss(), scan_init_multi_range_optimization(), scan_init_scan_attrs(), scan_init_scan_id(), scan_init_scan_pred(), indx_scan_id::scan_pred, scan_id_struct::scan_stats, indx_scan_id::scancache_inited, btid_int::sys_btid, TP_DOMAIN_TYPE, qfile_tuple_record::tpl, indx_cov::tplrec, tp_domain::type, scan_id_struct::type, indx_cov::type_list, multi_range_opt::use, btid::vfid, vpid::volid, vfid::volid, and indx_scan_id::vstr_ids.

Referenced by qexec_init_next_partition(), and qexec_open_scan().

Here is the caller graph for this function:

int scan_open_json_table_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
PRED_EXPR pr 
)
int scan_open_method_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
QFILE_LIST_ID list_id,
method_sig_list meth_sig_list 
)

Definition at line 3989 of file scan_manager.c.

References method_open_scan(), scan_id_struct::s, S_METHOD_SCAN, S_SELECT, va_scan_id::scan_buf, scan_init_scan_id(), scan_id_struct::type, and scan_id_struct::vaid.

Referenced by qexec_open_scan().

Here is the caller graph for this function:

int scan_open_set_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
REGU_VARIABLE set_ptr,
regu_variable_list_node regu_list_pred,
PRED_EXPR pr 
)
int scan_open_values_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id,
int  grouped,
QPROC_SINGLE_FETCH  single_fetch,
DB_VALUE join_dbval,
val_list_node val_list,
VAL_DESCR vd,
valptr_list_node valptr_list 
)
SCAN_CODE scan_prev_scan ( THREAD_ENTRY thread_p,
SCAN_ID s_id 
)

Definition at line 7095 of file scan_manager.c.

References scan_handle_single_scan(), and scan_prev_scan_local().

static int scan_regu_key_to_index_key ( THREAD_ENTRY thread_p,
KEY_RANGE key_ranges,
KEY_VAL_RANGE key_val_range,
INDX_SCAN_ID iscan_id,
TP_DOMAIN btree_domainp,
VAL_DESCR vd 
)
static
void scan_save_scan_pos ( SCAN_ID s_id,
SCAN_POS scan_pos 
)
int scan_start_scan ( THREAD_ENTRY thread_p,
SCAN_ID scan_id 
)

Definition at line 4014 of file scan_manager.c.

References ARG_FILE_LINE, assert, scan_attrs::attr_cache, scan_attrs::attr_ids, index_node_scan_id::btns, BTREE_KEY_INFO_COUNT, BTREE_NODE_INFO_COUNT, BTREE_NODE_SCAN_INIT, heap_scan_id::cache_recordinfo, heap_scan_id::caches_inited, indx_scan_id::caches_inited, index_node_scan_id::caches_inited, heap_scan_id::cls_oid, indx_scan_id::cls_oid, indx_scan_id::curr_keyno, heap_scan_id::curr_oid, indx_scan_id::curr_oidno, heap_page_scan_id::curr_vpid, regu_value_list::current_value, db_make_null(), scan_id_struct::direction, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_QPROC_INVALID_XASLNODE, er_set(), scan_id_struct::fixed, scan_id_struct::grouped, heap_attrinfo_end(), heap_attrinfo_start(), HEAP_RECORD_INFO_COUNT, heap_scancache_start(), heap_scanrange_start(), heap_scan_id::hfid, indx_scan_id::hfid, scan_id_struct::hpsid, scan_id_struct::hsid, i, scan_id_struct::insid, scan_id_struct::isid, scan_id_struct::jtid, indx_scan_id::key_attrs, indx_scan_id::key_info_values, indx_scan_id::key_pred, llist_scan_id::list_id, scan_id_struct::llsid, logtb_get_mvcc_snapshot(), llist_scan_id::lsid, regu_variable_list_node::next, NO_ERROR, index_node_scan_id::node_info_values, NULL, scan_id_struct::null_fetched, scan_attrs::num_attrs, OID_IS_ROOTOID, indx_scan_id::oids_count, indx_scan_id::one_range, scan_id_struct::position, heap_scan_id::pred_attrs, indx_scan_id::pred_attrs, qfile_open_list_scan(), qfile_start_scan_fix(), scan_id_struct::qualified_block, indx_scan_id::range_attrs, indx_scan_id::range_pred, scan_pred::regu_list, regu_value_list::regu_list, regu_values_scan_id::regu_list, heap_scan_id::rest_attrs, indx_scan_id::rest_attrs, scan_id_struct::rvsid, scan_id_struct::s, S_BEFORE, S_CLASS_ATTR_SCAN, S_FORWARD, 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_STARTED, S_VALUES_SCAN, heap_scan_id::scan_cache, indx_scan_id::scan_cache, heap_scan_id::scan_range, heap_scan_id::scancache_inited, indx_scan_id::scancache_inited, heap_scan_id::scanrange_inited, set_scan_id::set, showstmt_start_scan(), scan_id_struct::single_fetched, scan_id_struct::ssid, scan_id_struct::status, scan_id_struct::type, UT_CAST_TO_NULL_HEAP_OID, regu_variable_list_node::value, and VPID_SET_NULL.

Referenced by qexec_init_next_partition(), qexec_merge_list_outer(), qexec_next_merge_block(), qexec_next_scan_block(), and scan_open_list_scan().

Here is the caller graph for this function:

Variable Documentation

const int rop_range_table_size = sizeof (rop_range_table) / sizeof (struct rop_range_struct)
static

Definition at line 130 of file scan_manager.c.

Referenced by range_to_rop(), and rop_to_range().

int rv
static

Definition at line 58 of file scan_manager.c.

Referenced by scan_alloc_iscan_oid_buf_list(), and scan_free_iscan_oid_buf_list().

BTREE_ISCAN_OID_LIST* scan_Iscan_oid_buf_list = NULL
static
int scan_Iscan_oid_buf_list_count = 0
static

Definition at line 137 of file scan_manager.c.