CUBRID Engine  latest
file_manager.c File Reference
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include <time.h>
#include "file_manager.h"
#include "btree.h"
#include "porting.h"
#include "porting_inline.hpp"
#include "memory_alloc.h"
#include "storage_common.h"
#include "error_manager.h"
#include "file_io.h"
#include "page_buffer.h"
#include "disk_manager.h"
#include "log_append.hpp"
#include "log_manager.h"
#include "log_impl.h"
#include "log_lsa.hpp"
#include "lock_manager.h"
#include "system_parameter.h"
#include "boot_sr.h"
#include "memory_hash.h"
#include "environment_variable.h"
#include "xserver_interface.h"
#include "oid.h"
#include "heap_file.h"
#include "bit.h"
#include "util_func.h"
#include "vacuum.h"
#include "btree_load.h"
#include "critical_section.h"
#include "fault_injection.h"
#include "thread_manager.hpp"

Go to the source code of this file.

Classes

struct  file_header
 
struct  file_extensible_data
 
struct  file_extensible_data_search_context
 
struct  file_partial_sector
 
struct  file_vsid_collector
 
struct  file_ftab_collector
 
struct  file_map_context
 
struct  file_set_tde_algorithm_args
 
struct  file_find_nth_context
 
struct  file_tempcache_entry
 
struct  file_tempcache
 
struct  file_track_heap_metadata
 
union  file_track_metadata
 
struct  file_track_item
 
struct  file_tracker_dump_heap_context
 
struct  file_track_mark_heap_deleted_context
 
struct  file_tracker_reuse_heap_context
 

Macros

#define FILE_HEADER_ALIGNED_SIZE   ((INT16) (DB_ALIGN (sizeof (FILE_HEADER), MAX_ALIGNMENT)))
 
#define FILE_FLAG_NUMERABLE   0x1 /* Is file numerable */
 
#define FILE_FLAG_TEMPORARY   0x2 /* Is file temporary */
 
#define FILE_FLAG_ENCRYPTED_AES   0x4 /* Is file encrypted using AES */
 
#define FILE_FLAG_ENCRYPTED_ARIA   0x8 /* Is file encrypted using ARIA */
 
#define FILE_FLAG_ENCRYPTED_MASK   0x0000000c /* 0x4 + 0x8 */
 
#define FILE_IS_NUMERABLE(fh)   (((fh)->file_flags & FILE_FLAG_NUMERABLE) != 0)
 
#define FILE_IS_TEMPORARY(fh)   (((fh)->file_flags & FILE_FLAG_TEMPORARY) != 0)
 
#define FILE_IS_TDE_ENCRYPTED(fh)   (((fh)->file_flags & FILE_FLAG_ENCRYPTED_MASK) != 0)
 
#define FILE_CACHE_LAST_FIND_NTH(fh)   (FILE_IS_NUMERABLE (fh) && FILE_IS_TEMPORARY (fh) && (fh)->type == FILE_TEMP)
 
#define FILE_TYPE_CAN_BE_NUMERABLE(ftype)
 
#define FILE_TYPE_IS_ALWAYS_TEMP(ftype)
 
#define FILE_TYPE_IS_SOMETIMES_TEMP(ftype)
 
#define FILE_TYPE_IS_NEVER_TEMP(ftype)   (!FILE_TYPE_IS_ALWAYS_TEMP (ftype) && !FILE_TYPE_IS_SOMETIMES_TEMP (ftype))
 
#define FILE_GET_HEADER_VPID(vfid, vpid)   (vpid)->volid = (vfid)->volid; (vpid)->pageid = (vfid)->fileid
 
#define FILE_HEADER_GET_PART_FTAB(fh, parttab)
 
#define FILE_HEADER_GET_FULL_FTAB(fh, fulltab)
 
#define FILE_HEADER_GET_USER_PAGE_FTAB(fh, pagetab)
 
#define FILE_EXTDATA_HEADER_ALIGNED_SIZE   (DB_ALIGN (sizeof (FILE_EXTENSIBLE_DATA), MAX_ALIGNMENT))
 
#define FILE_FULL_PAGE_BITMAP   0xFFFFFFFFFFFFFFFF /* Full allocation bitmap */
 
#define FILE_EMPTY_PAGE_BITMAP   0x0000000000000000 /* Empty allocation bitmap */
 
#define FILE_ALLOC_BITMAP_NBITS   ((int) (sizeof (FILE_ALLOC_BITMAP) * CHAR_BIT))
 
#define FILE_PARTIAL_SECTOR_INITIALIZER   { VSID_INITIALIZER, 0 }
 
#define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND   ((float) 0.01) /* 1% of current size */
 
#define FILE_TABLESPACE_DEFAULT_MIN_EXPAND   (DISK_SECTOR_NPAGES * DB_PAGESIZE); /* one sector */
 
#define FILE_TABLESPACE_DEFAULT_MAX_EXPAND   (DISK_SECTOR_NPAGES * DB_PAGESIZE * 1024); /* 1k sectors */
 
#define FILE_TABLESPACE_FOR_PERM_NPAGES(tabspace, npages)
 
#define FILE_TABLESPACE_FOR_TEMP_NPAGES(tabspace, npages)
 
#define file_log(func, msg, ...)
 
#define FILE_PERM_TEMP_STRING(is_temp)   ((is_temp) ? "temporary" : "permanent")
 
#define FILE_NUMERABLE_REGULAR_STRING(is_numerable)   ((is_numerable) ? "numerable" : "regular")
 
#define FILE_TABLESPACE_MSG   "\ttablespace = { init_size = %lld, expand_ratio = %f, expand_min_size = %d, expand_max_size = %d } \n"
 
#define FILE_TABLESPACE_AS_ARGS(tabspace)
 
#define FILE_HEAD_ALLOC_MSG
 
#define FILE_HEAD_ALLOC_AS_ARGS(fhead)
 
#define FILE_HEAD_FULL_MSG
 
#define FILE_HEAD_FULL_AS_ARGS(fhead)
 
#define FILE_EXTDATA_MSG(name)   "\t" name ": { vpid_next = %d|%d, max_size = %d, item_size = %d, n_items = %d } \n"
 
#define FILE_EXTDATA_AS_ARGS(extdata)   VPID_AS_ARGS (&(extdata)->vpid_next), (extdata)->max_size, (extdata)->size_of_item, (extdata)->n_items
 
#define FILE_PARTSECT_MSG(name)   "\t" name ": { vsid = %d|%d, page bitmap = " BIT64_HEXA_PRINT_FORMAT " } \n"
 
#define FILE_PARTSECT_AS_ARGS(ps)   VSID_AS_ARGS (&(ps)->vsid), (long long unsigned int) (ps)->page_bitmap
 
#define FILE_ALLOC_TYPE_STRING(alloc_type)   ((alloc_type) == FILE_ALLOC_USER_PAGE ? "alloc user page" : "alloc table page")
 
#define FILE_TEMPCACHE_MSG
 
#define FILE_TEMPCACHE_AS_ARGS
 
#define FILE_TEMPCACHE_ENTRY_MSG   "%p, VFID %d|%d, %s"
 
#define FILE_TEMPCACHE_ENTRY_AS_ARGS(ent)   ent, VFID_AS_ARGS (&(ent)->vfid), file_type_to_string ((ent)->ftype)
 
#define FILE_TRACK_ITEM_MSG   "VFID %d|%d, %s"
 
#define FILE_TRACK_ITEM_AS_ARGS(item)   (item)->volid, (item)->fileid, file_type_to_string ((FILE_TYPE) (item)->type)
 
#define FILE_RV_DEALLOC_COMPENSATE   true
 
#define FILE_RV_DEALLOC_RUN_POSTPONE   false
 
#define FILE_FTAB_COLLECTOR_INITIALIZER   { 0, 0, NULL }
 
#define FILE_USER_PAGE_MARK_DELETE_FLAG   ((PAGEID) 0x80000000)
 
#define FILE_USER_PAGE_IS_MARKED_DELETED(vpid)   ((((VPID *) vpid)->pageid & FILE_USER_PAGE_MARK_DELETE_FLAG) != 0)
 
#define FILE_USER_PAGE_MARK_DELETED(vpid)   ((VPID *) vpid)->pageid |= FILE_USER_PAGE_MARK_DELETE_FLAG
 
#define FILE_USER_PAGE_CLEAR_MARK_DELETED(vpid)   ((VPID *) vpid)->pageid &= ~FILE_USER_PAGE_MARK_DELETE_FLAG
 
#define FILE_GET_TRACKER_LOCK_MODE(file_type)   (((file_type) == FILE_BTREE) ? IX_LOCK : SCH_S_LOCK)
 
#define LOG_BOOL_COUNT   3
 
#define LOG_BOOL_COUNT   3
 
#define UNDO_DATA_SIZE   (sizeof (VFID) + sizeof (VPID))
 
#define LOG_DATA_SIZE   (sizeof (VFID) + sizeof (VPID))
 

Typedefs

typedef struct file_header FILE_HEADER
 
typedef struct file_extensible_data FILE_EXTENSIBLE_DATA
 
typedef struct file_extensible_data_search_context FILE_EXTENSIBLE_DATA_SEARCH_CONTEXT
 
