diff options
author | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-24 16:32:18 -0700 |
---|---|---|
committer | Ben Johnson <benbjohnson@yahoo.com> | 2014-01-24 16:32:18 -0700 |
commit | 73ab1d420dedd965ebe6f814dcf016c8e10879f2 (patch) | |
tree | 2a025e8e8daeaba34953c6b92b83bd579c83962b /meta.go | |
parent | TODO (diff) | |
download | dedo-73ab1d420dedd965ebe6f814dcf016c8e10879f2.tar.gz dedo-73ab1d420dedd965ebe6f814dcf016c8e10879f2.tar.xz |
TODO
Diffstat (limited to 'meta.go')
-rw-r--r-- | meta.go | 48 |
1 files changed, 6 insertions, 42 deletions
@@ -4,37 +4,16 @@ var ( InvalidMetaPageError = &Error{"Invalid meta page", nil} ) -// TODO: #define mm_psize mm_dbs[0].md_pad -// TODO: #define mm_flags mm_dbs[0].md_flags - -// TODO: -// typedef union MDB_metabuf { -// MDB_page mb_page; -// struct { -// char mm_pad[PAGEHDRSZ]; -// MDB_meta mm_meta; -// } mb_metabuf; -// } MDB_metabuf; - -// TODO: -// typedef struct MDB_dbx { -// MDB_val md_name; /**< name of the database */ -// MDB_cmp_func *md_cmp; /**< function for comparing keys */ -// MDB_cmp_func *md_dcmp; /**< function for comparing data items */ -// MDB_rel_func *md_rel; /**< user relocate function */ -// void *md_relctx; /**< user-provided context for md_rel */ -// } MDB_dbx; - const magic uint32 = 0xC0DEC0DE const version uint32 = 1 type meta struct { - magic uint32 - version uint32 - free bucket - buckets bucket - pgno int - txnid int + magic uint32 + version uint32 + buckets bucket + pageSize uint32 + pgid pgid + txnid txnid } // validate checks the marker bytes and version of the meta page to ensure it matches this binary. @@ -46,18 +25,3 @@ func (m *meta) validate() error { } return nil } - -// Read the environment parameters of a DB environment before -// mapping it into memory. -// @param[in] env the environment handle -// @param[out] meta address of where to store the meta information -// @return 0 on success, non-zero on failure. -func (m *meta) read(p *page) error { - /* - if (off == 0 || m->mm_txnid > meta->mm_txnid) - *meta = *m; - } - return 0; - */ - return nil -} |