From f44eebe2ae1052f658c9b10053a8e4dba0df57a6 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Fri, 30 Nov 2007 05:04:06 +0000 Subject: [PATCH] Make bdb 4.4 be the default for buildheader, and add DB_DBT_APPMALLOC and DB_DBT_MULITPLE. Fixes #96, #97. git-svn-id: file:///svn/tokudb@846 c7de825b-a66e-492c-adef-691d508d4ae1 --- buildheader/Makefile | 2 +- buildheader/db.h_4_1 | 3 +++ buildheader/db.h_4_3 | 3 +++ buildheader/db.h_4_4 | 3 +++ buildheader/db.h_4_6 | 4 ++++ buildheader/make_db_h.c | 6 ++++++ include/db.h | 3 +++ 7 files changed, 23 insertions(+), 1 deletion(-) diff --git a/buildheader/Makefile b/buildheader/Makefile index e7535a2b8f5..0311b8ae8f1 100644 --- a/buildheader/Makefile +++ b/buildheader/Makefile @@ -11,7 +11,7 @@ # 3. gather the generated sample_offsets header files # 4. make hs -BDB = 4_1 +BDB = 4_4 BDBDIR = ../../berkeleydb MYSQL_H = -I$(BDBDIR)/db-4.1.25/build_unix/ CFLAGS = -Wall -W -O2 -Werror -g diff --git a/buildheader/db.h_4_1 b/buildheader/db.h_4_1 index 3a0244b3dbf..c135285a5df 100644 --- a/buildheader/db.h_4_1 +++ b/buildheader/db.h_4_1 @@ -1,6 +1,7 @@ #ifndef _DB_H #define _DB_H /* This code generated by make_db_h. Copyright (c) 2007 Tokutek */ +#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #include /*stdio is needed for the FILE* in db->verify*/ #include @@ -63,6 +64,7 @@ typedef enum { #define DB_KEYEXIST -30997 #define DB_LOCK_DEADLOCK -30996 #define DB_NOTFOUND -30991 +#define DB_DONOTINDEX -30999 #define DB_BADFORMAT -30500 #define DB_DELETE_ANY 65536 #define DB_FIRST 10 @@ -74,6 +76,7 @@ typedef enum { #define DB_SET 30 #define DB_SET_RANGE 32 #define DB_RMW 1073741824 +#define DB_DBT_APPMALLOC 1 #endif /* in wrap mode, top-level function txn_begin is renamed, but the field isn't renamed, so we have to hack it here.*/ #ifdef _TOKUDB_WRAP_H diff --git a/buildheader/db.h_4_3 b/buildheader/db.h_4_3 index 22614b34f2e..b86e79ad968 100644 --- a/buildheader/db.h_4_3 +++ b/buildheader/db.h_4_3 @@ -1,6 +1,7 @@ #ifndef _DB_H #define _DB_H /* This code generated by make_db_h. Copyright (c) 2007 Tokutek */ +#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #include /*stdio is needed for the FILE* in db->verify*/ #include @@ -63,6 +64,7 @@ typedef enum { #define DB_KEYEXIST -30996 #define DB_LOCK_DEADLOCK -30995 #define DB_NOTFOUND -30989 +#define DB_DONOTINDEX -30998 #define DB_BADFORMAT -30500 #define DB_DELETE_ANY 65536 #define DB_FIRST 9 @@ -74,6 +76,7 @@ typedef enum { #define DB_SET 28 #define DB_SET_RANGE 30 #define DB_RMW 536870912 +#define DB_DBT_APPMALLOC 1 #endif /* in wrap mode, top-level function txn_begin is renamed, but the field isn't renamed, so we have to hack it here.*/ #ifdef _TOKUDB_WRAP_H diff --git a/buildheader/db.h_4_4 b/buildheader/db.h_4_4 index 1925af8381c..5453573fb2f 100644 --- a/buildheader/db.h_4_4 +++ b/buildheader/db.h_4_4 @@ -1,6 +1,7 @@ #ifndef _DB_H #define _DB_H /* This code generated by make_db_h. Copyright (c) 2007 Tokutek */ +#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #include /*stdio is needed for the FILE* in db->verify*/ #include @@ -63,6 +64,7 @@ typedef enum { #define DB_KEYEXIST -30996 #define DB_LOCK_DEADLOCK -30995 #define DB_NOTFOUND -30989 +#define DB_DONOTINDEX -30998 #define DB_BADFORMAT -30500 #define DB_DELETE_ANY 65536 #define DB_FIRST 9 @@ -74,6 +76,7 @@ typedef enum { #define DB_SET 28 #define DB_SET_RANGE 30 #define DB_RMW 536870912 +#define DB_DBT_APPMALLOC 1 #endif /* in wrap mode, top-level function txn_begin is renamed, but the field isn't renamed, so we have to hack it here.*/ #ifdef _TOKUDB_WRAP_H diff --git a/buildheader/db.h_4_6 b/buildheader/db.h_4_6 index 1840b6d3c51..c00141b30d5 100644 --- a/buildheader/db.h_4_6 +++ b/buildheader/db.h_4_6 @@ -1,6 +1,7 @@ #ifndef _DB_H #define _DB_H /* This code generated by make_db_h. Copyright (c) 2007 Tokutek */ +#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #include /*stdio is needed for the FILE* in db->verify*/ #include @@ -63,6 +64,7 @@ typedef enum { #define DB_KEYEXIST -30996 #define DB_LOCK_DEADLOCK -30995 #define DB_NOTFOUND -30989 +#define DB_DONOTINDEX -30998 #define DB_BADFORMAT -30500 #define DB_DELETE_ANY 65536 #define DB_FIRST 7 @@ -74,6 +76,8 @@ typedef enum { #define DB_SET 26 #define DB_SET_RANGE 27 #define DB_RMW 1073741824 +#define DB_DBT_APPMALLOC 1 +#define DB_DBT_MULTIPLE 16 #endif /* in wrap mode, top-level function txn_begin is renamed, but the field isn't renamed, so we have to hack it here.*/ #ifdef _TOKUDB_WRAP_H diff --git a/buildheader/make_db_h.c b/buildheader/make_db_h.c index cbe6bbe8753..524921b1388 100644 --- a/buildheader/make_db_h.c +++ b/buildheader/make_db_h.c @@ -70,6 +70,7 @@ void print_defines (void) { dodefine(DB_KEYEXIST); dodefine(DB_LOCK_DEADLOCK); dodefine(DB_NOTFOUND); + dodefine(DB_DONOTINDEX); printf("#define DB_BADFORMAT -30500\n"); // private tokudb printf("#define DB_DELETE_ANY %d\n", 1<<16); // private tokudb @@ -83,6 +84,11 @@ void print_defines (void) { dodefine(DB_SET); dodefine(DB_SET_RANGE); dodefine(DB_RMW); + + dodefine(DB_DBT_APPMALLOC); +#ifdef DB_DBT_MULTIPLE + dodefine(DB_DBT_MULTIPLE); +#endif printf("#endif\n"); } diff --git a/include/db.h b/include/db.h index 1925af8381c..5453573fb2f 100644 --- a/include/db.h +++ b/include/db.h @@ -1,6 +1,7 @@ #ifndef _DB_H #define _DB_H /* This code generated by make_db_h. Copyright (c) 2007 Tokutek */ +#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved." #include /*stdio is needed for the FILE* in db->verify*/ #include @@ -63,6 +64,7 @@ typedef enum { #define DB_KEYEXIST -30996 #define DB_LOCK_DEADLOCK -30995 #define DB_NOTFOUND -30989 +#define DB_DONOTINDEX -30998 #define DB_BADFORMAT -30500 #define DB_DELETE_ANY 65536 #define DB_FIRST 9 @@ -74,6 +76,7 @@ typedef enum { #define DB_SET 28 #define DB_SET_RANGE 30 #define DB_RMW 536870912 +#define DB_DBT_APPMALLOC 1 #endif /* in wrap mode, top-level function txn_begin is renamed, but the field isn't renamed, so we have to hack it here.*/ #ifdef _TOKUDB_WRAP_H