Commit 94be297d authored by Rich Prohaska's avatar Rich Prohaska

add big ydb lock. addresses #7

git-svn-id: file:///svn/tokudb@1670 c7de825b-a66e-492c-adef-691d508d4ae1
parent 0ac7cfc8
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 500 #define _XOPEN_SOURCE 500
#endif
#define _FILE_OFFSET_BITS 64 #define _FILE_OFFSET_BITS 64
typedef struct brt *BRT; typedef struct brt *BRT;
......
...@@ -6,7 +6,7 @@ LIBNAME=libdb ...@@ -6,7 +6,7 @@ LIBNAME=libdb
# OPTFLAGS = -O2 # OPTFLAGS = -O2
CFLAGS = -W -Wall -Werror -g -fPIC $(OPTFLAGS) CFLAGS = -W -Wall -Werror -g -fPIC $(OPTFLAGS)
CPPFLAGS = -I../include -I../newbrt CPPFLAGS = -I../include -I../newbrt
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE CPPFLAGS += -D_GNU_SOURCE -D_THREAD_SAFE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
ifeq ($(OSX),OSX) ifeq ($(OSX),OSX)
......
...@@ -32,6 +32,44 @@ struct __toku_db_internal { ...@@ -32,6 +32,44 @@ struct __toku_db_internal {
int associate_is_immutable; // If this DB is a secondary then this field indicates that the index never changes due to updates. int associate_is_immutable; // If this DB is a secondary then this field indicates that the index never changes due to updates.
}; };
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1
typedef void (*toku_env_errcall_t)(const char *, char *);
#elif DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
typedef void (*toku_env_errcall_t)(const DB_ENV *, const char *, const char *);
#else
#error
#endif
struct __toku_db_env_internal {
int is_panicked;
int ref_count;
u_int32_t open_flags;
int open_mode;
toku_env_errcall_t errcall;
void *errfile;
const char *errpfx;
char *dir; /* A malloc'd copy of the directory. */
char *tmp_dir;
char *lg_dir;
char **data_dirs;
u_int32_t n_data_dirs;
//void (*noticecall)(DB_ENV *, db_notices);
unsigned long cachetable_size;
CACHETABLE cachetable;
TOKULOGGER logger;
};
struct __toku_db_txn_internal {
//TXNID txnid64; /* A sixty-four bit txn id. */
TOKUTXN tokutxn;
DB_TXN *parent;
};
struct __toku_dbc_internal {
BRT_CURSOR c;
DB_TXN *txn;
};
typedef struct __toku_lock_tree { typedef struct __toku_lock_tree {
DB* db; DB* db;
//Some Red Black tree //Some Red Black tree
...@@ -868,4 +906,6 @@ DUPSORT db ...@@ -868,4 +906,6 @@ DUPSORT db
+++++ +++++
*/ */
#endif #endif
This diff is collapsed.
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