typedef int(* FILE_EXTDATA_FUNC) (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
typedef int(* FILE_EXTDATA_ITEM_FUNC) (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
typedef UINT64 FILE_ALLOC_BITMAP
 
typedef struct file_partial_sector FILE_PARTIAL_SECTOR
 
typedef struct file_vsid_collector FILE_VSID_COLLECTOR
 
typedef struct file_ftab_collector FILE_FTAB_COLLECTOR
 
typedef struct file_map_context FILE_MAP_CONTEXT
 
typedef struct file_set_tde_algorithm_args FILE_SET_TDE_ALGORITHM_ARGS
 
typedef struct file_find_nth_context FILE_FIND_NTH_CONTEXT
 
typedef struct file_tempcache_entry FILE_TEMPCACHE_ENTRY
 
typedef struct file_tempcache FILE_TEMPCACHE
 
typedef struct file_track_heap_metadata FILE_TRACK_HEAP_METADATA
 
typedef union file_track_metadata FILE_TRACK_METADATA
 
typedef struct file_track_item FILE_TRACK_ITEM
 
typedef struct file_tracker_dump_heap_context FILE_TRACKER_DUMP_HEAP_CONTEXT
 
typedef struct file_track_mark_heap_deleted_context FILE_TRACK_MARK_HEAP_DELETED_CONTEXT
 
typedef struct file_tracker_reuse_heap_context FILE_TRACKER_REUSE_HEAP_CONTEXT
 
typedef int(* FILE_TRACK_ITEM_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 

Enumerations

enum  FILE_ALLOC_TYPE { FILE_ALLOC_USER_PAGE, FILE_ALLOC_TABLE_PAGE, FILE_ALLOC_TABLE_PAGE_FULL_SECTOR }
 

Functions

STATIC_INLINE void file_header_init (FILE_HEADER *fhead) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_sanity_check (THREAD_ENTRY *thread_p, FILE_HEADER *fhead) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_alloc (FILE_HEADER *fhead, FILE_ALLOC_TYPE alloc_type, bool was_empty, bool is_full) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_dealloc (FILE_HEADER *fhead, FILE_ALLOC_TYPE alloc_type, bool is_empty, bool was_full) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_log_fhead_alloc (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, bool was_empty, bool is_full) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_log_fhead_dealloc (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, bool is_empty, bool was_full) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_update_mark_deleted (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, int delta) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE int file_header_copy (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_HEADER *fhead_copy) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_dump (THREAD_ENTRY *thread_p, const FILE_HEADER *fhead, FILE *fp) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_header_dump_descriptor (THREAD_ENTRY *thread_p, const FILE_HEADER *fhead, FILE *fp) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_init (INT16 item_size, INT16 max_size, FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE int file_extdata_max_size (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE int file_extdata_size (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void * file_extdata_start (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void * file_extdata_end (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_extdata_is_full (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_extdata_is_empty (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE INT16 file_extdata_item_count (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE INT16 file_extdata_remaining_capacity (const FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_append (FILE_EXTENSIBLE_DATA *extdata, const void *append_data) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_append_array (FILE_EXTENSIBLE_DATA *extdata, const void *append_data, INT16 count) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void * file_extdata_at (const FILE_EXTENSIBLE_DATA *extdata, int index) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_extdata_can_merge (const FILE_EXTENSIBLE_DATA *extdata_src, const FILE_EXTENSIBLE_DATA *extdata_dest) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_extdata_merge_pages (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata_src, const PAGE_PTR page_src, FILE_EXTENSIBLE_DATA *extdata_dest, PAGE_PTR page_dest, int(*compare_func)(const void *, const void *), bool ordered) __attribute__((ALWAYS_INLINE))
 
static int file_extdata_find_and_remove_item (THREAD_ENTRY *thread_p, FILE_EXTENSIBLE_DATA *extdata_first, PAGE_PTR page_first, const void *item, int(*compare_func)(const void *, const void *), bool ordered, void *item_pop, VPID *vpid_merged)
 
STATIC_INLINE void file_extdata_merge_unordered (const FILE_EXTENSIBLE_DATA *extdata_src, FILE_EXTENSIBLE_DATA *extdata_dest) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_merge_ordered (const FILE_EXTENSIBLE_DATA *extdata_src, FILE_EXTENSIBLE_DATA *extdata_dest, int(*compare_func)(const void *, const void *)) __attribute__((ALWAYS_INLINE))
 
static void file_extdata_find_ordered (const FILE_EXTENSIBLE_DATA *extdata, const void *item_to_find, int(*compare_func)(const void *, const void *), bool *found, int *position)
 
STATIC_INLINE void file_extdata_insert_at (FILE_EXTENSIBLE_DATA *extdata, int position, int count, const void *data) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_remove_at (FILE_EXTENSIBLE_DATA *extdata, int position, int count) __attribute__((ALWAYS_INLINE))
 
static int file_extdata_apply_funcs (THREAD_ENTRY *thread_p, FILE_EXTENSIBLE_DATA *extdata_in, FILE_EXTDATA_FUNC f_extdata, void *f_extdata_args, FILE_EXTDATA_ITEM_FUNC f_item, void *f_item_args, bool for_write, FILE_EXTENSIBLE_DATA **extdata_out, PAGE_PTR *page_out)
 
static int file_extdata_item_func_for_search (THREAD_ENTRY *thread_p, const void *item, int index, bool *stop, void *args)
 
static int file_extdata_func_for_search_ordered (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
static int file_extdata_search_item (THREAD_ENTRY *thread_p, FILE_EXTENSIBLE_DATA **extdata, const void *item_to_find, int(*compare_func)(const void *, const void *), bool is_ordered, bool for_write, bool *found, int *position, PAGE_PTR *page_extdata)
 
static int file_extdata_find_not_full (THREAD_ENTRY *thread_p, FILE_EXTENSIBLE_DATA **extdata, PAGE_PTR *page_out, bool *found)
 
STATIC_INLINE void file_log_extdata_add (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, PAGE_PTR page, int position, int count, const void *data) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_log_extdata_remove (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, PAGE_PTR page, int position, int count) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_log_extdata_set_next (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, PAGE_PTR page, const VPID *vpid_next) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_extdata_update_item (THREAD_ENTRY *thread_p, PAGE_PTR page_extdata, const void *item_newval, int index_item, FILE_EXTENSIBLE_DATA *extdata) __attribute__((ALWAYS_INLINE))
 
static int file_extdata_all_item_count (THREAD_ENTRY *thread_p, FILE_EXTENSIBLE_DATA *extdata, int *count)
 
static int file_extdata_add_item_count (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
STATIC_INLINE bool file_partsect_is_full (FILE_PARTIAL_SECTOR *partsect) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_partsect_is_empty (FILE_PARTIAL_SECTOR *partsect) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_partsect_is_bit_set (FILE_PARTIAL_SECTOR *partsect, int offset) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_partsect_set_bit (FILE_PARTIAL_SECTOR *partsect, int offset) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE void file_partsect_clear_bit (FILE_PARTIAL_SECTOR *partsect, int offset) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE int file_partsect_pageid_to_offset (FILE_PARTIAL_SECTOR *partsect, PAGEID pageid) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE bool file_partsect_alloc (FILE_PARTIAL_SECTOR *partsect, VPID *vpid_out, int *offset_out) __attribute__((ALWAYS_INLINE))
 
static int file_rv_partsect_update (THREAD_ENTRY *thread_p, LOG_RCV *rcv, bool set)
 
static int file_compare_vpids (const void *first, const void *second)
 
static int file_compare_vfids (const void *first, const void *second)
 
static int file_compare_track_items (const void *first, const void *second)
 
static void file_print_name_of_class (THREAD_ENTRY *thread_p, FILE *fp, const OID *class_oid_p)
 
static int file_table_collect_vsid (THREAD_ENTRY *thread_p, const void *item, int index_unused, bool *stop, void *args)
 
STATIC_INLINE int file_table_collect_all_vsids (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_VSID_COLLECTOR *collector_out) __attribute__((ALWAYS_INLINE))
 
static int file_perm_expand (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead)
 
static int file_table_move_partial_sectors_to_header (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID *vpid_alloc_out)
 
static int file_table_append_full_sector_page (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, const VPID *vpid_new)
 
static int file_table_add_full_sector (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, const VSID *vsid)
 
STATIC_INLINE int file_table_collect_ftab_pages (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, bool collect_numerable, FILE_FTAB_COLLECTOR *collector_out) __attribute__((ALWAYS_INLINE))
 
static int file_extdata_collect_ftab_pages (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
STATIC_INLINE bool file_table_collector_has_page (FILE_FTAB_COLLECTOR *collector, VPID *vpid) __attribute__((ALWAYS_INLINE))
 
STATIC_INLINE int file_init_page_type_internal (THREAD_ENTRY *thread_p, PAGE_PTR page, PAGE_TYPE ptype, bool is_temp) __attribute__((ALWAYS_INLINE))
 
static int file_perm_alloc (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID *vpid_alloc_out)
 
static int file_perm_dealloc (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, const VPID *vpid_dealloc, FILE_ALLOC_TYPE alloc_type)
 
static int file_rv_dealloc_internal (THREAD_ENTRY *thread_p, LOG_RCV *rcv, bool compensate_or_run_postpone)
 
STATIC_INLINE int file_create_temp_internal (THREAD_ENTRY *thread_p, int npages, FILE_TYPE ftype, bool is_numerable, VFID *vfid_out) __attribute__((ALWAYS_INLINE))
 
static int file_sector_map_pages (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static DISK_ISVALID file_table_check (THREAD_ENTRY *thread_p, const VFID *vfid, DISK_VOLMAP_CLONE *disk_map_clone)
 
STATIC_INLINE int file_table_dump (THREAD_ENTRY *thread_p, const FILE_HEADER *fhead, FILE *fp) __attribute__((ALWAYS_INLINE))
 
static int file_partial_table_extdata_dump (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
static int file_partial_table_item_dump (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_full_table_extdata_dump (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
static int file_full_table_item_dump (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_user_page_table_extdata_dump (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
static int file_user_page_table_item_dump (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_sector_map_dealloc (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_set_tde_algorithm (THREAD_ENTRY *thread_p, const VFID *vfid, TDE_ALGORITHM tde_algo)
 
static TDE_ALGORITHM file_get_tde_algorithm_internal (const FILE_HEADER *fhead)
 
static void file_set_tde_algorithm_internal (FILE_HEADER *fhead, TDE_ALGORITHM tde_algo)
 
static int file_numerable_add_page (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, const VPID *vpid)
 
static int file_extdata_find_nth_vpid (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)
 
static int file_extdata_find_nth_vpid_and_skip_marked (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_table_check_page_is_in_sectors (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)
 
static int file_temp_alloc (THREAD_ENTRY *thread_p, PAGE_PTR page_fhead, FILE_ALLOC_TYPE alloc_type, VPID *vpid_alloc_out)
 
STATIC_INLINE int file_temp_set_type (THREAD_ENTRY *thread_p, VFID *vfid, FILE_TYPE ftype) __attribute__((ALWAYS_INLINE))
 
static int file_temp_reset_user_pages (THREAD_ENTRY *thread_p, const VFID *vfid)
 
STATIC_INLINE int file_temp_retire_internal (THREAD_ENTRY *thread_p, const VFID *vfid, bool was_preserved) __attribute__((ALWAYS_INLINE))
 
static int file_tempcache_init (void)
 
static void file_tempcache_final (void)
 
STATIC_INLINE void file_tempcache_lock (void)
 
void file_manager_final (void)
 
int file_rv_fhead_set_last_user_page_ftab (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_fhead_alloc (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_fhead_dealloc (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_header_update_mark_deleted (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_extdata_set_next (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void file_rv_dump_extdata_set_next (FILE *fp, int ignore_length, void *data)
 
int file_rv_extdata_add (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_extdata_remove (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void file_rv_dump_extdata_add (FILE *fp, int length, void *data)
 
void file_rv_dump_extdata_remove (FILE *fp, int length, void *data)
 
int file_rv_extdata_merge (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_partsect_set (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_partsect_clear (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
const char * file_type_to_string (FILE_TYPE fstruct_type)
 
int file_create_with_npages (THREAD_ENTRY *thread_p, FILE_TYPE file_type, int npages, FILE_DESCRIPTORS *des, VFID *vfid)
 
int file_create_heap (THREAD_ENTRY *thread_p, bool reuse_oid, const OID *class_oid, VFID *vfid)
 
int file_create_temp (THREAD_ENTRY *thread_p, int npages, VFID *vfid)
 
int file_create_temp_numerable (THREAD_ENTRY *thread_p, int npages, VFID *vfid)
 
int file_create_query_area (THREAD_ENTRY *thread_p, VFID *vfid)
 
int file_create_ehash (THREAD_ENTRY *thread_p, int npages, bool is_tmp, FILE_EHASH_DES *des_ehash, VFID *vfid)
 
int file_create_ehash_dir (THREAD_ENTRY *thread_p, int npages, bool is_tmp, FILE_EHASH_DES *des_ehash, VFID *vfid)
 
int file_create (THREAD_ENTRY *thread_p, FILE_TYPE file_type, FILE_TABLESPACE *tablespace, FILE_DESCRIPTORS *des, bool is_temp, bool is_numerable, VFID *vfid)
 
int file_destroy (THREAD_ENTRY *thread_p, const VFID *vfid, bool is_temp)
 
int file_rv_destroy (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void file_postpone_destroy (THREAD_ENTRY *thread_p, const VFID *vfid)
 
int file_temp_retire (THREAD_ENTRY *thread_p, const VFID *vfid)
 
int file_temp_retire_preserved (THREAD_ENTRY *thread_p, const VFID *vfid)
 
int file_rv_perm_expand_undo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_perm_expand_redo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_fhead_convert_ftab_to_user_page (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_fhead_convert_user_to_ftab_page (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void file_rv_dump_vfid_and_vpid (FILE *fp, int length, void *data)
 
int file_init_page_type (THREAD_ENTRY *thread_p, PAGE_PTR page, void *args)
 
int file_init_temp_page_type (THREAD_ENTRY *thread_p, PAGE_PTR page, void *args)
 
int file_alloc (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_INIT_PAGE_FUNC f_init, void *f_init_args, VPID *vpid_out, PAGE_PTR *page_out)
 
int file_alloc_multiple (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_INIT_PAGE_FUNC f_init, void *f_init_args, int npages, VPID *vpids_out)
 
int file_alloc_sticky_first_page (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_INIT_PAGE_FUNC f_init, void *f_init_args, VPID *vpid_out, PAGE_PTR *page_out)
 
int file_rv_fhead_sticky_page (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_get_sticky_first_page (THREAD_ENTRY *thread_p, const VFID *vfid, VPID *vpid_out)
 
int file_rv_set_tde_algorithm (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_get_tde_algorithm (THREAD_ENTRY *thread_p, const VFID *vfid, PGBUF_LATCH_CONDITION fix_head_cond, TDE_ALGORITHM *tde_algo)
 
static int file_file_map_set_tde_algorithm (THREAD_ENTRY *thread_p, PAGE_PTR *page, bool *stop, void *args)
 
int file_apply_tde_algorithm (THREAD_ENTRY *thread_p, const VFID *vfid, const TDE_ALGORITHM tde_algo)
 
int file_dealloc (THREAD_ENTRY *thread_p, const VFID *vfid, const VPID *vpid, FILE_TYPE file_type_hint)
 
int file_rv_dealloc_on_undo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_dealloc_on_postpone (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_get_num_user_pages (THREAD_ENTRY *thread_p, const VFID *vfid, int *n_user_pages_out)
 
DISK_ISVALID file_check_vpid (THREAD_ENTRY *thread_p, const VFID *vfid, const VPID *vpid_lookup)
 
int file_get_type (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_TYPE *ftype_out)
 
int file_is_temp (THREAD_ENTRY *thread_p, const VFID *vfid, bool *is_temp)
 
int file_map_pages (THREAD_ENTRY *thread_p, const VFID *vfid, PGBUF_LATCH_MODE latch_mode, PGBUF_LATCH_CONDITION latch_cond, FILE_MAP_PAGE_FUNC func, void *args)
 
int file_dump (THREAD_ENTRY *thread_p, const VFID *vfid, FILE *fp)
 
int file_spacedb (THREAD_ENTRY *thread_p, SPACEDB_FILES *spacedb)
 
int file_numerable_find_nth (THREAD_ENTRY *thread_p, const VFID *vfid, int nth, bool auto_alloc, FILE_INIT_PAGE_FUNC f_init, void *f_init_args, VPID *vpid_nth)
 
int file_rv_user_page_mark_delete (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_user_page_unmark_delete_logical (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_rv_user_page_unmark_delete_physical (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int file_numerable_truncate (THREAD_ENTRY *thread_p, const VFID *vfid, DKNPAGES npages)
 
void file_temp_preserve (THREAD_ENTRY *thread_p, const VFID *vfid)
 
STATIC_INLINE void file_tempcache_free_entry_list (FILE_TEMPCACHE_ENTRY **list)
 
STATIC_INLINE int file_tempcache_alloc_entry (FILE_TEMPCACHE_ENTRY **entry)
 
STATIC_INLINE void file_tempcache_retire_entry (FILE_TEMPCACHE_ENTRY *entry)
 
STATIC_INLINE void file_tempcache_unlock (void)
 
STATIC_INLINE void file_tempcache_check_lock (void)
 
STATIC_INLINE int file_tempcache_get (THREAD_ENTRY *thread_p, FILE_TYPE ftype, bool numerable, FILE_TEMPCACHE_ENTRY **entry)
 
static bool file_tempcache_check_duplicate (THREAD_ENTRY *thread_p, FILE_TEMPCACHE_ENTRY *entry, bool is_numerable)
 
STATIC_INLINE bool file_tempcache_put (THREAD_ENTRY *thread_p, FILE_TEMPCACHE_ENTRY *entry)
 
STATIC_INLINE int file_get_tempcache_entry_index (THREAD_ENTRY *thread_p)
 
void file_tempcache_drop_tran_temp_files (THREAD_ENTRY *thread_p)
 
STATIC_INLINE void file_tempcache_cache_or_drop_entries (THREAD_ENTRY *thread_p, FILE_TEMPCACHE_ENTRY **entries)
 
STATIC_INLINE FILE_TEMPCACHE_ENTRYfile_tempcache_pop_tran_file (THREAD_ENTRY *thread_p, const VFID *vfid)
 
STATIC_INLINE void file_tempcache_push_tran_file (THREAD_ENTRY *thread_p, FILE_TEMPCACHE_ENTRY *entry)
 
int file_get_tran_num_temp_files (THREAD_ENTRY *thread_p)
 
STATIC_INLINE void file_tempcache_dump (FILE *fp)
 
int file_tracker_create (THREAD_ENTRY *thread_p, VFID *vfid_tracker_out)
 
int file_tracker_load (THREAD_ENTRY *thread_p, const VFID *vfid)
 
static int file_tracker_init_page (THREAD_ENTRY *thread_p, PAGE_PTR page, void *args)
 
static int file_tracker_register (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_TYPE ftype, FILE_TRACK_METADATA *metadata)
 
static int file_tracker_register_internal (THREAD_ENTRY *thread_p, PAGE_PTR page_track_head, const FILE_TRACK_ITEM *item)
 
static int file_tracker_unregister (THREAD_ENTRY *thread_p, const VFID *vfid)
 
int file_rv_tracker_unregister_undo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
static int file_tracker_apply_to_file (THREAD_ENTRY *thread_p, const VFID *vfid, PGBUF_LATCH_MODE mode, FILE_TRACK_ITEM_FUNC func, void *args)
 
static int file_tracker_map (THREAD_ENTRY *thread_p, PGBUF_LATCH_MODE latch_mode, FILE_TRACK_ITEM_FUNC func, void *args)
 
int file_rv_tracker_reuse_heap (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
static int file_tracker_item_reuse_heap (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_reuse_heap (THREAD_ENTRY *thread_p, const OID *class_oid, HFID *hfid_out)
 
static int file_tracker_item_mark_heap_deleted (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_rv_tracker_mark_heap_deleted (THREAD_ENTRY *thread_p, LOG_RCV *rcv, bool is_undo)
 
int file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
STATIC_INLINE int file_tracker_get_and_protect (THREAD_ENTRY *thread_p, FILE_TYPE desired_type, FILE_TRACK_ITEM *item, OID *class_oid, bool *stop)
 
int file_tracker_interruptable_iterate (THREAD_ENTRY *thread_p, FILE_TYPE desired_ftype, VFID *vfid, OID *class_oid)
 
static int file_tracker_item_dump (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_dump (THREAD_ENTRY *thread_p, FILE *fp)
 
static int file_tracker_item_dump_capacity (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_dump_all_capacities (THREAD_ENTRY *thread_p, FILE *fp)
 
static int file_tracker_item_dump_heap (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_dump_all_heap (THREAD_ENTRY *thread_p, FILE *fp, bool dump_records)
 
static int file_tracker_item_dump_heap_capacity (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_dump_all_heap_capacities (THREAD_ENTRY *thread_p, FILE *fp)
 
static int file_tracker_item_dump_btree_capacity (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
int file_tracker_dump_all_btree_capacities (THREAD_ENTRY *thread_p, FILE *fp)
 
DISK_ISVALID file_tracker_check (THREAD_ENTRY *thread_p)
 
static int file_tracker_item_spacedb (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)
 
static int file_tracker_spacedb (THREAD_ENTRY *thread_p, SPACEDB_FILES *spacedb)
 
int file_descriptor_get (THREAD_ENTRY *thread_p, const VFID *vfid, FILE_DESCRIPTORS *desc_out)
 
int file_descriptor_update (THREAD_ENTRY *thread_p, const VFID *vfid, void *des_new)
 
int file_descriptor_dump (THREAD_ENTRY *thread_p, const VFID *vfid, FILE *fp)
 
int xfile_apply_tde_to_class_files (THREAD_ENTRY *thread_p, const OID *class_oid)
 

Variables

static bool file_Logging = false
 
static FILE_TEMPCACHEfile_Tempcache = NULL
 
static VFID file_Tracker_vfid = VFID_INITIALIZER
 
static VPID file_Tracker_vpid = VPID_INITIALIZER
 

Macro Definition Documentation

#define FILE_ALLOC_BITMAP_NBITS   ((int) (sizeof (FILE_ALLOC_BITMAP) * CHAR_BIT))

Definition at line 270 of file file_manager.c.

Referenced by file_partsect_alloc(), and file_sector_map_pages().

#define FILE_ALLOC_TYPE_STRING (   alloc_type)    ((alloc_type) == FILE_ALLOC_USER_PAGE ? "alloc user page" : "alloc table page")
#define FILE_CACHE_LAST_FIND_NTH (   fh)    (FILE_IS_NUMERABLE (fh) && FILE_IS_TEMPORARY (fh) && (fh)->type == FILE_TEMP)

Definition at line 175 of file file_manager.c.

Referenced by file_dealloc(), and file_numerable_find_nth().

#define FILE_EMPTY_PAGE_BITMAP   0x0000000000000000 /* Empty allocation bitmap */
#define FILE_EXTDATA_HEADER_ALIGNED_SIZE   (DB_ALIGN (sizeof (FILE_EXTENSIBLE_DATA), MAX_ALIGNMENT))
#define FILE_FLAG_ENCRYPTED_AES   0x4 /* Is file encrypted using AES */
#define FILE_FLAG_ENCRYPTED_ARIA   0x8 /* Is file encrypted using ARIA */
#define FILE_FLAG_ENCRYPTED_MASK   0x0000000c /* 0x4 + 0x8 */

Definition at line 169 of file file_manager.c.

Referenced by file_set_tde_algorithm_internal().

#define FILE_FLAG_NUMERABLE   0x1 /* Is file numerable */

Definition at line 164 of file file_manager.c.

Referenced by file_create().

#define FILE_FLAG_TEMPORARY   0x2 /* Is file temporary */

Definition at line 165 of file file_manager.c.

Referenced by file_create().

#define FILE_FTAB_COLLECTOR_INITIALIZER   { 0, 0, NULL }

Definition at line 416 of file file_manager.c.

Referenced by file_temp_reset_user_pages().

#define FILE_FULL_PAGE_BITMAP   0xFFFFFFFFFFFFFFFF /* Full allocation bitmap */
#define FILE_GET_TRACKER_LOCK_MODE (   file_type)    (((file_type) == FILE_BTREE) ? IX_LOCK : SCH_S_LOCK)
#define FILE_HEAD_ALLOC_AS_ARGS (   fhead)
Value:
VFID_AS_ARGS (&(fhead)->self), \
(fhead)->n_page_total, (fhead)->n_page_user, (fhead)->n_page_ftab, (fhead)->n_page_free, \
(fhead)->n_sector_total, (fhead)->n_sector_partial, (fhead)->n_sector_full, (fhead)->n_sector_empty
#define FILE_PERM_TEMP_STRING(is_temp)
Definition: file_manager.c:321
#define FILE_IS_NUMERABLE(fh)
Definition: file_manager.c:171
#define VFID_AS_ARGS(vfidp)
Definition: dbtype_def.h:892
static TDE_ALGORITHM file_get_tde_algorithm_internal(const FILE_HEADER *fhead)
const char * tde_get_algorithm_name(TDE_ALGORITHM tde_algo)
Definition: tde.c:1694
#define FILE_NUMERABLE_REGULAR_STRING(is_numerable)
Definition: file_manager.c:322
#define FILE_IS_TEMPORARY(fh)
Definition: file_manager.c:172

Definition at line 338 of file file_manager.c.

Referenced by file_alloc(), file_perm_alloc(), file_perm_dealloc(), file_perm_expand(), file_rv_fhead_alloc(), file_rv_fhead_dealloc(), file_rv_perm_expand_redo(), file_rv_perm_expand_undo(), and file_temp_alloc().

#define FILE_HEAD_ALLOC_MSG
Value:
"\tfile header: \n" \
"\t\tvfid = %d|%d \n" \
"\t\t%s \n" \
"\t\t%s \n" \
"\t\ttde_algorithm: %s \n" \
"\t\tpage: total = %d, user = %d, table = %d, free = %d \n" \
"\t\tsector: total = %d, partial = %d, full = %d, empty = %d \n"

Definition at line 330 of file file_manager.c.

Referenced by file_alloc(), file_perm_alloc(), file_perm_dealloc(), file_perm_expand(), file_rv_fhead_alloc(), file_rv_fhead_dealloc(), file_rv_perm_expand_redo(), file_rv_perm_expand_undo(), and file_temp_alloc().

#define FILE_HEAD_FULL_AS_ARGS (   fhead)
Value:
(long long int) fhead->time_creation, file_type_to_string ((fhead)->type), \
FILE_TABLESPACE_AS_ARGS (&(fhead)->tablespace), \
(fhead)->offset_to_partial_ftab, (fhead)->offset_to_full_ftab, (fhead)->offset_to_user_page_ftab, \
VPID_AS_ARGS (&(fhead)->vpid_sticky_first), \
VPID_AS_ARGS (&(fhead)->vpid_last_temp_alloc), (fhead)->offset_to_last_temp_alloc, \
VPID_AS_ARGS (&(fhead)->vpid_last_user_page_ftab), \
VPID_AS_ARGS (&(fhead)->vpid_find_nth_last), (fhead)->first_index_find_nth_last
#define VPID_AS_ARGS(vpidp)
Definition: dbtype_def.h:896
#define FILE_TABLESPACE_AS_ARGS(tabspace)
Definition: file_manager.c:326
const char * file_type_to_string(FILE_TYPE fstruct_type)
#define FILE_HEAD_ALLOC_AS_ARGS(fhead)
Definition: file_manager.c:338

Definition at line 355 of file file_manager.c.

Referenced by file_create(), file_destroy(), file_header_dump(), file_numerable_add_page(), file_temp_alloc(), and file_temp_reset_user_pages().

#define FILE_HEAD_FULL_MSG
Value:
"\t\ttime_creation = %lld, type = %s \n" \
"\t\ttable offsets: partial = %d, full = %d, user page = %d \n" \
"\t\tvpid_sticky_first = %d|%d \n" \
"\t\tvpid_last_temp_alloc = %d|%d, offset_to_last_temp_alloc=%d \n" \
"\t\tvpid_last_user_page_ftab = %d|%d \n" \
"\t\tvpid_find_nth_last = %d|%d, first_index_find_nth_last = %d \n"
#define FILE_HEAD_ALLOC_MSG
Definition: file_manager.c:330
#define FILE_TABLESPACE_MSG
Definition: file_manager.c:324

Definition at line 346 of file file_manager.c.

Referenced by file_create(), file_destroy(), file_header_dump(), file_numerable_add_page(), file_temp_alloc(), and file_temp_reset_user_pages().

#define FILE_HEADER_ALIGNED_SIZE   ((INT16) (DB_ALIGN (sizeof (FILE_HEADER), MAX_ALIGNMENT)))

Definition at line 161 of file file_manager.c.

Referenced by file_create().

#define FILE_HEADER_GET_FULL_FTAB (   fh,
  fulltab 
)
Value:
assert ((fh)->offset_to_full_ftab>= FILE_HEADER_ALIGNED_SIZE && (fh)->offset_to_full_ftab < DB_PAGESIZE); \
(fulltab) = (FILE_EXTENSIBLE_DATA *) (((char *) fh) + (fh)->offset_to_full_ftab)
#define FILE_HEADER_ALIGNED_SIZE
Definition: file_manager.c:161
#define assert(x)
#define FILE_IS_TEMPORARY(fh)
Definition: file_manager.c:172
#define DB_PAGESIZE

Definition at line 196 of file file_manager.c.

Referenced by file_apply_tde_algorithm(), file_check_vpid(), file_create(), file_destroy(), file_header_sanity_check(), file_map_pages(), file_perm_dealloc(), file_table_add_full_sector(), file_table_append_full_sector_page(), file_table_collect_all_vsids(), file_table_collect_ftab_pages(), and file_table_dump().

#define FILE_HEADER_GET_PART_FTAB (   fh,
  parttab 
)
#define FILE_HEADER_GET_USER_PAGE_FTAB (   fh,
  pagetab 
)
Value:
assert ((fh)->offset_to_user_page_ftab >= FILE_HEADER_ALIGNED_SIZE && (fh)->offset_to_user_page_ftab < DB_PAGESIZE); \
(pagetab) = (FILE_EXTENSIBLE_DATA *) (((char *) fh) + (fh)->offset_to_user_page_ftab)
#define FILE_IS_NUMERABLE(fh)
Definition: file_manager.c:171
#define FILE_HEADER_ALIGNED_SIZE
Definition: file_manager.c:161
#define assert(x)
#define DB_PAGESIZE

Definition at line 201 of file file_manager.c.

Referenced by file_check_vpid(), file_create(), file_dealloc(), file_numerable_add_page(), file_numerable_find_nth(), file_rv_dealloc_internal(), file_rv_user_page_unmark_delete_logical(), file_table_check(), file_table_collect_ftab_pages(), file_table_dump(), and file_temp_reset_user_pages().

#define FILE_IS_TDE_ENCRYPTED (   fh)    (((fh)->file_flags & FILE_FLAG_ENCRYPTED_MASK) != 0)

Definition at line 173 of file file_manager.c.

#define file_log (   func,
  msg,
  ... 
)
Value:
_er_log_debug (ARG_FILE_LINE, "FILE " func " " LOG_THREAD_TRAN_MSG ": " msg "\n", \
cubthread::entry * thread_get_thread_entry_info(void)
#define LOG_THREAD_TRAN_MSG
Definition: log_impl.h:796
#define LOG_THREAD_TRAN_ARGS(thread_p)
Definition: log_impl.h:797
void _er_log_debug(const char *file_name, const int line_no, const char *fmt,...)
static bool file_Logging
Definition: file_manager.c:314
#define ARG_FILE_LINE
Definition: error_manager.h:44

Definition at line 316 of file file_manager.c.

Referenced by file_alloc(), file_alloc_sticky_first_page(), file_create(), file_dealloc(), file_destroy(), file_extdata_collect_ftab_pages(), file_extdata_find_and_remove_item(), file_extdata_merge_pages(), file_header_update_mark_deleted(), file_log_extdata_set_next(), file_numerable_add_page(), file_numerable_find_nth(), file_perm_alloc(), file_perm_dealloc(), file_perm_expand(), file_rv_dealloc_on_postpone(), file_rv_dealloc_on_undo(), file_rv_extdata_add(), file_rv_extdata_merge(), file_rv_extdata_remove(), file_rv_extdata_set_next(), file_rv_fhead_alloc(), file_rv_fhead_dealloc(), file_rv_fhead_set_last_user_page_ftab(), file_rv_fhead_sticky_page(), file_rv_header_update_mark_deleted(), file_rv_partsect_update(), file_rv_perm_expand_redo(), file_rv_perm_expand_undo(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_rv_tracker_reuse_heap(), file_rv_user_page_mark_delete(), file_rv_user_page_unmark_delete_logical(), file_rv_user_page_unmark_delete_physical(), file_table_add_full_sector(), file_table_append_full_sector_page(), file_table_collect_ftab_pages(), file_table_move_partial_sectors_to_header(), file_temp_alloc(), file_temp_reset_user_pages(), file_tempcache_cache_or_drop_entries(), file_tempcache_drop_tran_temp_files(), file_tempcache_get(), file_tempcache_pop_tran_file(), file_tempcache_push_tran_file(), file_tempcache_put(), file_tracker_item_mark_heap_deleted(), file_tracker_item_reuse_heap(), file_tracker_register_internal(), and file_tracker_unregister().

#define FILE_NUMERABLE_REGULAR_STRING (   is_numerable)    ((is_numerable) ? "numerable" : "regular")

Definition at line 322 of file file_manager.c.

Referenced by file_create().

#define FILE_PARTIAL_SECTOR_INITIALIZER   { VSID_INITIALIZER, 0 }

Definition at line 281 of file file_manager.c.

Referenced by file_sector_map_dealloc(), file_sector_map_pages(), and file_temp_alloc().

#define FILE_PARTSECT_AS_ARGS (   ps)    VSID_AS_ARGS (&(ps)->vsid), (long long unsigned int) (ps)->page_bitmap
#define FILE_PARTSECT_MSG (   name)    "\t" name ": { vsid = %d|%d, page bitmap = " BIT64_HEXA_PRINT_FORMAT " } \n"
#define FILE_PERM_TEMP_STRING (   is_temp)    ((is_temp) ? "temporary" : "permanent")

Definition at line 321 of file file_manager.c.

Referenced by file_alloc(), and file_create().

#define FILE_RV_DEALLOC_COMPENSATE   true

Definition at line 406 of file file_manager.c.

Referenced by file_rv_dealloc_internal(), and file_rv_dealloc_on_undo().

#define FILE_RV_DEALLOC_RUN_POSTPONE   false

Definition at line 407 of file file_manager.c.

Referenced by file_rv_dealloc_on_postpone().

#define FILE_TABLESPACE_AS_ARGS (   tabspace)
Value:
(long long int) (tabspace)->initial_size, (tabspace)->expand_ratio, (tabspace)->expand_min_size, \
(tabspace)->expand_max_size

Definition at line 326 of file file_manager.c.

Referenced by file_create(), and file_perm_expand().

#define FILE_TABLESPACE_DEFAULT_MAX_EXPAND   (DISK_SECTOR_NPAGES * DB_PAGESIZE * 1024); /* 1k sectors */

Definition at line 290 of file file_manager.c.

#define FILE_TABLESPACE_DEFAULT_MIN_EXPAND   (DISK_SECTOR_NPAGES * DB_PAGESIZE); /* one sector */

Definition at line 289 of file file_manager.c.

#define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND   ((float) 0.01) /* 1% of current size */

Definition at line 288 of file file_manager.c.

#define FILE_TABLESPACE_FOR_PERM_NPAGES (   tabspace,
  npages 
)
Value:
((FILE_TABLESPACE *) (tabspace))->initial_size = (INT64) MAX (1, npages) * DB_PAGESIZE; \
((FILE_TABLESPACE *) (tabspace))->expand_ratio = FILE_TABLESPACE_DEFAULT_RATIO_EXPAND; \
((FILE_TABLESPACE *) (tabspace))->expand_min_size = FILE_TABLESPACE_DEFAULT_MIN_EXPAND; \
((FILE_TABLESPACE *) (tabspace))->expand_max_size = FILE_TABLESPACE_DEFAULT_MAX_EXPAND
#define FILE_TABLESPACE_DEFAULT_MAX_EXPAND
Definition: file_manager.c:290
#define DB_PAGESIZE
#define FILE_TABLESPACE_DEFAULT_MIN_EXPAND
Definition: file_manager.c:289
#define FILE_TABLESPACE_DEFAULT_RATIO_EXPAND
Definition: file_manager.c:288

Definition at line 292 of file file_manager.c.

Referenced by file_create_with_npages().

#define FILE_TABLESPACE_FOR_TEMP_NPAGES (   tabspace,
  npages 
)
Value:
((FILE_TABLESPACE *) (tabspace))->initial_size = (INT64) MAX (1, npages) * DB_PAGESIZE; \
((FILE_TABLESPACE *) (tabspace))->expand_ratio = 0; \
((FILE_TABLESPACE *) (tabspace))->expand_min_size = 0; \
((FILE_TABLESPACE *) (tabspace))->expand_max_size = 0
#define DB_PAGESIZE

Definition at line 298 of file file_manager.c.

Referenced by file_create_ehash(), file_create_ehash_dir(), and file_create_temp_internal().

#define FILE_TABLESPACE_MSG   "\ttablespace = { init_size = %lld, expand_ratio = %f, expand_min_size = %d, expand_max_size = %d } \n"

Definition at line 324 of file file_manager.c.

Referenced by file_create(), and file_perm_expand().

#define FILE_TEMPCACHE_ENTRY_AS_ARGS (   ent)    ent, VFID_AS_ARGS (&(ent)->vfid), file_type_to_string ((ent)->ftype)
#define FILE_TEMPCACHE_ENTRY_MSG   "%p, VFID %d|%d, %s"
#define FILE_TEMPCACHE_MSG
Value:
"\ttempcache: \n" \
"\t\tfile cache: max = %d, numerable = %d, regular = %d, total = %d \n" \
"\t\tfree entries: max = %d, count = %d \n"

Definition at line 377 of file file_manager.c.

Referenced by file_tempcache_get(), and file_tempcache_put().

#define FILE_TRACK_ITEM_AS_ARGS (   item)    (item)->volid, (item)->fileid, file_type_to_string ((FILE_TYPE) (item)->type)
#define FILE_TRACK_ITEM_MSG   "VFID %d|%d, %s"
#define FILE_TYPE_CAN_BE_NUMERABLE (   ftype)
Value:

Definition at line 179 of file file_manager.c.

Referenced by file_dealloc().

#define FILE_TYPE_IS_ALWAYS_TEMP (   ftype)
Value:
((ftype) == FILE_TEMP \
|| (ftype) == FILE_QUERY_AREA)

Definition at line 182 of file file_manager.c.

#define FILE_TYPE_IS_NEVER_TEMP (   ftype)    (!FILE_TYPE_IS_ALWAYS_TEMP (ftype) && !FILE_TYPE_IS_SOMETIMES_TEMP (ftype))

Definition at line 186 of file file_manager.c.

#define FILE_TYPE_IS_SOMETIMES_TEMP (   ftype)
#define FILE_USER_PAGE_MARK_DELETE_FLAG   ((PAGEID) 0x80000000)

Definition at line 445 of file file_manager.c.

#define FILE_USER_PAGE_MARK_DELETED (   vpid)    ((VPID *) vpid)->pageid |= FILE_USER_PAGE_MARK_DELETE_FLAG

Definition at line 447 of file file_manager.c.

Referenced by file_dealloc(), and file_rv_user_page_mark_delete().

#define LOG_BOOL_COUNT   3
#define LOG_BOOL_COUNT   3
#define LOG_DATA_SIZE   (sizeof (VFID) + sizeof (VPID))

Referenced by file_dealloc().

#define UNDO_DATA_SIZE   (sizeof (VFID) + sizeof (VPID))

Referenced by file_alloc().

Typedef Documentation

typedef UINT64 FILE_ALLOC_BITMAP

Definition at line 266 of file file_manager.c.

typedef int(* FILE_EXTDATA_FUNC) (THREAD_ENTRY *thread_p, const FILE_EXTENSIBLE_DATA *extdata, bool *stop, void *args)

Definition at line 247 of file file_manager.c.

typedef int(* FILE_EXTDATA_ITEM_FUNC) (THREAD_ENTRY *thread_p, const void *data, int index, bool *stop, void *args)

Definition at line 249 of file file_manager.c.

Definition at line 224 of file file_manager.c.

Definition at line 452 of file file_manager.c.

Definition at line 409 of file file_manager.c.

typedef struct file_header FILE_HEADER

Definition at line 83 of file file_manager.c.

Definition at line 419 of file file_manager.c.

Definition at line 274 of file file_manager.c.

Definition at line 434 of file file_manager.c.

Definition at line 476 of file file_manager.c.

Definition at line 467 of file file_manager.c.

Definition at line 509 of file file_manager.c.

Definition at line 524 of file file_manager.c.

typedef int(* FILE_TRACK_ITEM_FUNC) (THREAD_ENTRY *thread_p, PAGE_PTR page_of_item, FILE_EXTENSIBLE_DATA *extdata, int index_item, bool *stop, void *args)

Definition at line 556 of file file_manager.c.

Definition at line 516 of file file_manager.c.

Definition at line 306 of file file_manager.c.

Enumeration Type Documentation

Enumerator
FILE_ALLOC_USER_PAGE 
FILE_ALLOC_TABLE_PAGE 
FILE_ALLOC_TABLE_PAGE_FULL_SECTOR 

Definition at line 399 of file file_manager.c.

Function Documentation

int file_alloc ( THREAD_ENTRY thread_p,
const VFID vfid,
FILE_INIT_PAGE_FUNC  f_init,
void *  f_init_args,
VPID vpid_out,
PAGE_PTR page_out 
)
static int file_compare_track_items ( const void *  first,
const void *  second 
)
static
static int file_compare_vfids ( const void *  first,
const void *  second 
)
static

Definition at line 2979 of file file_manager.c.

References vfid::fileid, and vfid::volid.

static int file_compare_vpids ( const void *  first,
const void *  second 
)
static

Definition at line 2952 of file file_manager.c.

References FILE_USER_PAGE_CLEAR_MARK_DELETED, vpid::pageid, and vpid::volid.

Referenced by file_check_vpid(), file_dealloc(), file_rv_dealloc_internal(), and file_rv_user_page_unmark_delete_logical().

Here is the caller graph for this function:

int file_create ( THREAD_ENTRY thread_p,
FILE_TYPE  file_type,
FILE_TABLESPACE tablespace,
FILE_DESCRIPTORS des,
bool  is_temp,
bool  is_numerable,
VFID vfid 
)

Definition at line 3295 of file file_manager.c.

References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, CEIL_PTVDIV, DB_ALIGN, DB_PAGESIZE, DB_PERMANENT_DATA_PURPOSE, db_private_alloc, db_private_free, DB_SECTORSIZE, DB_TEMPORARY_DATA_PURPOSE, file_header::descriptor, disk_compare_vsids(), disk_reserve_sectors(), DISK_SECTOR_NPAGES, DISK_UNKNOWN_PURPOSE, disk_unreserve_ordered_sectors(), ER_ERROR_SEVERITY, ER_FAILED, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), FILE_BTREE, FILE_EMPTY_PAGE_BITMAP, file_extdata_append(), file_extdata_at(), file_extdata_end(), file_extdata_init(), file_extdata_is_empty(), file_extdata_is_full(), file_extdata_item_count(), file_extdata_max_size(), file_extdata_remove_at(), file_extdata_size(), file_extdata_start(), FILE_FLAG_NUMERABLE, FILE_FLAG_TEMPORARY, file_header::file_flags, FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, FILE_HEADER_ALIGNED_SIZE, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_sanity_check(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_log, FILE_NUMERABLE_REGULAR_STRING, file_partsect_is_bit_set(), file_partsect_is_full(), file_partsect_pageid_to_offset(), file_partsect_set_bit(), FILE_PERM_TEMP_STRING, FILE_TABLESPACE_AS_ARGS, FILE_TABLESPACE_MSG, FILE_TEMP, FILE_TRACKER, file_tracker_register(), file_type_to_string(), vfid::fileid, file_header::first_index_find_nth_last, FREE, i, file_tablespace::initial_size, log_sysop_abort(), log_sysop_end_logical_undo(), log_sysop_start(), logtb_get_current_mvccid(), logtb_set_check_interrupt(), MAX_ALIGNMENT, file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_mark_delete, file_header::n_page_total, file_header::n_page_user, file_header::n_sector_empty, file_header::n_sector_full, file_header::n_sector_partial, file_header::n_sector_total, NEW_PAGE, spacedb_files::nfile, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, NULL, NULL_OFFSET, NULL_VOLID, file_header::offset_to_full_ftab, file_header::offset_to_last_temp_alloc, file_header::offset_to_partial_ftab, file_header::offset_to_user_page_ftab, file_partial_sector::page_bitmap, PAGE_FTAB, vpid::pageid, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_log_new_page(), pgbuf_set_dirty(), pgbuf_set_dirty_and_free, pgbuf_set_page_ptype(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, file_header::reserved0, file_header::reserved1, file_header::reserved2, file_header::reserved3, RVFL_DESTROY, vsid::sectid, SECTOR_FIRST_PAGEID, SECTOR_FROM_PAGEID, SECTOR_LAST_PAGEID, file_header::self, file_tempcache::spacedb_temp, file_header::tablespace, file_header::time_creation, file_header::type, vacuum_is_file_dropped(), VFID_AS_ARGS, VFID_INITIALIZER, VFID_ISNULL, VFID_SET_NULL, vpid::volid, vfid::volid, vsid::volid, file_header::volid_last_expand, VPID_COPY, VPID_EQ, file_header::vpid_find_nth_last, VPID_INITIALIZER, file_header::vpid_last_temp_alloc, file_header::vpid_last_user_page_ftab, file_extensible_data::vpid_next, VPID_SET_NULL, file_header::vpid_sticky_first, file_partial_sector::vsid, and VSID_IS_SECTOR_OF_VPID.

Referenced by file_create_ehash(), file_create_ehash_dir(), file_create_temp_internal(), and file_create_with_npages().

Here is the caller graph for this function:

int file_create_ehash ( THREAD_ENTRY thread_p,
int  npages,
bool  is_tmp,
FILE_EHASH_DES des_ehash,
VFID vfid 
)

Definition at line 3245 of file file_manager.c.

References assert, file_create(), FILE_EXTENDIBLE_HASH, FILE_TABLESPACE_FOR_TEMP_NPAGES, and file_header::tablespace.

Referenced by ehash_create_helper().

Here is the caller graph for this function:

int file_create_ehash_dir ( THREAD_ENTRY thread_p,
int  npages,
bool  is_tmp,
FILE_EHASH_DES des_ehash,
VFID vfid 
)

Definition at line 3269 of file file_manager.c.

References assert, file_create(), FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_TABLESPACE_FOR_TEMP_NPAGES, and file_header::tablespace.

Referenced by ehash_create_helper().

Here is the caller graph for this function:

int file_create_heap ( THREAD_ENTRY thread_p,
bool  reuse_oid,
const OID class_oid,
VFID vfid 
)

Definition at line 3122 of file file_manager.c.

References assert, file_heap_des::class_oid, file_create_with_npages(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, file_descriptors::heap, NULL, and STATIC_INLINE.

Referenced by heap_create_internal().

Here is the caller graph for this function:

int file_create_query_area ( THREAD_ENTRY thread_p,
VFID vfid 
)

Definition at line 3228 of file file_manager.c.

References file_create_temp_internal(), and FILE_QUERY_AREA.

Referenced by qmgr_create_result_file().

Here is the caller graph for this function:

int file_create_temp ( THREAD_ENTRY thread_p,
int  npages,
VFID vfid 
)

Definition at line 3201 of file file_manager.c.

References file_create_temp_internal(), and FILE_TEMP.

Referenced by qmgr_get_new_page(), and sort_inphase_sort().

Here is the caller graph for this function:

int file_create_temp_numerable ( THREAD_ENTRY thread_p,
int  npages,
VFID vfid 
)

Definition at line 3215 of file file_manager.c.

References file_create_temp_internal(), and FILE_TEMP.

Referenced by sort_add_new_file().

Here is the caller graph for this function:

int file_create_with_npages ( THREAD_ENTRY thread_p,
FILE_TYPE  file_type,
int  npages,
FILE_DESCRIPTORS des,
VFID vfid 
)
int file_dealloc ( THREAD_ENTRY thread_p,
const VFID vfid,
const VPID vpid,
FILE_TYPE  file_type_hint 
)

Definition at line 5972 of file file_manager.c.

References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DONT_FREE, ER_FAILED, FILE_CACHE_LAST_FIND_NTH, file_compare_vpids(), file_extdata_at(), file_extdata_search_item(), FILE_EXTENDIBLE_HASH, FILE_EXTENDIBLE_HASH_DIRECTORY, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_update_mark_deleted(), FILE_HEAP, FILE_HEAP_REUSE_SLOTS, FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, file_log, FILE_TEMP, FILE_TYPE_CAN_BE_NUMERABLE, file_type_to_string(), FILE_UNKNOWN_TYPE, FILE_USER_PAGE_IS_MARKED_DELETED, FILE_USER_PAGE_MARK_DELETED, vfid::fileid, file_header::first_index_find_nth_last, log_append_postpone(), log_append_undoredo_data(), LOG_DATA_ADDR_INITIALIZER, LOG_DATA_SIZE, MAX_ALIGNMENT, NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, vpid::pageid, pgbuf_fix, pgbuf_get_lsa(), PGBUF_LATCH_WRITE, PGBUF_PAGE_MODIFY_ARGS, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, log_data_addr::pgptr, PTR_ALIGN, RVFL_DEALLOC, RVFL_USER_PAGE_MARK_DELETE, file_header::self, file_header::type, VFID_AS_ARGS, VFID_COPY, vpid::volid, vfid::volid, VPID_AS_ARGS, VPID_COPY, VPID_EQ, file_header::vpid_find_nth_last, VPID_SET_NULL, and file_header::vpid_sticky_first.

Referenced by btree_merge_node_and_advance(), btree_overflow_remove_object(), catalog_drop_representation_helper(), catalog_reclaim_space(), catalog_rv_ovf_page_logical_insert_undo(), ehash_merge(), ehash_split_bucket(), file_numerable_truncate(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_tracker_unregister(), heap_remove_page_on_vacuum(), heap_vpid_remove(), overflow_delete_internal(), overflow_update(), and vacuum_data_empty_page().

Here is the caller graph for this function:

int file_descriptor_dump ( THREAD_ENTRY thread_p,
const VFID vfid,
FILE *  fp 
)
int file_destroy ( THREAD_ENTRY thread_p,
const VFID vfid,
bool  is_temp 
)

Definition at line 4041 of file file_manager.c.

References ARG_FILE_LINE, assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DB_PERMANENT_DATA_PURPOSE, db_private_alloc, db_private_free, DB_TEMPORARY_DATA_PURPOSE, DISK_SECTOR_NPAGES, disk_unreserve_ordered_sectors(), ER_ERROR_SEVERITY, ER_FAILED, er_log_debug, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), file_extdata_apply_funcs(), file_extdata_collect_ftab_pages(), FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_IS_TEMPORARY, file_log, file_partsect_is_bit_set(), file_sector_map_dealloc(), file_table_collect_all_vsids(), file_tracker_unregister(), log_check_system_op_is_started(), logtb_set_check_interrupt(), file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_user, file_header::n_sector_total, file_vsid_collector::n_vsids, spacedb_files::nfile, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, file_ftab_collector::npages, file_ftab_collector::nsects, NULL, OLD_PAGE, vpid::pageid, file_ftab_collector::partsect_ftab, pgbuf_dealloc_page(), pgbuf_fix, PGBUF_LATCH_WRITE, PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, vsid::sectid, SECTOR_FIRST_PAGEID, file_header::self, file_tempcache::spacedb_temp, TDE_ALGORITHM_NONE, tde_get_algorithm_name(), VFID_AS_ARGS, VFID_ISNULL, vpid::volid, vsid::volid, file_partial_sector::vsid, and file_vsid_collector::vsids.

Referenced by ehash_create_helper(), file_rv_destroy(), file_rv_tracker_mark_heap_deleted_compensate_or_run_postpone(), file_temp_retire_internal(), file_tempcache_cache_or_drop_entries(), and xehash_destroy().

Here is the caller graph for this function:

int file_dump ( THREAD_ENTRY thread_p,
const VFID vfid,
FILE *  fp 
)
static int file_extdata_add_item_count ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static

Definition at line 2736 of file file_manager.c.

References file_extdata_item_count(), NO_ERROR, and STATIC_INLINE.

Referenced by file_extdata_all_item_count().

Here is the caller graph for this function:

static int file_extdata_all_item_count ( THREAD_ENTRY thread_p,
FILE_EXTENSIBLE_DATA extdata,
int *  count 
)
static

Definition at line 2720 of file file_manager.c.

References file_extdata_add_item_count(), file_extdata_apply_funcs(), and NULL.

Referenced by file_header_sanity_check().

Here is the caller graph for this function:

STATIC_INLINE void file_extdata_append ( FILE_EXTENSIBLE_DATA extdata,
const void *  append_data 
)
STATIC_INLINE void file_extdata_append_array ( FILE_EXTENSIBLE_DATA extdata,
const void *  append_data,
INT16  count 
)
STATIC_INLINE bool file_extdata_can_merge ( const FILE_EXTENSIBLE_DATA extdata_src,
const FILE_EXTENSIBLE_DATA extdata_dest 
)

Definition at line 1664 of file file_manager.c.

References file_extdata_remaining_capacity(), file_extensible_data::n_items, and STATIC_INLINE.

Referenced by file_extdata_merge_pages().

Here is the caller graph for this function:

STATIC_INLINE void * file_extdata_end ( const FILE_EXTENSIBLE_DATA extdata)

Definition at line 1552 of file file_manager.c.

References file_extdata_size(), and STATIC_INLINE.

Referenced by file_create(), file_extdata_append(), file_extdata_append_array(), file_extdata_merge_ordered(), and file_temp_reset_user_pages().

Here is the caller graph for this function:

static int file_extdata_find_not_full ( THREAD_ENTRY thread_p,
FILE_EXTENSIBLE_DATA **  extdata,
PAGE_PTR page_out,
bool found 
)
static
static int file_extdata_find_nth_vpid ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static
static int file_extdata_find_nth_vpid_and_skip_marked ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static

Definition at line 7916 of file file_manager.c.

References FILE_USER_PAGE_IS_MARKED_DELETED, NO_ERROR, file_find_nth_context::nth, and file_find_nth_context::vpid_nth.

Referenced by file_numerable_find_nth().

Here is the caller graph for this function:

static void file_extdata_find_ordered ( const FILE_EXTENSIBLE_DATA extdata,
const void *  item_to_find,
int(*)(const void *, const void *)  compare_func,
bool found,
int *  position 
)
static
static int file_extdata_func_for_search_ordered ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static
STATIC_INLINE void file_extdata_insert_at ( FILE_EXTENSIBLE_DATA extdata,
int  position,
int  count,
const void *  data 
)
STATIC_INLINE bool file_extdata_is_empty ( const FILE_EXTENSIBLE_DATA extdata)
static int file_extdata_item_func_for_search ( THREAD_ENTRY thread_p,
const void *  item,
int  index,
bool stop,
void *  args 
)
static
STATIC_INLINE int file_extdata_max_size ( const FILE_EXTENSIBLE_DATA extdata)

Definition at line 1516 of file file_manager.c.

References FILE_EXTDATA_HEADER_ALIGNED_SIZE, file_extensible_data::max_size, and STATIC_INLINE.

Referenced by file_create().

Here is the caller graph for this function:

STATIC_INLINE void file_extdata_merge_ordered ( const FILE_EXTENSIBLE_DATA extdata_src,
FILE_EXTENSIBLE_DATA extdata_dest,
int(*)(const void *, const void *)  compare_func 
)
STATIC_INLINE void file_extdata_merge_unordered ( const FILE_EXTENSIBLE_DATA extdata_src,
FILE_EXTENSIBLE_DATA extdata_dest 
)

Definition at line 1677 of file file_manager.c.

References file_extdata_append_array(), file_extdata_item_count(), file_extdata_start(), and STATIC_INLINE.

Referenced by file_extdata_merge_pages().

Here is the caller graph for this function:

STATIC_INLINE void file_extdata_remove_at ( FILE_EXTENSIBLE_DATA extdata,
int  position,
int  count 
)
STATIC_INLINE void file_extdata_update_item ( THREAD_ENTRY thread_p,
PAGE_PTR  page_extdata,
const void *  item_newval,
int  index_item,
FILE_EXTENSIBLE_DATA extdata 
)
static int file_file_map_set_tde_algorithm ( THREAD_ENTRY thread_p,
PAGE_PTR page,
bool stop,
void *  args 
)
static

Definition at line 5836 of file file_manager.c.

References NO_ERROR, pgbuf_set_tde_algorithm(), file_set_tde_algorithm_args::skip_logging, and file_set_tde_algorithm_args::tde_algo.

Referenced by file_apply_tde_algorithm().

Here is the caller graph for this function:

static int file_full_table_extdata_dump ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static

Definition at line 7554 of file file_manager.c.

References FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, and NO_ERROR.

Referenced by file_table_dump().

Here is the caller graph for this function:

static int file_full_table_item_dump ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static

Definition at line 7573 of file file_manager.c.

References DISK_SECTOR_NPAGES, NO_ERROR, vpid::pageid, vsid::sectid, SECTOR_FIRST_PAGEID, vpid::volid, vsid::volid, VPID_AS_ARGS, and VSID_AS_ARGS.

Referenced by file_table_dump().

Here is the caller graph for this function:

int file_get_tde_algorithm ( THREAD_ENTRY thread_p,
const VFID vfid,
PGBUF_LATCH_CONDITION  fix_head_cond,
TDE_ALGORITHM tde_algo 
)

Definition at line 5782 of file file_manager.c.

References ER_FAILED, FILE_GET_HEADER_VPID, file_get_tde_algorithm_internal(), NO_ERROR, NULL, OLD_PAGE, pgbuf_fix, PGBUF_LATCH_READ, and pgbuf_unfix.

Referenced by log_append_sysop_end(), and sort_write_area().

Here is the caller graph for this function:

TDE_ALGORITHM file_get_tde_algorithm_internal ( const FILE_HEADER fhead)
static
STATIC_INLINE int file_get_tempcache_entry_index ( THREAD_ENTRY thread_p)
int file_get_tran_num_temp_files ( THREAD_ENTRY thread_p)
STATIC_INLINE int file_header_copy ( THREAD_ENTRY thread_p,
const VFID vfid,
FILE_HEADER fhead_copy 
)
STATIC_INLINE void file_header_dealloc ( FILE_HEADER fhead,
FILE_ALLOC_TYPE  alloc_type,
bool  is_empty,
bool  was_full 
)
STATIC_INLINE void file_header_dump ( THREAD_ENTRY thread_p,
const FILE_HEADER fhead,
FILE *  fp 
)

Definition at line 1406 of file file_manager.c.

References FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, file_header_dump_descriptor(), and STATIC_INLINE.

Referenced by file_dump().

Here is the caller graph for this function:

STATIC_INLINE void file_header_sanity_check ( THREAD_ENTRY thread_p,
FILE_HEADER fhead 
)
STATIC_INLINE void file_header_update_mark_deleted ( THREAD_ENTRY thread_p,
PAGE_PTR  page_fhead,
int  delta 
)
int file_init_page_type ( THREAD_ENTRY thread_p,
PAGE_PTR  page,
void *  args 
)
STATIC_INLINE int file_init_page_type_internal ( THREAD_ENTRY thread_p,
PAGE_PTR  page,
PAGE_TYPE  ptype,
bool  is_temp 
)

Definition at line 5233 of file file_manager.c.

References DONT_FREE, log_append_undoredo_data2(), NO_ERROR, NULL, pgbuf_set_dirty(), pgbuf_set_page_ptype(), and RVPGBUF_NEW_PAGE.

Referenced by file_init_page_type(), and file_init_temp_page_type().

Here is the caller graph for this function:

int file_init_temp_page_type ( THREAD_ENTRY thread_p,
PAGE_PTR  page,
void *  args 
)

Definition at line 5216 of file file_manager.c.

References file_init_page_type_internal(), and STATIC_INLINE.

Referenced by ehash_create_helper(), and overflow_insert().

Here is the caller graph for this function:

int file_is_temp ( THREAD_ENTRY thread_p,
const VFID vfid,
bool is_temp 
)
STATIC_INLINE void file_log_fhead_alloc ( THREAD_ENTRY thread_p,
PAGE_PTR  page_fhead,
FILE_ALLOC_TYPE  alloc_type,
bool  was_empty,
bool  is_full 
)
STATIC_INLINE void file_log_fhead_dealloc ( THREAD_ENTRY thread_p,
PAGE_PTR  page_fhead,
FILE_ALLOC_TYPE  alloc_type,
bool  is_empty,
bool  was_full 
)
void file_manager_final ( void  )

Definition at line 869 of file file_manager.c.

References file_tempcache_final(), and STATIC_INLINE.

Referenced by logtb_undefine_trantable().

Here is the caller graph for this function:

static int file_partial_table_extdata_dump ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static

Definition at line 7479 of file file_manager.c.

References FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, and NO_ERROR.

Referenced by file_table_dump().

Here is the caller graph for this function:

static int file_partial_table_item_dump ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static
STATIC_INLINE bool file_partsect_alloc ( FILE_PARTIAL_SECTOR partsect,
VPID vpid_out,
int *  offset_out 
)
STATIC_INLINE void file_partsect_clear_bit ( FILE_PARTIAL_SECTOR partsect,
int  offset 
)

Definition at line 2807 of file file_manager.c.

References assert, bit64_clear(), file_partsect_is_bit_set(), file_partial_sector::page_bitmap, and STATIC_INLINE.

Referenced by file_perm_dealloc(), and file_rv_partsect_update().

Here is the caller graph for this function:

STATIC_INLINE bool file_partsect_is_empty ( FILE_PARTIAL_SECTOR partsect)

Definition at line 2766 of file file_manager.c.

References FILE_EMPTY_PAGE_BITMAP, file_partial_sector::page_bitmap, and STATIC_INLINE.

Referenced by file_perm_alloc(), file_perm_dealloc(), and file_temp_alloc().

Here is the caller graph for this function:

STATIC_INLINE bool file_partsect_is_full ( FILE_PARTIAL_SECTOR partsect)

Definition at line 2754 of file file_manager.c.

References FILE_FULL_PAGE_BITMAP, file_partial_sector::page_bitmap, and STATIC_INLINE.

Referenced by file_create(), file_partsect_alloc(), file_perm_alloc(), and file_temp_alloc().

Here is the caller graph for this function:

STATIC_INLINE int file_partsect_pageid_to_offset ( FILE_PARTIAL_SECTOR partsect,
PAGEID  pageid 
)
STATIC_INLINE void file_partsect_set_bit ( FILE_PARTIAL_SECTOR partsect,
int  offset 
)
static int file_perm_dealloc ( THREAD_ENTRY thread_p,
PAGE_PTR  page_fhead,
const VPID vpid_dealloc,
FILE_ALLOC_TYPE  alloc_type 
)
static

Definition at line 6165 of file file_manager.c.

References assert, ASSERT_ERROR, ASSERT_ERROR_AND_SET, assert_release, DB_PAGESIZE, disk_compare_vsids(), DONT_FREE, ER_FAILED, FILE_ALLOC_TABLE_PAGE, FILE_ALLOC_TYPE_STRING, file_extdata_append(), FILE_EXTDATA_AS_ARGS, file_extdata_at(), file_extdata_find_and_remove_item(), file_extdata_find_not_full(), file_extdata_find_ordered(), file_extdata_init(), file_extdata_insert_at(), FILE_EXTDATA_MSG, file_extdata_search_item(), file_extdata_size(), FILE_FULL_PAGE_BITMAP, FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, file_header_dealloc(), FILE_HEADER_GET_FULL_FTAB, FILE_HEADER_GET_PART_FTAB, FILE_IS_TEMPORARY, file_log, file_log_extdata_add(), file_log_extdata_set_next(), file_log_fhead_dealloc(), FILE_PARTSECT_AS_ARGS, file_partsect_clear_bit(), file_partsect_is_empty(), FILE_PARTSECT_MSG, file_partsect_pageid_to_offset(), file_perm_alloc(), log_append_undoredo_data(), log_check_system_op_is_started(), LOG_DATA_ADDR_INITIALIZER, NEW_PAGE, NO_ERROR, NULL, log_data_addr::offset, OLD_PAGE, file_partial_sector::page_bitmap, PAGE_FTAB, vpid::pageid, perfmon_inc_stat(), pgbuf_dealloc_page(), pgbuf_fix, pgbuf_get_lsa(), PGBUF_LATCH_WRITE, pgbuf_log_new_page(), PGBUF_PAGE_MODIFY_ARGS, pgbuf_set_dirty(), pgbuf_set_page_ptype(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, pgbuf_unfix_and_init, log_data_addr::pgptr, PSTAT_FILE_NUM_PAGE_DEALLOCS, RVFL_PARTSECT_DEALLOC, vsid::sectid, SECTOR_FROM_PAGEID, file_header::self, VFID_AS_ARGS, vpid::volid, vsid::volid, VPID_AS_ARGS, VPID_COPY, VPID_EQ, VPID_INITIALIZER, VPID_ISNULL, file_extensible_data::vpid_next, file_header::vpid_sticky_first, file_partial_sector::vsid, VSID_AS_ARGS, and VSID_IS_SECTOR_OF_VPID.

Referenced by file_rv_dealloc_internal().

Here is the caller graph for this function:

static void file_print_name_of_class ( THREAD_ENTRY thread_p,
FILE *  fp,
const OID class_oid_p 
)
static

Definition at line 3062 of file file_manager.c.

References er_clear(), free_and_init, heap_get_class_name(), NO_ERROR, NULL, OID_AS_ARGS, and OID_ISNULL.

Referenced by file_header_dump_descriptor().

Here is the caller graph for this function:

int file_rv_dealloc_on_postpone ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_dealloc_on_undo ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_destroy ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
void file_rv_dump_extdata_add ( FILE *  fp,
int  length,
void *  data 
)

Definition at line 2289 of file file_manager.c.

References cubregex::count(), and log_rv_dump_hexa().

void file_rv_dump_extdata_remove ( FILE *  fp,
int  length,
void *  data 
)

Definition at line 2312 of file file_manager.c.

References assert, cubregex::count(), and STATIC_INLINE.

void file_rv_dump_extdata_set_next ( FILE *  fp,
int  ignore_length,
void *  data 
)

Definition at line 2197 of file file_manager.c.

References VPID_AS_ARGS.

void file_rv_dump_vfid_and_vpid ( FILE *  fp,
int  length,
void *  data 
)

Definition at line 4989 of file file_manager.c.

References assert, NULL, VFID_AS_ARGS, and VPID_AS_ARGS.

int file_rv_fhead_convert_ftab_to_user_page ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_fhead_convert_user_to_ftab_page ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_fhead_set_last_user_page_ftab ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_header_update_mark_deleted ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_partsect_clear ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)

Definition at line 2933 of file file_manager.c.

References file_rv_partsect_update().

int file_rv_partsect_set ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)

Definition at line 2920 of file file_manager.c.

References file_rv_partsect_update().

static int file_rv_partsect_update ( THREAD_ENTRY thread_p,
LOG_RCV rcv,
bool  set 
)
static
int file_rv_set_tde_algorithm ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
int file_rv_tracker_mark_heap_deleted ( THREAD_ENTRY thread_p,
LOG_RCV rcv,
bool  is_undo 
)
int file_rv_user_page_unmark_delete_physical ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
static int file_sector_map_dealloc ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static
static int file_table_check_page_is_in_sectors ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static
static int file_table_collect_vsid ( THREAD_ENTRY thread_p,
const void *  item,
int  index_unused,
bool stop,
void *  args 
)
static

Definition at line 3899 of file file_manager.c.

References file_vsid_collector::n_vsids, NO_ERROR, STATIC_INLINE, and file_vsid_collector::vsids.

Referenced by file_table_collect_all_vsids().

Here is the caller graph for this function:

STATIC_INLINE bool file_table_collector_has_page ( FILE_FTAB_COLLECTOR collector,
VPID vpid 
)
static int file_temp_alloc ( THREAD_ENTRY thread_p,
PAGE_PTR  page_fhead,
FILE_ALLOC_TYPE  alloc_type,
VPID vpid_alloc_out 
)
static

Definition at line 8413 of file file_manager.c.

References assert, assert_release, DB_PAGESIZE, DB_TEMPORARY_DATA_PURPOSE, disk_reserve_sectors(), DISK_SECTOR_NPAGES, DONT_FREE, ER_FAILED, FILE_ALLOC_TYPE_STRING, FILE_ALLOC_USER_PAGE, FILE_EMPTY_PAGE_BITMAP, file_extdata_append(), FILE_EXTDATA_AS_ARGS, file_extdata_at(), file_extdata_init(), file_extdata_is_full(), file_extdata_item_count(), FILE_EXTDATA_MSG, FILE_GET_HEADER_VPID, FILE_HEAD_ALLOC_AS_ARGS, FILE_HEAD_ALLOC_MSG, FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, file_header_alloc(), FILE_HEADER_GET_PART_FTAB, file_header_sanity_check(), FILE_IS_TEMPORARY, file_log, FILE_PARTIAL_SECTOR_INITIALIZER, file_partsect_alloc(), FILE_PARTSECT_AS_ARGS, file_partsect_is_empty(), file_partsect_is_full(), FILE_PARTSECT_MSG, file_partsect_set_bit(), logtb_set_check_interrupt(), file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_total, file_header::n_sector_empty, file_header::n_sector_partial, file_header::n_sector_total, NEW_PAGE, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, NULL, file_header::offset_to_last_temp_alloc, OLD_PAGE, file_partial_sector::page_bitmap, PAGE_FTAB, vpid::pageid, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), pgbuf_set_dirty_and_free, pgbuf_set_page_ptype(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix_and_init, vsid::sectid, SECTOR_FIRST_PAGEID, file_header::self, file_tempcache::spacedb_temp, STATIC_INLINE, vpid::volid, vsid::volid, file_header::volid_last_expand, VPID_AS_ARGS, VPID_COPY, VPID_EQ, VPID_ISNULL, file_header::vpid_last_temp_alloc, file_extensible_data::vpid_next, file_partial_sector::vsid, and VSID_AS_ARGS.

Referenced by file_alloc(), and file_numerable_add_page().

Here is the caller graph for this function:

void file_temp_preserve ( THREAD_ENTRY thread_p,
const VFID vfid 
)

Definition at line 8881 of file file_manager.c.

References assert, assert_release, file_tempcache_pop_tran_file(), file_tempcache_retire_entry(), NULL, and VFID_ISNULL.

Referenced by qmgr_create_result_file(), and session_preserve_temporary_files().

Here is the caller graph for this function:

static int file_temp_reset_user_pages ( THREAD_ENTRY thread_p,
const VFID vfid 
)
static

Definition at line 8699 of file file_manager.c.

References assert, ASSERT_ERROR_AND_SET, assert_release, db_private_free, disk_compare_vsids(), DONT_FREE, ER_FAILED, FILE_EMPTY_PAGE_BITMAP, file_extdata_end(), file_extdata_start(), FILE_FTAB_COLLECTOR_INITIALIZER, FILE_FULL_PAGE_BITMAP, FILE_GET_HEADER_VPID, FILE_HEAD_FULL_AS_ARGS, FILE_HEAD_FULL_MSG, FILE_HEADER_GET_PART_FTAB, FILE_HEADER_GET_USER_PAGE_FTAB, file_header_sanity_check(), FILE_IS_NUMERABLE, FILE_IS_TEMPORARY, file_log, file_table_collect_ftab_pages(), file_header::first_index_find_nth_last, logtb_set_check_interrupt(), file_extensible_data::n_items, file_header::n_page_free, file_header::n_page_ftab, file_header::n_page_total, file_header::n_page_user, file_header::n_sector_empty, file_header::n_sector_full, file_header::n_sector_partial, file_header::n_sector_total, NO_ERROR, spacedb_files::npage_ftab, spacedb_files::npage_reserved, spacedb_files::npage_user, file_ftab_collector::npages, file_ftab_collector::nsects, NULL, file_header::offset_to_last_temp_alloc, OLD_PAGE, file_partial_sector::page_bitmap, file_ftab_collector::partsect_ftab, pgbuf_fix, PGBUF_LATCH_WRITE, pgbuf_set_dirty(), PGBUF_UNCONDITIONAL_LATCH, pgbuf_unfix, file_tempcache::spacedb_temp, file_header::vpid_find_nth_last, VPID_ISNULL, file_header::vpid_last_temp_alloc, file_header::vpid_last_user_page_ftab, file_extensible_data::vpid_next, VPID_SET_NULL, and file_partial_sector::vsid.

Referenced by file_tempcache_put().

Here is the caller graph for this function:

STATIC_INLINE int file_temp_retire_internal ( THREAD_ENTRY thread_p,
const VFID vfid,
bool  was_preserved 
)
int file_temp_retire_preserved ( THREAD_ENTRY thread_p,
const VFID vfid 
)

Definition at line 4312 of file file_manager.c.

References file_temp_retire_internal(), and STATIC_INLINE.

Referenced by qfile_delete_list_cache_entry(), qmgr_free_list_temp_file(), and qmgr_free_temp_file_list().

Here is the caller graph for this function:

static bool file_tempcache_check_duplicate ( THREAD_ENTRY thread_p,
FILE_TEMPCACHE_ENTRY entry,
bool  is_numerable 
)
static
STATIC_INLINE void file_tempcache_check_lock ( void  )

Definition at line 9135 of file file_manager.c.

References assert, file_tempcache::owner_mutex, STATIC_INLINE, and thread_get_current_entry_index().

Referenced by file_tempcache_alloc_entry(), and file_tempcache_free_entry_list().

Here is the caller graph for this function:

void file_tempcache_drop_tran_temp_files ( THREAD_ENTRY thread_p)
STATIC_INLINE void file_tempcache_free_entry_list ( FILE_TEMPCACHE_ENTRY **  list)

Definition at line 9021 of file file_manager.c.

References file_tempcache_check_lock(), file_tempcache_entry::next, NULL, and STATIC_INLINE.

Referenced by file_tempcache_final().

Here is the caller graph for this function:

STATIC_INLINE void file_tempcache_lock ( void  )

Definition at line 778 of file file_manager.c.

Referenced by file_temp_retire_internal(), file_tempcache_dump(), file_tempcache_final(), file_tempcache_get(), file_tempcache_put(), and file_tempcache_retire_entry().

Here is the caller graph for this function:

STATIC_INLINE void file_tempcache_push_tran_file ( THREAD_ENTRY thread_p,
FILE_TEMPCACHE_ENTRY entry 
)
int file_tracker_create ( THREAD_ENTRY thread_p,
VFID vfid_tracker_out 
)
int file_tracker_dump ( THREAD_ENTRY thread_p,
FILE *  fp 
)

Definition at line 10868 of file file_manager.c.

References file_tracker_item_dump(), file_tracker_map(), and PGBUF_LATCH_READ.

Referenced by diagdb().

Here is the caller graph for this function:

int file_tracker_dump_all_btree_capacities ( THREAD_ENTRY thread_p,
FILE *  fp 
)

Definition at line 11121 of file file_manager.c.

References file_tracker_item_dump_btree_capacity(), file_tracker_map(), and PGBUF_LATCH_READ.

Referenced by diagdb().

Here is the caller graph for this function:

int file_tracker_dump_all_capacities ( THREAD_ENTRY thread_p,
FILE *  fp 
)

Definition at line 10929 of file file_manager.c.

References ASSERT_ERROR, file_tracker_item_dump_capacity(), file_tracker_map(), NO_ERROR, and PGBUF_LATCH_READ.

Referenced by diagdb().

Here is the caller graph for this function:

int file_tracker_dump_all_heap ( THREAD_ENTRY thread_p,
FILE *  fp,
bool  dump_records 
)

Definition at line 10994 of file file_manager.c.

References file_tracker_dump_heap_context::dump_records, file_tracker_item_dump_heap(), file_tracker_map(), file_tracker_dump_heap_context::fp, and PGBUF_LATCH_READ.

Referenced by diagdb().

Here is the caller graph for this function:

int file_tracker_dump_all_heap_capacities ( THREAD_ENTRY thread_p,
FILE *  fp 
)

Definition at line 11058 of file file_manager.c.

References DB_PAGESIZE, file_tracker_item_dump_heap_capacity(), file_tracker_map(), IO_PAGESIZE, and PGBUF_LATCH_READ.

Referenced by diagdb().

Here is the caller graph for this function:

static int file_tracker_init_page ( THREAD_ENTRY thread_p,
PAGE_PTR  page,
void *  args 
)
static
static int file_tracker_item_dump ( THREAD_ENTRY thread_p,
PAGE_PTR  page_of_item,
FILE_EXTENSIBLE_DATA extdata,
int  index_item,
bool stop,
void *  args 
)
static

Definition at line 10838 of file file_manager.c.

References ASSERT_ERROR, file_dump(), file_extdata_at(), file_track_item::fileid, vfid::fileid, NO_ERROR, file_track_item::volid, and vfid::volid.

Referenced by file_tracker_dump().

Here is the caller graph for this function:

static int file_tracker_item_dump_btree_capacity ( THREAD_ENTRY thread_p,
PAGE_PTR  page_of_item,
FILE_EXTENSIBLE_DATA extdata,
int  index_item,
bool stop,
void *  args 
)
static
static int file_tracker_item_dump_heap ( THREAD_ENTRY thread_p,
PAGE_PTR  page_of_item,
FILE_EXTENSIBLE_DATA extdata,
int  index_item,
bool stop,
void *  args 
)
static
static int file_tracker_item_dump_heap_capacity ( THREAD_ENTRY thread_p,
PAGE_PTR  page_of_item,
FILE_EXTENSIBLE_DATA extdata,
int  index_item,
bool stop,
void *  args 
)
static
int file_tracker_load ( THREAD_ENTRY thread_p,
const VFID vfid 
)

Definition at line 9613 of file file_manager.c.

References assert, ASSERT_ERROR, file_get_sticky_first_page(), NO_ERROR, NULL, and VFID_ISNULL.

Referenced by boot_restart_server(), and xboot_emergency_patch().

Here is the caller graph for this function:

int file_tracker_reuse_heap ( THREAD_ENTRY thread_p,
const OID class_oid,
HFID hfid_out 
)
static int file_user_page_table_extdata_dump ( THREAD_ENTRY thread_p,
const FILE_EXTENSIBLE_DATA extdata,
bool stop,
void *  args 
)
static

Definition at line 7607 of file file_manager.c.

References FILE_EXTDATA_AS_ARGS, FILE_EXTDATA_MSG, and NO_ERROR.

static int file_user_page_table_item_dump ( THREAD_ENTRY thread_p,
const void *  data,
int  index,
bool stop,
void *  args 
)
static

Definition at line 7627 of file file_manager.c.

References FILE_USER_PAGE_IS_MARKED_DELETED, NO_ERROR, and VPID_AS_ARGS.

Variable Documentation

bool file_Logging = false
static

Definition at line 314 of file file_manager.c.

FILE_TEMPCACHE* file_Tempcache = NULL
static

Definition at line 500 of file file_manager.c.

VFID file_Tracker_vfid = VFID_INITIALIZER
static

Definition at line 506 of file file_manager.c.

VPID file_Tracker_vpid = VPID_INITIALIZER
static

Definition at line 507 of file file_manager.c.