5I0Berkeley DB: dbenv_set_tx_recover[P

dbenv_set_tx_recover





#include <db_cxx.h>

Ftypedef int (*tx_recover_fcn)(DB_LOG *, DBT *, DB_LSN *, int, void *);+void DbEnv::set_tx_recover(tx_recover_fcn);





Description



oSet the function that is called by DbTxn::abort during transactionabort.#This function takes five arguments:

;

logp
A pointer to the transaction log (DB_LOG *).

log_rec
A log record.=

lsnp
A pointer to a log sequence number (DB_LSN *).K

redo
An integer value that is set to one of the following values:
g

DB_TXN_BACKWARD_ROLL
The log is being read backward to determine which transactions have beenJcommitted and which transactions were not (and should therefore be abortedduring recovery).c

DB_TXN_FORWARD_ROLL
The log is being played forward, any transaction ids encountered that1have not been entered into the list referenced byinfo should be ignored.d

DB_TXN_OPENFILES
The log is being read to open all the files required to perform recovery.E

DB_TXN_REDO
Redo the operation described by the log record.E

DB_TXN_UNDO
Undo the operation described by the log record.
Z

info
An opaque pointer used to reference the list of transaction IDs encounteredduring recovery.


PIf no recover function is specified, the default is that only Berkeley DB accessMmethod operations are transaction protected, and the default recover function will be used.



Class

2DbEnv



See Also

>DbEnv::appinit,>DbEnv::appexit,>DbEnv::version,FDbEnv::get_lg_info,FDbEnv::get_lk_info,FDbEnv::get_mp_info,FDbEnv::get_tx_info,dbenv_set_data_dir,FDbEnv::set_errcall,FDbEnv::set_errfile,NDbEnv::set_error_model,PDbEnv::set_error_stream,DDbEnv::set_errpfx,DDbEnv::set_lg_max,PDbEnv::set_lk_conflicts,JDbEnv::set_lk_detect,HDbEnv::set_lk_modes,DDbEnv::set_lorder,NDbEnv::set_mp_mmapsize,FDbEnv::set_mp_size,DDbEnv::set_tx_max,dbenv_set_tx_recoverandFDbEnv::set_verbose.
ÿÿ