CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <search.h>
#include <stddef.h>
#include <assert.h>
#include "list_file.h"
#include "binaryheap.h"
#include "db_value_printer.hpp"
#include "dbtype.h"
#include "error_manager.h"
#include "log_append.hpp"
#include "object_primitive.h"
#include "object_representation.h"
#include "query_manager.h"
#include "query_opfunc.h"
#include "stream_to_xasl.h"
#include "thread_entry.hpp"
#include "thread_manager.hpp"
#include "xasl.h"
#include "xasl_cache.h"
Go to the source code of this file.
Classes | |
struct | qfile_cleanup_candidate |
struct | qfile_list_cache |
struct | qfile_list_cache_candidate |
union | qfile_pooled_list_cache_entry |
struct | qfile_list_cache_entry_pool |
Macros | |
#define | pthread_mutex_init(a, b) |
#define | pthread_mutex_destroy(a) |
#define | pthread_mutex_lock(a) 0 |
#define | pthread_mutex_unlock(a) |
#define | thread_sleep(a) |
#define | QFILE_CHECK_LIST_FILE_IS_CLOSED(list_id) |
#define | QFILE_DEFAULT_PAGES 4 |
#define | LS_PUT_NEXT_VPID(ptr) |
#define | FIXED_SIZE_OF_POOLED_LIST_CACHE_ENTRY 4096 |
#define | ADDITION_FOR_POOLED_LIST_CACHE_ENTRY offsetof(QFILE_POOLED_LIST_CACHE_ENTRY, s.entry) |
#define | POOLED_LIST_CACHE_ENTRY_FROM_LIST_CACHE_ENTRY(p) ((QFILE_POOLED_LIST_CACHE_ENTRY *) ((char*) p - ADDITION_FOR_POOLED_LIST_CACHE_ENTRY)) |
Typedefs | |
typedef struct qfile_cleanup_candidate | QFILE_CACHE_CLEANUP_CANDIDATE |
typedef SCAN_CODE(* | ADVANCE_FUCTION) (THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *, QFILE_TUPLE_RECORD *, QFILE_LIST_SCAN_ID *, QFILE_TUPLE_RECORD *, QFILE_TUPLE_VALUE_TYPE_LIST *) |
typedef struct qfile_list_cache | QFILE_LIST_CACHE |
typedef struct qfile_list_cache_candidate | QFILE_LIST_CACHE_CANDIDATE |
typedef union qfile_pooled_list_cache_entry | QFILE_POOLED_LIST_CACHE_ENTRY |
typedef struct qfile_list_cache_entry_pool | QFILE_LIST_CACHE_ENTRY_POOL |
Variables | |
static int | rv |
static const int | RESERVED_SIZE_FOR_LIST_CACHE_ENTRY |
static QFILE_LIST_CACHE | qfile_List_cache = { NULL, 0, 0, 0, 0, 0, 0, 0 } |
static QFILE_LIST_CACHE_CANDIDATE | qfile_List_cache_candidate = { 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, false } |
static QFILE_LIST_CACHE_ENTRY_POOL | qfile_List_cache_entry_pool = { NULL, 0, 0 } |
static LF_FREELIST | qfile_sort_list_Freelist |
static LF_ENTRY_DESCRIPTOR | qfile_sort_list_entry_desc |
int | qfile_Is_list_cache_disabled |
static int | qfile_Max_tuple_page_size |
#define ADDITION_FOR_POOLED_LIST_CACHE_ENTRY offsetof(QFILE_POOLED_LIST_CACHE_ENTRY, s.entry) |
Definition at line 125 of file list_file.c.
Referenced by qfile_allocate_list_cache_entry().
#define FIXED_SIZE_OF_POOLED_LIST_CACHE_ENTRY 4096 |
Definition at line 124 of file list_file.c.
#define LS_PUT_NEXT_VPID | ( | ptr | ) |
Definition at line 75 of file list_file.c.
Referenced by qfile_allocate_new_page(), and qfile_get_first_page().
#define POOLED_LIST_CACHE_ENTRY_FROM_LIST_CACHE_ENTRY | ( | p | ) | ((QFILE_POOLED_LIST_CACHE_ENTRY *) ((char*) p - ADDITION_FOR_POOLED_LIST_CACHE_ENTRY)) |
Definition at line 127 of file list_file.c.
Referenced by qfile_free_list_cache_entry().
#define pthread_mutex_destroy | ( | a | ) |
Definition at line 54 of file list_file.c.
#define pthread_mutex_init | ( | a, | |
b | |||
) |
Definition at line 53 of file list_file.c.
#define pthread_mutex_lock | ( | a | ) | 0 |
Definition at line 55 of file list_file.c.
#define pthread_mutex_unlock | ( | a | ) |
Definition at line 56 of file list_file.c.
#define QFILE_CHECK_LIST_FILE_IS_CLOSED | ( | list_id | ) |
Definition at line 62 of file list_file.c.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), qfile_add_tuple_to_list(), qfile_fast_intint_tuple_to_list(), qfile_fast_intval_tuple_to_list(), qfile_fast_val_tuple_to_list(), and qfile_generate_tuple_into_list().
#define QFILE_DEFAULT_PAGES 4 |
Definition at line 64 of file list_file.c.
#define thread_sleep | ( | a | ) |
Definition at line 59 of file list_file.c.
Referenced by qfile_clear_list_cache().
typedef SCAN_CODE(* ADVANCE_FUCTION) (THREAD_ENTRY *thread_p, QFILE_LIST_SCAN_ID *, QFILE_TUPLE_RECORD *, QFILE_LIST_SCAN_ID *, QFILE_TUPLE_RECORD *, QFILE_TUPLE_VALUE_TYPE_LIST *) |
Definition at line 91 of file list_file.c.
typedef struct qfile_cleanup_candidate QFILE_CACHE_CLEANUP_CANDIDATE |
Definition at line 84 of file list_file.c.
typedef struct qfile_list_cache QFILE_LIST_CACHE |
Definition at line 95 of file list_file.c.
typedef struct qfile_list_cache_candidate QFILE_LIST_CACHE_CANDIDATE |
Definition at line 108 of file list_file.c.
typedef struct qfile_list_cache_entry_pool QFILE_LIST_CACHE_ENTRY_POOL |
Definition at line 148 of file list_file.c.
typedef union qfile_pooled_list_cache_entry QFILE_POOLED_LIST_CACHE_ENTRY |
Definition at line 130 of file list_file.c.
int qfile_add_item_to_list | ( | THREAD_ENTRY * | thread_p, |
char * | item_p, | ||
int | item_size, | ||
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 2330 of file list_file.c.
References HL::align(), DB_ALIGN, ER_FAILED, free_and_init, qfile_tuple_descriptor::item, qfile_tuple_descriptor::item_size, MAX_ALIGNMENT, NO_ERROR, NULL, qfile_add_tuple_to_list(), qfile_generate_tuple_into_list(), QFILE_MAX_TUPLE_SIZE_IN_PAGE, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, T_SINGLE_BOUND_ITEM, qfile_list_id::tpl_descr, qfile_tuple_descriptor::tpl_size, and V_BOUND.
Referenced by qdata_evaluate_aggregate_list(), and qdata_evaluate_analytic_func().
|
static |
Definition at line 2515 of file list_file.c.
References qfile_add_tuple_to_list().
Referenced by qfile_combine_two_list().
int qfile_add_overflow_tuple_to_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
PAGE_PTR | ovf_tuple_page_p, | ||
QFILE_LIST_ID * | input_list_id_p | ||
) |
Definition at line 2032 of file list_file.c.
References DONT_FREE, ER_FAILED, FREE, qfile_list_id::last_offset, qfile_list_id::last_pgptr, NO_ERROR, NULL, qfile_add_tuple_to_list_id(), qfile_allocate_new_ovf_page(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_GET_OVERFLOW_VPID, QFILE_GET_TUPLE_LENGTH, qfile_Max_tuple_page_size, QFILE_PAGE_HEADER_SIZE, QFILE_PUT_OVERFLOW_VPID_NULL, qfile_set_dirty_page(), qmgr_free_old_page_and_init, qmgr_get_old_page(), and qfile_list_id::tfile_vfid.
Referenced by qexec_ordby_put_next(), and qfile_put_next_sort_item().
int qfile_add_tuple_get_pos_in_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
QFILE_TUPLE | tuple, | ||
QFILE_TUPLE_POSITION * | tuple_pos | ||
) |
Definition at line 5989 of file list_file.c.
References DONT_FREE, ER_FAILED, FREE, qfile_list_id::last_offset, qfile_list_id::last_pgptr, qfile_list_id::last_vpid, NO_ERROR, NULL, qfile_tuple_position::offset, qfile_add_tuple_to_list_id(), qfile_allocate_new_ovf_page(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_GET_TUPLE_LENGTH, qfile_Max_tuple_page_size, QFILE_PAGE_HEADER_SIZE, QFILE_PUT_OVERFLOW_VPID_NULL, qfile_set_dirty_page(), qfile_list_id::tfile_vfid, qfile_tuple_position::tpl, qfile_tuple_position::tplno, qfile_list_id::tuple_cnt, and qfile_tuple_position::vpid.
Referenced by qexec_execute_connect_by().
int qfile_add_tuple_to_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
QFILE_TUPLE | tuple | ||
) |
Definition at line 1511 of file list_file.c.
References assert, DB_PAGESIZE, DONT_FREE, ER_FAILED, FREE, qfile_list_id::last_offset, qfile_list_id::last_pgptr, NO_ERROR, NULL, qfile_add_tuple_to_list_id(), qfile_allocate_new_ovf_page(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_GET_TUPLE_LENGTH, qfile_Max_tuple_page_size, QFILE_PAGE_HEADER_SIZE, QFILE_PUT_OVERFLOW_VPID_NULL, qfile_set_dirty_page(), and qfile_list_id::tfile_vfid.
Referenced by qdata_save_agg_hentry_to_list(), qdata_save_agg_htable_to_list(), qexec_analytic_finalize_group(), qexec_end_buildvalueblock_iterations(), qexec_end_one_iteration(), qexec_gby_finalize_group(), qexec_hash_gby_agg_tuple(), qexec_insert_tuple_into_list(), qexec_merge_tuple_add_list(), qexec_ordby_put_next(), qexec_update_connect_by_lists(), qfile_add_item_to_list(), qfile_add_one_tuple(), qfile_add_two_tuple(), qfile_combine_two_list(), qfile_copy_tuple(), and qfile_put_next_sort_item().
|
static |
Definition at line 1493 of file list_file.c.
References assert, DB_PAGESIZE, qfile_list_id::last_offset, qfile_list_id::lasttpl_len, QFILE_PUT_PREV_TUPLE_LENGTH, and qfile_list_id::tuple_cnt.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), qfile_add_tuple_to_list(), qfile_fast_intint_tuple_to_list(), qfile_fast_intval_tuple_to_list(), qfile_fast_val_tuple_to_list(), and qfile_generate_tuple_into_list().
|
static |
Definition at line 2528 of file list_file.c.
References error(), NO_ERROR, and qfile_add_tuple_to_list().
Referenced by qfile_combine_two_list().
|
static |
|
static |
Definition at line 2542 of file list_file.c.
References ER_FAILED, NO_ERROR, S_END, S_SUCCESS, and qfile_list_id::type_list.
Referenced by qfile_combine_two_list().
|
static |
Definition at line 2456 of file list_file.c.
References cmp, NO_ERROR, NULL, PEEK, qfile_list_scan_id::position, qfile_compare_tuple_helper(), qfile_jump_scan_tuple_position(), qfile_save_current_scan_tuple_position(), qfile_scan_list_next(), S_AFTER, S_BEFORE, S_END, S_ON, S_SUCCESS, and qfile_tuple_record::tpl.
Referenced by qfile_combine_two_list().
|
static |
Definition at line 2434 of file list_file.c.
References NULL, PEEK, qfile_scan_list_next(), and S_END.
Referenced by qfile_combine_two_list().
|
static |
Definition at line 658 of file list_file.c.
|
static |
Definition at line 5113 of file list_file.c.
References ADDITION_FOR_POOLED_LIST_CACHE_ENTRY, ARG_FILE_LINE, assert, qfile_pooled_list_cache_entry::entry, er_log_debug, qfile_list_cache_entry_pool::free_list, qfile_list_cache_entry_pool::n_entries, qfile_pooled_list_cache_entry::next, NULL, qfile_list_cache_entry_pool::pool, RESERVED_SIZE_FOR_LIST_CACHE_ENTRY, and qfile_pooled_list_cache_entry::s.
Referenced by qfile_update_list_cache_entry().
|
static |
Definition at line 1435 of file list_file.c.
References FREE, NULL, qfile_list_id::page_cnt, qfile_Max_tuple_page_size, QFILE_OVERFLOW_TUPLE_COUNT_FLAG, QFILE_PUT_NEXT_VPID_NULL, QFILE_PUT_OVERFLOW_TUPLE_PAGE_SIZE, QFILE_PUT_OVERFLOW_VPID, QFILE_PUT_OVERFLOW_VPID_NULL, QFILE_PUT_TUPLE_COUNT, qfile_set_dirty_page(), qmgr_get_new_page(), and qfile_list_id::tfile_vfid.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), and qfile_add_tuple_to_list().
|
static |
Definition at line 1374 of file list_file.c.
References ARG_FILE_LINE, ER_ERROR_SEVERITY, ER_INTERRUPTED, er_set(), qfile_list_id::first_vpid, FREE, qfile_list_id::last_offset, qfile_list_id::last_pgptr, qfile_list_id::last_vpid, LS_PUT_NEXT_VPID, NULL, qfile_list_id::page_cnt, QFILE_COPY_VPID, QFILE_PAGE_HEADER_SIZE, QFILE_PUT_LAST_TUPLE_OFFSET, QFILE_PUT_NEXT_VPID, QFILE_PUT_NEXT_VPID_NULL, QFILE_PUT_OVERFLOW_VPID_NULL, QFILE_PUT_PREV_VPID, QFILE_PUT_TUPLE_COUNT, qfile_set_dirty_page(), qmgr_get_new_page(), qfile_list_id::query_id, and qfile_list_id::tfile_vfid.
Referenced by qfile_allocate_new_page_if_need().
|
static |
Definition at line 1470 of file list_file.c.
References ER_FAILED, qfile_list_id::last_offset, NO_ERROR, NULL, qfile_allocate_new_page(), QFILE_GET_TUPLE_COUNT, qfile_is_first_tuple(), qfile_is_last_page_full(), QFILE_PUT_LAST_TUPLE_OFFSET, and QFILE_PUT_TUPLE_COUNT.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), qfile_add_tuple_to_list(), qfile_fast_intint_tuple_to_list(), qfile_fast_intval_tuple_to_list(), qfile_fast_val_tuple_to_list(), and qfile_generate_tuple_into_list().
SORT_LIST* qfile_allocate_sort_list | ( | THREAD_ENTRY * | thread_p, |
int | count | ||
) |
Definition at line 613 of file list_file.c.
References assert, lf_freelist_claim(), sort_list::next, NULL, thread_get_tran_entry(), and THREAD_TS_FREE_SORT_LIST.
Referenced by qexec_initialize_groupby_state(), qexec_orderby_distinct_by_sorting(), qfile_copy_list_id(), and qfile_open_list().
|
static |
int qfile_clear_list_cache | ( | THREAD_ENTRY * | thread_p, |
int | list_ht_no | ||
) |
Definition at line 5053 of file list_file.c.
References ARG_FILE_LINE, csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, ER_FAILED, er_log_debug, INF_WAIT, qfile_list_cache::list_hts, mht_clear(), mht_map_no_key(), qfile_list_cache::n_hts, NO_ERROR, NULL, qfile_end_use_of_list_cache_entry_local(), qfile_get_list_cache_number_of_entries(), QFILE_IS_LIST_CACHE_DISABLED, rc, and thread_sleep.
Referenced by qexec_clear_list_cache_by_class(), xcache_cleanup(), xcache_invalidate_entries(), xcache_invalidate_qcaches(), and xcache_unfix().
void qfile_clear_list_id | ( | QFILE_LIST_ID * | list_id_p | ) |
Definition at line 526 of file list_file.c.
References qfile_tuple_descriptor::clear_f_val_at_clone_decache, qfile_tuple_value_type_list::domp, qfile_tuple_descriptor::f_valp, free_and_init, NULL, QFILE_CLEAR_LIST_ID, qfile_free_sort_list(), qfile_update_qlist_count(), qfile_list_id::sort_list, thread_get_thread_entry_info(), qfile_list_id::tpl_descr, and qfile_list_id::type_list.
Referenced by qexec_clear_xasl(), qexec_execute_cte(), qexec_execute_insert(), qexec_execute_selupd_list(), qexec_get_xasl_list_id(), qfile_close_scan(), qfile_delete_list_cache_entry(), qfile_destroy_list(), qfile_free_list_id(), and qfile_union_list().
|
static |
Definition at line 3873 of file list_file.c.
References recdes::area_size, recdes::data, db_private_free_and_init, SORT_INFO::key_info, qfile_list_scan_id::list_id, NULL, SORT_INFO::output_recdes, qfile_clear_sort_key_info(), qmgr_free_old_page_and_init, SORT_INFO::s_id, qfile_sort_scan_id::s_id, and qfile_list_id::tfile_vfid.
Referenced by qfile_sort_list_with_func().
void qfile_clear_sort_key_info | ( | SORTKEY_INFO * | key_info_p | ) |
Definition at line 3826 of file list_file.c.
References db_private_free_and_init, SORTKEY_INFO::default_keys, SORTKEY_INFO::key, SORTKEY_INFO::nkeys, and NULL.
Referenced by qexec_clear_analytic_state(), qexec_clear_groupby_state(), qexec_free_agg_hash_context(), and qfile_clear_sort_info().
QFILE_LIST_ID* qfile_clone_list_id | ( | const QFILE_LIST_ID * | list_id_p, |
bool | is_include_sort_list | ||
) |
Definition at line 501 of file list_file.c.
References DB_SIZEOF, free_and_init, NO_ERROR, and qfile_copy_list_id().
Referenced by qfile_union_list(), qmgr_process_query(), and xqmgr_execute_query().
|
static |
Definition at line 2924 of file list_file.c.
References qfile_close_list(), and QFILE_FREE_AND_INIT_LIST_ID.
Referenced by qfile_sort_list_with_func().
void qfile_close_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 1263 of file list_file.c.
References qfile_list_id::last_pgptr, NULL, QFILE_PUT_NEXT_VPID_NULL, qmgr_free_old_page_and_init, and qfile_list_id::tfile_vfid.
Referenced by qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_process_distinct_or_sort(), qexec_clear_analytic_function_state(), qexec_clear_analytic_state(), qexec_clear_connect_by_lists(), qexec_clear_groupby_state(), qexec_clear_mainblock_iterations(), qexec_clear_xasl_head(), qexec_end_buildvalueblock_iterations(), qexec_end_connect_by_lists(), qexec_end_mainblock_iterations(), qexec_execute_analytic(), qexec_execute_build_columns(), qexec_execute_build_indexes(), qexec_execute_connect_by(), qexec_execute_mainblock_internal(), qexec_execute_query(), qexec_execute_selupd_list(), qexec_free_agg_hash_context(), qexec_gby_clear_group_dim(), qexec_gby_finalize_group_dim(), qexec_groupby(), qexec_groupby_index(), qexec_merge_list(), qexec_merge_list_outer(), qexec_topn_tuples_to_list_id(), qfile_close_and_free_list_file(), qfile_combine_two_list(), qfile_sort_list_with_func(), qfile_union_list(), qmgr_clear_trans_wakeup(), scan_close_scan(), scan_next_index_scan(), and session_free_sentry_data().
void qfile_close_scan | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_SCAN_ID * | scan_id_p | ||
) |
Definition at line 4774 of file list_file.c.
References qfile_list_scan_id::curr_pgptr, db_private_free_and_init, qfile_list_scan_id::keep_page_on_finish, qfile_list_scan_id::list_id, NULL, qfile_list_scan_id::position, qfile_clear_list_id(), qmgr_free_old_page_and_init, S_AFTER, S_CLOSED, S_ON, qfile_tuple_record::size, qfile_list_scan_id::status, qfile_list_id::tfile_vfid, qfile_tuple_record::tpl, and qfile_list_scan_id::tplrec.
Referenced by eval_item_card_sort_list(), eval_some_list_eval(), eval_sub_sort_list_to_multi_set(), eval_sub_sort_list_to_sort_list(), qdata_convert_table_to_set(), qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_get_single_tuple_from_list_id(), qexec_analytic_update_group_result(), qexec_check_for_cycle(), qexec_clear_analytic_state(), qexec_clear_groupby_state(), qexec_execute_analytic(), qexec_execute_connect_by(), qexec_free_agg_hash_context(), qexec_groupby(), qexec_groupby_index(), qexec_iterate_connect_by_results(), qexec_merge_list(), qexec_recalc_tuples_parent_pos_in_list(), qfile_combine_two_list(), qfile_copy_tuple(), qfile_reallocate_tuple(), qfile_sort_list_with_func(), scan_close_scan(), scan_end_scan(), scan_next_index_scan(), scan_reset_scan_block(), and stran_can_end_after_query_execution().
QFILE_LIST_ID* qfile_combine_two_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | lhs_file_p, | ||
QFILE_LIST_ID * | rhs_file_p, | ||
int | flag | ||
) |
Definition at line 2576 of file list_file.c.
References cmp, error(), NO_ERROR, NULL, Q_ALL, Q_DISTINCT, qfile_add_one_tuple(), qfile_add_tuple_to_list(), qfile_add_two_tuple(), qfile_advance(), qfile_advance_group(), qfile_advance_single(), qfile_close_list(), qfile_close_scan(), qfile_compare_tuple_helper(), QFILE_FLAG_ALL, QFILE_FLAG_DIFFERENCE, QFILE_FLAG_DISTINCT, QFILE_FLAG_INTERSECT, QFILE_FLAG_UNION, QFILE_FREE_AND_INIT_LIST_ID, QFILE_IS_FLAG_SET, QFILE_IS_FLAG_SET_BOTH, qfile_open_list(), qfile_open_list_scan(), qfile_sort_list(), qfile_unify_types(), qfile_union_list(), qfile_list_id::query_id, success(), qfile_tuple_record::tpl, qfile_list_id::tuple_cnt, and qfile_list_id::type_list.
Referenced by qexec_end_mainblock_iterations(), and qexec_execute_cte().
Definition at line 3586 of file list_file.c.
References SUBKEY_INFO::col_dom, d0, d1, i, SUBKEY_INFO::is_desc, SORTKEY_INFO::key, SORTKEY_INFO::nkeys, NULL, SORT_REC::offset, qfile_compare_with_null_value(), SORT_REC::s, and SUBKEY_INFO::sort_f.
Referenced by qexec_groupby(), and qfile_sort_list_with_func().
Definition at line 4847 of file list_file.c.
References i, mht_compare_dbvalues_are_equal(), NULL, db_value_array::size, and db_value_array::vals.
Referenced by qfile_initialize_list_cache().
Definition at line 3508 of file list_file.c.
References SUBKEY_INFO::col_dom, d0, d1, i, SUBKEY_INFO::is_desc, SORTKEY_INFO::key, MAX_ALIGNMENT, SORTKEY_INFO::nkeys, NULL, SORT_REC::original, PTR_ALIGN, qfile_compare_with_interpolation_domain(), qfile_compare_with_null_value(), QFILE_GET_TUPLE_VALUE_FLAG, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_LENGTH, SORT_REC::s, SUBKEY_INFO::sort_f, SUBKEY_INFO::use_cmp_dom, and V_BOUND.
Referenced by qexec_execute_analytic(), qexec_groupby(), and qfile_sort_list_with_func().
|
static |
Definition at line 2395 of file list_file.c.
References qfile_tuple_value_type_list::domp, i, NO_ERROR, qfile_compare_tuple_values(), QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, and qfile_tuple_value_type_list::type_cnt.
Referenced by qfile_advance_group(), and qfile_combine_two_list().
|
static |
Definition at line 744 of file list_file.c.
References pr_type::cmpval(), tp_domain::collation_id, pr_type::data_readval(), DB_EQ, DB_GT, DB_LT, db_make_null(), ER_FAILED, NO_ERROR, NULL, or_init(), pr_clear_value(), pr_is_set_type(), QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_SIZE, rc, TP_DOMAIN_TYPE, and tp_domain::type.
Referenced by qfile_compare_tuple_helper().
|
static |
Definition at line 6372 of file list_file.c.
References assert, SUBKEY_INFO::cmp_dom, pr_type::cmpval(), SUBKEY_INFO::col_dom, tp_domain::collation_id, d0, d1, pr_type::data_readval(), DB_IS_NULL, db_make_null(), DOMAIN_COMPATIBLE, ER_ARG_CAN_NOT_BE_CASTED_TO_DESIRED_DOMAIN, SORTKEY_INFO::error, error(), NO_ERROR, NULL, OR_BUF_INIT, pr_clear_value(), qdata_update_interpolation_func_value_and_domain(), QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_LENGTH, tp_value_cast(), and tp_domain::type.
Referenced by qfile_compare_partial_sort_record().
|
static |
Definition at line 3640 of file list_file.c.
References assert, and SUBKEY_INFO::is_nulls_first.
Referenced by qfile_compare_all_sort_record(), and qfile_compare_partial_sort_record().
int qfile_copy_list_id | ( | QFILE_LIST_ID * | dest_list_id_p, |
const QFILE_LIST_ID * | src_list_id_p, | ||
bool | is_include_sort_list | ||
) |
Definition at line 433 of file list_file.c.
References DB_SIZEOF, qfile_tuple_value_position::dom, qfile_tuple_value_type_list::domp, ER_FAILED, free_and_init, sort_list::next, NO_ERROR, NULL, sort_list::pos_descr, qfile_tuple_value_position::pos_no, qfile_allocate_sort_list(), qfile_get_sort_list_size(), qfile_update_qlist_count(), sort_list::s_nulls, sort_list::s_order, qfile_list_id::sort_list, thread_get_thread_entry_info(), qfile_list_id::tpl_descr, qfile_tuple_value_type_list::type_cnt, and qfile_list_id::type_list.
Referenced by qdata_initialize_analytic_func(), qdata_process_distinct_or_sort(), qexec_end_buildvalueblock_iterations(), qexec_end_mainblock_iterations(), qexec_execute_analytic(), qexec_execute_cte(), qexec_execute_mainblock_internal(), qexec_get_xasl_list_id(), qexec_groupby(), qexec_groupby_index(), qexec_merge_listfiles(), qexec_start_connect_by_lists(), qexec_start_mainblock_iterations(), qfile_clone_list_id(), qfile_open_list_scan(), qfile_sort_list_with_func(), and qfile_update_list_cache_entry().
|
static |
Definition at line 4057 of file list_file.c.
References DB_PAGESIZE, ER_FAILED, FREE, NO_ERROR, NULL, QFILE_GET_NEXT_VPID, QFILE_GET_OVERFLOW_VPID, QFILE_PUT_NEXT_VPID, QFILE_PUT_OVERFLOW_VPID, QFILE_PUT_PREV_VPID, qfile_set_dirty_page(), qmgr_free_old_page_and_init, qmgr_get_new_page(), qmgr_get_old_page(), and VPID_ISNULL.
Referenced by qfile_duplicate_list().
|
static |
Definition at line 2886 of file list_file.c.
References ER_FAILED, NO_ERROR, NULL, PEEK, qfile_add_tuple_to_list(), qfile_close_scan(), qfile_open_list_scan(), qfile_scan_list_next(), S_END, S_SUCCESS, and qfile_tuple_record::tpl.
Referenced by qfile_union_list().
int qfile_copy_tuple_descr_to_tuple | ( | THREAD_ENTRY * | thread_p, |
QFILE_TUPLE_DESCRIPTOR * | tpl_descr, | ||
QFILE_TUPLE_RECORD * | tplrec | ||
) |
Definition at line 2846 of file list_file.c.
References assert, qfile_tuple_descriptor::clear_f_val_at_clone_decache, db_private_alloc, db_private_free_and_init, ER_FAILED, qfile_tuple_descriptor::f_cnt, qfile_tuple_descriptor::f_valp, i, NO_ERROR, NULL, qdata_copy_db_value_to_tuple_value(), QFILE_PUT_TUPLE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, qfile_tuple_record::size, qfile_tuple_record::tpl, and qfile_tuple_descriptor::tpl_size.
Referenced by qdata_save_agg_hentry_to_list(), and qexec_analytic_finalize_group().
|
static |
Definition at line 669 of file list_file.c.
References NO_ERROR.
|
static |
Definition at line 5403 of file list_file.c.
References ARG_FILE_LINE, db_private_free, qfile_list_cache_entry::deletion_marker, ER_FAILED, er_log_debug, file_temp_retire_preserved(), vfid::fileid, qfile_list_cache_entry::list_ht_no, qfile_list_cache::list_hts, qfile_list_cache_entry::list_id, mht_rem2(), qfile_list_cache::n_entries, qfile_list_cache::n_pages, NO_ERROR, NULL, qfile_list_id::page_cnt, qfile_list_cache_entry::param_values, pr_valstring(), qfile_clear_list_id(), qfile_free_list_cache_entry(), qfile_update_qlist_count(), db_value_array::size, qfile_list_id::temp_vfid, db_value_array::vals, VFID_ISNULL, and vfid::volid.
Referenced by qfile_end_use_of_list_cache_entry(), qfile_lookup_list_cache_entry(), and qfile_update_list_cache_entry().
|
static |
void qfile_destroy_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 2163 of file list_file.c.
References file_temp_retire(), qfile_clear_list_id(), qmgr_free_list_temp_file(), qfile_list_id::query_id, qfile_list_id::temp_vfid, qfile_list_id::tfile_vfid, and VFID_ISNULL.
Referenced by qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_process_distinct_or_sort(), qexec_clear_analytic_function_state(), qexec_clear_analytic_state(), qexec_clear_connect_by_lists(), qexec_clear_mainblock_iterations(), qexec_clear_xasl_head(), qexec_execute_analytic(), qexec_execute_connect_by(), qexec_execute_selupd_list(), qexec_free_agg_hash_context(), qexec_gby_clear_group_dim(), qexec_gby_finalize_group_dim(), qexec_groupby(), qexec_groupby_index(), qfile_duplicate_list(), qfile_sort_list_with_func(), scan_close_scan(), scan_next_index_scan(), scan_reset_scan_block(), and xqmgr_execute_query().
int qfile_dump_list_cache_internal | ( | THREAD_ENTRY * | thread_p, |
FILE * | fp | ||
) |
Definition at line 5321 of file list_file.c.
References csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, ER_FAILED, qfile_list_cache::full_counter, qfile_list_cache::hit_counter, i, INF_WAIT, qfile_list_cache::list_hts, qfile_list_cache::lookup_counter, mht_count(), mht_dump(), qfile_list_cache::miss_counter, qfile_list_cache::n_entries, qfile_list_cache::n_hts, qfile_list_cache::n_pages, NO_ERROR, NULL, qfile_dump_list_cache_internal(), QFILE_IS_LIST_CACHE_DISABLED, qfile_print_list_cache_entry(), and rc.
Referenced by qfile_dump_list_cache_internal(), and xqmgr_dump_query_cache().
QFILE_LIST_ID* qfile_duplicate_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
int | flag | ||
) |
Definition at line 4174 of file list_file.c.
References qfile_list_id::first_vpid, qfile_list_id::last_vpid, NO_ERROR, NULL, qfile_list_id::page_cnt, qfile_copy_list_pages(), qfile_destroy_list(), QFILE_FREE_AND_INIT_LIST_ID, qfile_open_list(), qfile_list_id::query_id, qfile_list_id::tfile_vfid, qfile_list_id::tuple_cnt, and qfile_list_id::type_list.
Referenced by xqmgr_execute_query().
void qfile_end_scan_fix | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_SCAN_ID * | scan_id_p | ||
) |
Definition at line 4752 of file list_file.c.
References qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::list_id, qfile_list_scan_id::position, qmgr_free_old_page_and_init, S_AFTER, S_ENDED, S_ON, qfile_list_scan_id::status, and qfile_list_id::tfile_vfid.
Referenced by scan_end_scan(), and scan_reset_scan_block().
int qfile_end_use_of_list_cache_entry | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_CACHE_ENTRY * | lent, | ||
bool | marker | ||
) |
Definition at line 5849 of file list_file.c.
References assert, csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, qfile_list_cache_entry::deletion_marker, ER_FAILED, INF_WAIT, LOG_FIND_THREAD_TRAN_INDEX, qfile_list_cache::n_hts, NO_ERROR, NULL, p, qfile_delete_list_cache_entry(), and QFILE_IS_LIST_CACHE_DISABLED.
Referenced by qfile_end_use_of_list_cache_entry_local(), qmgr_clear_trans_wakeup(), xqmgr_end_query(), and xqmgr_execute_query().
|
static |
Definition at line 5464 of file list_file.c.
References qfile_end_use_of_list_cache_entry().
Referenced by qfile_clear_list_cache(), and qfile_finalize_list_cache().
int qfile_fast_intint_tuple_to_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
int | v1, | ||
int | v2 | ||
) |
Definition at line 1802 of file list_file.c.
References DB_ALIGN, pr_type::disksize, DONT_FREE, ER_FAILED, qfile_list_id::last_offset, qfile_list_id::last_pgptr, MAX_ALIGNMENT, NO_ERROR, NULL, OR_PUT_INT, qfile_add_tuple_to_list_id(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, qfile_set_dirty_page(), QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, qfile_list_id::tfile_vfid, tp_Integer, and V_BOUND.
Referenced by qexec_analytic_finalize_group().
int qfile_fast_intval_tuple_to_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
int | v1, | ||
DB_VALUE * | v2 | ||
) |
Definition at line 1862 of file list_file.c.
References pr_type::data_writeval(), DB_ALIGN, DB_IS_NULL, DB_VALUE_DOMAIN_TYPE, pr_type::disksize, DONT_FREE, ER_FAILED, qfile_list_id::last_offset, qfile_list_id::last_pgptr, MAX_ALIGNMENT, NO_ERROR, NULL, OR_BUF_INIT, OR_PUT_INT, pr_data_writeval_disk_size(), pr_type_from_id(), qfile_add_tuple_to_list_id(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_MAX_TUPLE_SIZE_IN_PAGE, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, qfile_set_dirty_page(), QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, qfile_list_id::tfile_vfid, tp_Integer, qfile_list_id::tpl_descr, qfile_tuple_descriptor::tpl_size, V_BOUND, and V_UNBOUND.
Referenced by qexec_analytic_finalize_group().
int qfile_fast_val_tuple_to_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
DB_VALUE * | val | ||
) |
Definition at line 1949 of file list_file.c.
References pr_type::data_writeval(), DB_ALIGN, DB_IS_NULL, DB_VALUE_DOMAIN_TYPE, DONT_FREE, ER_FAILED, qfile_list_id::last_offset, qfile_list_id::last_pgptr, MAX_ALIGNMENT, NO_ERROR, NULL, OR_BUF_INIT, pr_data_writeval_disk_size(), pr_type_from_id(), qfile_add_tuple_to_list_id(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, QFILE_MAX_TUPLE_SIZE_IN_PAGE, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, qfile_set_dirty_page(), QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, qfile_list_id::tfile_vfid, qfile_list_id::tpl_descr, qfile_tuple_descriptor::tpl_size, V_BOUND, and V_UNBOUND.
Referenced by qexec_execute_insert().
void qfile_finalize | ( | void | ) |
Definition at line 1117 of file list_file.c.
References lf_freelist_destroy().
Referenced by qmgr_finalize().
int qfile_finalize_list_cache | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 5010 of file list_file.c.
References csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, ER_FAILED, free_and_init, i, INF_WAIT, qfile_list_cache::list_hts, mht_destroy(), mht_map_no_key(), qfile_list_cache::n_hts, NO_ERROR, qfile_list_cache_entry_pool::pool, qfile_end_use_of_list_cache_entry_local(), and QFILE_IS_LIST_CACHE_DISABLED.
Referenced by boot_restart_server(), and xboot_shutdown_server().
|
static |
Definition at line 5167 of file list_file.c.
References assert, CAST_BUFLEN, db_change_private_heap(), qfile_pooled_list_cache_entry::entry, ER_FAILED, free_and_init, qfile_list_cache_entry_pool::free_list, i, qfile_pooled_list_cache_entry::next, NO_ERROR, NULL, qfile_list_cache_entry::param_values, qfile_list_cache_entry_pool::pool, POOLED_LIST_CACHE_ENTRY_FROM_LIST_CACHE_ENTRY, pr_clear_value(), qfile_pooled_list_cache_entry::s, db_value_array::size, and db_value_array::vals.
Referenced by qfile_delete_list_cache_entry(), and qfile_initialize_list_cache().
void qfile_free_list_id | ( | QFILE_LIST_ID * | list_id_p | ) |
Definition at line 563 of file list_file.c.
References qfile_clear_list_id().
Referenced by qdata_initialize_analytic_func(), qexec_clear_analytic_function_state(), qexec_clear_analytic_state(), qexec_execute_analytic(), qexec_free_agg_hash_context(), qexec_groupby(), qexec_start_mainblock_iterations(), qfile_union_list(), and session_free_sentry_data().
void qfile_free_sort_list | ( | THREAD_ENTRY * | thread_p, |
SORT_LIST * | sort_list_p | ||
) |
Definition at line 580 of file list_file.c.
References assert, lf_freelist_retire(), sort_list::next, NO_ERROR, NULL, thread_get_tran_entry(), and THREAD_TS_FREE_SORT_LIST.
Referenced by qexec_execute_connect_by(), qexec_initialize_groupby_state(), qexec_orderby_distinct_by_sorting(), and qfile_clear_list_id().
QFILE_TUPLE qfile_generate_sort_tuple | ( | SORTKEY_INFO * | key_info_p, |
SORT_REC * | sort_record_p, | ||
RECDES * | output_recdes_p | ||
) |
Definition at line 3226 of file list_file.c.
References recdes::area_size, recdes::data, db_private_alloc, db_private_realloc, i, SORTKEY_INFO::key, SORTKEY_INFO::nkeys, NULL, SORT_REC::offset, p, SUBKEY_INFO::permuted_col, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, SORT_REC::s, and V_UNBOUND.
Referenced by qexec_gby_put_next(), qexec_hash_gby_put_next(), qexec_ordby_put_next(), and qfile_put_next_sort_item().
int qfile_generate_tuple_into_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
QFILE_TUPLE_TYPE | tuple_type | ||
) |
Definition at line 1749 of file list_file.c.
References assert, DB_PAGESIZE, DONT_FREE, ER_FAILED, if(), qfile_list_id::last_offset, qfile_list_id::last_pgptr, NO_ERROR, NULL, qfile_add_tuple_to_list_id(), qfile_allocate_new_page_if_need(), QFILE_CHECK_LIST_FILE_IS_CLOSED, qfile_Max_tuple_page_size, qfile_save_tuple(), qfile_set_dirty_page(), qfile_list_id::tfile_vfid, qfile_list_id::tpl_descr, and qfile_tuple_descriptor::tpl_size.
Referenced by qdata_save_agg_hentry_to_list(), qexec_end_buildvalueblock_iterations(), qexec_end_one_iteration(), qexec_gby_finalize_group(), qexec_insert_tuple_into_list(), qexec_merge_tuple_add_list(), qexec_topn_tuples_to_list_id(), qfile_add_item_to_list(), and qfile_put_next_sort_item().
int qfile_get_estimated_pages_for_sorting | ( | QFILE_LIST_ID * | list_id_p, |
SORTKEY_INFO * | key_info_p | ||
) |
Definition at line 3689 of file list_file.c.
References DB_PAGESIZE, if(), SORTKEY_INFO::nkeys, SORT_REC::offset, SORT_REC::original, qfile_list_id::page_cnt, qfile_list_id::tuple_cnt, and SORTKEY_INFO::use_original.
Referenced by qexec_execute_analytic(), qexec_groupby(), and qfile_sort_list_with_func().
int qfile_get_first_page | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 2112 of file list_file.c.
References DB_PAGESIZE, DONT_FREE, ER_FAILED, qfile_list_id::first_vpid, qfile_list_id::last_offset, qfile_list_id::last_pgptr, qfile_list_id::last_vpid, qfile_list_id::lasttpl_len, LS_PUT_NEXT_VPID, NO_ERROR, NULL, qfile_list_id::page_cnt, QFILE_COPY_VPID, QFILE_PAGE_HEADER_SIZE, QFILE_PUT_OVERFLOW_VPID_NULL, QFILE_PUT_PREV_VPID, QFILE_PUT_TUPLE_COUNT, qfile_set_dirty_page(), qmgr_create_new_temp_file(), qmgr_get_new_page(), qfile_list_id::query_id, TEMP_FILE_MEMBUF_NORMAL, and qfile_list_id::tfile_vfid.
|
static |
Definition at line 5971 of file list_file.c.
References MAX_NTRANS.
Referenced by qfile_update_list_cache_entry().
|
static |
Definition at line 5950 of file list_file.c.
References MAX_NTRANS.
Referenced by qfile_update_list_cache_entry().
int qfile_get_list_cache_number_of_entries | ( | int | ht_no | ) |
Definition at line 6486 of file list_file.c.
References assert_release, qfile_list_cache::list_hts, and mht_table::nentries.
Referenced by qfile_clear_list_cache(), and xcache_invalidate_qcaches().
|
static |
Definition at line 3312 of file list_file.c.
References SORT_INFO::key_info, qfile_make_sort_key(), SORT_INFO::s_id, qfile_sort_scan_id::s_id, and qfile_sort_scan_id::tplrec.
Referenced by qfile_sort_list_with_func().
|
static |
Definition at line 682 of file list_file.c.
References sort_list::next.
Referenced by qfile_copy_list_id(), qfile_initialize_sort_key_info(), and qfile_open_list().
int qfile_get_tuple | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | first_page_p, | ||
QFILE_TUPLE | tuple, | ||
QFILE_TUPLE_RECORD * | tuple_record_p, | ||
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 4211 of file list_file.c.
References ER_FAILED, if(), NO_ERROR, NULL, NULL_PAGEID, vpid::pageid, QFILE_GET_OVERFLOW_PAGE_ID, QFILE_GET_OVERFLOW_VPID, QFILE_GET_TUPLE_LENGTH, qfile_Max_tuple_page_size, QFILE_PAGE_HEADER_SIZE, qfile_reallocate_tuple(), qmgr_free_old_page_and_init, qmgr_get_old_page(), qfile_tuple_record::size, qfile_list_id::tfile_vfid, and qfile_tuple_record::tpl.
Referenced by qexec_analytic_put_next(), qexec_gby_put_next(), qexec_hash_gby_put_next(), qexec_ordby_put_next(), qfile_get_tuple_from_current_list(), and qfile_set_tuple_column_value().
|
static |
Definition at line 4286 of file list_file.c.
References qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::list_id, and qfile_get_tuple().
Referenced by qfile_retrieve_tuple().
Definition at line 6066 of file list_file.c.
References NULL_PAGEID, NULL_PAGEID_IN_PROGRESS, and QFILE_GET_NEXT_PAGE_ID.
Referenced by qfile_scan_next().
bool qfile_has_no_cache_entries | ( | ) |
Definition at line 6494 of file list_file.c.
References qfile_list_cache::n_entries.
Referenced by qmgr_clear_trans_wakeup(), and xcache_invalidate_entries().
|
static |
Definition at line 4819 of file list_file.c.
References i, mht_valhash(), NULL, db_value_array::size, and db_value_array::vals.
Referenced by qfile_initialize_list_cache().
int qfile_initialize | ( | void | ) |
Definition at line 1095 of file list_file.c.
References ER_FAILED, free_sort_list_Ts, lf_freelist_init(), NO_ERROR, prm_get_integer_value(), PRM_ID_LIST_MAX_QUERY_CACHE_ENTRIES, PRM_ID_LIST_MAX_QUERY_CACHE_PAGES, PRM_ID_LIST_QUERY_CACHE_MODE, qfile_Is_list_cache_disabled, QFILE_LIST_QUERY_CACHE_MODE_OFF, qfile_Max_tuple_page_size, and QFILE_MAX_TUPLE_SIZE_IN_PAGE.
Referenced by qmgr_initialize().
int qfile_initialize_list_cache | ( | THREAD_ENTRY * | thread_p | ) |
Definition at line 4895 of file list_file.c.
References csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, ER_FAILED, error(), free_and_init, qfile_list_cache_entry_pool::free_list, qfile_list_cache::full_counter, qfile_list_cache::hit_counter, i, INF_WAIT, qfile_list_cache::list_hts, qfile_list_cache::lookup_counter, mht_clear(), mht_create(), mht_destroy(), mht_map_no_key(), qfile_list_cache::miss_counter, qfile_list_cache::n_entries, qfile_list_cache_entry_pool::n_entries, qfile_list_cache::n_hts, qfile_list_cache::n_pages, qfile_pooled_list_cache_entry::next, NO_ERROR, NULL, qfile_list_cache_entry_pool::pool, prm_get_integer_value(), PRM_ID_LIST_MAX_QUERY_CACHE_ENTRIES, PRM_ID_XASL_CACHE_MAX_ENTRIES, qfile_compare_equal_db_value_array(), qfile_free_list_cache_entry(), qfile_hash_db_value_array(), QFILE_IS_LIST_CACHE_DISABLED, and qfile_pooled_list_cache_entry::s.
Referenced by boot_restart_server().
|
static |
Definition at line 1025 of file list_file.c.
References NULL_PAGEID, NULL_VOLID, OR_PUT_INT, OR_PUT_SHORT, QFILE_LAST_TUPLE_OFFSET, QFILE_NEXT_PAGE_ID_OFFSET, QFILE_NEXT_VOL_ID_OFFSET, QFILE_OVERFLOW_PAGE_ID_OFFSET, QFILE_OVERFLOW_VOL_ID_OFFSET, QFILE_PAGE_HEADER_SIZE, QFILE_PREV_PAGE_ID_OFFSET, QFILE_PREV_VOL_ID_OFFSET, QFILE_RESERVED_OFFSET, and QFILE_TUPLE_COUNT_OFFSET.
|
static |
Definition at line 3849 of file list_file.c.
References recdes::area_size, recdes::data, SORTKEY_INFO::key, SORT_INFO::key_info, NULL, SORT_INFO::output_recdes, qfile_initialize_sort_key_info(), qfile_list_id::type_list, and VPID_SET_NULL.
Referenced by qfile_sort_list_with_func().
SORTKEY_INFO* qfile_initialize_sort_key_info | ( | SORTKEY_INFO * | key_info_p, |
SORT_LIST * | list_p, | ||
QFILE_TUPLE_VALUE_TYPE_LIST * | types | ||
) |
Definition at line 3728 of file list_file.c.
References ARG_FILE_LINE, assert_release, SUBKEY_INFO::cmp_dom, SUBKEY_INFO::col, SUBKEY_INFO::col_dom, db_private_alloc, DB_TYPE_VARIABLE, SORTKEY_INFO::default_keys, qfile_tuple_value_type_list::domp, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), SORTKEY_INFO::error, pr_type::get_data_cmpdisk_function(), i, SUBKEY_INFO::is_desc, SUBKEY_INFO::is_nulls_first, SORTKEY_INFO::key, sort_list::next, SORTKEY_INFO::nkeys, NO_ERROR, NULL, p, SUBKEY_INFO::permuted_col, qfile_get_sort_list_size(), S_ASC, S_NULLS_LAST, SUBKEY_INFO::sort_f, tp_domain::type, qfile_tuple_value_type_list::type_cnt, SUBKEY_INFO::use_cmp_dom, and SORTKEY_INFO::use_original.
Referenced by qexec_initialize_analytic_state(), qexec_initialize_groupby_state(), and qfile_initialize_sort_info().
|
static |
Definition at line 5600 of file list_file.c.
|
static |
Definition at line 1339 of file list_file.c.
References qfile_list_id::first_vpid, and VPID_ISNULL.
Referenced by qfile_allocate_new_page_if_need().
|
static |
Definition at line 1345 of file list_file.c.
References assert, DB_PAGESIZE, qfile_list_id::last_offset, and QFILE_PAGE_HEADER_SIZE.
Referenced by qfile_allocate_new_page_if_need().
Definition at line 705 of file list_file.c.
References sort_list::next, NULL, sort_list::pos_descr, qfile_tuple_value_position::pos_no, sort_list::s_nulls, and sort_list::s_order.
Referenced by qexec_execute_mainblock_internal(), qexec_listfile_orderby(), qexec_orderby_distinct_by_sorting(), and qfile_sort_list().
SCAN_CODE qfile_jump_scan_tuple_position | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_SCAN_ID * | scan_id_p, | ||
QFILE_TUPLE_POSITION * | tuple_position_p, | ||
QFILE_TUPLE_RECORD * | tuple_record_p, | ||
int | peek | ||
) |
Definition at line 4552 of file list_file.c.
References ARG_FILE_LINE, qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::curr_tpl, qfile_list_scan_id::curr_tplno, qfile_list_scan_id::curr_vpid, ER_ERROR_SEVERITY, ER_QPROC_UNKNOWN_CRSPOS, er_set(), if(), qfile_list_scan_id::list_id, NULL, qfile_tuple_position::offset, vpid::pageid, qfile_tuple_position::position, qfile_list_scan_id::position, QFILE_COPY_VPID, qfile_retrieve_tuple(), qmgr_free_old_page_and_init, qmgr_get_old_page(), S_AFTER, S_BEFORE, S_END, S_ERROR, S_ON, qfile_tuple_position::status, qfile_list_scan_id::status, qfile_list_id::tfile_vfid, qfile_tuple_position::tplno, vpid::volid, and qfile_tuple_position::vpid.
Referenced by qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qexec_check_for_cycle(), qexec_merge_list(), qfile_advance_group(), scan_hash_probe_next(), and scan_jump_scan_pos().
void qfile_load_xasl_node_header | ( | THREAD_ENTRY * | thread_p, |
char * | xasl_stream, | ||
xasl_node_header * | xasl_header_p | ||
) |
Definition at line 1063 of file list_file.c.
References assert, INIT_XASL_NODE_HEADER, NO_ERROR, NULL, and stx_map_stream_to_xasl_node_header().
Referenced by xqmgr_prepare_query(), and xsession_get_prepared_statement().
int qfile_locate_tuple_next_value | ( | OR_BUF * | iterator, |
OR_BUF * | buf, | ||
QFILE_TUPLE_VALUE_FLAG * | flag | ||
) |
Definition at line 952 of file list_file.c.
References db_fprint_value(), db_make_null(), qfile_tuple_value_type_list::domp, i, pr_type::id, NULL, or_advance(), OR_BUF_INIT, or_init(), pr_clear_value(), pr_is_set_type(), or_buf::ptr, QFILE_GET_TUPLE_VALUE_FLAG, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, tp_domain::type, qfile_tuple_value_type_list::type_cnt, and V_BOUND.
Referenced by qdata_load_agg_hentry_from_tuple().
QFILE_TUPLE_VALUE_FLAG qfile_locate_tuple_value | ( | QFILE_TUPLE | tuple, |
int | index, | ||
char ** | tuple_value_p, | ||
int * | value_size_p | ||
) |
Definition at line 905 of file list_file.c.
References qfile_locate_tuple_value_r(), and QFILE_TUPLE_LENGTH_SIZE.
Referenced by eval_item_card_sort_list(), eval_some_list_eval(), eval_sub_sort_list_to_multi_set(), eval_sub_sort_list_to_sort_list(), fetch_peek_dbval(), qdata_convert_table_to_set(), qdata_get_single_tuple_from_list_id(), qexec_get_tuple_column_value(), and qfile_set_tuple_column_value().
QFILE_TUPLE_VALUE_FLAG qfile_locate_tuple_value_r | ( | QFILE_TUPLE | tuple, |
int | index, | ||
char ** | tuple_value_p, | ||
int * | value_size_p | ||
) |
Definition at line 922 of file list_file.c.
References i, QFILE_GET_TUPLE_VALUE_FLAG, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_SIZE, V_BOUND, and V_UNBOUND.
Referenced by fetch_peek_dbval_pos(), and qfile_locate_tuple_value().
QFILE_LIST_CACHE_ENTRY* qfile_lookup_list_cache_entry | ( | THREAD_ENTRY * | thread_p, |
int | list_ht_no, | ||
const DB_VALUE_ARRAY * | params, | ||
bool * | result_cached | ||
) |
Definition at line 5480 of file list_file.c.
References assert, csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, qfile_list_cache_entry::deletion_marker, qfile_list_cache::hit_counter, i, INF_WAIT, qfile_list_cache::list_hts, LOG_FIND_THREAD_TRAN_INDEX, qfile_list_cache::lookup_counter, MAX_NTRANS, mht_get(), qfile_list_cache::miss_counter, qfile_list_cache::n_hts, NO_ERROR, NULL, qfile_delete_list_cache_entry(), QFILE_IS_LIST_CACHE_DISABLED, qfile_list_cache_entry::ref_count, and qfile_list_cache_entry::time_last_used.
Referenced by xqmgr_execute_query().
SORT_STATUS qfile_make_sort_key | ( | THREAD_ENTRY * | thread_p, |
SORTKEY_INFO * | key_info_p, | ||
RECDES * | key_record_p, | ||
QFILE_LIST_SCAN_ID * | input_scan_p, | ||
QFILE_TUPLE_RECORD * | tuple_record_p | ||
) |
Definition at line 3090 of file list_file.c.
References recdes::area_size, CAST_BUFLEN, SUBKEY_INFO::col, qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_vpid, recdes::data, i, if(), SORTKEY_INFO::key, recdes::length, MAX_ALIGNMENT, SORT_REC::next, SORTKEY_INFO::nkeys, NULL, SORT_REC::offset, SORT_REC::original, vpid::pageid, PEEK, PTR_ALIGN, QFILE_GET_TUPLE_VALUE_FLAG, QFILE_GET_TUPLE_VALUE_HEADER_POSITION, QFILE_GET_TUPLE_VALUE_LENGTH, qfile_scan_list_next(), qfile_scan_prev(), QFILE_TUPLE_VALUE_HEADER_SIZE, SORT_REC::s, S_END, S_ERROR, S_SUCCESS, SORT_ERROR_OCCURRED, SORT_NOMORE_RECS, SORT_REC_DOESNT_FIT, SORT_SUCCESS, qfile_tuple_record::tpl, SORTKEY_INFO::use_original, V_BOUND, and vpid::volid.
Referenced by qexec_analytic_get_next(), qexec_gby_get_next(), qexec_hash_gby_get_next(), and qfile_get_next_sort_item().
int qfile_modify_type_list | ( | QFILE_TUPLE_VALUE_TYPE_LIST * | type_list_p, |
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 401 of file list_file.c.
References qfile_tuple_descriptor::clear_f_val_at_clone_decache, DB_SIZEOF, qfile_tuple_value_type_list::domp, ER_FAILED, qfile_tuple_descriptor::f_valp, NO_ERROR, NULL, qfile_list_id::tpl_descr, qfile_tuple_value_type_list::type_cnt, and qfile_list_id::type_list.
QFILE_LIST_ID* qfile_open_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_TUPLE_VALUE_TYPE_LIST * | type_list_p, | ||
SORT_LIST * | sort_list_p, | ||
QUERY_ID | query_id, | ||
int | flag | ||
) |
Definition at line 1142 of file list_file.c.
References DB_SIZEOF, qfile_tuple_value_position::dom, qfile_tuple_value_type_list::domp, free_and_init, i, sort_list::next, NULL, qfile_list_id::page_cnt, sort_list::pos_descr, qfile_tuple_value_position::pos_no, qfile_allocate_sort_list(), QFILE_CLEAR_LIST_ID, QFILE_FLAG_DISTINCT, QFILE_FLAG_RESULT_FILE, QFILE_FLAG_USE_KEY_BUFFER, qfile_get_sort_list_size(), QFILE_IS_FLAG_SET, QFILE_IS_LIST_CACHE_DISABLED, qfile_update_qlist_count(), qmgr_create_new_temp_file(), qmgr_create_result_file(), qfile_list_id::query_id, S_ASC, sort_list::s_nulls, S_NULLS_FIRST, sort_list::s_order, qfile_list_id::sort_list, TEMP_FILE_MEMBUF_KEY_BUFFER, TEMP_FILE_MEMBUF_NORMAL, qmgr_temp_file::temp_vfid, qfile_list_id::temp_vfid, qfile_list_id::tfile_vfid, qfile_list_id::tuple_cnt, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, and VFID_COPY.
Referenced by qdata_initialize_analytic_func(), qdata_process_distinct_or_sort(), qexec_alloc_agg_hash_context(), qexec_end_buildvalueblock_iterations(), qexec_execute_analytic(), qexec_execute_connect_by(), qexec_groupby(), qexec_groupby_index(), qexec_initialize_analytic_function_state(), qexec_merge_list(), qexec_merge_list_outer(), qexec_start_connect_by_lists(), qexec_start_mainblock_iterations(), qfile_combine_two_list(), qfile_duplicate_list(), qfile_sort_list_with_func(), scan_init_indx_coverage(), scan_next_index_scan(), and scan_reset_scan_block().
int qfile_open_list_scan | ( | QFILE_LIST_ID * | list_id_p, |
QFILE_LIST_SCAN_ID * | scan_id_p | ||
) |
Definition at line 4658 of file list_file.c.
References qfile_list_scan_id::curr_vpid, ER_FAILED, qfile_list_scan_id::keep_page_on_finish, qfile_list_scan_id::list_id, NO_ERROR, NULL, NULL_PAGEID, NULL_VOLID, vpid::pageid, qfile_list_scan_id::position, QFILE_CLEAR_LIST_ID, qfile_copy_list_id(), S_BEFORE, S_OPENED, qfile_tuple_record::size, qfile_list_scan_id::status, qfile_tuple_record::tpl, qfile_list_scan_id::tplrec, and vpid::volid.
Referenced by eval_item_card_sort_list(), eval_some_list_eval(), eval_sub_sort_list_to_multi_set(), eval_sub_sort_list_to_sort_list(), qdata_convert_table_to_set(), qdata_evaluate_connect_by_root(), qdata_evaluate_qprior(), qdata_evaluate_sys_connect_by_path(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_get_single_tuple_from_list_id(), qexec_analytic_update_group_result(), qexec_check_for_cycle(), qexec_execute_analytic(), qexec_execute_connect_by(), qexec_groupby(), qexec_groupby_index(), qexec_iterate_connect_by_results(), qexec_merge_list(), qexec_recalc_tuples_parent_pos_in_list(), qfile_combine_two_list(), qfile_copy_tuple(), qfile_reallocate_tuple(), qfile_sort_list_with_func(), scan_next_index_scan(), scan_reset_scan_block(), scan_start_scan(), and stran_can_end_after_query_execution().
int qfile_overwrite_tuple | ( | THREAD_ENTRY * | thread_p, |
PAGE_PTR | first_page_p, | ||
QFILE_TUPLE | tuple, | ||
QFILE_TUPLE_RECORD * | tuple_record_p, | ||
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 6298 of file list_file.c.
References assert, ER_FAILED, FREE, if(), NO_ERROR, NULL, NULL_PAGEID, vpid::pageid, QFILE_GET_OVERFLOW_PAGE_ID, QFILE_GET_OVERFLOW_VPID, QFILE_GET_TUPLE_LENGTH, qfile_Max_tuple_page_size, QFILE_PAGE_HEADER_SIZE, qfile_set_dirty_page(), qmgr_get_old_page(), qfile_tuple_record::size, qfile_list_id::tfile_vfid, and qfile_tuple_record::tpl.
Referenced by qfile_set_tuple_column_value().
|
static |
Definition at line 5227 of file list_file.c.
References db_fprint_value(), qfile_list_cache_entry::deletion_marker, qfile_tuple_value_type_list::domp, vfid::fileid, qfile_list_id::first_vpid, i, qfile_list_id::last_vpid, qfile_list_id::lasttpl_len, qfile_list_cache_entry::list_id, NULL, qfile_list_id::page_cnt, vpid::pageid, qfile_list_cache_entry::param_values, qfile_list_id::query_id, qfile_list_cache_entry::query_string, qfile_list_cache_entry::ref_count, db_value_array::size, qfile_list_id::temp_vfid, qfile_list_cache_entry::time_created, qfile_list_cache_entry::time_last_used, TP_DOMAIN_TYPE, qfile_list_id::tuple_cnt, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, db_value_array::vals, vpid::volid, and vfid::volid.
Referenced by qfile_dump_list_cache_internal().
|
static |
Definition at line 3348 of file list_file.c.
References assert, recdes::data, er_errid(), ER_FAILED, error(), i, SORT_INFO::key_info, qfile_list_scan_id::list_id, SORT_REC::next, SORTKEY_INFO::nkeys, NO_ERROR, NULL, NULL_PAGEID, SORT_REC::offset, SORT_REC::original, SORT_INFO::output_file, SORT_INFO::output_recdes, p, vpid::pageid, qfile_add_overflow_tuple_to_list(), qfile_add_tuple_to_list(), qfile_generate_sort_tuple(), qfile_generate_tuple_into_list(), QFILE_GET_OVERFLOW_VPID, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_MAX_TUPLE_SIZE_IN_PAGE, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, qmgr_free_old_page_and_init, qmgr_get_old_page(), SORT_REC::s, SORT_INFO::s_id, qfile_sort_scan_id::s_id, qfile_tuple_descriptor::sort_rec, qfile_tuple_descriptor::sortkey_info, T_SORTKEY, qfile_list_id::tfile_vfid, qfile_list_id::tpl_descr, qfile_tuple_descriptor::tpl_size, SORTKEY_INFO::use_original, vpid::volid, and VPID_EQ.
Referenced by qfile_sort_list_with_func().
int qfile_reallocate_tuple | ( | QFILE_TUPLE_RECORD * | tuple_record_p, |
int | tuple_size | ||
) |
Definition at line 3010 of file list_file.c.
References db_private_alloc, db_private_free_and_init, db_private_realloc, ER_FAILED, NO_ERROR, NULL, PEEK, qfile_close_scan(), qfile_open_list_scan(), qfile_scan_list_next(), S_SUCCESS, qfile_tuple_record::size, qfile_tuple_record::tpl, qfile_tuple_value_type_list::type_cnt, and qfile_list_id::type_list.
Referenced by qexec_merge_list(), qexec_merge_list_outer(), qexec_merge_tuple(), qfile_get_tuple(), and qfile_retrieve_tuple().
int qfile_reopen_list_as_append_mode | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p | ||
) |
Definition at line 1284 of file list_file.c.
References assert_release, ER_FAILED, qfile_list_id::first_vpid, qfile_list_id::last_pgptr, qfile_list_id::last_vpid, qmgr_temp_file::membuf, qmgr_temp_file::membuf_last, NO_ERROR, NULL, NULL_VOLID, OLD_PAGE, PAGE_QRESULT, vpid::pageid, pgbuf_check_page_ptype(), pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, qfile_list_id::tfile_vfid, vpid::volid, and VPID_ISNULL.
Referenced by qexec_execute_cte(), qexec_groupby(), and qfile_union_list().
|
static |
Definition at line 4490 of file list_file.c.
References qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::curr_tpl, NO_ERROR, NULL_PAGEID, QFILE_GET_OVERFLOW_PAGE_ID, qfile_get_tuple_from_current_list(), QFILE_GET_TUPLE_LENGTH, qfile_reallocate_tuple(), S_ERROR, S_SUCCESS, qfile_tuple_record::size, qfile_tuple_record::tpl, and qfile_list_scan_id::tplrec.
Referenced by qfile_jump_scan_tuple_position(), and qfile_scan_list().
void qfile_save_current_scan_tuple_position | ( | QFILE_LIST_SCAN_ID * | scan_id_p, |
QFILE_TUPLE_POSITION * | tuple_position_p | ||
) |
Definition at line 4478 of file list_file.c.
References qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_tpl, qfile_list_scan_id::curr_tplno, qfile_list_scan_id::curr_vpid, qfile_tuple_position::offset, vpid::pageid, qfile_tuple_position::position, qfile_list_scan_id::position, qfile_tuple_position::status, qfile_list_scan_id::status, qfile_tuple_position::tpl, qfile_tuple_position::tplno, vpid::volid, and qfile_tuple_position::vpid.
Referenced by qexec_merge_list(), qexec_recalc_tuples_parent_pos_in_list(), qfile_advance_group(), and scan_save_scan_pos().
|
static |
Definition at line 1652 of file list_file.c.
References i, qfile_list_merge_info::ls_outer_inner_list, qfile_list_merge_info::ls_pos_cnt, qfile_list_merge_info::ls_pos_list, qfile_tuple_descriptor::merge_info, NO_ERROR, QFILE_GET_TUPLE_VALUE_HEADER_POSITION, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_OUTER_LIST, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, QFILE_TUPLE_LENGTH_SIZE, QFILE_TUPLE_VALUE_HEADER_SIZE, qfile_tuple_record::tpl, qfile_tuple_descriptor::tplrec1, qfile_tuple_descriptor::tplrec2, and V_UNBOUND.
Referenced by qfile_save_tuple().
|
static |
Definition at line 1596 of file list_file.c.
References qfile_tuple_descriptor::clear_f_val_at_clone_decache, ER_FAILED, qfile_tuple_descriptor::f_cnt, qfile_tuple_descriptor::f_valp, i, NO_ERROR, qdata_copy_db_value_to_tuple_value(), and QFILE_PUT_TUPLE_LENGTH.
Referenced by qfile_save_tuple().
|
static |
Definition at line 1573 of file list_file.c.
References HL::align(), DB_ALIGN, qfile_tuple_descriptor::item, qfile_tuple_descriptor::item_size, MAX_ALIGNMENT, NO_ERROR, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_SIZE, and V_BOUND.
Referenced by qfile_save_tuple().
|
static |
Definition at line 1616 of file list_file.c.
References i, SORTKEY_INFO::key, SORTKEY_INFO::nkeys, NO_ERROR, SORT_REC::offset, SUBKEY_INFO::permuted_col, QFILE_GET_TUPLE_VALUE_LENGTH, QFILE_PUT_TUPLE_LENGTH, QFILE_PUT_TUPLE_VALUE_FLAG, QFILE_PUT_TUPLE_VALUE_LENGTH, QFILE_TUPLE_VALUE_HEADER_SIZE, SORT_REC::s, qfile_tuple_descriptor::sort_rec, qfile_tuple_descriptor::sortkey_info, and V_UNBOUND.
Referenced by qfile_save_tuple().
int qfile_save_tuple | ( | QFILE_TUPLE_DESCRIPTOR * | tuple_descr_p, |
QFILE_TUPLE_TYPE | tuple_type, | ||
char * | page_p, | ||
int * | tuple_length_p | ||
) |
Definition at line 1705 of file list_file.c.
References ER_FAILED, NO_ERROR, qfile_save_merge_tuple(), qfile_save_normal_tuple(), qfile_save_single_bound_item_tuple(), qfile_save_sort_key_tuple(), QFILE_TUPLE_LENGTH_SIZE, T_MERGE, T_NORMAL, T_SINGLE_BOUND_ITEM, and T_SORTKEY.
Referenced by qexec_hash_gby_agg_tuple(), and qfile_generate_tuple_into_list().
|
static |
Definition at line 4701 of file list_file.c.
References qfile_retrieve_tuple(), and S_SUCCESS.
Referenced by qfile_scan_list_next(), and qfile_scan_list_prev().
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 at line 4724 of file list_file.c.
References qfile_scan_list(), and qfile_scan_next().
Referenced by eval_item_card_sort_list(), eval_some_list_eval(), eval_sub_sort_list_to_multi_set(), eval_sub_sort_list_to_sort_list(), qdata_convert_table_to_set(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), qdata_get_interpolation_function_result(), qdata_get_single_tuple_from_list_id(), qdata_load_agg_hentry_from_list(), qexec_analytic_update_group_result(), qexec_analytic_value_advance(), qexec_execute_connect_by(), qexec_groupby_index(), qexec_iterate_connect_by_results(), qexec_recalc_tuples_parent_pos_in_list(), qfile_advance_group(), qfile_advance_single(), qfile_copy_tuple(), qfile_make_sort_key(), qfile_reallocate_tuple(), scan_build_hash_list_scan(), scan_jump_scan_pos(), scan_next_index_lookup_heap(), scan_next_index_scan(), scan_next_list_scan(), and stran_can_end_after_query_execution().
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 at line 4738 of file list_file.c.
References qfile_scan_list(), and qfile_scan_prev().
Referenced by qexec_analytic_value_advance(), and scan_prev_scan_local().
|
static |
Definition at line 4310 of file list_file.c.
References ARG_FILE_LINE, qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::curr_tpl, qfile_list_scan_id::curr_tplno, qfile_list_scan_id::curr_vpid, ER_ERROR_SEVERITY, ER_QPROC_UNKNOWN_CRSPOS, er_set(), qfile_list_id::first_vpid, qfile_list_scan_id::keep_page_on_finish, qfile_list_scan_id::list_id, NULL, NULL_PAGEID, vpid::pageid, qfile_list_scan_id::position, QFILE_COPY_VPID, QFILE_GET_NEXT_VPID, QFILE_GET_TUPLE_COUNT, QFILE_GET_TUPLE_LENGTH, qfile_has_next_page(), QFILE_PAGE_HEADER_SIZE, qmgr_free_old_page_and_init, qmgr_get_old_page(), S_AFTER, S_BEFORE, S_END, S_ERROR, S_ON, S_SUCCESS, qfile_list_id::tfile_vfid, and qfile_list_id::tuple_cnt.
Referenced by qfile_scan_list_next().
|
static |
Definition at line 4398 of file list_file.c.
References ARG_FILE_LINE, qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::curr_tpl, qfile_list_scan_id::curr_tplno, qfile_list_scan_id::curr_vpid, ER_ERROR_SEVERITY, ER_QPROC_UNKNOWN_CRSPOS, er_set(), qfile_list_id::first_vpid, qfile_list_id::last_vpid, qfile_list_scan_id::list_id, NULL, NULL_PAGEID, vpid::pageid, qfile_list_scan_id::position, QFILE_COPY_VPID, QFILE_GET_LAST_TUPLE_OFFSET, QFILE_GET_PREV_PAGE_ID, QFILE_GET_PREV_TUPLE_LENGTH, QFILE_GET_PREV_VPID, QFILE_GET_TUPLE_COUNT, qmgr_free_old_page_and_init, qmgr_get_old_page(), S_AFTER, S_BEFORE, S_END, S_ERROR, S_ON, S_SUCCESS, qfile_list_id::tfile_vfid, and VPID_ISNULL.
Referenced by qfile_make_sort_key(), and qfile_scan_list_prev().
|
static |
Definition at line 1362 of file list_file.c.
References NULL, log_data_addr::offset, log_data_addr::pgptr, qmgr_set_dirty_page(), and log_data_addr::vfid.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), qfile_add_tuple_to_list(), qfile_allocate_new_ovf_page(), qfile_allocate_new_page(), qfile_copy_list_pages(), qfile_fast_intint_tuple_to_list(), qfile_fast_intval_tuple_to_list(), qfile_fast_val_tuple_to_list(), qfile_generate_tuple_into_list(), qfile_get_first_page(), qfile_overwrite_tuple(), and qfile_set_tuple_column_value().
|
static |
Definition at line 1042 of file list_file.c.
References log_skip_logging(), log_data_addr::offset, pgbuf_set_dirty(), log_data_addr::pgptr, and log_data_addr::vfid.
int qfile_set_tuple_column_value | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
PAGE_PTR | curr_page_p, | ||
VPID * | vpid_p, | ||
QFILE_TUPLE | tuple_p, | ||
int | col_num, | ||
DB_VALUE * | value_p, | ||
TP_DOMAIN * | domain_p | ||
) |
Definition at line 6170 of file list_file.c.
References cleanup(), pr_type::data_writeval(), db_private_free_and_init, DONT_FREE, ER_FAILED, error(), NO_ERROR, NULL, NULL_PAGEID, OR_BUF_INIT, QFILE_GET_OVERFLOW_PAGE_ID, qfile_get_tuple(), QFILE_GET_TUPLE_LENGTH, qfile_locate_tuple_value(), qfile_overwrite_tuple(), qfile_set_dirty_page(), qmgr_free_old_page_and_init, qmgr_get_old_page(), qfile_tuple_record::size, qfile_list_id::tfile_vfid, qfile_tuple_record::tpl, tp_domain::type, and V_BOUND.
Referenced by qexec_execute_connect_by(), and qexec_recalc_tuples_parent_pos_in_list().
QFILE_LIST_ID* qfile_sort_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
SORT_LIST * | sort_list_p, | ||
QUERY_OPTIONS | option, | ||
bool | do_close | ||
) |
Definition at line 4030 of file list_file.c.
References NO_SORT_LIMIT, NULL, Q_DISTINCT, QFILE_FLAG_ALL, QFILE_FLAG_DISTINCT, qfile_is_sort_list_covered(), qfile_sort_list_with_func(), and qfile_list_id::sort_list.
Referenced by eval_set_list_cmp(), qdata_finalize_aggregate_list(), qdata_finalize_analytic_func(), and qfile_combine_two_list().
QFILE_LIST_ID* qfile_sort_list_with_func | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
SORT_LIST * | sort_list_p, | ||
QUERY_OPTIONS | option, | ||
int | flag, | ||
SORT_GET_FUNC * | get_func, | ||
SORT_PUT_FUNC * | put_func, | ||
SORT_CMP_FUNC * | cmp_func, | ||
void * | extra_arg, | ||
int | limit, | ||
bool | do_close | ||
) |
Definition at line 3912 of file list_file.c.
References SORT_INFO::extra_arg, SORT_INFO::key_info, NO_ERROR, NULL, NULL_VOLID, SORT_INFO::output_file, Q_DISTINCT, qfile_clear_sort_info(), qfile_close_and_free_list_file(), qfile_close_list(), qfile_close_scan(), qfile_compare_all_sort_record(), qfile_compare_partial_sort_record(), qfile_copy_list_id(), qfile_destroy_list(), QFILE_FREE_AND_INIT_LIST_ID, qfile_get_estimated_pages_for_sorting(), qfile_get_next_sort_item(), qfile_initialize_sort_info(), qfile_open_list(), qfile_open_list_scan(), qfile_put_next_sort_item(), qfile_list_id::query_id, SORT_INFO::s_id, qfile_sort_scan_id::s_id, qfile_tuple_record::size, SORT_DUP, SORT_ELIM_DUP, sort_listfile(), qmgr_temp_file::tde_encrypted, qfile_list_id::tfile_vfid, qfile_tuple_record::tpl, qfile_sort_scan_id::tplrec, qfile_list_id::type_list, and SORTKEY_INFO::use_original.
Referenced by qexec_listfile_orderby(), qexec_orderby_distinct_by_sorting(), and qfile_sort_list().
int qfile_start_scan_fix | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_SCAN_ID * | scan_id_p | ||
) |
Definition at line 4628 of file list_file.c.
References qfile_list_scan_id::curr_offset, qfile_list_scan_id::curr_pgptr, qfile_list_scan_id::curr_tpl, qfile_list_scan_id::curr_vpid, ER_FAILED, qfile_list_scan_id::list_id, NO_ERROR, NULL, qfile_list_scan_id::position, qmgr_get_old_page(), S_BEFORE, S_ON, S_STARTED, qfile_list_scan_id::status, and qfile_list_id::tfile_vfid.
Referenced by scan_reset_scan_block(), and scan_start_scan().
int qfile_unify_types | ( | QFILE_LIST_ID * | list_id1_p, |
const QFILE_LIST_ID * | list_id2_p | ||
) |
Definition at line 826 of file list_file.c.
References ARG_FILE_LINE, assert_release, DB_TYPE_JSON, DB_TYPE_NULL, DB_TYPE_VARIABLE, qfile_tuple_value_type_list::domp, ER_ERROR_SEVERITY, ER_QPROC_INCOMPATIBLE_TYPES, ER_QSTR_INCOMPATIBLE_COLLATIONS, er_set(), i, NO_ERROR, pr_is_string_type(), pr_is_variable_type(), TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_COLLATION_FLAG, TP_DOMAIN_TYPE, qfile_list_id::tuple_cnt, qfile_tuple_value_type_list::type_cnt, and qfile_list_id::type_list.
Referenced by qexec_execute_cte(), qfile_combine_two_list(), and qfile_union_list().
|
static |
Definition at line 2942 of file list_file.c.
References error(), NO_ERROR, NULL, qfile_clear_list_id(), qfile_clone_list_id(), qfile_close_list(), qfile_copy_tuple(), qfile_free_list_id(), qfile_reopen_list_as_append_mode(), qfile_unify_types(), and qfile_list_id::tuple_cnt.
Referenced by qfile_combine_two_list().
int qfile_update_domains_on_type_list | ( | THREAD_ENTRY * | thread_p, |
QFILE_LIST_ID * | list_id_p, | ||
valptr_list_node * | valptr_list_p | ||
) |
Definition at line 6078 of file list_file.c.
References ARG_FILE_LINE, assert, tp_domain::collation_flag, cubregex::count(), DB_TYPE_VARIABLE, qfile_tuple_value_type_list::domp, ER_ERROR_SEVERITY, ER_FAILED, ER_GENERIC_ERROR, er_set(), i, qfile_list_id::is_domain_resolved, regu_variable_list_node::next, NO_ERROR, NULL, REGU_VARIABLE_HIDDEN_COLUMN, REGU_VARIABLE_IS_FLAGED(), TP_DOMAIN_COLL_NORMAL, TP_DOMAIN_TYPE, qfile_tuple_value_type_list::type_cnt, qfile_list_id::type_list, valptr_list_node::valptr_cnt, and valptr_list_node::valptrp.
Referenced by qexec_generate_tuple_descriptor().
QFILE_LIST_CACHE_ENTRY* qfile_update_list_cache_entry | ( | THREAD_ENTRY * | thread_p, |
int | list_ht_no, | ||
const DB_VALUE_ARRAY * | params, | ||
const QFILE_LIST_ID * | list_id, | ||
XASL_CACHE_ENTRY * | xasl | ||
) |
Definition at line 5627 of file list_file.c.
References ARG_FILE_LINE, assert, csect_enter, csect_exit, CSECT_QPROC_LIST_CACHE, db_change_private_heap(), db_private_free, qfile_list_cache_entry::deletion_marker, er_log_debug, i, INF_WAIT, qfile_list_cache_entry::list_ht_no, qfile_list_cache::list_hts, qfile_list_cache_entry::list_id, LOG_FIND_THREAD_TRAN_INDEX, logtb_find_isolation(), MAX_NTRANS, mht_get(), mht_put_new(), qfile_list_cache::n_entries, qfile_list_cache::n_hts, qfile_list_cache::n_pages, NO_ERROR, NULL, p, qfile_list_id::page_cnt, qfile_list_cache_entry::param_values, pr_clone_value(), pr_valstring(), prm_get_integer_value(), PRM_ID_LIST_MAX_QUERY_CACHE_ENTRIES, PRM_ID_LIST_MAX_QUERY_CACHE_PAGES, qfile_allocate_list_cache_entry(), qfile_copy_list_id(), qfile_delete_list_cache_entry(), qfile_get_list_cache_entry_param_values(), qfile_get_list_cache_entry_size_for_allocate(), QFILE_IS_LIST_CACHE_DISABLED, qfile_list_cache_entry::query_string, qfile_list_cache_entry::ref_count, db_value_array::size, execution_info::sql_hash_text, xasl_cache_ent::sql_info, qfile_list_id::tfile_vfid, qfile_list_cache_entry::time_created, qfile_list_cache_entry::time_last_used, db_value_array::vals, and qfile_list_cache_entry::xcache_entry.
Referenced by xqmgr_execute_query().
void qfile_update_qlist_count | ( | THREAD_ENTRY * | thread_p, |
const QFILE_LIST_ID * | list_p, | ||
int | inc | ||
) |
Definition at line 6471 of file list_file.c.
References ARG_FILE_LINE, er_print_callstack(), NULL, prm_get_bool_value(), PRM_ID_LOG_QUERY_LISTS, qfile_tuple_value_type_list::type_cnt, and qfile_list_id::type_list.
Referenced by qexec_setup_list_id(), qfile_clear_list_id(), qfile_copy_list_id(), qfile_delete_list_cache_entry(), and qfile_open_list().
int xqfile_get_list_file_page | ( | THREAD_ENTRY * | thread_p, |
QUERY_ID | query_id, | ||
VOLID | vol_id, | ||
PAGEID | page_id, | ||
char * | page_buf_p, | ||
int * | page_size_p | ||
) |
Definition at line 2200 of file list_file.c.
References assert, DB_PAGESIZE, er_errid(), ER_QPROC_UNKNOWN_QUERYID, qmgr_query_entry::errid, IO_MAX_PAGE_SIZE, qmgr_query_entry::list_id, LOG_FIND_THREAD_TRAN_INDEX, NO_ERROR, NULL, NULL_PAGEID, NULL_PAGEID_IN_PROGRESS, NULL_VOLID, vpid::pageid, QFILE_GET_LAST_TUPLE_OFFSET, QFILE_GET_NEXT_VPID, QFILE_GET_OVERFLOW_PAGE_ID, QFILE_GET_OVERFLOW_VPID, QFILE_GET_TUPLE_COUNT, QFILE_GET_TUPLE_LENGTH, QFILE_OVERFLOW_TUPLE_COUNT_FLAG, QFILE_PAGE_HEADER_SIZE, qmgr_free_old_page_and_init, qmgr_get_old_page(), qmgr_get_query_entry(), QUERY_COMPLETED, qmgr_query_entry::query_status, qfile_list_id::tfile_vfid, and VPID_SET.
Referenced by qfile_get_list_file_page(), and sqfile_get_list_file_page().
int qfile_Is_list_cache_disabled |
Definition at line 193 of file list_file.c.
Referenced by qfile_initialize().
|
static |
Definition at line 161 of file list_file.c.
|
static |
Definition at line 164 of file list_file.c.
|
static |
Definition at line 167 of file list_file.c.
|
static |
Definition at line 195 of file list_file.c.
Referenced by qfile_add_overflow_tuple_to_list(), qfile_add_tuple_get_pos_in_list(), qfile_add_tuple_to_list(), qfile_allocate_new_ovf_page(), qfile_generate_tuple_into_list(), qfile_get_tuple(), qfile_initialize(), and qfile_overwrite_tuple().
|
static |
Definition at line 175 of file list_file.c.
|
static |
Definition at line 170 of file list_file.c.
|
static |
Definition at line 145 of file list_file.c.
Referenced by qfile_allocate_list_cache_entry().
|
static |
Definition at line 57 of file list_file.c.