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.58.55; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.03.21.18.33.40; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.03.21.18.33.40; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.07.22.30.58; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.49.10; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.10.15.03.47.27; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.05.14; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @

Transaction Commands

Transactions are used in a manner similar to the other subsystems.  We create a handle to the transaction and  then use it for a variety of operations.  Some of the transaction commands use the environment instead.  Those are presented first.  The transaction command handle returned is the handle used by the various commands that can be transaction protected, such as cursors.

> <env> txn_checkpoint [-kbyte kb] [-min min]

This command causes a checkpoint of the transaction region.  It is a direct translation of the txn_checkpoint function.  It returns either a 0 (for success), a DB error message or it throws a Tcl error with a system message.  The arguments are:



> <env> txn_stat

This command returns transaction statistics.  It is a direct translation of the txn_stat function.  It will return a list of name/value pairs that correspond to the DB_TXN_STAT structure.



>  <txn> id

This command returns the transaction id.  It is a direct call to the txn_id function.  The typical use of this identifier is as the locker value for the lock_get and lock_vec calls.



> <txn> prepare

This command initiates a two-phase commit.  It is a direct call to the txn_prepare function.  It returns either a 0 (for success), a DB error message or it throws a Tcl error with a system message.


@ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 7 a7 7 d9 2 a10 2

Transaction Commands

d16 7 a22 7 transaction protected, such as cursors.

> <env> txn_checkpoint [-kbyte kb] [-min min]

This command causes a checkpoint of the transaction region.  It is a direct translation of the txn_checkpoint function.  d25 4 a28 4

d35 4 a38 4

> <env> txn_stat

This command returns transaction statistics.  It is a direct translation of the txn_stat function.  d41 6 a46 11



> <env> txn_id_set  current max

This is a diagnosic command that sets the next transaction id to be allocated and the maximum transaction
id, which is the point at which the relcaimation algorthm is triggered.



>  <txn> id

This command returns the transaction id.  It is a direct call to the txn_id function.  The typical use of this identifier is as the locker value for the lock_get and lock_vec d48 4 a51 4



> <txn> prepare

This command initiates a two-phase commit.  It is a direct call to the txn_prepare function.  d54 3 a56 8


> <env> txn_timeout timeout

This command sets thetransaction timeout for transactions started in the future in this environment.  The timeout is in micorseconds.
 
  @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 1 a1 2 @ 1.1.1.4 log @Import: RPM 4.1 @ text @d1 2 a2 1 @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 1 a1 2 @