snacktime
9/9/2006 8:51:00 PM
I want to make sure I'm not missing something here. The following
statement from docs/transactions.rb seems to state that BDB::INIT_TXN
and BDB::INIT_TRANSACTION are the same, and do not enable locking.
# The transaction subsystem is created, initialized, and opened by calls
# to <em>BDB::Env#open</em> with the <em>BDB::INIT_TXN</em>
# flag (or <em>BDB::INIT_TRANSACTION</em>) specified.
# Note that enabling transactions automatically enables
# logging, but does not enable locking, as a single thread of control
# that needed atomicity and recoverability would not require it.
However, in the source it shows this:
bdb.h:
#define BDB_INIT_TRANSACTION (DB_INIT_LOCK | DB_INIT_MPOOL |
DB_INIT_TXN | DB_INIT_LOG)
bdb.c:
rb_define_const(bdb_mDb, "INIT_TXN", INT2FIX(DB_INIT_TXN));
Which would seem to me that BDB::INIT_TRANSACTION would give you the
standard bdb environment for transactions with locking, while
BDB::INIT_TXN is exactly the same as the bdb DB_INIT_TXN flag.
The test suite seems to back this up, but I just wanted to make sure
I'm not missing something.
Chris