CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
#include "error_manager.h"
#include "system_parameter.h"
#include "memory_alloc.h"
#include "external_sort.h"
#include "file_manager.h"
#include "page_buffer.h"
#include "log_manager.h"
#include "disk_manager.h"
#include "slotted_page.h"
#include "overflow_file.h"
#include "boot_sr.h"
#include "server_support.h"
#include "thread_entry_task.hpp"
#include "thread_manager.hpp"
#include <functional>
Go to the source code of this file.
Classes | |
struct | file_contents |
struct | vol_info |
struct | vol_list |
struct | px_tree_node |
struct | sort_param |
struct | sort_rec_list |
struct | slotted_pheader |
struct | slot |
struct | run_struct |
struct | srun |
struct | sort_stack |
Macros | |
#define | SORT_MULTIPAGE_FILE_SIZE_ESTIMATE 20 |
#define | SORT_MAX_HALF_FILES 4 |
#define | SORT_MIN_HALF_FILES 2 |
#define | SORT_INITIAL_DYN_ARRAY_SIZE 30 |
#define | SORT_EXPAND_DYN_ARRAY_RATIO 1.5 |
#define | SORT_MAXREC_LENGTH ((ssize_t)(DB_PAGESIZE - sizeof(SLOTTED_PAGE_HEADER) - sizeof(SLOT))) |
#define | SORT_SWAP_PTR(a, b) { char **temp; temp = a; a = b; b = temp; } |
#define | SORT_CHECK_DUPLICATE(a, b) |
#define | SORT_PARTITION_RUN_SIZE_MIN (ONE_M) |
Typedefs | |
typedef struct file_contents | FILE_CONTENTS |
typedef struct vol_info | VOL_INFO |
typedef struct vol_list | VOL_LIST |
typedef struct px_tree_node | PX_TREE_NODE |
typedef struct sort_param | SORT_PARAM |
typedef struct sort_rec_list | SORT_REC_LIST |
typedef struct slotted_pheader | SLOTTED_PAGE_HEADER |
typedef struct slot | SLOT |
typedef struct run_struct | RUN |
typedef struct srun | SRUN |
typedef struct sort_stack | SORT_STACK |
typedef void | FIND_RUN_FN(char **, long *, SORT_STACK *, long, SORT_CMP_FUNC *, void *) |
typedef void | MERGE_RUN_FN(char **, char **, SORT_STACK *, SORT_CMP_FUNC *, void *) |
Functions | |
static int | sort_validate (char **vector, long size, SORT_CMP_FUNC *compare, void *comp_arg) |
static PX_TREE_NODE * | px_sort_assign (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param, int px_id, char **px_buff, char **px_vector, long px_vector_size, int px_height, int px_myself) |
static int | px_sort_myself (THREAD_ENTRY *thread_p, PX_TREE_NODE *px_node) |
static int | sort_inphase_sort (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param, SORT_GET_FUNC *get_next, void *arguments, unsigned int *total_numrecs) |
static int | sort_exphase_merge_elim_dup (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param) |
static int | sort_exphase_merge (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param) |
static int | sort_get_avg_numpages_of_nonempty_tmpfile (SORT_PARAM *sort_param) |
static void | sort_return_used_resources (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param) |
static int | sort_add_new_file (THREAD_ENTRY *thread_p, VFID *vfid, int file_pg_cnt_est, bool force_alloc, bool tde_encrypted) |
static int | sort_write_area (THREAD_ENTRY *thread_p, VFID *vfid, int first_page, INT32 num_pages, char *area_start) |
static int | sort_read_area (THREAD_ENTRY *thread_p, VFID *vfid, int first_page, INT32 num_pages, char *area_start) |
static int | sort_get_num_half_tmpfiles (int tot_buffers, int input_pages) |
static int | sort_checkalloc_numpages_of_outfiles (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param) |
static int | sort_get_numpages_of_active_infiles (const SORT_PARAM *sort_param) |
static int | sort_find_inbuf_size (int tot_buffers, int in_sections) |
static char * | sort_retrieve_longrec (THREAD_ENTRY *thread_p, RECDES *address, RECDES *memory) |
static char ** | sort_run_sort (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param, char **base, long limit, long sort_numrecs, char **otherbase, long *srun_limit) |
static int | sort_run_add_new (FILE_CONTENTS *file_contents, int num_pages) |
static void | sort_run_remove_first (FILE_CONTENTS *file_contents) |
static void | sort_run_flip (char **start, char **stop) |
static void | sort_run_find (char **source, long *top, SORT_STACK *st_p, long limit, SORT_CMP_FUNC *compare, void *comp_arg, SORT_DUP_OPTION option) |
static void | sort_run_merge (char **low, char **high, SORT_STACK *st_p, SORT_CMP_FUNC *compare, void *comp_arg, SORT_DUP_OPTION option) |
static int | sort_run_flush (THREAD_ENTRY *thread_p, SORT_PARAM *sort_param, int out_curfile, int *cur_page, char *output_buffer, char **index_area, int numrecs, int rec_type) |
static int | sort_get_num_file_contents (FILE_CONTENTS *file_contents) |
static void | sort_spage_initialize (PAGE_PTR pgptr, INT16 slots_type, INT16 alignment) |
static INT16 | sort_spage_get_numrecs (PAGE_PTR pgptr) |
static INT16 | sort_spage_insert (PAGE_PTR pgptr, RECDES *recdes) |
static SCAN_CODE | sort_spage_get_record (PAGE_PTR pgptr, INT16 slotid, RECDES *recdes, bool peek_p) |
static int | sort_spage_offsetcmp (const void *s1, const void *s2) |
static int | sort_spage_compact (PAGE_PTR pgptr) |
static INT16 | sort_spage_find_free (PAGE_PTR pgptr, SLOT **sptr, INT16 length, INT16 type, INT16 *space) |
static void | sort_append (const void *pk0, const void *pk1) |
int | sort_listfile (THREAD_ENTRY *thread_p, INT16 volid, int est_inp_pg_cnt, SORT_GET_FUNC *get_fn, void *get_arg, SORT_PUT_FUNC *put_fn, void *put_arg, SORT_CMP_FUNC *cmp_fn, void *cmp_arg, SORT_DUP_OPTION option, int limit, bool includes_tde_class) |
#define SORT_CHECK_DUPLICATE | ( | a, | |
b | |||
) |
Definition at line 84 of file external_sort.c.
Referenced by sort_run_find().
#define SORT_EXPAND_DYN_ARRAY_RATIO 1.5 |
Definition at line 77 of file external_sort.c.
Referenced by sort_run_add_new().
#define SORT_INITIAL_DYN_ARRAY_SIZE 30 |
Definition at line 74 of file external_sort.c.
Referenced by sort_listfile().
#define SORT_MAX_HALF_FILES 4 |
Definition at line 64 of file external_sort.c.
Referenced by sort_checkalloc_numpages_of_outfiles(), sort_exphase_merge(), sort_exphase_merge_elim_dup(), sort_get_num_half_tmpfiles(), sort_inphase_sort(), and sort_listfile().
#define SORT_MAXREC_LENGTH ((ssize_t)(DB_PAGESIZE - sizeof(SLOTTED_PAGE_HEADER) - sizeof(SLOT))) |
Definition at line 79 of file external_sort.c.
Referenced by sort_inphase_sort(), and sort_spage_insert().
#define SORT_MIN_HALF_FILES 2 |
Definition at line 71 of file external_sort.c.
Referenced by sort_get_num_half_tmpfiles().
#define SORT_MULTIPAGE_FILE_SIZE_ESTIMATE 20 |
Definition at line 57 of file external_sort.c.
#define SORT_PARTITION_RUN_SIZE_MIN (ONE_M) |
Referenced by px_sort_myself().
#define SORT_SWAP_PTR | ( | a, | |
b | |||
) | { char **temp; temp = a; a = b; b = temp; } |
Definition at line 82 of file external_sort.c.
typedef struct file_contents FILE_CONTENTS |
Definition at line 94 of file external_sort.c.
typedef void FIND_RUN_FN(char **, long *, SORT_STACK *, long, SORT_CMP_FUNC *, void *) |
Definition at line 241 of file external_sort.c.
typedef void MERGE_RUN_FN(char **, char **, SORT_STACK *, SORT_CMP_FUNC *, void *) |
Definition at line 242 of file external_sort.c.
typedef struct px_tree_node PX_TREE_NODE |
Definition at line 121 of file external_sort.c.
typedef struct run_struct RUN |
Definition at line 218 of file external_sort.c.
Definition at line 210 of file external_sort.c.
typedef struct slotted_pheader SLOTTED_PAGE_HEADER |
Definition at line 196 of file external_sort.c.
typedef struct sort_param SORT_PARAM |
Definition at line 144 of file external_sort.c.
typedef struct sort_rec_list SORT_REC_LIST |
Definition at line 188 of file external_sort.c.
typedef struct sort_stack SORT_STACK |
Definition at line 234 of file external_sort.c.
Definition at line 225 of file external_sort.c.
Definition at line 104 of file external_sort.c.
Definition at line 111 of file external_sort.c.
|
static |
Definition at line 1619 of file external_sort.c.
References assert, assert_release, css_get_current_conn_entry(), css_push_external_task(), LOG_FIND_THREAD_TRAN_INDEX, NO_ERROR, NULL, pthread_mutex_lock, pthread_mutex_unlock, px_tree_node::px_arg, sort_param::px_array, sort_param::px_array_size, px_tree_node::px_buff, px_tree_node::px_height, sort_param::px_height_max, px_tree_node::px_id, px_tree_node::px_myself, px_tree_node::px_result, px_tree_node::px_result_size, px_sort_myself(), px_tree_node::px_tran_index, px_tree_node::px_vector, px_tree_node::px_vector_size, and rv.
Referenced by px_sort_myself(), and sort_inphase_sort().
|
static |
Definition at line 1752 of file external_sort.c.
References assert, assert_release, cmp, sort_param::cmp_arg, sort_param::cmp_fn, DB_EQ, DB_GT, DB_LT, er_errid(), ER_FAILED, i, logtb_set_check_interrupt(), NO_ERROR, NULL, sort_param::option, pthread_mutex_lock, pthread_mutex_unlock, px_tree_node::px_arg, px_tree_node::px_buff, px_tree_node::px_height, px_tree_node::px_id, px_tree_node::px_myself, px_tree_node::px_result, px_tree_node::px_result_size, px_sort_assign(), px_tree_node::px_tran_index, px_tree_node::px_vector, px_tree_node::px_vector_size, rv, sort_append(), SORT_DUP, SORT_PARTITION_RUN_SIZE_MIN, sort_run_sort(), sort_validate(), thread_get_thread_entry_info(), and thread_sleep().
Referenced by px_sort_assign(), and sort_inphase_sort().
|
static |
Definition at line 4477 of file external_sort.c.
References ASSERT_ERROR, assert_release, ER_FAILED, file_alloc(), file_apply_tde_algorithm(), file_create_temp_numerable(), file_temp_retire(), NO_ERROR, NULL, prm_get_integer_value(), PRM_ID_TDE_DEFAULT_ALGORITHM, TDE_ALGORITHM_NONE, VFID_ISNULL, and VFID_SET_NULL.
Referenced by sort_listfile(), and sort_run_flush().
Definition at line 856 of file external_sort.c.
References SORT_REC::next.
Referenced by px_sort_myself(), and sort_run_merge().
|
static |
Definition at line 4704 of file external_sort.c.
References assert, ASSERT_ERROR, file_alloc_multiple(), sort_param::file_contents, file_get_num_user_pages(), file_temp_retire(), file_contents::first_run, sort_param::half_files, i, sort_param::in_half, file_contents::last_run, NO_ERROR, NULL, file_contents::num_pages, SORT_MAX_HALF_FILES, sort_param::temp, VFID_ISNULL, and VFID_SET_NULL.
Referenced by sort_exphase_merge(), and sort_exphase_merge_elim_dup().
|
static |
Definition at line 3630 of file external_sort.c.
References recdes::area_size, ARG_FILE_LINE, ASSERT_ERROR, cmp, sort_param::cmp_arg, sort_param::cmp_fn, recdes::data, DB_PAGESIZE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), ER_SORT_TEMP_PAGE_CORRUPTED, error(), sort_param::file_contents, file_contents::first_run, free_and_init, sort_param::half_files, i, sort_param::in_half, sort_param::internal_memory, MAX_ALIGNMENT, min, SORT_REC::next, sort_rec_list::next, NO_ERROR, NULL, NULL_SLOTID, file_contents::num_pages, p, PEEK, sort_param::put_arg, sort_param::put_fn, REC_BIGONE, sort_rec_list::rec_pos, S_SUCCESS, sort_checkalloc_numpages_of_outfiles(), sort_find_inbuf_size(), sort_get_num_file_contents(), sort_get_numpages_of_active_infiles(), SORT_MAX_HALF_FILES, SORT_PUT_STOP, sort_read_area(), sort_retrieve_longrec(), sort_run_add_new(), sort_run_remove_first(), sort_spage_get_numrecs(), sort_spage_get_record(), sort_spage_initialize(), sort_spage_insert(), sort_write_area(), sort_param::temp, sort_param::tot_buffers, sort_param::tot_tempfiles, recdes::type, and UNANCHORED_KEEP_SEQUENCE.
Referenced by sort_listfile().
|
static |
Definition at line 2846 of file external_sort.c.
References recdes::area_size, ARG_FILE_LINE, ASSERT_ERROR, cmp, sort_param::cmp_arg, sort_param::cmp_fn, recdes::data, DB_PAGESIZE, er_errid(), ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), ER_SORT_TEMP_PAGE_CORRUPTED, error(), sort_param::file_contents, file_contents::first_run, free_and_init, sort_param::half_files, i, sort_param::in_half, sort_param::internal_memory, sort_rec_list::is_duplicated, MAX_ALIGNMENT, min, SORT_REC::next, sort_rec_list::next, NO_ERROR, NULL, NULL_SLOTID, file_contents::num_pages, p, PEEK, sort_param::put_arg, sort_param::put_fn, REC_BIGONE, sort_rec_list::rec_pos, S_SUCCESS, sort_checkalloc_numpages_of_outfiles(), sort_find_inbuf_size(), sort_get_num_file_contents(), sort_get_numpages_of_active_infiles(), SORT_MAX_HALF_FILES, SORT_PUT_STOP, sort_read_area(), sort_retrieve_longrec(), sort_run_add_new(), sort_run_remove_first(), sort_spage_get_numrecs(), sort_spage_get_record(), sort_spage_initialize(), sort_spage_insert(), sort_write_area(), sort_param::temp, sort_param::tot_buffers, sort_param::tot_tempfiles, recdes::type, and UNANCHORED_KEEP_SEQUENCE.
Referenced by sort_listfile().
|
static |
Definition at line 4850 of file external_sort.c.
Referenced by sort_exphase_merge(), and sort_exphase_merge_elim_dup().
|
static |
Definition at line 4380 of file external_sort.c.
References sort_param::file_contents, file_contents::first_run, i, file_contents::last_run, file_contents::num_pages, and sort_param::tot_tempfiles.
Referenced by sort_listfile().
|
static |
Definition at line 4935 of file external_sort.c.
References file_contents::first_run, file_contents::last_run, and file_contents::num_pages.
Referenced by sort_exphase_merge(), and sort_exphase_merge_elim_dup().
|
static |
Definition at line 4649 of file external_sort.c.
References CEIL_PTVDIV, SORT_MAX_HALF_FILES, and SORT_MIN_HALF_FILES.
Referenced by sort_listfile().
|
static |
Definition at line 4811 of file external_sort.c.
References sort_param::file_contents, file_contents::first_run, sort_param::half_files, i, and sort_param::in_half.
Referenced by sort_exphase_merge(), and sort_exphase_merge_elim_dup().
|
static |
Definition at line 2165 of file external_sort.c.
References recdes::area_size, ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, recdes::data, DB_ALIGN, DB_PAGESIZE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), file_apply_tde_algorithm(), file_create_temp(), FILE_TEMP, file_temp_retire(), free_and_init, sort_param::half_files, i, sort_param::in_half, sort_param::internal_memory, recdes::length, MAX_ALIGNMENT, sort_param::multipage_file, NO_ERROR, NULL, NULL_VOLID, sort_param::option, overflow_insert(), PEEK, prm_get_integer_value(), PRM_ID_TDE_DEFAULT_ALGORITHM, pthread_mutex_lock, pthread_mutex_unlock, sort_param::put_arg, sort_param::put_fn, sort_param::px_array, sort_param::px_array_size, sort_param::px_height_max, px_tree_node::px_result, px_tree_node::px_result_size, px_sort_assign(), px_sort_myself(), REC_BIGONE, REC_HOME, rv, S_SUCCESS, SORT_ELIM_DUP, SORT_ERROR_OCCURRED, SORT_MAX_HALF_FILES, SORT_MAXREC_LENGTH, SORT_NOMORE_RECS, SORT_PUT_STOP, sort_read_area(), SORT_REC_DOESNT_FIT, SORT_RECORD_LENGTH, SORT_RECORD_LENGTH_SIZE, sort_retrieve_longrec(), sort_run_flush(), sort_run_sort(), sort_spage_get_record(), SORT_SUCCESS, TDE_ALGORITHM_NONE, sort_param::tde_encrypted, sort_param::temp, sort_param::tot_buffers, sort_param::tot_runs, and vfid::volid.
Referenced by sort_listfile().
int sort_listfile | ( | THREAD_ENTRY * | thread_p, |
INT16 | volid, | ||
int | est_inp_pg_cnt, | ||
SORT_GET_FUNC * | get_fn, | ||
void * | get_arg, | ||
SORT_PUT_FUNC * | put_fn, | ||
void * | put_arg, | ||
SORT_CMP_FUNC * | cmp_fn, | ||
void * | cmp_arg, | ||
SORT_DUP_OPTION | option, | ||
int | limit, | ||
bool | includes_tde_class | ||
) |
Definition at line 1345 of file external_sort.c.
References ARG_FILE_LINE, assert_release, CEIL_PTVDIV, cleanup(), sort_param::cmp_arg, sort_param::cmp_fn, DB_PAGESIZE, db_private_alloc, ER_CSS_PTHREAD_MUTEX_INIT, ER_ERROR_SEVERITY, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), sort_param::file_contents, vfid::fileid, file_contents::first_run, free_and_init, sort_param::half_files, i, sort_param::in_half, sort_param::internal_memory, file_contents::last_run, sort_param::limit, sort_param::multipage_file, NO_ERROR, NULL, NULL_FILEID, NULL_VOLID, file_contents::num_pages, file_contents::num_slots, sort_param::option, prm_get_integer_value(), PRM_ID_SR_NBUFFERS, pthread_mutex_init, sort_param::put_arg, sort_param::put_fn, sort_param::px_array, sort_param::px_array_size, sort_param::px_height_max, rv, sort_add_new_file(), SORT_ELIM_DUP, sort_exphase_merge(), sort_exphase_merge_elim_dup(), sort_get_avg_numpages_of_nonempty_tmpfile(), sort_get_num_half_tmpfiles(), SORT_INITIAL_DYN_ARRAY_SIZE, sort_inphase_sort(), SORT_MAX_HALF_FILES, sort_return_used_resources(), sort_param::tde_encrypted, sort_param::temp, thread_set_sort_stats_active(), sort_param::tmp_file_pgs, sort_param::tot_buffers, sort_param::tot_runs, sort_param::tot_tempfiles, vol_list::vol_cnt, vol_list::vol_ent_cnt, vol_list::vol_info, sort_param::vol_list, vol_list::volid, and vfid::volid.
Referenced by btree_index_sort(), qexec_execute_analytic(), qexec_groupby(), and qfile_sort_list_with_func().
|
static |
Definition at line 4604 of file external_sort.c.
References ASSERT_ERROR, ASSERT_ERROR_AND_SET, DB_PAGESIZE, file_numerable_find_nth(), i, NO_ERROR, NULL, file_contents::num_pages, pgbuf_copy_to_area(), vpid::volid, and vfid::volid.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_inphase_sort().
|
static |
Definition at line 2802 of file external_sort.c.
References recdes::area_size, recdes::data, free_and_init, NULL, overflow_get(), overflow_get_length(), and S_SUCCESS.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_inphase_sort().
|
static |
Definition at line 4413 of file external_sort.c.
References ARG_FILE_LINE, db_private_free_and_init, ER_CSS_PTHREAD_MUTEX_DESTROY, ER_ERROR_SEVERITY, er_set(), sort_param::file_contents, file_temp_retire(), free_and_init, sort_param::internal_memory, sort_param::multipage_file, NULL, NULL_VOLID, file_contents::num_pages, pthread_mutex_destroy, sort_param::px_array, sort_param::px_array_size, sort_param::px_height_max, rv, sort_param::temp, sort_param::tot_tempfiles, and vfid::volid.
Referenced by sort_listfile().
|
static |
Definition at line 4873 of file external_sort.c.
References db_private_realloc, ER_FAILED, file_contents::first_run, file_contents::last_run, NO_ERROR, NULL, file_contents::num_pages, file_contents::num_slots, and SORT_EXPAND_DYN_ARRAY_RATIO.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_run_flush().
|
static |
Definition at line 886 of file external_sort.c.
References CAST_BUFLEN, cmp, srun::low_high, NULL, SORT_CHECK_DUPLICATE, sort_run_flip(), sort_stack::srun, srun::start, srun::stop, sort_stack::top, and srun::tree_depth.
Referenced by sort_run_sort().
|
static |
Definition at line 833 of file external_sort.c.
Referenced by sort_run_find().
|
static |
Definition at line 2687 of file external_sort.c.
References ARG_FILE_LINE, recdes::data, ER_FATAL_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), error(), sort_param::file_contents, i, recdes::length, sort_param::limit, MAX_ALIGNMENT, SORT_REC::next, NO_ERROR, NULL, NULL_SLOTID, NULL_VOLID, REC_HOME, sort_add_new_file(), SORT_RECORD_LENGTH, sort_run_add_new(), sort_spage_get_numrecs(), sort_spage_initialize(), sort_spage_insert(), sort_write_area(), sort_param::tde_encrypted, sort_param::temp, sort_param::tmp_file_pgs, sort_param::tot_runs, recdes::type, UNANCHORED_KEEP_SEQUENCE, and vfid::volid.
Referenced by sort_inphase_sort().
|
static |
Definition at line 1007 of file external_sort.c.
References cmp, srun::low_high, sort_append(), SORT_DUP, sort_stack::srun, srun::start, srun::stop, sort_stack::top, and srun::tree_depth.
Referenced by sort_run_sort().
|
static |
Definition at line 4914 of file external_sort.c.
References file_contents::first_run, and file_contents::last_run.
Referenced by sort_exphase_merge(), and sort_exphase_merge_elim_dup().
|
static |
Definition at line 1169 of file external_sort.c.
References ARG_FILE_LINE, assert, assert_release, sort_param::cmp_arg, sort_param::cmp_fn, db_private_alloc, db_private_free_and_init, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), srun::low_high, NO_ERROR, NULL, sort_param::option, SORT_ELIM_DUP, sort_run_find(), sort_run_merge(), sort_validate(), sort_stack::srun, srun::start, srun::stop, sort_stack::top, and srun::tree_depth.
Referenced by px_sort_myself(), and sort_inphase_sort().
|
static |
Definition at line 404 of file external_sort.c.
References slotted_pheader::alignment, ARG_FILE_LINE, slotted_pheader::cfree, DB_ALIGN, DB_PAGESIZE, ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), slotted_pheader::foffset, free_and_init, i, NO_ERROR, slotted_pheader::nrecs, slotted_pheader::nslots, NULL, NULL_OFFSET, slot::rlength, slot::roffset, sort_spage_offsetcmp(), and slotted_pheader::tfree.
Referenced by sort_spage_find_free().
|
static |
Definition at line 479 of file external_sort.c.
References slotted_pheader::alignment, assert, slotted_pheader::cfree, DB_PAGESIZE, DB_WASTED_ALIGN, slotted_pheader::foffset, NO_ERROR, slotted_pheader::nrecs, slotted_pheader::nslots, NULL, NULL_SLOTID, REC_BIGONE, REC_HOME, sort_spage_compact(), slotted_pheader::tfree, and slotted_pheader::waste_align.
Referenced by sort_spage_insert().
|
static |
Definition at line 366 of file external_sort.c.
References slotted_pheader::nrecs.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_run_flush().
|
static |
Definition at line 638 of file external_sort.c.
References slotted_pheader::alignment, slotted_pheader::anchor_flag, recdes::area_size, assert, slotted_pheader::cfree, recdes::data, DB_PAGESIZE, DB_WASTED_ALIGN, slotted_pheader::foffset, for(), i, recdes::length, slotted_pheader::nrecs, slotted_pheader::nslots, NULL_OFFSET, PEEK, REC_BIGONE, REC_HOME, slot::rlength, slot::roffset, slot::rtype, S_DOESNT_EXIST, S_DOESNT_FIT, S_SUCCESS, spage_alignment_string(), spage_anchor_flag_string(), slotted_pheader::tfree, recdes::type, and slotted_pheader::waste_align.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_inphase_sort().
|
static |
Definition at line 317 of file external_sort.c.
References slotted_pheader::alignment, slotted_pheader::anchor_flag, slotted_pheader::cfree, CHAR_ALIGNMENT, DB_PAGESIZE, DB_WASTED_ALIGN, DOUBLE_ALIGNMENT, FLOAT_ALIGNMENT, slotted_pheader::foffset, INT_ALIGNMENT, LONG_ALIGNMENT, MAX_ALIGNMENT, slotted_pheader::nrecs, slotted_pheader::nslots, SHORT_ALIGNMENT, spage_is_valid_anchor_type(), slotted_pheader::tfree, UNANCHORED_KEEP_SEQUENCE, and slotted_pheader::waste_align.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_run_flush().
Definition at line 586 of file external_sort.c.
References assert, recdes::data, recdes::length, NULL_SLOTID, REC_BIGONE, REC_HOME, slot::roffset, SORT_MAXREC_LENGTH, sort_spage_find_free(), and recdes::type.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_run_flush().
Definition at line 382 of file external_sort.c.
References slot::roffset.
Referenced by sort_spage_compact().
|
static |
Definition at line 1577 of file external_sort.c.
References assert, cmp, DB_LT, ER_FAILED, NO_ERROR, and NULL.
Referenced by px_sort_myself(), and sort_run_sort().
|
static |
Definition at line 4549 of file external_sort.c.
References ASSERT_ERROR, ASSERT_ERROR_AND_SET, DB_PAGESIZE, file_get_tde_algorithm(), file_numerable_find_nth(), i, NO_ERROR, NULL, file_contents::num_pages, pgbuf_copy_from_area(), PGBUF_UNCONDITIONAL_LATCH, and TDE_ALGORITHM_NONE.
Referenced by sort_exphase_merge(), sort_exphase_merge_elim_dup(), and sort_run_flush().