Commit 818f9606 authored by Rich Prohaska's avatar Rich Prohaska

close #17 dont put any DB_ flags in the tokudb header

git-svn-id: file:///svn/tokudb@707 c7de825b-a66e-492c-adef-691d508d4ae1
parent 01bd9ce7
......@@ -78,6 +78,10 @@ struct brt_header {
unsigned int flags;
};
enum brt_header_flags {
TOKU_DB_DUP = 1,
TOKU_DB_DUPSORT = 2,
};
struct brt {
CACHEFILE cf;
......
......@@ -1558,9 +1558,6 @@ int brt_open(BRT t, const char *fname, const char *fname_in_env, const char *dbn
}
t->h->dirty=1;
t->h->flags = t->flags;
/* These flags do not need to match. */
t->h->flags &= ~DB_CREATE;
t->h->flags &= ~DB_EXCL;
t->h->nodesize=t->nodesize;
t->h->freelist=-1;
t->h->unused_memory=2*t->nodesize;
......
......@@ -13,12 +13,6 @@ int open_brt (const char *fname, const char *dbname, int is_create, BRT *, int n
int brt_create(BRT *);
int brt_set_flags(BRT, int flags);
enum {
TOKU_DB_DUP = 1,
TOKU_DB_DUPSORT = 2,
};
int brt_set_nodesize(BRT, int nodesize);
int brt_set_bt_compare(BRT, int (*bt_compare)(DB *, const DBT*, const DBT*));
int brt_set_dup_compare(BRT, int (*dup_compare)(DB *, const DBT*, const DBT*));
......
......@@ -22,7 +22,7 @@ int main() {
r=chdir(DIR); assert(r==0);
r = db_create(&db, null_env, 0); CKERR(r);
r = db->set_flags(db, DB_DUP); CKERR(r);
// r = db->set_flags(db, DB_DUP); CKERR(r);
r = db->open(db, null_txn, fname, "main", DB_BTREE, DB_CREATE, 0666); CKERR(r);
r = db->close(db, 0); CKERR(r);
r = db_create(&db, null_env, 0); CKERR(r);
......
......@@ -16,6 +16,7 @@
#include <unistd.h>
#include "brt.h"
#include "brt-internal.h"
#include "cachetable.h"
#include "log.h"
#include "memory.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment