File slotted_page.c
FileList > cubrid > src > storage > slotted_page.c
Go to the source code of this file
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "slotted_page.h"
#include "storage_common.h"
#include "memory_alloc.h"
#include "error_manager.h"
#include "system_parameter.h"
#include "memory_hash.h"
#include "object_representation.h"
#include "page_buffer.h"
#include "porting_inline.hpp"
#include "log_manager.h"
#include "critical_section.h"
#include "lock_free.h"
#include "mvcc.h"
#include "connection_error.h"
#include "dbtype.h"
#include "thread_entry.hpp"
#include "thread_lockfree_hash_map.hpp"
#include "thread_manager.hpp"
#include "memory_wrapper.hpp"
Classes
Public Types
Public Static Attributes
Public Functions
| Type |
Name |
| const char * |
spage_alignment_string (unsigned short alignment)
|
| const char * |
spage_anchor_flag_string (const INT16 anchor_type)
|
| int |
spage_append (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, const RECDES * record_descriptor_p)
|
| void |
spage_boot (THREAD_ENTRY * thread_p)
|
| int |
spage_check (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| bool |
spage_check_num_slots (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| int |
spage_check_slot_owner (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| void |
spage_collect_statistics (PAGE_PTR page_p, int * npages, int * nrecords, int * rec_length)
|
| int |
spage_compact (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| PGSLOTID |
spage_delete (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| PGSLOTID |
spage_delete_for_recovery (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| void |
spage_dump (THREAD_ENTRY * thread_p, FILE * fp, PAGE_PTR page_p, int is_record_printed)
|
| void |
spage_finalize (THREAD_ENTRY * thread_p)
|
| PGSLOTID |
spage_find_free_slot (PAGE_PTR page_p, SPAGE_SLOT ** out_slot_p, PGSLOTID start_slot)
|
| void |
spage_free_saved_spaces (THREAD_ENTRY * thread_p, void * first_save_entry)
|
| int |
spage_get_free_space (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| int |
spage_get_free_space_without_saving (THREAD_ENTRY * thread_p, PAGE_PTR page_p, bool * need_update)
|
| SCAN_CODE |
spage_get_page_header_info (PAGE_PTR page_p, DB_VALUE ** page_header_info)
|
| SCAN_CODE |
spage_get_record (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, RECDES * record_descriptor_p, int is_peeking)
|
| int |
spage_get_record_length (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| int |
spage_get_record_offset (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| INT16 |
spage_get_record_type (PAGE_PTR page_p, PGSLOTID slot_id)
|
| SPAGE_SLOT * |
spage_get_slot (PAGE_PTR page_p, PGSLOTID slot_id)
|
| int |
spage_get_space_for_record (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| int |
spage_header_end_scan (THREAD_ENTRY * thread_p, void ** ptr)
|
| SCAN_CODE |
spage_header_next_scan (THREAD_ENTRY * thread_p, int cursor, DB_VALUE ** out_values, int out_cnt, void * ptr)
|
| int |
spage_header_start_scan (THREAD_ENTRY * thread_p, int show_type, DB_VALUE ** arg_values, int arg_cnt, void ** ptr)
|
| void |
spage_initialize (THREAD_ENTRY * thread_p, PAGE_PTR page_p, INT16 slot_type, unsigned short alignment, bool is_saving)
|
| int |
spage_insert (THREAD_ENTRY * thread_p, PAGE_PTR page_p, RECDES * record_descriptor_p, PGSLOTID * out_slot_id_p)
|
| int |
spage_insert_at (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, RECDES * record_descriptor_p)
|
| int |
spage_insert_for_recovery (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, RECDES * record_descriptor_p)
|
| bool |
spage_is_mvcc_updatable (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int delete_record_length, int insert_record_length)
|
| bool |
spage_is_slot_exist (PAGE_PTR page_p, PGSLOTID slot_id)
|
| bool |
spage_is_updatable (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int record_descriptor_length)
|
| bool |
spage_is_valid_anchor_type (const INT16 anchor_type)
|
| int |
spage_mark_deleted_slot_as_reusable (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id)
|
| int |
spage_max_record_size (void)
|
| int |
spage_max_space_for_new_record (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| int |
spage_merge (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID first_slot_id, PGSLOTID second_slot_id)
|
| bool |
spage_need_compact (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| SCAN_CODE |
spage_next_record (PAGE_PTR page_p, PGSLOTID * out_slot_id_p, RECDES * record_descriptor_p, int is_peeking)
|
| SCAN_CODE |
spage_next_record_dont_skip_empty (PAGE_PTR page_p, PGSLOTID * out_slot_id_p, RECDES * record_descriptor_p, int is_peeking)
|
| PGNSLOTS |
spage_number_of_records (PAGE_PTR page_p)
|
| PGNSLOTS |
spage_number_of_slots (PAGE_PTR page_p)
|
| int |
spage_overwrite (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int overwrite_offset, const RECDES * record_descriptor_p)
|
| SCAN_CODE |
spage_previous_record (PAGE_PTR page_p, PGSLOTID * out_slot_id_p, RECDES * record_descriptor_p, int is_peeking)
|
| SCAN_CODE |
spage_previous_record_dont_skip_empty (PAGE_PTR page_p, PGSLOTID * out_slot_id_p, RECDES * record_descriptor_p, int is_peeking)
|
| int |
spage_put (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int offset, const RECDES * record_descriptor_p)
|
| bool |
spage_reclaim (THREAD_ENTRY * thread_p, PAGE_PTR page_p)
|
| void |
spage_set_need_update_best_hint (THREAD_ENTRY * thread_p, PAGE_PTR page_p, bool need_update)
|
| int |
spage_slots_end_scan (THREAD_ENTRY * thread_p, void ** ptr)
|
| SCAN_CODE |
spage_slots_next_scan (THREAD_ENTRY * thread_p, int cursor, DB_VALUE ** out_values, int out_cnt, void * ptr)
|
| int |
spage_slots_start_scan (THREAD_ENTRY * thread_p, int show_type, DB_VALUE ** arg_values, int arg_cnt, void ** ptr)
|
| int |
spage_split (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int offset, PGSLOTID * out_new_slot_id_p)
|
| int |
spage_take_out (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int takeout_offset, int takeout_length)
|
| int |
spage_update (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, const RECDES * record_descriptor_p)
|
| void |
spage_update_record_type (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, INT16 record_type)
|
| void |
spage_vacuum_slot (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slotid, bool reusable)
|
Public Static Functions
| Type |
Name |
| void |
spage_add_contiguous_free_space (PAGE_PTR pgptr, int space)
|
| int |
spage_add_new_slot (THREAD_ENTRY * thread_p, PAGE_PTR page_p, SPAGE_HEADER * page_header_p, int * out_space_p)
|
| int |
spage_check_mvcc_updatable (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int mvcc_delete_record_length, int mvcc_insert_record_length)
|
| int |
spage_check_record_for_insert (RECDES * record_descriptor_p)
|
| int |
spage_check_space (THREAD_ENTRY * thread_p, PAGE_PTR page_p, SPAGE_HEADER * page_header_p, int space)
|
| int |
spage_check_updatable (THREAD_ENTRY * thread_p, PAGE_PTR page_p, PGSLOTID slot_id, int record_descriptor_length, SPAGE_SLOT ** out_slot_p, int * out_space_p, int * out_old_waste_p, int * out_new_waste_p)
|
| int |
spage_compare_slot_offset (const void * arg1, const void * arg2)
|
| void |
spage_dump_header (FILE * fp, const SPAGE_HEADER * sphdr)
|
| void |
spage_dump_header_to_string (char * buffer, int size, const SPAGE_HEADER * page_header_p)
|
| void |
spage_dump_record (FILE * Fp, PAGE_PTR page_p, PGSLOTID slot_id, SPAGE_SLOT * slot_p)
|
| void |
spage_dump_saved_spaces_by_other_trans (THREAD_ENTRY * thread_p, FILE * fp, VPID * vpid)
|
| void |
spage_dump_slots (FILE * fp, const SPAGE_SLOT * sptr, PGNSLOTS nslots, unsigned short alignment)
|
| int |
spage_find_empty_slot (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, int length, INT16 type, SPAGE_SLOT ** sptr, int * space, PGSLOTID * slotid)
|
| int |
spage_find_empty_slot_at (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int length, INT16 type, SPAGE_SLOT ** sptr)
|
| SPAGE_SLOT * |
spage_find_slot (PAGE_PTR pgptr, SPAGE_HEADER * sphdr, PGSLOTID slotid, bool is_unknown_slot_check)
|
| int |
spage_find_slot_for_insert (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, RECDES * recdes, PGSLOTID * slotid, void ** slotptr, int * used_space)
|
| SCAN_CODE |
spage_get_record_data (PAGE_PTR pgptr, SPAGE_SLOT * sptr, RECDES * recdes, bool ispeeking)
|
| int |
spage_get_saved_spaces (THREAD_ENTRY * thread_p, SPAGE_HEADER * page_header_p, PAGE_PTR page_p, int * other_saved_spaces)
|
| int |
spage_get_saved_spaces_by_other_trans (THREAD_ENTRY * thread_p, SPAGE_HEADER * sphdr, PAGE_PTR pgptr)
|
| int |
spage_get_total_saved_spaces (THREAD_ENTRY * thread_p, SPAGE_HEADER * page_header_p, PAGE_PTR page_p)
|
| bool |
spage_has_enough_contiguous_space (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, SPAGE_HEADER * sphdr, int space)
|
| bool |
spage_has_enough_total_space (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, SPAGE_HEADER * sphdr, int space)
|
| int |
spage_insert_data (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, RECDES * recdes, void * slotptr)
|
| bool |
spage_is_record_located_at_end (SPAGE_HEADER * page_header_p, SPAGE_SLOT * slot_p)
|
| bool |
spage_is_slotted_page_type (PAGE_TYPE ptype)
|
| bool |
spage_is_unknown_slot (PGSLOTID slotid, SPAGE_HEADER * sphdr, SPAGE_SLOT * sptr)
|
| int |
spage_put_helper (THREAD_ENTRY * thread_p, PAGE_PTR pgptr, PGSLOTID slotid, int offset, const RECDES * recdes, bool is_append)
|
| const char * |
spage_record_type_string (INT16 record_type)
|
| void |
spage_reduce_a_slot (PAGE_PTR page_p)
|
| void |
spage_reduce_contiguous_free_space (PAGE_PTR pgptr, int space)
|
| void * |
spage_save_head_alloc (void)
|
| int |
spage_save_head_free (void * entry_p)
|
| int |
spage_save_head_init (void * entry_p)
|
| int |
spage_save_head_uninit (void * entry_p)
|
| int |
spage_save_space (THREAD_ENTRY * thread_p, SPAGE_HEADER * sphdr, PAGE_PTR pgptr, int save)
|
| SCAN_CODE |
spage_search_record (PAGE_PTR page_p, PGSLOTID * out_slot_id_p, RECDES * record_descriptor_p, int is_peeking, int direction, bool skip_empty)
|
| void |
spage_set_slot (SPAGE_SLOT * slot_p, int offset, int length, INT16 type)
|
| void |
spage_shift_slot_down (PAGE_PTR page_p, SPAGE_HEADER * page_header_p, SPAGE_SLOT * slot_p)
|
| void |
spage_shift_slot_up (PAGE_PTR page_p, SPAGE_HEADER * page_header_p, SPAGE_SLOT * slot_p)
|
| int |
spage_take_slot_in_use (THREAD_ENTRY * thread_p, PAGE_PTR page_p, SPAGE_HEADER * page_header_p, PGSLOTID slot_id, SPAGE_SLOT * slot_p, int * out_space_p)
|
| int |
spage_update_record_after_compact (THREAD_ENTRY * thread_p, PAGE_PTR page_p, SPAGE_HEADER * page_header_p, SPAGE_SLOT * slot_p, const RECDES * record_descriptor_p, int space, int old_waste, int new_waste)
|
| int |
spage_update_record_in_place (PAGE_PTR page_p, SPAGE_HEADER * page_header_p, SPAGE_SLOT * slot_p, const RECDES * record_descriptor_p, int space)
|
| void |
spage_verify_header (PAGE_PTR page_p)
|
Macros
| Type |
Name |
| define |
SPAGE_DB_PAGESIZE ([**spage\_User\_page\_size**](slotted__page_8c.md#variable-spage_user_page_size) != 0 ? [**assert**](malloc__2__8__3_8c.md#define-assert) ([**spage\_User\_page\_size**](slotted__page_8c.md#variable-spage_user_page_size) == [**DB\_PAGESIZE**](storage__common_8h.md#define-db_pagesize)), [**spage\_User\_page\_size**](slotted__page_8c.md#variable-spage_user_page_size) : [**DB\_PAGESIZE**](storage__common_8h.md#define-db_pagesize))
|
| define |
SPAGE_OVERFLOW (offset) (([**int**](broker__monitor_8c.md#function-timeout)) (offset) > [**SPAGE\_DB\_PAGESIZE**](slotted__page_8c.md#define-spage_db_pagesize))
|
| define |
SPAGE_SEARCH_NEXT 1
|
| define |
SPAGE_SEARCH_PREV -1
|
| define |
SPAGE_VERIFY_HEADER (sphdr) /* multi line expression */
|
Public Types Documentation
typedef struct spage_header_context SPAGE_HEADER_CONTEXT;
typedef SPAGE_SAVE_ENTRY
typedef struct spage_save_entry SPAGE_SAVE_ENTRY;
typedef SPAGE_SAVE_HEAD
typedef struct spage_save_head SPAGE_SAVE_HEAD;
typedef SPAGE_SLOTS_CONTEXT
typedef struct spage_slots_context SPAGE_SLOTS_CONTEXT;
enum slotted__page_8c_1a49b1d57ca8b026018a74c3dcb2779740
enum slotted__page_8c_1a49b1d57ca8b026018a74c3dcb2779740 {
SPAGE_EMPTY_OFFSET = 0
};
typedef spage_saving_hashmap_type
using spage_saving_hashmap_type = cubthread::lockfree_hashmap<VPID, spage_save_head>;
Public Static Attributes Documentation
variable spage_Saving_entry_descriptor
LF_ENTRY_DESCRIPTOR spage_Saving_entry_descriptor;
variable spage_Saving_hashmap
spage_saving_hashmap_type spage_Saving_hashmap;
variable spage_User_page_size
PGLENGTH spage_User_page_size;
Public Functions Documentation
function spage_alignment_string
const char * spage_alignment_string (
unsigned short alignment
)
function spage_anchor_flag_string
const char * spage_anchor_flag_string (
const INT16 anchor_type
)
function spage_append
int spage_append (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
const RECDES * record_descriptor_p
)
function spage_boot
void spage_boot (
THREAD_ENTRY * thread_p
)
function spage_check
int spage_check (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_check_num_slots
bool spage_check_num_slots (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_check_slot_owner
int spage_check_slot_owner (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_collect_statistics
void spage_collect_statistics (
PAGE_PTR page_p,
int * npages,
int * nrecords,
int * rec_length
)
function spage_compact
int spage_compact (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_delete
PGSLOTID spage_delete (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_delete_for_recovery
PGSLOTID spage_delete_for_recovery (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_dump
void spage_dump (
THREAD_ENTRY * thread_p,
FILE * fp,
PAGE_PTR page_p,
int is_record_printed
)
function spage_finalize
void spage_finalize (
THREAD_ENTRY * thread_p
)
function spage_find_free_slot
PGSLOTID spage_find_free_slot (
PAGE_PTR page_p,
SPAGE_SLOT ** out_slot_p,
PGSLOTID start_slot
)
function spage_free_saved_spaces
void spage_free_saved_spaces (
THREAD_ENTRY * thread_p,
void * first_save_entry
)
function spage_get_free_space
int spage_get_free_space (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_get_free_space_without_saving
int spage_get_free_space_without_saving (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
bool * need_update
)
SCAN_CODE spage_get_page_header_info (
PAGE_PTR page_p,
DB_VALUE ** page_header_info
)
function spage_get_record
SCAN_CODE spage_get_record (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
RECDES * record_descriptor_p,
int is_peeking
)
function spage_get_record_length
int spage_get_record_length (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_get_record_offset
int spage_get_record_offset (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_get_record_type
INT16 spage_get_record_type (
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_get_slot
SPAGE_SLOT * spage_get_slot (
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_get_space_for_record
int spage_get_space_for_record (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
int spage_header_end_scan (
THREAD_ENTRY * thread_p,
void ** ptr
)
SCAN_CODE spage_header_next_scan (
THREAD_ENTRY * thread_p,
int cursor,
DB_VALUE ** out_values,
int out_cnt,
void * ptr
)
int spage_header_start_scan (
THREAD_ENTRY * thread_p,
int show_type,
DB_VALUE ** arg_values,
int arg_cnt,
void ** ptr
)
function spage_initialize
void spage_initialize (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
INT16 slot_type,
unsigned short alignment,
bool is_saving
)
function spage_insert
int spage_insert (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
RECDES * record_descriptor_p,
PGSLOTID * out_slot_id_p
)
function spage_insert_at
int spage_insert_at (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
RECDES * record_descriptor_p
)
function spage_insert_for_recovery
int spage_insert_for_recovery (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
RECDES * record_descriptor_p
)
function spage_is_mvcc_updatable
bool spage_is_mvcc_updatable (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int delete_record_length,
int insert_record_length
)
function spage_is_slot_exist
bool spage_is_slot_exist (
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_is_updatable
bool spage_is_updatable (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int record_descriptor_length
)
function spage_is_valid_anchor_type
bool spage_is_valid_anchor_type (
const INT16 anchor_type
)
function spage_mark_deleted_slot_as_reusable
int spage_mark_deleted_slot_as_reusable (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id
)
function spage_max_record_size
int spage_max_record_size (
void
)
function spage_max_space_for_new_record
int spage_max_space_for_new_record (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_merge
int spage_merge (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID first_slot_id,
PGSLOTID second_slot_id
)
function spage_need_compact
bool spage_need_compact (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_next_record
SCAN_CODE spage_next_record (
PAGE_PTR page_p,
PGSLOTID * out_slot_id_p,
RECDES * record_descriptor_p,
int is_peeking
)
function spage_next_record_dont_skip_empty
SCAN_CODE spage_next_record_dont_skip_empty (
PAGE_PTR page_p,
PGSLOTID * out_slot_id_p,
RECDES * record_descriptor_p,
int is_peeking
)
function spage_number_of_records
PGNSLOTS spage_number_of_records (
PAGE_PTR page_p
)
function spage_number_of_slots
PGNSLOTS spage_number_of_slots (
PAGE_PTR page_p
)
function spage_overwrite
int spage_overwrite (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int overwrite_offset,
const RECDES * record_descriptor_p
)
function spage_previous_record
SCAN_CODE spage_previous_record (
PAGE_PTR page_p,
PGSLOTID * out_slot_id_p,
RECDES * record_descriptor_p,
int is_peeking
)
function spage_previous_record_dont_skip_empty
SCAN_CODE spage_previous_record_dont_skip_empty (
PAGE_PTR page_p,
PGSLOTID * out_slot_id_p,
RECDES * record_descriptor_p,
int is_peeking
)
function spage_put
int spage_put (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int offset,
const RECDES * record_descriptor_p
)
function spage_reclaim
bool spage_reclaim (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p
)
function spage_set_need_update_best_hint
void spage_set_need_update_best_hint (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
bool need_update
)
function spage_slots_end_scan
int spage_slots_end_scan (
THREAD_ENTRY * thread_p,
void ** ptr
)
function spage_slots_next_scan
SCAN_CODE spage_slots_next_scan (
THREAD_ENTRY * thread_p,
int cursor,
DB_VALUE ** out_values,
int out_cnt,
void * ptr
)
function spage_slots_start_scan
int spage_slots_start_scan (
THREAD_ENTRY * thread_p,
int show_type,
DB_VALUE ** arg_values,
int arg_cnt,
void ** ptr
)
function spage_split
int spage_split (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int offset,
PGSLOTID * out_new_slot_id_p
)
function spage_take_out
int spage_take_out (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int takeout_offset,
int takeout_length
)
function spage_update
int spage_update (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
const RECDES * record_descriptor_p
)
function spage_update_record_type
void spage_update_record_type (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
INT16 record_type
)
function spage_vacuum_slot
void spage_vacuum_slot (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slotid,
bool reusable
)
Public Static Functions Documentation
function spage_add_contiguous_free_space
static void spage_add_contiguous_free_space (
PAGE_PTR pgptr,
int space
)
function spage_add_new_slot
static int spage_add_new_slot (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
int * out_space_p
)
function spage_check_mvcc_updatable
static int spage_check_mvcc_updatable (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int mvcc_delete_record_length,
int mvcc_insert_record_length
)
function spage_check_record_for_insert
static int spage_check_record_for_insert (
RECDES * record_descriptor_p
)
function spage_check_space
static int spage_check_space (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
int space
)
function spage_check_updatable
static int spage_check_updatable (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
PGSLOTID slot_id,
int record_descriptor_length,
SPAGE_SLOT ** out_slot_p,
int * out_space_p,
int * out_old_waste_p,
int * out_new_waste_p
)
function spage_compare_slot_offset
static int spage_compare_slot_offset (
const void * arg1,
const void * arg2
)
static void spage_dump_header (
FILE * fp,
const SPAGE_HEADER * sphdr
)
static void spage_dump_header_to_string (
char * buffer,
int size,
const SPAGE_HEADER * page_header_p
)
function spage_dump_record
static void spage_dump_record (
FILE * Fp,
PAGE_PTR page_p,
PGSLOTID slot_id,
SPAGE_SLOT * slot_p
)
function spage_dump_saved_spaces_by_other_trans
static void spage_dump_saved_spaces_by_other_trans (
THREAD_ENTRY * thread_p,
FILE * fp,
VPID * vpid
)
function spage_dump_slots
static void spage_dump_slots (
FILE * fp,
const SPAGE_SLOT * sptr,
PGNSLOTS nslots,
unsigned short alignment
)
function spage_find_empty_slot
static int spage_find_empty_slot (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
int length,
INT16 type,
SPAGE_SLOT ** sptr,
int * space,
PGSLOTID * slotid
)
function spage_find_empty_slot_at
static int spage_find_empty_slot_at (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PGSLOTID slotid,
int length,
INT16 type,
SPAGE_SLOT ** sptr
)
function spage_find_slot
static inline SPAGE_SLOT * spage_find_slot (
PAGE_PTR pgptr,
SPAGE_HEADER * sphdr,
PGSLOTID slotid,
bool is_unknown_slot_check
)
function spage_find_slot_for_insert
static inline int spage_find_slot_for_insert (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
RECDES * recdes,
PGSLOTID * slotid,
void ** slotptr,
int * used_space
)
function spage_get_record_data
static SCAN_CODE spage_get_record_data (
PAGE_PTR pgptr,
SPAGE_SLOT * sptr,
RECDES * recdes,
bool ispeeking
)
function spage_get_saved_spaces
static int spage_get_saved_spaces (
THREAD_ENTRY * thread_p,
SPAGE_HEADER * page_header_p,
PAGE_PTR page_p,
int * other_saved_spaces
)
function spage_get_saved_spaces_by_other_trans
static int spage_get_saved_spaces_by_other_trans (
THREAD_ENTRY * thread_p,
SPAGE_HEADER * sphdr,
PAGE_PTR pgptr
)
function spage_get_total_saved_spaces
static int spage_get_total_saved_spaces (
THREAD_ENTRY * thread_p,
SPAGE_HEADER * page_header_p,
PAGE_PTR page_p
)
function spage_has_enough_contiguous_space
static bool spage_has_enough_contiguous_space (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
SPAGE_HEADER * sphdr,
int space
)
function spage_has_enough_total_space
static bool spage_has_enough_total_space (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
SPAGE_HEADER * sphdr,
int space
)
function spage_insert_data
static int spage_insert_data (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
RECDES * recdes,
void * slotptr
)
function spage_is_record_located_at_end
static bool spage_is_record_located_at_end (
SPAGE_HEADER * page_header_p,
SPAGE_SLOT * slot_p
)
function spage_is_slotted_page_type
static bool spage_is_slotted_page_type (
PAGE_TYPE ptype
)
function spage_is_unknown_slot
static inline bool spage_is_unknown_slot (
PGSLOTID slotid,
SPAGE_HEADER * sphdr,
SPAGE_SLOT * sptr
)
function spage_put_helper
static int spage_put_helper (
THREAD_ENTRY * thread_p,
PAGE_PTR pgptr,
PGSLOTID slotid,
int offset,
const RECDES * recdes,
bool is_append
)
function spage_record_type_string
static const char * spage_record_type_string (
INT16 record_type
)
function spage_reduce_a_slot
static void spage_reduce_a_slot (
PAGE_PTR page_p
)
function spage_reduce_contiguous_free_space
static void spage_reduce_contiguous_free_space (
PAGE_PTR pgptr,
int space
)
function spage_save_head_alloc
static void * spage_save_head_alloc (
void
)
function spage_save_head_free
static int spage_save_head_free (
void * entry_p
)
function spage_save_head_init
static int spage_save_head_init (
void * entry_p
)
function spage_save_head_uninit
static int spage_save_head_uninit (
void * entry_p
)
function spage_save_space
static int spage_save_space (
THREAD_ENTRY * thread_p,
SPAGE_HEADER * sphdr,
PAGE_PTR pgptr,
int save
)
function spage_search_record
static SCAN_CODE spage_search_record (
PAGE_PTR page_p,
PGSLOTID * out_slot_id_p,
RECDES * record_descriptor_p,
int is_peeking,
int direction,
bool skip_empty
)
function spage_set_slot
static void spage_set_slot (
SPAGE_SLOT * slot_p,
int offset,
int length,
INT16 type
)
function spage_shift_slot_down
static void spage_shift_slot_down (
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
SPAGE_SLOT * slot_p
)
function spage_shift_slot_up
static void spage_shift_slot_up (
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
SPAGE_SLOT * slot_p
)
function spage_take_slot_in_use
static int spage_take_slot_in_use (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
PGSLOTID slot_id,
SPAGE_SLOT * slot_p,
int * out_space_p
)
function spage_update_record_after_compact
static int spage_update_record_after_compact (
THREAD_ENTRY * thread_p,
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
SPAGE_SLOT * slot_p,
const RECDES * record_descriptor_p,
int space,
int old_waste,
int new_waste
)
function spage_update_record_in_place
static int spage_update_record_in_place (
PAGE_PTR page_p,
SPAGE_HEADER * page_header_p,
SPAGE_SLOT * slot_p,
const RECDES * record_descriptor_p,
int space
)
static inline void spage_verify_header (
PAGE_PTR page_p
)
Macro Definition Documentation
define SPAGE_DB_PAGESIZE
#define SPAGE_DB_PAGESIZE `( spage_User_page_size != 0 ? assert ( spage_User_page_size == DB_PAGESIZE ), spage_User_page_size : DB_PAGESIZE )`
define SPAGE_OVERFLOW
#define SPAGE_OVERFLOW (
offset
) `(( int ) (offset) > SPAGE_DB_PAGESIZE )`
define SPAGE_SEARCH_NEXT
#define SPAGE_SEARCH_NEXT `1`
define SPAGE_SEARCH_PREV
#define SPAGE_SEARCH_PREV `-1`
#define SPAGE_VERIFY_HEADER (
sphdr
) `/* multi line expression */`
The documentation for this class was generated from the following file cubrid/src/storage/slotted_page.c