CUBRID Engine  latest
mvcc.c File Reference
#include "mvcc.h"
#include "dbtype.h"
#include "heap_file.h"
#include "page_buffer.h"
#include "overflow_file.h"
#include "perf_monitor.h"
#include "porting_inline.hpp"
#include "vacuum.h"
Include dependency graph for mvcc.c:

Go to the source code of this file.

Macros

#define MVCC_IS_REC_INSERTER_ACTIVE(thread_p, rec_header_p)   (mvcc_is_active_id (thread_p, (rec_header_p)->mvcc_ins_id))
 
#define MVCC_IS_REC_DELETER_ACTIVE(thread_p, rec_header_p)   (mvcc_is_active_id (thread_p, (rec_header_p)->mvcc_del_id))
 
#define MVCC_IS_REC_INSERTER_IN_SNAPSHOT(thread_p, rec_header_p, snapshot)   (mvcc_is_id_in_snapshot (thread_p, (rec_header_p)->mvcc_ins_id, (snapshot)))
 
#define MVCC_IS_REC_DELETER_IN_SNAPSHOT(thread_p, rec_header_p, snapshot)   (mvcc_is_id_in_snapshot (thread_p, (rec_header_p)->mvcc_del_id, (snapshot)))
 
#define MVCC_IS_REC_INSERTED_SINCE_MVCCID(rec_header_p, mvcc_id)   (!MVCC_ID_PRECEDES ((rec_header_p)->mvcc_ins_id, (mvcc_id)))
 
#define MVCC_IS_REC_DELETED_SINCE_MVCCID(rec_header_p, mvcc_id)   (!MVCC_ID_PRECEDES ((rec_header_p)->mvcc_del_id, (mvcc_id)))
 

Enumerations

enum  { NOT_VISITED = -1, VISITED_DEAD = -2, VISITED_ALIVE = -3 }
 

Functions

static INLINE bool mvcc_is_id_in_snapshot (THREAD_ENTRY *thread_p, MVCCID mvcc_id, MVCC_SNAPSHOT *snapshot) __attribute__((ALWAYS_INLINE))
 
static INLINE bool mvcc_is_active_id (THREAD_ENTRY *thread_p, MVCCID mvccid) __attribute__((ALWAYS_INLINE))
 
MVCC_SATISFIES_SNAPSHOT_RESULT mvcc_satisfies_snapshot (THREAD_ENTRY *thread_p, MVCC_REC_HEADER *rec_header, MVCC_SNAPSHOT *snapshot)
 
MVCC_SATISFIES_SNAPSHOT_RESULT mvcc_is_not_deleted_for_snapshot (THREAD_ENTRY *thread_p, MVCC_REC_HEADER *rec_header, MVCC_SNAPSHOT *snapshot)
 
MVCC_SATISFIES_VACUUM_RESULT mvcc_satisfies_vacuum (THREAD_ENTRY *thread_p, MVCC_REC_HEADER *rec_header, MVCCID oldest_mvccid)
 
MVCC_SATISFIES_DELETE_RESULT mvcc_satisfies_delete (THREAD_ENTRY *thread_p, MVCC_REC_HEADER *rec_header)
 
MVCC_SATISFIES_SNAPSHOT_RESULT mvcc_satisfies_dirty (THREAD_ENTRY *thread_p, MVCC_REC_HEADER *rec_header, MVCC_SNAPSHOT *snapshot)
 
bool mvcc_is_mvcc_disabled_class (const OID *class_oid)
 

Macro Definition Documentation

#define MVCC_IS_REC_DELETED_SINCE_MVCCID (   rec_header_p,
  mvcc_id 
)    (!MVCC_ID_PRECEDES ((rec_header_p)->mvcc_del_id, (mvcc_id)))

Definition at line 49 of file mvcc.c.

Referenced by mvcc_satisfies_vacuum().

#define MVCC_IS_REC_DELETER_ACTIVE (   thread_p,
  rec_header_p 
)    (mvcc_is_active_id (thread_p, (rec_header_p)->mvcc_del_id))

Definition at line 37 of file mvcc.c.

Referenced by mvcc_satisfies_delete(), and mvcc_satisfies_dirty().

#define MVCC_IS_REC_DELETER_IN_SNAPSHOT (   thread_p,
  rec_header_p,
  snapshot 
)    (mvcc_is_id_in_snapshot (thread_p, (rec_header_p)->mvcc_del_id, (snapshot)))

Definition at line 43 of file mvcc.c.

Referenced by mvcc_is_not_deleted_for_snapshot(), and mvcc_satisfies_snapshot().

#define MVCC_IS_REC_INSERTED_SINCE_MVCCID (   rec_header_p,
  mvcc_id 
)    (!MVCC_ID_PRECEDES ((rec_header_p)->mvcc_ins_id, (mvcc_id)))

Definition at line 46 of file mvcc.c.

Referenced by mvcc_satisfies_vacuum().

#define MVCC_IS_REC_INSERTER_ACTIVE (   thread_p,
  rec_header_p 
)    (mvcc_is_active_id (thread_p, (rec_header_p)->mvcc_ins_id))

Definition at line 34 of file mvcc.c.

Referenced by mvcc_satisfies_delete(), and mvcc_satisfies_dirty().

#define MVCC_IS_REC_INSERTER_IN_SNAPSHOT (   thread_p,
  rec_header_p,
  snapshot 
)    (mvcc_is_id_in_snapshot (thread_p, (rec_header_p)->mvcc_ins_id, (snapshot)))

Definition at line 40 of file mvcc.c.

Referenced by mvcc_satisfies_snapshot().

Enumeration Type Documentation

anonymous enum
Enumerator
NOT_VISITED 
VISITED_DEAD 
VISITED_ALIVE 

Definition at line 54 of file mvcc.c.

Function Documentation

MVCC_SATISFIES_SNAPSHOT_RESULT mvcc_is_not_deleted_for_snapshot ( THREAD_ENTRY thread_p,
MVCC_REC_HEADER rec_header,
MVCC_SNAPSHOT snapshot 
)

Definition at line 268 of file mvcc.c.

References assert, MVCC_IS_HEADER_DELID_VALID, MVCC_IS_REC_DELETED_BY_ME, MVCC_IS_REC_DELETER_IN_SNAPSHOT, NULL, SNAPSHOT_SATISFIED, and TOO_OLD_FOR_SNAPSHOT.

Referenced by heap_is_object_not_null().

Here is the caller graph for this function:

MVCC_SATISFIES_SNAPSHOT_RESULT mvcc_satisfies_dirty ( THREAD_ENTRY thread_p,
MVCC_REC_HEADER rec_header,
MVCC_SNAPSHOT snapshot 
)