aboutsummaryrefslogtreecommitdiff
path: root/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db.go')
-rw-r--r--db.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/db.go b/db.go
index af946e3..480d059 100644
--- a/db.go
+++ b/db.go
@@ -45,9 +45,8 @@ type DB struct {
mmapSize int /**< size of the data memory map */
size int /**< current file size */
pbuf []byte
- transaction *Transaction /**< current write transaction */
+ transaction *RWTransaction /**< current write transaction */
maxPageNumber int /**< me_mapsize / me_psize */
- pagestate pagestate /**< state of old pages from freeDB */
dpages []*page /**< list of malloc'd blocks for re-use */
freePages []int /** IDL of pages that became unused in a write txn */
dirtyPages []int /** ID2L of pages written during a write txn. Length MDB_IDL_UM_SIZE. */
@@ -223,6 +222,8 @@ func (db *DB) Transaction(writable bool) (*Transaction, error) {
db: db,
meta: db.meta(),
writable: writable,
+ buckets: make(map[string]*Bucket),
+ cursors: make(map[uint32]*Cursor),
}
// Save references to the sys•free and sys•buckets buckets.