Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
David Barchiesi
OpenLDAP
Commits
076b773d
Commit
076b773d
authored
Jan 12, 2015
by
David Barbour
Committed by
Hallvard Furuseth
Oct 25, 2015
Browse files
ITS#7994 Access to current transaction ID.
commit
b660491d
(mdb_txn_id()) plus
c36c167c
(fix prev commit) from mdb.master.
parent
f3d3f60e
Changes
2
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/lmdb.h
View file @
076b773d
...
...
@@ -953,6 +953,17 @@ int mdb_txn_begin(MDB_env *env, MDB_txn *parent, unsigned int flags, MDB_txn **
*/
MDB_env
*
mdb_txn_env
(
MDB_txn
*
txn
);
/** @brief Return the transaction's ID.
*
* This returns the identifier associated with this transaction. For a
* read-only transaction, this corresponds to the snapshot being read;
* concurrent readers will frequently have the same transaction ID.
*
* @param[in] txn A transaction handle returned by #mdb_txn_begin()
* @return A transaction ID, valid if input is an active transaction.
*/
size_t
mdb_txn_id
(
MDB_txn
*
txn
);
/** @brief Commit all the operations of a transaction into the database.
*
* The transaction handle is freed. It and its cursors must not be used
...
...
libraries/liblmdb/mdb.c
View file @
076b773d
...
...
@@ -2766,6 +2766,13 @@ mdb_txn_env(MDB_txn *txn)
return
txn
->
mt_env
;
}
size_t
mdb_txn_id
(
MDB_txn
*
txn
)
{
if
(
!
txn
)
return
0
;
return
txn
->
mt_txnid
;
}
/** Export or close DBI handles opened in this txn. */
static
void
mdb_dbis_update
(
MDB_txn
*
txn
,
int
keep
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment