Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/include
File: db.h
#define DB_user_BEGIN 10000
[500] Fix | Delete
#define DB_debug_FLAG 0x80000000
[501] Fix | Delete
[502] Fix | Delete
/*
[503] Fix | Delete
* DB_LOGC --
[504] Fix | Delete
* Log cursor.
[505] Fix | Delete
*/
[506] Fix | Delete
struct __db_log_cursor {
[507] Fix | Delete
ENV *env; /* Environment */
[508] Fix | Delete
[509] Fix | Delete
DB_FH *fhp; /* File handle. */
[510] Fix | Delete
DB_LSN lsn; /* Cursor: LSN */
[511] Fix | Delete
u_int32_t len; /* Cursor: record length */
[512] Fix | Delete
u_int32_t prev; /* Cursor: previous record's offset */
[513] Fix | Delete
[514] Fix | Delete
DBT dbt; /* Return DBT. */
[515] Fix | Delete
DB_LSN p_lsn; /* Persist LSN. */
[516] Fix | Delete
u_int32_t p_version; /* Persist version. */
[517] Fix | Delete
[518] Fix | Delete
u_int8_t *bp; /* Allocated read buffer. */
[519] Fix | Delete
u_int32_t bp_size; /* Read buffer length in bytes. */
[520] Fix | Delete
u_int32_t bp_rlen; /* Read buffer valid data length. */
[521] Fix | Delete
DB_LSN bp_lsn; /* Read buffer first byte LSN. */
[522] Fix | Delete
[523] Fix | Delete
u_int32_t bp_maxrec; /* Max record length in the log file. */
[524] Fix | Delete
[525] Fix | Delete
/* DB_LOGC PUBLIC HANDLE LIST BEGIN */
[526] Fix | Delete
int (*close) __P((DB_LOGC *, u_int32_t));
[527] Fix | Delete
int (*get) __P((DB_LOGC *, DB_LSN *, DBT *, u_int32_t));
[528] Fix | Delete
int (*version) __P((DB_LOGC *, u_int32_t *, u_int32_t));
[529] Fix | Delete
/* DB_LOGC PUBLIC HANDLE LIST END */
[530] Fix | Delete
[531] Fix | Delete
#define DB_LOG_DISK 0x01 /* Log record came from disk. */
[532] Fix | Delete
#define DB_LOG_LOCKED 0x02 /* Log region already locked */
[533] Fix | Delete
#define DB_LOG_SILENT_ERR 0x04 /* Turn-off error messages. */
[534] Fix | Delete
u_int32_t flags;
[535] Fix | Delete
};
[536] Fix | Delete
[537] Fix | Delete
/* Log statistics structure. */
[538] Fix | Delete
struct __db_log_stat { /* SHARED */
[539] Fix | Delete
u_int32_t st_magic; /* Log file magic number. */
[540] Fix | Delete
u_int32_t st_version; /* Log file version number. */
[541] Fix | Delete
int32_t st_mode; /* Log file permissions mode. */
[542] Fix | Delete
u_int32_t st_lg_bsize; /* Log buffer size. */
[543] Fix | Delete
u_int32_t st_lg_size; /* Log file size. */
[544] Fix | Delete
u_int32_t st_wc_bytes; /* Bytes to log since checkpoint. */
[545] Fix | Delete
u_int32_t st_wc_mbytes; /* Megabytes to log since checkpoint. */
[546] Fix | Delete
u_int32_t st_fileid_init; /* Initial allocation for fileids. */
[547] Fix | Delete
#ifndef __TEST_DB_NO_STATISTICS
[548] Fix | Delete
u_int32_t st_nfileid; /* Current number of fileids. */
[549] Fix | Delete
u_int32_t st_maxnfileid; /* Maximum number of fileids used. */
[550] Fix | Delete
uintmax_t st_record; /* Records entered into the log. */
[551] Fix | Delete
u_int32_t st_w_bytes; /* Bytes to log. */
[552] Fix | Delete
u_int32_t st_w_mbytes; /* Megabytes to log. */
[553] Fix | Delete
uintmax_t st_wcount; /* Total I/O writes to the log. */
[554] Fix | Delete
uintmax_t st_wcount_fill; /* Overflow writes to the log. */
[555] Fix | Delete
uintmax_t st_rcount; /* Total I/O reads from the log. */
[556] Fix | Delete
uintmax_t st_scount; /* Total syncs to the log. */
[557] Fix | Delete
uintmax_t st_region_wait; /* Region lock granted after wait. */
[558] Fix | Delete
uintmax_t st_region_nowait; /* Region lock granted without wait. */
[559] Fix | Delete
u_int32_t st_cur_file; /* Current log file number. */
[560] Fix | Delete
u_int32_t st_cur_offset; /* Current log file offset. */
[561] Fix | Delete
u_int32_t st_disk_file; /* Known on disk log file number. */
[562] Fix | Delete
u_int32_t st_disk_offset; /* Known on disk log file offset. */
[563] Fix | Delete
u_int32_t st_maxcommitperflush; /* Max number of commits in a flush. */
[564] Fix | Delete
u_int32_t st_mincommitperflush; /* Min number of commits in a flush. */
[565] Fix | Delete
roff_t st_regsize; /* Region size. */
[566] Fix | Delete
#endif
[567] Fix | Delete
};
[568] Fix | Delete
[569] Fix | Delete
/*
[570] Fix | Delete
* We need to record the first log record of a transaction. For user
[571] Fix | Delete
* defined logging this macro returns the place to put that information,
[572] Fix | Delete
* if it is need in rlsnp, otherwise it leaves it unchanged. We also
[573] Fix | Delete
* need to track the last record of the transaction, this returns the
[574] Fix | Delete
* place to put that info.
[575] Fix | Delete
*/
[576] Fix | Delete
#define DB_SET_TXN_LSNP(txn, blsnp, llsnp) \
[577] Fix | Delete
((txn)->set_txn_lsnp(txn, blsnp, llsnp))
[578] Fix | Delete
[579] Fix | Delete
/*
[580] Fix | Delete
* Definition of the structure which specifies marshalling of log records.
[581] Fix | Delete
*/
[582] Fix | Delete
typedef enum {
[583] Fix | Delete
LOGREC_Done,
[584] Fix | Delete
LOGREC_ARG,
[585] Fix | Delete
LOGREC_HDR,
[586] Fix | Delete
LOGREC_DATA,
[587] Fix | Delete
LOGREC_DB,
[588] Fix | Delete
LOGREC_DBOP,
[589] Fix | Delete
LOGREC_DBT,
[590] Fix | Delete
LOGREC_LOCKS,
[591] Fix | Delete
LOGREC_OP,
[592] Fix | Delete
LOGREC_PGDBT,
[593] Fix | Delete
LOGREC_PGDDBT,
[594] Fix | Delete
LOGREC_PGLIST,
[595] Fix | Delete
LOGREC_POINTER,
[596] Fix | Delete
LOGREC_TIME
[597] Fix | Delete
} log_rec_type_t;
[598] Fix | Delete
[599] Fix | Delete
typedef const struct __log_rec_spec {
[600] Fix | Delete
log_rec_type_t type;
[601] Fix | Delete
u_int32_t offset;
[602] Fix | Delete
const char *name;
[603] Fix | Delete
const char fmt[4];
[604] Fix | Delete
} DB_LOG_RECSPEC;
[605] Fix | Delete
[606] Fix | Delete
/*
[607] Fix | Delete
* Size of a DBT in a log record.
[608] Fix | Delete
*/
[609] Fix | Delete
#define LOG_DBT_SIZE(dbt) \
[610] Fix | Delete
(sizeof(u_int32_t) + ((dbt) == NULL ? 0 : (dbt)->size))
[611] Fix | Delete
[612] Fix | Delete
/*******************************************************
[613] Fix | Delete
* Shared buffer cache (mpool).
[614] Fix | Delete
*******************************************************/
[615] Fix | Delete
/* Priority values for DB_MPOOLFILE->{put,set_priority}. */
[616] Fix | Delete
typedef enum {
[617] Fix | Delete
DB_PRIORITY_UNCHANGED=0,
[618] Fix | Delete
DB_PRIORITY_VERY_LOW=1,
[619] Fix | Delete
DB_PRIORITY_LOW=2,
[620] Fix | Delete
DB_PRIORITY_DEFAULT=3,
[621] Fix | Delete
DB_PRIORITY_HIGH=4,
[622] Fix | Delete
DB_PRIORITY_VERY_HIGH=5
[623] Fix | Delete
} DB_CACHE_PRIORITY;
[624] Fix | Delete
[625] Fix | Delete
/* Per-process DB_MPOOLFILE information. */
[626] Fix | Delete
struct __db_mpoolfile {
[627] Fix | Delete
DB_FH *fhp; /* Underlying file handle. */
[628] Fix | Delete
[629] Fix | Delete
/*
[630] Fix | Delete
* !!!
[631] Fix | Delete
* The ref, pinref and q fields are protected by the region lock.
[632] Fix | Delete
*/
[633] Fix | Delete
u_int32_t ref; /* Reference count. */
[634] Fix | Delete
[635] Fix | Delete
u_int32_t pinref; /* Pinned block reference count. */
[636] Fix | Delete
[637] Fix | Delete
/*
[638] Fix | Delete
* !!!
[639] Fix | Delete
* Explicit representations of structures from queue.h.
[640] Fix | Delete
* TAILQ_ENTRY(__db_mpoolfile) q;
[641] Fix | Delete
*/
[642] Fix | Delete
struct {
[643] Fix | Delete
struct __db_mpoolfile *tqe_next;
[644] Fix | Delete
struct __db_mpoolfile **tqe_prev;
[645] Fix | Delete
} q; /* Linked list of DB_MPOOLFILE's. */
[646] Fix | Delete
[647] Fix | Delete
/*
[648] Fix | Delete
* !!!
[649] Fix | Delete
* The rest of the fields (with the exception of the MP_FLUSH flag)
[650] Fix | Delete
* are not thread-protected, even when they may be modified at any
[651] Fix | Delete
* time by the application. The reason is the DB_MPOOLFILE handle
[652] Fix | Delete
* is single-threaded from the viewpoint of the application, and so
[653] Fix | Delete
* the only fields needing to be thread-protected are those accessed
[654] Fix | Delete
* by checkpoint or sync threads when using DB_MPOOLFILE structures
[655] Fix | Delete
* to flush buffers from the cache.
[656] Fix | Delete
*/
[657] Fix | Delete
ENV *env; /* Environment */
[658] Fix | Delete
MPOOLFILE *mfp; /* Underlying MPOOLFILE. */
[659] Fix | Delete
[660] Fix | Delete
u_int32_t clear_len; /* Cleared length on created pages. */
[661] Fix | Delete
u_int8_t /* Unique file ID. */
[662] Fix | Delete
fileid[DB_FILE_ID_LEN];
[663] Fix | Delete
int ftype; /* File type. */
[664] Fix | Delete
int32_t lsn_offset; /* LSN offset in page. */
[665] Fix | Delete
u_int32_t gbytes, bytes; /* Maximum file size. */
[666] Fix | Delete
DBT *pgcookie; /* Byte-string passed to pgin/pgout. */
[667] Fix | Delete
int32_t priority; /* Cache priority. */
[668] Fix | Delete
[669] Fix | Delete
void *addr; /* Address of mmap'd region. */
[670] Fix | Delete
size_t len; /* Length of mmap'd region. */
[671] Fix | Delete
[672] Fix | Delete
u_int32_t config_flags; /* Flags to DB_MPOOLFILE->set_flags. */
[673] Fix | Delete
[674] Fix | Delete
/* DB_MPOOLFILE PUBLIC HANDLE LIST BEGIN */
[675] Fix | Delete
int (*close) __P((DB_MPOOLFILE *, u_int32_t));
[676] Fix | Delete
int (*get)
[677] Fix | Delete
__P((DB_MPOOLFILE *, db_pgno_t *, DB_TXN *, u_int32_t, void *));
[678] Fix | Delete
int (*get_clear_len) __P((DB_MPOOLFILE *, u_int32_t *));
[679] Fix | Delete
int (*get_fileid) __P((DB_MPOOLFILE *, u_int8_t *));
[680] Fix | Delete
int (*get_flags) __P((DB_MPOOLFILE *, u_int32_t *));
[681] Fix | Delete
int (*get_ftype) __P((DB_MPOOLFILE *, int *));
[682] Fix | Delete
int (*get_last_pgno) __P((DB_MPOOLFILE *, db_pgno_t *));
[683] Fix | Delete
int (*get_lsn_offset) __P((DB_MPOOLFILE *, int32_t *));
[684] Fix | Delete
int (*get_maxsize) __P((DB_MPOOLFILE *, u_int32_t *, u_int32_t *));
[685] Fix | Delete
int (*get_pgcookie) __P((DB_MPOOLFILE *, DBT *));
[686] Fix | Delete
int (*get_priority) __P((DB_MPOOLFILE *, DB_CACHE_PRIORITY *));
[687] Fix | Delete
int (*open) __P((DB_MPOOLFILE *, const char *, u_int32_t, int, size_t));
[688] Fix | Delete
int (*put) __P((DB_MPOOLFILE *, void *, DB_CACHE_PRIORITY, u_int32_t));
[689] Fix | Delete
int (*set_clear_len) __P((DB_MPOOLFILE *, u_int32_t));
[690] Fix | Delete
int (*set_fileid) __P((DB_MPOOLFILE *, u_int8_t *));
[691] Fix | Delete
int (*set_flags) __P((DB_MPOOLFILE *, u_int32_t, int));
[692] Fix | Delete
int (*set_ftype) __P((DB_MPOOLFILE *, int));
[693] Fix | Delete
int (*set_lsn_offset) __P((DB_MPOOLFILE *, int32_t));
[694] Fix | Delete
int (*set_maxsize) __P((DB_MPOOLFILE *, u_int32_t, u_int32_t));
[695] Fix | Delete
int (*set_pgcookie) __P((DB_MPOOLFILE *, DBT *));
[696] Fix | Delete
int (*set_priority) __P((DB_MPOOLFILE *, DB_CACHE_PRIORITY));
[697] Fix | Delete
int (*sync) __P((DB_MPOOLFILE *));
[698] Fix | Delete
/* DB_MPOOLFILE PUBLIC HANDLE LIST END */
[699] Fix | Delete
[700] Fix | Delete
/*
[701] Fix | Delete
* MP_FILEID_SET, MP_OPEN_CALLED and MP_READONLY do not need to be
[702] Fix | Delete
* thread protected because they are initialized before the file is
[703] Fix | Delete
* linked onto the per-process lists, and never modified.
[704] Fix | Delete
*
[705] Fix | Delete
* MP_FLUSH is thread protected because it is potentially read/set by
[706] Fix | Delete
* multiple threads of control.
[707] Fix | Delete
*/
[708] Fix | Delete
#define MP_FILEID_SET 0x001 /* Application supplied a file ID. */
[709] Fix | Delete
#define MP_FLUSH 0x002 /* Was used to flush a buffer. */
[710] Fix | Delete
#define MP_FOR_FLUSH 0x004 /* Was opened to flush a buffer. */
[711] Fix | Delete
#define MP_MULTIVERSION 0x008 /* Opened for multiversion access. */
[712] Fix | Delete
#define MP_OPEN_CALLED 0x010 /* File opened. */
[713] Fix | Delete
#define MP_READONLY 0x020 /* File is readonly. */
[714] Fix | Delete
#define MP_DUMMY 0x040 /* File is dummy for __memp_fput. */
[715] Fix | Delete
u_int32_t flags;
[716] Fix | Delete
};
[717] Fix | Delete
[718] Fix | Delete
/* Mpool statistics structure. */
[719] Fix | Delete
struct __db_mpool_stat { /* SHARED */
[720] Fix | Delete
u_int32_t st_gbytes; /* Total cache size: GB. */
[721] Fix | Delete
u_int32_t st_bytes; /* Total cache size: B. */
[722] Fix | Delete
u_int32_t st_ncache; /* Number of cache regions. */
[723] Fix | Delete
u_int32_t st_max_ncache; /* Maximum number of regions. */
[724] Fix | Delete
db_size_t st_mmapsize; /* Maximum file size for mmap. */
[725] Fix | Delete
int32_t st_maxopenfd; /* Maximum number of open fd's. */
[726] Fix | Delete
int32_t st_maxwrite; /* Maximum buffers to write. */
[727] Fix | Delete
db_timeout_t st_maxwrite_sleep; /* Sleep after writing max buffers. */
[728] Fix | Delete
u_int32_t st_pages; /* Total number of pages. */
[729] Fix | Delete
#ifndef __TEST_DB_NO_STATISTICS
[730] Fix | Delete
u_int32_t st_map; /* Pages from mapped files. */
[731] Fix | Delete
uintmax_t st_cache_hit; /* Pages found in the cache. */
[732] Fix | Delete
uintmax_t st_cache_miss; /* Pages not found in the cache. */
[733] Fix | Delete
uintmax_t st_page_create; /* Pages created in the cache. */
[734] Fix | Delete
uintmax_t st_page_in; /* Pages read in. */
[735] Fix | Delete
uintmax_t st_page_out; /* Pages written out. */
[736] Fix | Delete
uintmax_t st_ro_evict; /* Clean pages forced from the cache. */
[737] Fix | Delete
uintmax_t st_rw_evict; /* Dirty pages forced from the cache. */
[738] Fix | Delete
uintmax_t st_page_trickle; /* Pages written by memp_trickle. */
[739] Fix | Delete
u_int32_t st_page_clean; /* Clean pages. */
[740] Fix | Delete
u_int32_t st_page_dirty; /* Dirty pages. */
[741] Fix | Delete
u_int32_t st_hash_buckets; /* Number of hash buckets. */
[742] Fix | Delete
u_int32_t st_hash_mutexes; /* Number of hash bucket mutexes. */
[743] Fix | Delete
u_int32_t st_pagesize; /* Assumed page size. */
[744] Fix | Delete
u_int32_t st_hash_searches; /* Total hash chain searches. */
[745] Fix | Delete
u_int32_t st_hash_longest; /* Longest hash chain searched. */
[746] Fix | Delete
uintmax_t st_hash_examined; /* Total hash entries searched. */
[747] Fix | Delete
uintmax_t st_hash_nowait; /* Hash lock granted with nowait. */
[748] Fix | Delete
uintmax_t st_hash_wait; /* Hash lock granted after wait. */
[749] Fix | Delete
uintmax_t st_hash_max_nowait; /* Max hash lock granted with nowait. */
[750] Fix | Delete
uintmax_t st_hash_max_wait; /* Max hash lock granted after wait. */
[751] Fix | Delete
uintmax_t st_region_nowait; /* Region lock granted with nowait. */
[752] Fix | Delete
uintmax_t st_region_wait; /* Region lock granted after wait. */
[753] Fix | Delete
uintmax_t st_mvcc_frozen; /* Buffers frozen. */
[754] Fix | Delete
uintmax_t st_mvcc_thawed; /* Buffers thawed. */
[755] Fix | Delete
uintmax_t st_mvcc_freed; /* Frozen buffers freed. */
[756] Fix | Delete
uintmax_t st_alloc; /* Number of page allocations. */
[757] Fix | Delete
uintmax_t st_alloc_buckets; /* Buckets checked during allocation. */
[758] Fix | Delete
uintmax_t st_alloc_max_buckets;/* Max checked during allocation. */
[759] Fix | Delete
uintmax_t st_alloc_pages; /* Pages checked during allocation. */
[760] Fix | Delete
uintmax_t st_alloc_max_pages; /* Max checked during allocation. */
[761] Fix | Delete
uintmax_t st_io_wait; /* Thread waited on buffer I/O. */
[762] Fix | Delete
uintmax_t st_sync_interrupted; /* Number of times sync interrupted. */
[763] Fix | Delete
roff_t st_regsize; /* Region size. */
[764] Fix | Delete
roff_t st_regmax; /* Region max. */
[765] Fix | Delete
#endif
[766] Fix | Delete
};
[767] Fix | Delete
[768] Fix | Delete
/*
[769] Fix | Delete
* Mpool file statistics structure.
[770] Fix | Delete
* The first fields in this structure must mirror the __db_mpool_fstat_int
[771] Fix | Delete
* structure, since content is mem copied between the two.
[772] Fix | Delete
*/
[773] Fix | Delete
struct __db_mpool_fstat {
[774] Fix | Delete
u_int32_t st_pagesize; /* Page size. */
[775] Fix | Delete
#ifndef __TEST_DB_NO_STATISTICS
[776] Fix | Delete
u_int32_t st_map; /* Pages from mapped files. */
[777] Fix | Delete
uintmax_t st_cache_hit; /* Pages found in the cache. */
[778] Fix | Delete
uintmax_t st_cache_miss; /* Pages not found in the cache. */
[779] Fix | Delete
uintmax_t st_page_create; /* Pages created in the cache. */
[780] Fix | Delete
uintmax_t st_page_in; /* Pages read in. */
[781] Fix | Delete
uintmax_t st_page_out; /* Pages written out. */
[782] Fix | Delete
uintmax_t st_backup_spins; /* Number of spins during a copy. */
[783] Fix | Delete
#endif
[784] Fix | Delete
char *file_name; /* File name. */
[785] Fix | Delete
};
[786] Fix | Delete
[787] Fix | Delete
/*******************************************************
[788] Fix | Delete
* Transactions and recovery.
[789] Fix | Delete
*******************************************************/
[790] Fix | Delete
#define DB_TXNVERSION 1
[791] Fix | Delete
[792] Fix | Delete
typedef enum {
[793] Fix | Delete
DB_TXN_ABORT=0, /* Public. */
[794] Fix | Delete
DB_TXN_APPLY=1, /* Public. */
[795] Fix | Delete
DB_TXN_BACKWARD_ROLL=3, /* Public. */
[796] Fix | Delete
DB_TXN_FORWARD_ROLL=4, /* Public. */
[797] Fix | Delete
DB_TXN_OPENFILES=5, /* Internal. */
[798] Fix | Delete
DB_TXN_POPENFILES=6, /* Internal. */
[799] Fix | Delete
DB_TXN_PRINT=7, /* Public. */
[800] Fix | Delete
DB_TXN_LOG_VERIFY=8 /* Internal. */
[801] Fix | Delete
} db_recops;
[802] Fix | Delete
[803] Fix | Delete
/*
[804] Fix | Delete
* BACKWARD_ALLOC is used during the forward pass to pick up any aborted
[805] Fix | Delete
* allocations for files that were created during the forward pass.
[806] Fix | Delete
* The main difference between _ALLOC and _ROLL is that the entry for
[807] Fix | Delete
* the file not exist during the rollforward pass.
[808] Fix | Delete
*/
[809] Fix | Delete
#define DB_UNDO(op) ((op) == DB_TXN_ABORT || (op) == DB_TXN_BACKWARD_ROLL)
[810] Fix | Delete
#define DB_REDO(op) ((op) == DB_TXN_FORWARD_ROLL || (op) == DB_TXN_APPLY)
[811] Fix | Delete
[812] Fix | Delete
struct __db_txn {
[813] Fix | Delete
DB_TXNMGR *mgrp; /* Pointer to transaction manager. */
[814] Fix | Delete
DB_TXN *parent; /* Pointer to transaction's parent. */
[815] Fix | Delete
DB_THREAD_INFO *thread_info; /* Pointer to thread information. */
[816] Fix | Delete
[817] Fix | Delete
u_int32_t txnid; /* Unique transaction id. */
[818] Fix | Delete
char *name; /* Transaction name. */
[819] Fix | Delete
DB_LOCKER *locker; /* Locker for this txn. */
[820] Fix | Delete
[821] Fix | Delete
void *td; /* Detail structure within region. */
[822] Fix | Delete
db_timeout_t lock_timeout; /* Timeout for locks for this txn. */
[823] Fix | Delete
void *txn_list; /* Undo information for parent. */
[824] Fix | Delete
[825] Fix | Delete
/*
[826] Fix | Delete
* !!!
[827] Fix | Delete
* Explicit representations of structures from queue.h.
[828] Fix | Delete
* TAILQ_ENTRY(__db_txn) links;
[829] Fix | Delete
*/
[830] Fix | Delete
struct {
[831] Fix | Delete
struct __db_txn *tqe_next;
[832] Fix | Delete
struct __db_txn **tqe_prev;
[833] Fix | Delete
} links; /* Links transactions off manager. */
[834] Fix | Delete
[835] Fix | Delete
/*
[836] Fix | Delete
* !!!
[837] Fix | Delete
* Explicit representations of structures from shqueue.h.
[838] Fix | Delete
* SH_TAILQ_ENTRY xa_links;
[839] Fix | Delete
* These links link together transactions that are active in
[840] Fix | Delete
* the same thread of control.
[841] Fix | Delete
*/
[842] Fix | Delete
struct {
[843] Fix | Delete
db_ssize_t stqe_next;
[844] Fix | Delete
db_ssize_t stqe_prev;
[845] Fix | Delete
} xa_links; /* Links XA transactions. */
[846] Fix | Delete
[847] Fix | Delete
/*
[848] Fix | Delete
* !!!
[849] Fix | Delete
* Explicit representations of structures from queue.h.
[850] Fix | Delete
* TAILQ_HEAD(__kids, __db_txn) kids;
[851] Fix | Delete
*/
[852] Fix | Delete
struct __kids {
[853] Fix | Delete
struct __db_txn *tqh_first;
[854] Fix | Delete
struct __db_txn **tqh_last;
[855] Fix | Delete
} kids;
[856] Fix | Delete
[857] Fix | Delete
/*
[858] Fix | Delete
* !!!
[859] Fix | Delete
* Explicit representations of structures from queue.h.
[860] Fix | Delete
* TAILQ_HEAD(__events, __txn_event) events;
[861] Fix | Delete
*/
[862] Fix | Delete
struct {
[863] Fix | Delete
struct __txn_event *tqh_first;
[864] Fix | Delete
struct __txn_event **tqh_last;
[865] Fix | Delete
} events; /* Links deferred events. */
[866] Fix | Delete
[867] Fix | Delete
/*
[868] Fix | Delete
* !!!
[869] Fix | Delete
* Explicit representations of structures from queue.h.
[870] Fix | Delete
* STAILQ_HEAD(__logrec, __txn_logrec) logs;
[871] Fix | Delete
*/
[872] Fix | Delete
struct {
[873] Fix | Delete
struct __txn_logrec *stqh_first;
[874] Fix | Delete
struct __txn_logrec **stqh_last;
[875] Fix | Delete
} logs; /* Links in memory log records. */
[876] Fix | Delete
[877] Fix | Delete
/*
[878] Fix | Delete
* !!!
[879] Fix | Delete
* Explicit representations of structures from queue.h.
[880] Fix | Delete
* TAILQ_ENTRY(__db_txn) klinks;
[881] Fix | Delete
*/
[882] Fix | Delete
struct {
[883] Fix | Delete
struct __db_txn *tqe_next;
[884] Fix | Delete
struct __db_txn **tqe_prev;
[885] Fix | Delete
} klinks; /* Links of children in parent. */
[886] Fix | Delete
[887] Fix | Delete
/*
[888] Fix | Delete
* !!!
[889] Fix | Delete
* Explicit representations of structures from queue.h.
[890] Fix | Delete
* TAILQ_HEAD(__my_cursors, __dbc) my_cursors;
[891] Fix | Delete
*/
[892] Fix | Delete
struct __my_cursors {
[893] Fix | Delete
struct __dbc *tqh_first;
[894] Fix | Delete
struct __dbc **tqh_last;
[895] Fix | Delete
} my_cursors;
[896] Fix | Delete
[897] Fix | Delete
/*
[898] Fix | Delete
* !!!
[899] Fix | Delete
* Explicit representations of structures from queue.h.
[900] Fix | Delete
* TAILQ_HEAD(__femfs, MPOOLFILE) femfs;
[901] Fix | Delete
*
[902] Fix | Delete
* These are DBs involved in file extension in this transaction.
[903] Fix | Delete
*/
[904] Fix | Delete
struct __femfs {
[905] Fix | Delete
DB *tqh_first;
[906] Fix | Delete
DB **tqh_last;
[907] Fix | Delete
} femfs;
[908] Fix | Delete
[909] Fix | Delete
DB_TXN_TOKEN *token_buffer; /* User's commit token buffer. */
[910] Fix | Delete
void *api_internal; /* C++ API private. */
[911] Fix | Delete
void *xml_internal; /* XML API private. */
[912] Fix | Delete
[913] Fix | Delete
u_int32_t cursors; /* Number of cursors open for txn */
[914] Fix | Delete
[915] Fix | Delete
/* DB_TXN PUBLIC HANDLE LIST BEGIN */
[916] Fix | Delete
int (*abort) __P((DB_TXN *));
[917] Fix | Delete
int (*commit) __P((DB_TXN *, u_int32_t));
[918] Fix | Delete
int (*discard) __P((DB_TXN *, u_int32_t));
[919] Fix | Delete
int (*get_name) __P((DB_TXN *, const char **));
[920] Fix | Delete
int (*get_priority) __P((DB_TXN *, u_int32_t *));
[921] Fix | Delete
u_int32_t (*id) __P((DB_TXN *));
[922] Fix | Delete
int (*prepare) __P((DB_TXN *, u_int8_t *));
[923] Fix | Delete
int (*set_commit_token) __P((DB_TXN *, DB_TXN_TOKEN *));
[924] Fix | Delete
int (*set_name) __P((DB_TXN *, const char *));
[925] Fix | Delete
int (*set_priority) __P((DB_TXN *, u_int32_t));
[926] Fix | Delete
int (*set_timeout) __P((DB_TXN *, db_timeout_t, u_int32_t));
[927] Fix | Delete
/* DB_TXN PUBLIC HANDLE LIST END */
[928] Fix | Delete
[929] Fix | Delete
/* DB_TXN PRIVATE HANDLE LIST BEGIN */
[930] Fix | Delete
void (*set_txn_lsnp) __P((DB_TXN *txn, DB_LSN **, DB_LSN **));
[931] Fix | Delete
/* DB_TXN PRIVATE HANDLE LIST END */
[932] Fix | Delete
[933] Fix | Delete
#define TXN_XA_THREAD_NOTA 0
[934] Fix | Delete
#define TXN_XA_THREAD_ASSOCIATED 1
[935] Fix | Delete
#define TXN_XA_THREAD_SUSPENDED 2
[936] Fix | Delete
#define TXN_XA_THREAD_UNASSOCIATED 3
[937] Fix | Delete
u_int32_t xa_thr_status;
[938] Fix | Delete
[939] Fix | Delete
#define TXN_CHILDCOMMIT 0x00001 /* Txn has committed. */
[940] Fix | Delete
#define TXN_COMPENSATE 0x00002 /* Compensating transaction. */
[941] Fix | Delete
#define TXN_DEADLOCK 0x00004 /* Txn has deadlocked. */
[942] Fix | Delete
#define TXN_FAMILY 0x00008 /* Cursors/children are independent. */
[943] Fix | Delete
#define TXN_IGNORE_LEASE 0x00010 /* Skip lease check at commit time. */
[944] Fix | Delete
#define TXN_INFAMILY 0x00020 /* Part of a transaction family. */
[945] Fix | Delete
#define TXN_LOCKTIMEOUT 0x00040 /* Txn has a lock timeout. */
[946] Fix | Delete
#define TXN_MALLOC 0x00080 /* Structure allocated by TXN system. */
[947] Fix | Delete
#define TXN_NOSYNC 0x00100 /* Do not sync on prepare and commit. */
[948] Fix | Delete
#define TXN_NOWAIT 0x00200 /* Do not wait on locks. */
[949] Fix | Delete
#define TXN_PRIVATE 0x00400 /* Txn owned by cursor. */
[950] Fix | Delete
#define TXN_READONLY 0x00800 /* CDS group handle. */
[951] Fix | Delete
#define TXN_READ_COMMITTED 0x01000 /* Txn has degree 2 isolation. */
[952] Fix | Delete
#define TXN_READ_UNCOMMITTED 0x02000 /* Txn has degree 1 isolation. */
[953] Fix | Delete
#define TXN_RESTORED 0x04000 /* Txn has been restored. */
[954] Fix | Delete
#define TXN_SNAPSHOT 0x08000 /* Snapshot Isolation. */
[955] Fix | Delete
#define TXN_SYNC 0x10000 /* Write and sync on prepare/commit. */
[956] Fix | Delete
#define TXN_WRITE_NOSYNC 0x20000 /* Write only on prepare/commit. */
[957] Fix | Delete
#define TXN_BULK 0x40000 /* Enable bulk loading optimization. */
[958] Fix | Delete
u_int32_t flags;
[959] Fix | Delete
};
[960] Fix | Delete
[961] Fix | Delete
#define TXN_SYNC_FLAGS (TXN_SYNC | TXN_NOSYNC | TXN_WRITE_NOSYNC)
[962] Fix | Delete
[963] Fix | Delete
/*
[964] Fix | Delete
* Structure used for two phase commit interface.
[965] Fix | Delete
* We set the size of our global transaction id (gid) to be 128 in order
[966] Fix | Delete
* to match that defined by the XA X/Open standard.
[967] Fix | Delete
*/
[968] Fix | Delete
#define DB_GID_SIZE 128
[969] Fix | Delete
struct __db_preplist {
[970] Fix | Delete
DB_TXN *txn;
[971] Fix | Delete
u_int8_t gid[DB_GID_SIZE];
[972] Fix | Delete
};
[973] Fix | Delete
[974] Fix | Delete
/* Transaction statistics structure. */
[975] Fix | Delete
struct __db_txn_active {
[976] Fix | Delete
u_int32_t txnid; /* Transaction ID */
[977] Fix | Delete
u_int32_t parentid; /* Transaction ID of parent */
[978] Fix | Delete
pid_t pid; /* Process owning txn ID */
[979] Fix | Delete
db_threadid_t tid; /* Thread owning txn ID */
[980] Fix | Delete
[981] Fix | Delete
DB_LSN lsn; /* LSN when transaction began */
[982] Fix | Delete
[983] Fix | Delete
DB_LSN read_lsn; /* Read LSN for MVCC */
[984] Fix | Delete
u_int32_t mvcc_ref; /* MVCC reference count */
[985] Fix | Delete
[986] Fix | Delete
u_int32_t priority; /* Deadlock resolution priority */
[987] Fix | Delete
[988] Fix | Delete
#define TXN_ABORTED 1
[989] Fix | Delete
#define TXN_COMMITTED 2
[990] Fix | Delete
#define TXN_NEED_ABORT 3
[991] Fix | Delete
#define TXN_PREPARED 4
[992] Fix | Delete
#define TXN_RUNNING 5
[993] Fix | Delete
u_int32_t status; /* Status of the transaction */
[994] Fix | Delete
[995] Fix | Delete
#define TXN_XA_ACTIVE 1
[996] Fix | Delete
#define TXN_XA_DEADLOCKED 2
[997] Fix | Delete
#define TXN_XA_IDLE 3
[998] Fix | Delete
#define TXN_XA_PREPARED 4
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function