head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.52.59; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.08; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.48.58; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.08.00; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.57; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
txn_begin |
![]() ![]() |
#include <db.h>int txn_begin(DB_ENV *env, DB_TXN *parent, DB_TXN **tid, u_int32_t flags);
The txn_begin method creates a new transaction in the environment and copies a pointer to a DB_TXN that uniquely identifies it into the memory to which tid refers.
If the parent argument is non-NULL, the new transaction will be a nested transaction, with the transaction indicated by parent as its parent. Transactions may be nested to any level. In the presence of distributed transactions and two-phase commit, only the parental transaction, that is a transaction without a parent specified, should be passed as an argument to txn_prepare.
The flags value must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
This behavior may be set for a Berkeley DB environment using the DB_ENV->set_flags interface. Any value specified in this interface overrides that setting.
This behavior is the default for Berkeley DB environments unless the DB_TXN_NOSYNC flag was specified to the DB_ENV->set_flags interface. Any value specified in this interface overrides that setting.
Note: A transaction may not span threads; that is, each transaction must begin and end in the same thread, and each transaction may be used only by a single thread.
Note: Cursors may not span transactions; that is, each cursor must be opened and closed within a single transaction.
Note: A parent transaction may not issue any Berkeley DB operations -- except for txn_begin, txn_abort and txn_commit -- while it has active child transactions (child transactions that have not yet been committed or aborted).
The txn_begin function returns a non-zero error value on failure and 0 on success.
The txn_begin function may fail and return a non-zero error for the following conditions:
The txn_begin function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the txn_begin function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
![]() ![]() |
Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @d1 1 a1 1 @ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 1 a1 1 d6 1 a6 1
The DB_ENV->txn_begin method creates a new transaction in the environment and copies a pointer to a DB_TXN that uniquely identifies it into a31 3 Calling the DB_TXN->abort, DB_TXN->commit or DB_TXN->discard functions will discard the returned handle. d39 1 a39 1 DB_TXN->prepare. d61 1 a61 1 DB_TXN_NOSYNC flag was specified to the DB_ENV->set_flags d71 1 a71 1 DB_ENV->txn_begin, DB_TXN->abort and DB_TXN->commit -- while it has d74 1 a74 1
The DB_ENV->txn_begin function returns a non-zero error value on failure and 0 on success. d76 1 a76 1
The DB_ENV->txn_begin function may fail and return a non-zero error for the following conditions: d80 2 a81 2
The DB_ENV->txn_begin function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->txn_begin function may fail and return d88 8 a95 9 DB_TXN->abort, DB_ENV->txn_begin, DB_ENV->txn_checkpoint, DB_TXN->commit, DB_TXN->discard, DB_TXN->id, DB_TXN->prepare, DB_ENV->txn_recover, DB_TXN->set_timeout d97 1 a97 1 DB_ENV->txn_stat. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d30 1 a30 1 and copies a pointer to a DB_TXN that uniquely identifies it into d33 1 a33 1 DB_TXN->commit or DB_TXN->discard methods will discard the returned d58 2 a59 3 of this transaction, return DB_LOCK_NOTGRANTED immediately instead of blocking on the lock. d77 1 a77 1
The DB_ENV->txn_begin method returns a non-zero error value on failure and 0 on success. d79 1 a79 1
The DB_ENV->txn_begin method may fail and return a non-zero error for the following conditions: d83 4 a86 6
The DB_ENV->txn_begin method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->txn_begin method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
The DB_ENV->txn_begin function returns a non-zero error value on failure and 0 on success. d81 1 a81 1
The DB_ENV->txn_begin function may fail and return a non-zero error for the following conditions: d85 6 a90 4
The DB_ENV->txn_begin function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->txn_begin function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d92 1 a92 14 DB_ENV->set_tx_max, DB_ENV->set_tx_recover, DB_ENV->set_tx_timestamp, DB_TXN->abort, DB_ENV->txn_begin, DB_ENV->txn_checkpoint, DB_TXN->commit, DB_TXN->discard, DB_TXN->id, DB_TXN->prepare, DB_ENV->txn_recover, DB_TXN->set_timeout and DB_ENV->txn_stat. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d30 1 a30 1 and copies a pointer to a DB_TXN that uniquely identifies it into d33 1 a33 1 DB_TXN->commit or DB_TXN->discard methods will discard the returned d58 2 a59 3 of this transaction, return DB_LOCK_NOTGRANTED immediately instead of blocking on the lock. d77 1 a77 1
The DB_ENV->txn_begin method returns a non-zero error value on failure and 0 on success. d79 1 a79 1
The DB_ENV->txn_begin method may fail and return a non-zero error for the following conditions: d83 4 a86 6
The DB_ENV->txn_begin method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_ENV->txn_begin method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.