mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 16:54:13 +08:00
mdbx: minor reorder/shrink transaction fields.
This commit is contained in:
parent
0d100a898f
commit
74ea79ac1b
@ -921,15 +921,7 @@ typedef struct MDBX_dbx {
|
|||||||
* Every operation requires a transaction handle. */
|
* Every operation requires a transaction handle. */
|
||||||
struct MDBX_txn {
|
struct MDBX_txn {
|
||||||
#define MDBX_MT_SIGNATURE UINT32_C(0x93D53A31)
|
#define MDBX_MT_SIGNATURE UINT32_C(0x93D53A31)
|
||||||
size_t mt_signature;
|
uint32_t mt_signature;
|
||||||
MDBX_txn *mt_parent; /* parent of a nested txn */
|
|
||||||
/* Nested txn under this txn, set together with flag MDBX_TXN_HAS_CHILD */
|
|
||||||
MDBX_txn *mt_child;
|
|
||||||
MDBX_geo mt_geo;
|
|
||||||
/* next unallocated page */
|
|
||||||
#define mt_next_pgno mt_geo.next
|
|
||||||
/* corresponding to the current size of datafile */
|
|
||||||
#define mt_end_pgno mt_geo.now
|
|
||||||
|
|
||||||
/* Transaction Flags */
|
/* Transaction Flags */
|
||||||
/* mdbx_txn_begin() flags */
|
/* mdbx_txn_begin() flags */
|
||||||
@ -958,8 +950,17 @@ struct MDBX_txn {
|
|||||||
MDBX_SHRINK_ALLOWED)
|
MDBX_SHRINK_ALLOWED)
|
||||||
#error "Oops, some flags overlapped or wrong"
|
#error "Oops, some flags overlapped or wrong"
|
||||||
#endif
|
#endif
|
||||||
|
uint32_t mt_flags;
|
||||||
|
|
||||||
|
MDBX_txn *mt_parent; /* parent of a nested txn */
|
||||||
|
/* Nested txn under this txn, set together with flag MDBX_TXN_HAS_CHILD */
|
||||||
|
MDBX_txn *mt_child;
|
||||||
|
MDBX_geo mt_geo;
|
||||||
|
/* next unallocated page */
|
||||||
|
#define mt_next_pgno mt_geo.next
|
||||||
|
/* corresponding to the current size of datafile */
|
||||||
|
#define mt_end_pgno mt_geo.now
|
||||||
|
|
||||||
unsigned mt_flags;
|
|
||||||
/* The ID of this transaction. IDs are integers incrementing from 1.
|
/* The ID of this transaction. IDs are integers incrementing from 1.
|
||||||
* Only committed write transactions increment the ID. If a transaction
|
* Only committed write transactions increment the ID. If a transaction
|
||||||
* aborts, the ID may be re-used by the next writer. */
|
* aborts, the ID may be re-used by the next writer. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user