24 #ifndef _SLOTTED_PAGE_H_ 25 #define _SLOTTED_PAGE_H_ 50 #define SP_SUCCESS (1) 51 #define SP_DOESNT_FIT (3) 53 #define SAFEGUARD_RVSPACE true 54 #define DONT_SAFEGUARD_RVSPACE false 57 #define SPAGE_HEADER_FLAG_NONE 0x0 58 #define SPAGE_HEADER_FLAG_ALL_VISIBLE 0x1 87 unsigned int offset_to_record:14;
88 unsigned int record_length:14;
89 unsigned int record_type:4;
103 bool safeguard_rvspace);
113 int delete_record_length,
int insert_record_length);
bool spage_is_slot_exist(PAGE_PTR pgptr, PGSLOTID slotid)
PGNSLOTS spage_number_of_slots(PAGE_PTR pgptr)
PGSLOTID spage_delete_for_recovery(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid)
int spage_slots_start_scan(THREAD_ENTRY *thread_p, int show_type, DB_VALUE **arg_values, int arg_cnt, void **ctx)
int spage_header_end_scan(THREAD_ENTRY *thread_p, void **ctx)
SCAN_CODE spage_next_record_dont_skip_empty(PAGE_PTR pgptr, PGSLOTID *slotid, RECDES *recdes, int ispeeking)
void spage_collect_statistics(PAGE_PTR pgptr, int *npages, int *nrecords, int *rec_length)
int spage_get_free_space(THREAD_ENTRY *thread_p, PAGE_PTR pgptr)
SCAN_CODE spage_next_record(PAGE_PTR pgptr, PGSLOTID *slotid, RECDES *recdes, int ispeeking)
int spage_get_record_length(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid)
bool spage_check_num_slots(THREAD_ENTRY *thread_p, PAGE_PTR page_p)
void spage_vacuum_slot(THREAD_ENTRY *thread_p, PAGE_PTR page_p, PGSLOTID slotid, bool reusable)
int spage_insert_at(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, RECDES *recdes)
int spage_slots_end_scan(THREAD_ENTRY *thread_p, void **ctx)
const char * spage_alignment_string(unsigned short alignment)
PGSLOTID spage_delete(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid)
void spage_finalize(THREAD_ENTRY *thread_p)
int spage_max_record_size(void)
INT16 spage_get_record_type(PAGE_PTR pgptr, PGSLOTID slotid)
int spage_overwrite(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int overwrite_offset, const RECDES *recdes)
int spage_merge(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid1, PGSLOTID slotid2)
int spage_compact(THREAD_ENTRY *thread_p, PAGE_PTR pgptr)
bool spage_need_compact(THREAD_ENTRY *thread_p, PAGE_PTR page_p)
bool spage_is_updatable(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int recdes_length)
SCAN_CODE spage_header_next_scan(THREAD_ENTRY *thread_p, int cursor, DB_VALUE **out_values, int out_cnt, void *ctx)
int spage_max_space_for_new_record(THREAD_ENTRY *thread_p, PAGE_PTR pgptr)
void spage_dump(THREAD_ENTRY *thread_p, FILE *fp, PAGE_PTR pgptr, int isrecord_printed)
SPAGE_SLOT * spage_get_slot(PAGE_PTR page_p, PGSLOTID slot_id)
int spage_put(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int offset, const RECDES *recdes)
void spage_free_saved_spaces(THREAD_ENTRY *thread_p, void *first_save_entry)
int spage_check(THREAD_ENTRY *thread_p, PAGE_PTR page_p)
void spage_update_record_type(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, INT16 type)
SCAN_CODE spage_previous_record(PAGE_PTR pgptr, PGSLOTID *slotid, RECDES *recdes, int ispeeking)
SCAN_CODE spage_get_record(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, RECDES *recdes, int ispeeking)
SCAN_CODE spage_slots_next_scan(THREAD_ENTRY *thread_p, int cursor, DB_VALUE **out_values, int out_cnt, void *ctx)
int spage_get_free_space_without_saving(THREAD_ENTRY *thread_p, PAGE_PTR page_p, bool *need_update)
int spage_check_slot_owner(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid)
int spage_update(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, const RECDES *recdes)
bool spage_is_valid_anchor_type(const INT16 anchor_type)
SCAN_CODE spage_get_page_header_info(PAGE_PTR page_p, DB_VALUE **page_header_info)
void spage_boot(THREAD_ENTRY *thread_p)
int spage_insert_for_recovery(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, RECDES *recdes)
int spage_append(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, const RECDES *recdes)
const char * spage_anchor_flag_string(const INT16 anchor_type)
PGSLOTID spage_find_free_slot(PAGE_PTR page_p, SPAGE_SLOT **out_slot_p, PGSLOTID start_id)
int spage_get_record_offset(THREAD_ENTRY *thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
SCAN_CODE spage_previous_record_dont_skip_empty(PAGE_PTR pgptr, PGSLOTID *slotid, RECDES *recdes, int ispeeking)
int spage_insert(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, RECDES *recdes, PGSLOTID *slotid)
int spage_slot_size(void)
int spage_get_space_for_record(THREAD_ENTRY *thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
int spage_header_start_scan(THREAD_ENTRY *thread_p, int show_type, DB_VALUE **arg_values, int arg_cnt, void **ctx)
PGNSLOTS spage_number_of_records(PAGE_PTR pgptr)
bool spage_is_mvcc_updatable(THREAD_ENTRY *thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int delete_record_length, int insert_record_length)
void spage_set_need_update_best_hint(THREAD_ENTRY *thread_p, PAGE_PTR page_p, bool need_update)
int spage_mark_deleted_slot_as_reusable(THREAD_ENTRY *thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
bool spage_reclaim(THREAD_ENTRY *thread_p, PAGE_PTR pgptr)
int spage_header_size(void)
int spage_split(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int offset, PGSLOTID *new_slotid)
int spage_take_out(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int takeout_offset, int takeout_length)
void spage_initialize(THREAD_ENTRY *thread_p, PAGE_PTR pgptr, INT16 slots_type, unsigned short alignment, bool safeguard_rvspace)