CUBRID Engine  latest
overflow_file.c File Reference
#include "overflow_file.h"
#include "config.h"
#include "error_manager.h"
#include "file_manager.h"
#include "heap_file.h"
#include "log_append.hpp"
#include "log_manager.h"
#include "memory_alloc.h"
#include "mvcc.h"
#include "page_buffer.h"
#include "slotted_page.h"
#include "storage_common.h"
#include <string.h>
Include dependency graph for overflow_file.c:

Go to the source code of this file.

Classes

struct  overflow_first_part
 
struct  overflow_rest_part
 

Macros

#define OVERFLOW_ALLOCVPID_ARRAY_SIZE   64
 

Typedefs

typedef struct overflow_first_part OVERFLOW_FIRST_PART
 
typedef struct overflow_rest_part OVERFLOW_REST_PART
 

Enumerations

enum  OVERFLOW_DO_FUNC { OVERFLOW_DO_DELETE, OVERFLOW_DO_FLUSH }
 

Functions

static void overflow_next_vpid (const VPID *ovf_vpid, VPID *vpid, PAGE_PTR pgptr)
 
static const VPIDoverflow_traverse (THREAD_ENTRY *thread_p, const VFID *ovf_vfid, const VPID *ovf_vpid, OVERFLOW_DO_FUNC func)
 
static int overflow_delete_internal (THREAD_ENTRY *thread_p, const VFID *ovf_vfid, VPID *vpid, PAGE_PTR pgptr)
 
static int overflow_flush_internal (THREAD_ENTRY *thread_p, PAGE_PTR pgptr)
 
int overflow_insert (THREAD_ENTRY *thread_p, const VFID *ovf_vfid, VPID *ovf_vpid, RECDES *recdes, FILE_TYPE file_type)
 
int overflow_update (THREAD_ENTRY *thread_p, const VFID *ovf_vfid, const VPID *ovf_vpid, RECDES *recdes, FILE_TYPE file_type)
 
const VPIDoverflow_delete (THREAD_ENTRY *thread_p, const VFID *ovf_vfid, const VPID *ovf_vpid)
 
void overflow_flush (THREAD_ENTRY *thread_p, const VPID *ovf_vpid)
 
int overflow_get_length (THREAD_ENTRY *thread_p, const VPID *ovf_vpid)
 
SCAN_CODE overflow_get_nbytes (THREAD_ENTRY *thread_p, const VPID *ovf_vpid, RECDES *recdes, int start_offset, int max_nbytes, int *remaining_length, MVCC_SNAPSHOT *mvcc_snapshot)
 
SCAN_CODE overflow_get (THREAD_ENTRY *thread_p, const VPID *ovf_vpid, RECDES *recdes, MVCC_SNAPSHOT *mvcc_snapshot)
 
int overflow_get_capacity (THREAD_ENTRY *thread_p, const VPID *ovf_vpid, int *ovf_size, int *ovf_num_pages, int *ovf_overhead, int *ovf_free_space)
 
int overflow_rv_newpage_insert_redo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int overflow_rv_newpage_link_undo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
int overflow_rv_link (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void overflow_rv_link_dump (FILE *fp, int length_ignore, void *data)
 
int overflow_rv_page_update_redo (THREAD_ENTRY *thread_p, LOG_RCV *rcv)
 
void overflow_rv_page_dump (FILE *fp, int length, void *data)
 
char * overflow_get_first_page_data (char *page_ptr)
 

Macro Definition Documentation

#define OVERFLOW_ALLOCVPID_ARRAY_SIZE   64

Definition at line 41 of file overflow_file.c.

Referenced by overflow_insert().

Typedef Documentation

Definition at line 43 of file overflow_file.c.

Definition at line 51 of file overflow_file.c.

Enumeration Type Documentation

Enumerator
OVERFLOW_DO_DELETE 
OVERFLOW_DO_FLUSH 

Definition at line 58 of file overflow_file.c.

Function Documentation

const VPID* overflow_delete ( THREAD_ENTRY thread_p,
const VFID ovf_vfid,
const VPID ovf_vpid 
)

Definition at line 650 of file overflow_file.c.

References OVERFLOW_DO_DELETE, and overflow_traverse().

Referenced by btree_delete_overflow_key(), ehash_delete(), ehash_insert_to_bucket(), and heap_ovf_delete().

Here is the caller graph for this function:

static int overflow_delete_internal ( THREAD_ENTRY thread_p,
const VFID ovf_vfid,
VPID vpid,
PAGE_PTR  pgptr 
)
static

Definition at line 619 of file overflow_file.c.

References er_errid(), ER_FAILED, file_dealloc(), FILE_UNKNOWN_TYPE, NO_ERROR, and pgbuf_unfix_and_init.

Referenced by overflow_traverse().

Here is the caller graph for this function:

void overflow_flush ( THREAD_ENTRY thread_p,
const VPID ovf_vpid 
)

Definition at line 683 of file overflow_file.c.

References NULL, OVERFLOW_DO_FLUSH, and overflow_traverse().

Referenced by heap_ovf_flush().

Here is the caller graph for this function:

static int overflow_flush_internal ( THREAD_ENTRY thread_p,
PAGE_PTR  pgptr 
)
static

Definition at line 661 of file overflow_file.c.

References er_errid(), ER_FAILED, NO_ERROR, NULL, and pgbuf_flush_with_wal().

Referenced by overflow_traverse().

Here is the caller graph for this function:

SCAN_CODE overflow_get ( THREAD_ENTRY thread_p,
const VPID ovf_vpid,
RECDES recdes,
MVCC_SNAPSHOT mvcc_snapshot 
)

Definition at line 916 of file overflow_file.c.

References overflow_get_nbytes().

Referenced by btree_load_overflow_key(), ehash_free_recdes(), heap_ovf_get(), and sort_retrieve_longrec().

Here is the caller graph for this function:

char* overflow_get_first_page_data ( char *  page_ptr)

Definition at line 1213 of file overflow_file.c.

References assert, and NULL.

Referenced by heap_get_mvcc_rec_header_from_overflow(), heap_set_mvcc_rec_header_on_overflow(), and heap_update_set_prev_version().

Here is the caller graph for this function:

int overflow_get_length ( THREAD_ENTRY thread_p,
const VPID ovf_vpid 
)
static void overflow_next_vpid ( const VPID ovf_vpid,
VPID vpid,
PAGE_PTR  pgptr 
)
static

Definition at line 287 of file overflow_file.c.

References VPID_EQ.

Referenced by overflow_traverse().

Here is the caller graph for this function:

int overflow_rv_link ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
void overflow_rv_link_dump ( FILE *  fp,
int  length_ignore,
void *  data 
)

Definition at line 1160 of file overflow_file.c.

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

int overflow_rv_newpage_insert_redo ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)

Definition at line 1108 of file overflow_file.c.

References log_rv_copy_char().

int overflow_rv_newpage_link_undo ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)
void overflow_rv_page_dump ( FILE *  fp,
int  length,
void *  data 
)
int overflow_rv_page_update_redo ( THREAD_ENTRY thread_p,
LOG_RCV rcv 
)