2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1996-2002
5
* Sleepycat Software. All rights reserved.
11
static const char revid[] = "$Id$";
14
#ifndef NO_SYSTEM_INCLUDES
15
#include <sys/types.h>
25
#include "dbinc/txn.h"
28
#include "dbinc_auto/db_server.h"
29
#include "dbinc_auto/rpc_client_ext.h"
32
static int __txn_set_tx_max __P((DB_ENV *, u_int32_t));
33
static int __txn_set_tx_timestamp __P((DB_ENV *, time_t *));
36
* __txn_dbenv_create --
37
* Transaction specific initialization of the DB_ENV structure.
39
* PUBLIC: void __txn_dbenv_create __P((DB_ENV *));
42
__txn_dbenv_create(dbenv)
47
* Our caller has not yet had the opportunity to reset the panic
48
* state or turn off mutex locking, and so we can neither check
49
* the panic state or acquire a mutex in the DB_ENV create path.
52
dbenv->tx_max = DEF_MAX_TXNS;
55
if (F_ISSET(dbenv, DB_ENV_RPCCLIENT)) {
56
dbenv->set_tx_max = __dbcl_set_tx_max;
57
dbenv->set_tx_timestamp = __dbcl_set_tx_timestamp;
58
dbenv->txn_checkpoint = __dbcl_txn_checkpoint;
59
dbenv->txn_recover = __dbcl_txn_recover;
60
dbenv->txn_stat = __dbcl_txn_stat;
61
dbenv->txn_begin = __dbcl_txn_begin;
65
dbenv->set_tx_max = __txn_set_tx_max;
66
dbenv->set_tx_timestamp = __txn_set_tx_timestamp;
67
dbenv->txn_checkpoint = __txn_checkpoint;
69
dbenv->txn_id_set = __txn_id_set;
71
dbenv->txn_recover = __txn_recover;
72
dbenv->txn_stat = __txn_stat;
73
dbenv->txn_begin = __txn_begin;
79
* Set the size of the transaction table.
82
__txn_set_tx_max(dbenv, tx_max)
86
ENV_ILLEGAL_AFTER_OPEN(dbenv, "set_tx_max");
88
dbenv->tx_max = tx_max;
93
* __txn_set_tx_timestamp --
94
* Set the transaction recovery timestamp.
97
__txn_set_tx_timestamp(dbenv, timestamp)
101
ENV_ILLEGAL_AFTER_OPEN(dbenv, "set_tx_timestamp");
103
dbenv->tx_timestamp = *timestamp;