File scan_manager.c
FileList > cubrid > src > query > scan_manager.c
Go to the source code of this file
#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"
#include "query_hash_scan.h"
#include "statistics.h"
#include "px_heap_scan.hpp"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Attributes
Public Static Attributes
Public Functions
| Type |
Name |
| void |
scan_close_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| void |
scan_end_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| void |
scan_finalize (void)
|
| void |
scan_init_index_scan (INDX_SCAN_ID * isidp, struct btree_iscan_oid_list * oid_list, MVCC_SNAPSHOT * mvcc_snapshot)
|
| int |
scan_init_iss (INDX_SCAN_ID * isidp)
|
| int |
scan_initialize (void)
|
| SCAN_CODE |
scan_jump_scan_pos (THREAD_ENTRY * thread_p, SCAN_ID * s_id, SCAN_POS * scan_pos)
|
| SCAN_CODE |
scan_next_scan (THREAD_ENTRY * thread_p, SCAN_ID * s_id)
|
| SCAN_CODE |
scan_next_scan_block (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_dblink_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id, struct access_spec_node * spec, VAL_DESCR * vd, VAL_LIST * val_list, DBLINK_HOST_VARS * host_vars)
|
| 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_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, bool is_partition_table)
|
| 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_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, bool min_max_optimzied_scan)
|
| 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_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, bool is_read_only)
|
| 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, PL_SIGNATURE_ARRAY_TYPE * sig_array)
|
| 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_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)
|
| SCAN_CODE |
scan_prev_scan (THREAD_ENTRY * thread_p, SCAN_ID * s_id)
|
| void |
scan_print_stats_json (SCAN_ID * scan_id, json_t * scan_stats)
|
| void |
scan_print_stats_text (FILE * fp, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_reset_scan_block (THREAD_ENTRY * thread_p, SCAN_ID * s_id)
|
| 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)
|
Public Static Functions
| Type |
Name |
| 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)
|
| HASH_METHOD |
check_hash_list_scan (LLIST_SCAN_ID * llsidp, int * val_cnt, int hash_list_scan_type)
|
| int |
check_key_vals (KEY_VAL_RANGE * key_vals, int key_cnt, QPROC_KEY_VAL_FU * chk_fn)
|
| ROP_TYPE |
compare_val_op (DB_VALUE * val1, ROP_TYPE op1, DB_VALUE * val2, ROP_TYPE op2, int num_index_term)
|
| int |
eliminate_duplicated_keys (KEY_VAL_RANGE * key_vals, int key_cnt)
|
| int |
key_val_compare (const void * p1, const void * p2)
|
| int |
merge_key_ranges (KEY_VAL_RANGE * key_vals, int key_cnt)
|
| void |
range_to_rop (ROP_TYPE * left, ROP_TYPE * rightk, RANGE range)
|
| void |
resolve_domain_on_regu_operand (REGU_VARIABLE * regu_var, val_list_node * ref_val_list, QFILE_TUPLE_VALUE_TYPE_LIST * p_type_list)
|
| void |
resolve_domains_on_list_scan (LLIST_SCAN_ID * llsidp, val_list_node * ref_val_list)
|
| int |
reverse_key_list (KEY_VAL_RANGE * key_vals, int key_cnt)
|
| void |
rop_to_range (RANGE * range, ROP_TYPE left, ROP_TYPE right)
|
| int |
scan_alloc_iscan_oid_buf_list (BTREE_ISCAN_OID_LIST ** oid_list)
|
| int |
scan_alloc_oid_list (BTREE_ISCAN_OID_LIST ** oid_list_p)
|
| SCAN_CODE |
scan_build_hash_list_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| 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, TP_DOMAIN ** prebuilt_midxkey_domain)
|
| int |
scan_dump_key_into_tuple (THREAD_ENTRY * thread_p, INDX_SCAN_ID * iscan_id, DB_VALUE * key, OID * oid, QFILE_TUPLE_RECORD * tplrec)
|
| void |
scan_free_iscan_oid_buf_list (BTREE_ISCAN_OID_LIST * oid_list)
|
| void |
scan_free_oid_list (BTREE_ISCAN_OID_LIST * oid_list_p)
|
| int |
scan_get_index_oidset (THREAD_ENTRY * thread_p, SCAN_ID * s_id, DB_BIGINT * key_limit_upper, DB_BIGINT * key_limit_lower)
|
| SCAN_CODE |
scan_get_next_iss_value (THREAD_ENTRY * thread_p, SCAN_ID * scan_id, INDX_SCAN_ID * isidp)
|
| SCAN_CODE |
scan_handle_single_scan (THREAD_ENTRY * thread_p, SCAN_ID * s_id, QP_SCAN_FUNC next_scan)
|
| SCAN_CODE |
scan_hash_probe_next (THREAD_ENTRY * thread_p, SCAN_ID * scan_id, QFILE_TUPLE * tuple)
|
| int |
scan_init_index_key_limit (THREAD_ENTRY * thread_p, INDX_SCAN_ID * isidp, KEY_INFO * key_infop, VAL_DESCR * vd)
|
| 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)
|
| int |
scan_init_multi_range_optimization (THREAD_ENTRY * thread_p, MULTI_RANGE_OPT * multi_range_opt, bool use_range_opt, int max_size)
|
| void |
scan_init_scan_attrs (SCAN_ATTRS * scan_attrs_p, int num_attrs, ATTR_ID * attr_ids, HEAP_CACHE_ATTRINFO * attr_cache)
|
| 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)
|
| 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)
|
| int |
scan_key_compare (DB_VALUE * val1, DB_VALUE * val2, int num_index_term)
|
| SCAN_CODE |
scan_next_class_attr_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_dblink_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_hash_list_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_heap_page_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_heap_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_index_key_info_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| 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)
|
| SCAN_CODE |
scan_next_index_node_info_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_index_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_json_table_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_list_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_method_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_scan_local (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_set_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_showstmt_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_next_value_scan (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| SCAN_CODE |
scan_prev_scan_local (THREAD_ENTRY * thread_p, SCAN_ID * scan_id)
|
| 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, int key_range_idx)
|
| int |
scan_restore_range_details (ISS_RANGE_DETAILS * rdp_src, INDX_SCAN_ID * isidp_dest)
|
| int |
scan_save_range_details (INDX_SCAN_ID * isidp_src, ISS_RANGE_DETAILS * rdp_dest)
|
Macros
Public Types Documentation
typedef ISS_RANGE_DETAILS
typedef struct iss_range_details ISS_RANGE_DETAILS;
enum OBJECT_GET_STATUS
enum OBJECT_GET_STATUS {
OBJ_GET_WITHOUT_LOCK = 0,
OBJ_REPEAT_GET_WITH_LOCK = 1,
OBJ_GET_WITH_LOCK_COMPLETE = 2
};
typedef QPROC_KEY_VAL_FU
typedef int QPROC_KEY_VAL_FU(KEY_VAL_RANGE *key_vals, int key_cnt);
typedef QP_SCAN_FUNC
typedef SCAN_CODE(* QP_SCAN_FUNC) (THREAD_ENTRY *thread_p, SCAN_ID *s_id);
enum ROP_TYPE
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
};
Public Attributes Documentation
variable rop_range_table
struct rop_range_struct rop_range_table[];
Public Static Attributes Documentation
variable rop_range_table_size
const int rop_range_table_size;
variable scan_Iscan_oid_buf_list
BTREE_ISCAN_OID_LIST* scan_Iscan_oid_buf_list;
variable scan_Iscan_oid_buf_list_count
int scan_Iscan_oid_buf_list_count;
variable scan_Iscan_oid_buf_list_mutex
pthread_mutex_t scan_Iscan_oid_buf_list_mutex;
Public Functions Documentation
function scan_close_scan
void scan_close_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_end_scan
void scan_end_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_finalize
void scan_finalize (
void
)
function scan_init_index_scan
void scan_init_index_scan (
INDX_SCAN_ID * isidp,
struct btree_iscan_oid_list * oid_list,
MVCC_SNAPSHOT * mvcc_snapshot
)
function scan_init_iss
int scan_init_iss (
INDX_SCAN_ID * isidp
)
function scan_initialize
int scan_initialize (
void
)
function scan_jump_scan_pos
SCAN_CODE scan_jump_scan_pos (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id,
SCAN_POS * scan_pos
)
function scan_next_scan
SCAN_CODE scan_next_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id
)
function scan_next_scan_block
SCAN_CODE scan_next_scan_block (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id
)
function scan_open_class_attr_scan
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
)
function scan_open_dblink_scan
int scan_open_dblink_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id,
struct access_spec_node * spec,
VAL_DESCR * vd,
VAL_LIST * val_list,
DBLINK_HOST_VARS * host_vars
)
function scan_open_heap_page_scan
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
)
function scan_open_heap_scan
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,
bool is_partition_table
)
function scan_open_index_key_info_scan
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
)
function scan_open_index_node_info_scan
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
)
function scan_open_index_scan
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,
bool min_max_optimzied_scan
)
function scan_open_json_table_scan
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
)
function scan_open_list_scan
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,
bool is_read_only
)
function scan_open_method_scan
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,
PL_SIGNATURE_ARRAY_TYPE * sig_array
)
function scan_open_set_scan
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
)
function scan_open_showstmt_scan
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
)
function scan_open_values_scan
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
)
function scan_prev_scan
SCAN_CODE scan_prev_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id
)
function scan_print_stats_json
void scan_print_stats_json (
SCAN_ID * scan_id,
json_t * scan_stats
)
function scan_print_stats_text
void scan_print_stats_text (
FILE * fp,
SCAN_ID * scan_id
)
function scan_reset_scan_block
SCAN_CODE scan_reset_scan_block (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id
)
function scan_save_scan_pos
void scan_save_scan_pos (
SCAN_ID * s_id,
SCAN_POS * scan_pos
)
function scan_start_scan
int scan_start_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
Public Static Functions Documentation
function call_get_next_index_oidset
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
)
function check_hash_list_scan
static HASH_METHOD check_hash_list_scan (
LLIST_SCAN_ID * llsidp,
int * val_cnt,
int hash_list_scan_type
)
function check_key_vals
static int check_key_vals (
KEY_VAL_RANGE * key_vals,
int key_cnt,
QPROC_KEY_VAL_FU * chk_fn
)
function compare_val_op
static ROP_TYPE compare_val_op (
DB_VALUE * val1,
ROP_TYPE op1,
DB_VALUE * val2,
ROP_TYPE op2,
int num_index_term
)
function eliminate_duplicated_keys
static int eliminate_duplicated_keys (
KEY_VAL_RANGE * key_vals,
int key_cnt
)
function key_val_compare
static int key_val_compare (
const void * p1,
const void * p2
)
function merge_key_ranges
static int merge_key_ranges (
KEY_VAL_RANGE * key_vals,
int key_cnt
)
function range_to_rop
static void range_to_rop (
ROP_TYPE * left,
ROP_TYPE * rightk,
RANGE range
)
function resolve_domain_on_regu_operand
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
)
function resolve_domains_on_list_scan
static void resolve_domains_on_list_scan (
LLIST_SCAN_ID * llsidp,
val_list_node * ref_val_list
)
function reverse_key_list
static int reverse_key_list (
KEY_VAL_RANGE * key_vals,
int key_cnt
)
function rop_to_range
static void rop_to_range (
RANGE * range,
ROP_TYPE left,
ROP_TYPE right
)
function scan_alloc_iscan_oid_buf_list
static int scan_alloc_iscan_oid_buf_list (
BTREE_ISCAN_OID_LIST ** oid_list
)
function scan_alloc_oid_list
static int scan_alloc_oid_list (
BTREE_ISCAN_OID_LIST ** oid_list_p
)
function scan_build_hash_list_scan
static SCAN_CODE scan_build_hash_list_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_dbvals_to_midxkey
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,
TP_DOMAIN ** prebuilt_midxkey_domain
)
function scan_dump_key_into_tuple
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
)
function scan_free_iscan_oid_buf_list
static void scan_free_iscan_oid_buf_list (
BTREE_ISCAN_OID_LIST * oid_list
)
function scan_free_oid_list
static void scan_free_oid_list (
BTREE_ISCAN_OID_LIST * oid_list_p
)
function scan_get_index_oidset
static int scan_get_index_oidset (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id,
DB_BIGINT * key_limit_upper,
DB_BIGINT * key_limit_lower
)
function scan_get_next_iss_value
static SCAN_CODE scan_get_next_iss_value (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id,
INDX_SCAN_ID * isidp
)
function scan_handle_single_scan
static SCAN_CODE scan_handle_single_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * s_id,
QP_SCAN_FUNC next_scan
)
function scan_hash_probe_next
static SCAN_CODE scan_hash_probe_next (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id,
QFILE_TUPLE * tuple
)
function scan_init_index_key_limit
static int scan_init_index_key_limit (
THREAD_ENTRY * thread_p,
INDX_SCAN_ID * isidp,
KEY_INFO * key_infop,
VAL_DESCR * vd
)
function scan_init_indx_coverage
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
)
function scan_init_multi_range_optimization
static int scan_init_multi_range_optimization (
THREAD_ENTRY * thread_p,
MULTI_RANGE_OPT * multi_range_opt,
bool use_range_opt,
int max_size
)
function scan_init_scan_attrs
static void scan_init_scan_attrs (
SCAN_ATTRS * scan_attrs_p,
int num_attrs,
ATTR_ID * attr_ids,
HEAP_CACHE_ATTRINFO * attr_cache
)
function scan_init_scan_id
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
)
function scan_init_scan_pred
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
)
function scan_key_compare
static int scan_key_compare (
DB_VALUE * val1,
DB_VALUE * val2,
int num_index_term
)
function scan_next_class_attr_scan
static SCAN_CODE scan_next_class_attr_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_dblink_scan
static SCAN_CODE scan_next_dblink_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_hash_list_scan
static SCAN_CODE scan_next_hash_list_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_heap_page_scan
static SCAN_CODE scan_next_heap_page_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_heap_scan
static SCAN_CODE scan_next_heap_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_index_key_info_scan
static SCAN_CODE scan_next_index_key_info_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_index_lookup_heap
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
)
function scan_next_index_node_info_scan
static SCAN_CODE scan_next_index_node_info_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_index_scan
static SCAN_CODE scan_next_index_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_json_table_scan
static SCAN_CODE scan_next_json_table_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_list_scan
static SCAN_CODE scan_next_list_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_method_scan
static SCAN_CODE scan_next_method_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_scan_local
static SCAN_CODE scan_next_scan_local (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_set_scan
static SCAN_CODE scan_next_set_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_showstmt_scan
static SCAN_CODE scan_next_showstmt_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_next_value_scan
static SCAN_CODE scan_next_value_scan (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_prev_scan_local
static SCAN_CODE scan_prev_scan_local (
THREAD_ENTRY * thread_p,
SCAN_ID * scan_id
)
function scan_regu_key_to_index_key
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,
int key_range_idx
)
function scan_restore_range_details
static int scan_restore_range_details (
ISS_RANGE_DETAILS * rdp_src,
INDX_SCAN_ID * isidp_dest
)
function scan_save_range_details
static int scan_save_range_details (
INDX_SCAN_ID * isidp_src,
ISS_RANGE_DETAILS * rdp_dest
)
Macro Definition Documentation
define GET_NTH_OID
#define GET_NTH_OID (
oid_setp,
n
) `(( OID *)(( OID *)( oid_setp ) + (n)))`
define SCAN_ISCAN_OID_BUF_LIST_DEFAULT_SIZE
#define SCAN_ISCAN_OID_BUF_LIST_DEFAULT_SIZE `10`
define UT_CAST_TO_NULL_HEAP_OID
#define UT_CAST_TO_NULL_HEAP_OID (
hfidp,
oidp
) `/* multi line expression */`
The documentation for this class was generated from the following file cubrid/src/query/scan_manager.c