Commit de5d8782 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

[t:r4298] Resolve various conflicts with buildheader between 4298 and main. Refs #4298.

git-svn-id: file:///svn/toku/tokudb@39774 c7de825b-a66e-492c-adef-691d508d4ae1
parent 03c7a70c
This diff is collapsed.
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -212,19 +214,19 @@ struct __toku_db_env { ...@@ -212,19 +214,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -396,7 +398,7 @@ struct __toku_db_txn { ...@@ -396,7 +398,7 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */ DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */
DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */ DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void* __toku_dummy0[10]; void* __toku_dummy0[10];
......
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -212,19 +214,19 @@ struct __toku_db_env { ...@@ -212,19 +214,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -402,7 +404,7 @@ struct __toku_db_txn { ...@@ -402,7 +404,7 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */ DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */
DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */ DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void* __toku_dummy0[13]; void* __toku_dummy0[13];
......
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -212,19 +214,19 @@ struct __toku_db_env { ...@@ -212,19 +214,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -402,7 +404,7 @@ struct __toku_db_txn { ...@@ -402,7 +404,7 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */ DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */
DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */ DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void* __toku_dummy0[13]; void* __toku_dummy0[13];
......
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -213,19 +215,19 @@ struct __toku_db_env { ...@@ -213,19 +215,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -405,7 +407,7 @@ struct __toku_db_txn { ...@@ -405,7 +407,7 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */ DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; /* 32-bit offset=0 size=4, 64=bit offset=0 size=8 */
DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */ DB_TXN *parent; /* 32-bit offset=4 size=4, 64=bit offset=8 size=8 */
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void* __toku_dummy0[14]; void* __toku_dummy0[14];
......
This diff is collapsed.
/* -*- mode: C; c-basic-offset: 4 -*- */ /* -*- mode: C; c-basic-offset: 4 -*- */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved."
#ident "$Id$"
/* LICENSE: This file is licensed under the GPL or from Tokutek. */ /* LICENSE: This file is licensed under the GPL or from Tokutek. */
/* Make a db.h that will be link-time compatible with Sleepycat's Berkeley DB. */ /* Make a db.h that will be link-time compatible with Sleepycat's Berkeley DB. */
...@@ -11,16 +12,16 @@ ...@@ -11,16 +12,16 @@
// Don't include toku_assert.h. Just use assert.h // Don't include toku_assert.h. Just use assert.h
#include <assert.h> #include <assert.h>
#define DECL_LIMIT 100 #define DECL_LIMIT 200
#define FIELD_LIMIT 100 #define FIELD_LIMIT 100
struct fieldinfo { struct fieldinfo {
char decl[DECL_LIMIT]; char decl[DECL_LIMIT];
unsigned int off; unsigned int off;
unsigned int size; unsigned int size;
} fields[FIELD_LIMIT]; } fields[FIELD_LIMIT];
int field_counter=0; static int field_counter=0;
int compare_fields (const void *av, const void *bv) { static int compare_fields (const void *av, const void *bv) {
const struct fieldinfo *a = av; const struct fieldinfo *a = av;
const struct fieldinfo *b = bv; const struct fieldinfo *b = bv;
if (a->off < b->off) return -1; if (a->off < b->off) return -1;
...@@ -28,14 +29,16 @@ int compare_fields (const void *av, const void *bv) { ...@@ -28,14 +29,16 @@ int compare_fields (const void *av, const void *bv) {
return 0; return 0;
} }
#define STRUCT_SETUP(typ, name, fstring) ({ snprintf(fields[field_counter].decl, DECL_LIMIT, fstring, #name); \ #define STRUCT_SETUP(typ, name, fstring) ({ \
fields[field_counter].off = __builtin_offsetof(typ, name); \ int len=snprintf(fields[field_counter].decl, DECL_LIMIT, fstring, #name); \
{ typ dummy; \ assert(len<DECL_LIMIT); \
fields[field_counter].size = sizeof(dummy.name); } \ fields[field_counter].off = __builtin_offsetof(typ, name); \
{ typ dummy; \
fields[field_counter].size = sizeof(dummy.name); } \
field_counter++; }) field_counter++; })
FILE *outf; static FILE *outf;
void open_file (void) { static void open_file (void) {
char fname[100]; char fname[100];
#ifdef LOCAL #ifdef LOCAL
snprintf(fname, 100, "sample_offsets_local.h"); snprintf(fname, 100, "sample_offsets_local.h");
...@@ -47,32 +50,32 @@ void open_file (void) { ...@@ -47,32 +50,32 @@ void open_file (void) {
} }
void sort_and_dump_fields (const char *structname, unsigned int sizeofstruct) { static void sort_and_dump_fields (const char *structname, unsigned int sizeofstruct) {
int i; int i;
qsort(fields, field_counter, sizeof(fields[0]), compare_fields); qsort(fields, field_counter, sizeof(fields[0]), compare_fields);
fprintf(outf, "struct fieldinfo %s_fields%d[] = {\n", structname, __WORDSIZE); fprintf(outf, "struct fieldinfo %s_fields%d[] = {\n", structname, __WORDSIZE);
for (i=0; i<field_counter; i++) { for (i=0; i<field_counter; i++) {
fprintf(outf, " {\"%s\", %d, %d},\n", fields[i].decl, fields[i].off, fields[i].size); fprintf(outf, " {\"%s\", %u, %u},\n", fields[i].decl, fields[i].off, fields[i].size);
} }
fprintf(outf, " {0, %d, %d} /* size of whole struct */\n", sizeofstruct, sizeofstruct); fprintf(outf, " {0, %u, %u} /* size of whole struct */\n", sizeofstruct, sizeofstruct);
fprintf(outf, "};\n"); fprintf(outf, "};\n");
} }
void sample_db_btree_stat_offsets (void) { static void sample_db_btree_stat_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_BTREE_STAT, bt_ndata, "u_int32_t %s"); STRUCT_SETUP(DB_BTREE_STAT, bt_ndata, "u_int32_t %s");
STRUCT_SETUP(DB_BTREE_STAT, bt_nkeys, "u_int32_t %s"); STRUCT_SETUP(DB_BTREE_STAT, bt_nkeys, "u_int32_t %s");
sort_and_dump_fields("db_btree_stat", sizeof(DB_BTREE_STAT)); sort_and_dump_fields("db_btree_stat", sizeof(DB_BTREE_STAT));
} }
void sample_db_env_offsets (void) { static void sample_db_env_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_ENV, api1_internal, "void *%s"); /* Used for C++ hacking. */ STRUCT_SETUP(DB_ENV, api1_internal, "void *%s"); /* Used for C++ hacking. */
STRUCT_SETUP(DB_ENV, app_private, "void *%s"); STRUCT_SETUP(DB_ENV, app_private, "void *%s");
STRUCT_SETUP(DB_ENV, close, "int (*%s) (DB_ENV *, u_int32_t)"); STRUCT_SETUP(DB_ENV, close, "int (*%s) (DB_ENV *, u_int32_t)");
STRUCT_SETUP(DB_ENV, err, "void (*%s) (const DB_ENV *, int, const char *, ...)"); STRUCT_SETUP(DB_ENV, err, "void (*%s) (const DB_ENV *, int, const char *, ...)");
#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3 #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3
STRUCT_SETUP(DB_ENV, get_cachesize, "int (*%s) (DB_ENV *, u_int32_t *, u_int32_t *, int *)"); STRUCT_SETUP(DB_ENV, get_cachesize, "int (*%s) (DB_ENV *, u_int32_t *, u_int32_t *, int *)");
STRUCT_SETUP(DB_ENV, get_flags, "int (*%s) (DB_ENV *, u_int32_t *)"); STRUCT_SETUP(DB_ENV, get_flags, "int (*%s) (DB_ENV *, u_int32_t *)");
STRUCT_SETUP(DB_ENV, get_lk_max_locks, "int (*%s) (DB_ENV *, u_int32_t *)"); STRUCT_SETUP(DB_ENV, get_lk_max_locks, "int (*%s) (DB_ENV *, u_int32_t *)");
STRUCT_SETUP(DB_ENV, get_lg_max, "int (*%s) (DB_ENV *, u_int32_t*)"); STRUCT_SETUP(DB_ENV, get_lg_max, "int (*%s) (DB_ENV *, u_int32_t*)");
...@@ -103,14 +106,15 @@ void sample_db_env_offsets (void) { ...@@ -103,14 +106,15 @@ void sample_db_env_offsets (void) {
STRUCT_SETUP(DB_ENV, set_tmp_dir, "int (*%s) (DB_ENV *, const char *)"); STRUCT_SETUP(DB_ENV, set_tmp_dir, "int (*%s) (DB_ENV *, const char *)");
STRUCT_SETUP(DB_ENV, set_verbose, "int (*%s) (DB_ENV *, u_int32_t, int)"); STRUCT_SETUP(DB_ENV, set_verbose, "int (*%s) (DB_ENV *, u_int32_t, int)");
STRUCT_SETUP(DB_ENV, txn_checkpoint, "int (*%s) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)"); STRUCT_SETUP(DB_ENV, txn_checkpoint, "int (*%s) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)");
STRUCT_SETUP(DB_ENV, txn_stat, "int (*%s) (DB_ENV *, DB_TXN_STAT **, u_int32_t)"); STRUCT_SETUP(DB_ENV, txn_stat, "int (*%s) (DB_ENV *, DB_TXN_STAT **, u_int32_t)");
STRUCT_SETUP(DB_ENV, txn_begin, "int (*%s) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)"); STRUCT_SETUP(DB_ENV, txn_begin, "int (*%s) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)");
STRUCT_SETUP(DB_ENV, dbremove, "int (*%s) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)"); STRUCT_SETUP(DB_ENV, txn_recover, "int (*%s) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)");
STRUCT_SETUP(DB_ENV, dbrename, "int (*%s) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)"); STRUCT_SETUP(DB_ENV, dbremove, "int (*%s) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)");
STRUCT_SETUP(DB_ENV, dbrename, "int (*%s) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)");
sort_and_dump_fields("db_env", sizeof(DB_ENV)); sort_and_dump_fields("db_env", sizeof(DB_ENV));
} }
void sample_db_key_range_offsets (void) { static void sample_db_key_range_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_KEY_RANGE, less, "double %s"); STRUCT_SETUP(DB_KEY_RANGE, less, "double %s");
STRUCT_SETUP(DB_KEY_RANGE, equal, "double %s"); STRUCT_SETUP(DB_KEY_RANGE, equal, "double %s");
...@@ -118,12 +122,12 @@ void sample_db_key_range_offsets (void) { ...@@ -118,12 +122,12 @@ void sample_db_key_range_offsets (void) {
sort_and_dump_fields("db_key_range", sizeof(DB_ENV)); sort_and_dump_fields("db_key_range", sizeof(DB_ENV));
} }
void sample_db_lsn_offsets (void) { static void sample_db_lsn_offsets (void) {
field_counter=0; field_counter=0;
sort_and_dump_fields("db_lsn", sizeof(DB_LSN)); sort_and_dump_fields("db_lsn", sizeof(DB_LSN));
} }
void sample_db_offsets (void) { static void sample_db_offsets (void) {
/* Do these in alphabetical order. */ /* Do these in alphabetical order. */
field_counter=0; field_counter=0;
STRUCT_SETUP(DB, api_internal, "void *%s"); /* Used for C++ hacking. */ STRUCT_SETUP(DB, api_internal, "void *%s"); /* Used for C++ hacking. */
...@@ -152,32 +156,33 @@ void sample_db_offsets (void) { ...@@ -152,32 +156,33 @@ void sample_db_offsets (void) {
sort_and_dump_fields("db", sizeof(DB)); sort_and_dump_fields("db", sizeof(DB));
} }
void sample_db_txn_active_offsets (void) { static void sample_db_txn_active_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_TXN_ACTIVE, lsn, "DB_LSN %s"); STRUCT_SETUP(DB_TXN_ACTIVE, lsn, "DB_LSN %s");
STRUCT_SETUP(DB_TXN_ACTIVE, txnid, "u_int32_t %s"); STRUCT_SETUP(DB_TXN_ACTIVE, txnid, "u_int32_t %s");
sort_and_dump_fields("db_txn_active", sizeof(DB_TXN_ACTIVE)); sort_and_dump_fields("db_txn_active", sizeof(DB_TXN_ACTIVE));
} }
void sample_db_txn_offsets (void) { static void sample_db_txn_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_TXN, abort, "int (*%s) (DB_TXN *)"); STRUCT_SETUP(DB_TXN, abort, "int (*%s) (DB_TXN *)");
STRUCT_SETUP(DB_TXN, api_internal,"void *%s"); STRUCT_SETUP(DB_TXN, api_internal,"void *%s");
STRUCT_SETUP(DB_TXN, commit, "int (*%s) (DB_TXN*, u_int32_t)"); STRUCT_SETUP(DB_TXN, commit, "int (*%s) (DB_TXN*, u_int32_t)");
STRUCT_SETUP(DB_TXN, prepare, "int (*%s) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])");
STRUCT_SETUP(DB_TXN, id, "u_int32_t (*%s) (DB_TXN *)"); STRUCT_SETUP(DB_TXN, id, "u_int32_t (*%s) (DB_TXN *)");
STRUCT_SETUP(DB_TXN, mgrp, "DB_ENV *%s /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/"); STRUCT_SETUP(DB_TXN, mgrp, "DB_ENV *%s /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/");
STRUCT_SETUP(DB_TXN, parent, "DB_TXN *%s"); STRUCT_SETUP(DB_TXN, parent, "DB_TXN *%s");
sort_and_dump_fields("db_txn", sizeof(DB_TXN)); sort_and_dump_fields("db_txn", sizeof(DB_TXN));
} }
void sample_db_txn_stat_offsets (void) { static void sample_db_txn_stat_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DB_TXN_STAT, st_nactive, "u_int32_t %s"); STRUCT_SETUP(DB_TXN_STAT, st_nactive, "u_int32_t %s");
STRUCT_SETUP(DB_TXN_STAT, st_txnarray, "DB_TXN_ACTIVE *%s"); STRUCT_SETUP(DB_TXN_STAT, st_txnarray, "DB_TXN_ACTIVE *%s");
sort_and_dump_fields("db_txn_stat", sizeof(DB_TXN_STAT)); sort_and_dump_fields("db_txn_stat", sizeof(DB_TXN_STAT));
} }
void sample_dbc_offsets (void) { static void sample_dbc_offsets (void) {
field_counter=0; field_counter=0;
STRUCT_SETUP(DBC, c_close, "int (*%s) (DBC *)"); STRUCT_SETUP(DBC, c_close, "int (*%s) (DBC *)");
STRUCT_SETUP(DBC, c_count, "int (*%s) (DBC *, db_recno_t *, u_int32_t)"); STRUCT_SETUP(DBC, c_count, "int (*%s) (DBC *, db_recno_t *, u_int32_t)");
...@@ -187,7 +192,7 @@ void sample_dbc_offsets (void) { ...@@ -187,7 +192,7 @@ void sample_dbc_offsets (void) {
sort_and_dump_fields("dbc", sizeof(DBC)); sort_and_dump_fields("dbc", sizeof(DBC));
} }
void sample_dbt_offsets (void) { static void sample_dbt_offsets (void) {
field_counter=0; field_counter=0;
#if 0 && DB_VERSION_MAJOR==4 && DB_VERSION_MINOR==1 #if 0 && DB_VERSION_MAJOR==4 && DB_VERSION_MINOR==1
STRUCT_SETUP(DBT, app_private, "void*%s"); STRUCT_SETUP(DBT, app_private, "void*%s");
......
...@@ -33,6 +33,7 @@ struct fieldinfo db_env_fields32[] = { ...@@ -33,6 +33,7 @@ struct fieldinfo db_env_fields32[] = {
{"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 452, 4}, {"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 452, 4},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 540, 4}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 540, 4},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 544, 4}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 544, 4},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 552, 4},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 556, 4}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 556, 4},
{0, 576, 576} /* size of whole struct */ {0, 576, 576} /* size of whole struct */
}; };
...@@ -79,6 +80,7 @@ struct fieldinfo db_txn_fields32[] = { ...@@ -79,6 +80,7 @@ struct fieldinfo db_txn_fields32[] = {
{"int (*abort) (DB_TXN *)", 76, 4}, {"int (*abort) (DB_TXN *)", 76, 4},
{"int (*commit) (DB_TXN*, u_int32_t)", 80, 4}, {"int (*commit) (DB_TXN*, u_int32_t)", 80, 4},
{"u_int32_t (*id) (DB_TXN *)", 88, 4}, {"u_int32_t (*id) (DB_TXN *)", 88, 4},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 92, 4},
{0, 104, 104} /* size of whole struct */ {0, 104, 104} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields32[] = { struct fieldinfo db_txn_stat_fields32[] = {
......
...@@ -19,7 +19,7 @@ struct fieldinfo db_env_fields32[] = { ...@@ -19,7 +19,7 @@ struct fieldinfo db_env_fields32[] = {
{"void (*set_errcall) (DB_ENV *, void (*)(const DB_ENV *, const char *, const char *))", 348, 4}, {"void (*set_errcall) (DB_ENV *, void (*)(const DB_ENV *, const char *, const char *))", 348, 4},
{"void (*set_errfile) (DB_ENV *, FILE*)", 356, 4}, {"void (*set_errfile) (DB_ENV *, FILE*)", 356, 4},
{"void (*set_errpfx) (DB_ENV *, const char *)", 364, 4}, {"void (*set_errpfx) (DB_ENV *, const char *)", 364, 4},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 372, 4}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 372, 4},
{"int (*set_flags) (DB_ENV *, u_int32_t, int)", 376, 4}, {"int (*set_flags) (DB_ENV *, u_int32_t, int)", 376, 4},
{"int (*set_tmp_dir) (DB_ENV *, const char *)", 432, 4}, {"int (*set_tmp_dir) (DB_ENV *, const char *)", 432, 4},
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 440, 4}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 440, 4},
...@@ -33,10 +33,11 @@ struct fieldinfo db_env_fields32[] = { ...@@ -33,10 +33,11 @@ struct fieldinfo db_env_fields32[] = {
{"int (*set_lk_max) (DB_ENV *, u_int32_t)", 528, 4}, {"int (*set_lk_max) (DB_ENV *, u_int32_t)", 528, 4},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 532, 4}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 532, 4},
{"int (*set_lk_max_locks) (DB_ENV *, u_int32_t)", 536, 4}, {"int (*set_lk_max_locks) (DB_ENV *, u_int32_t)", 536, 4},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 592, 4}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 592, 4},
{"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 596, 4}, {"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 596, 4},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 712, 4}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 712, 4},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 716, 4}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 716, 4},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 720, 4},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 724, 4}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 724, 4},
{0, 756, 756} /* size of whole struct */ {0, 756, 756} /* size of whole struct */
}; };
...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields32[] = { ...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields32[] = {
{"int (*abort) (DB_TXN *)", 100, 4}, {"int (*abort) (DB_TXN *)", 100, 4},
{"int (*commit) (DB_TXN*, u_int32_t)", 104, 4}, {"int (*commit) (DB_TXN*, u_int32_t)", 104, 4},
{"u_int32_t (*id) (DB_TXN *)", 112, 4}, {"u_int32_t (*id) (DB_TXN *)", 112, 4},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 116, 4},
{0, 132, 132} /* size of whole struct */ {0, 132, 132} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields32[] = { struct fieldinfo db_txn_stat_fields32[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 372, 4}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 372, 4},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 376, 4}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 376, 4},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 380, 4}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 380, 4},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 396, 4}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 396, 4},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 416, 4}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 416, 4},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 436, 4}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 436, 4},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 456, 4}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 456, 4},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 548, 4}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 548, 4},
...@@ -37,6 +37,7 @@ struct fieldinfo db_env_fields32[] = { ...@@ -37,6 +37,7 @@ struct fieldinfo db_env_fields32[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 872, 4}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 872, 4},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 880, 4}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 880, 4},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 884, 4}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 884, 4},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 888, 4},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 892, 4}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 892, 4},
{0, 920, 920} /* size of whole struct */ {0, 920, 920} /* size of whole struct */
}; };
...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields32[] = { ...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields32[] = {
{"int (*abort) (DB_TXN *)", 96, 4}, {"int (*abort) (DB_TXN *)", 96, 4},
{"int (*commit) (DB_TXN*, u_int32_t)", 100, 4}, {"int (*commit) (DB_TXN*, u_int32_t)", 100, 4},
{"u_int32_t (*id) (DB_TXN *)", 112, 4}, {"u_int32_t (*id) (DB_TXN *)", 112, 4},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 116, 4},
{0, 136, 136} /* size of whole struct */ {0, 136, 136} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields32[] = { struct fieldinfo db_txn_stat_fields32[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 376, 4}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 376, 4},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 380, 4}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 380, 4},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 384, 4}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 384, 4},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 400, 4}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 400, 4},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 420, 4}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 420, 4},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 440, 4}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 440, 4},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 460, 4}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 460, 4},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 548, 4}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 548, 4},
...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields32[] = { ...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields32[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 924, 4}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 924, 4},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 932, 4}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 932, 4},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 936, 4}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 936, 4},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 940, 4},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 944, 4}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 944, 4},
{0, 972, 972} /* size of whole struct */ {0, 972, 972} /* size of whole struct */
}; };
...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields32[] = { ...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields32[] = {
{"int (*abort) (DB_TXN *)", 96, 4}, {"int (*abort) (DB_TXN *)", 96, 4},
{"int (*commit) (DB_TXN*, u_int32_t)", 100, 4}, {"int (*commit) (DB_TXN*, u_int32_t)", 100, 4},
{"u_int32_t (*id) (DB_TXN *)", 112, 4}, {"u_int32_t (*id) (DB_TXN *)", 112, 4},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 116, 4},
{0, 136, 136} /* size of whole struct */ {0, 136, 136} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields32[] = { struct fieldinfo db_txn_stat_fields32[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields32[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 396, 4}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 396, 4},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 400, 4}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 400, 4},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 404, 4}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 404, 4},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 420, 4}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 420, 4},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 444, 4}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 444, 4},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 464, 4}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 464, 4},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 484, 4}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 484, 4},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 576, 4}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 576, 4},
...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields32[] = { ...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields32[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 968, 4}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 968, 4},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 976, 4}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 976, 4},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 980, 4}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 980, 4},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 984, 4},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 988, 4}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 988, 4},
{0, 1016, 1016} /* size of whole struct */ {0, 1016, 1016} /* size of whole struct */
}; };
...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields32[] = { ...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields32[] = {
{"int (*abort) (DB_TXN *)", 100, 4}, {"int (*abort) (DB_TXN *)", 100, 4},
{"int (*commit) (DB_TXN*, u_int32_t)", 104, 4}, {"int (*commit) (DB_TXN*, u_int32_t)", 104, 4},
{"u_int32_t (*id) (DB_TXN *)", 116, 4}, {"u_int32_t (*id) (DB_TXN *)", 116, 4},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 120, 4},
{0, 140, 140} /* size of whole struct */ {0, 140, 140} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields32[] = { struct fieldinfo db_txn_stat_fields32[] = {
......
...@@ -33,6 +33,7 @@ struct fieldinfo db_env_fields64[] = { ...@@ -33,6 +33,7 @@ struct fieldinfo db_env_fields64[] = {
{"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 840, 8}, {"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 840, 8},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1016, 8}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1016, 8},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1024, 8}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1024, 8},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 1040, 8},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1048, 8}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1048, 8},
{0, 1080, 1080} /* size of whole struct */ {0, 1080, 1080} /* size of whole struct */
}; };
...@@ -79,6 +80,7 @@ struct fieldinfo db_txn_fields64[] = { ...@@ -79,6 +80,7 @@ struct fieldinfo db_txn_fields64[] = {
{"int (*abort) (DB_TXN *)", 128, 8}, {"int (*abort) (DB_TXN *)", 128, 8},
{"int (*commit) (DB_TXN*, u_int32_t)", 136, 8}, {"int (*commit) (DB_TXN*, u_int32_t)", 136, 8},
{"u_int32_t (*id) (DB_TXN *)", 152, 8}, {"u_int32_t (*id) (DB_TXN *)", 152, 8},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 160, 8},
{0, 184, 184} /* size of whole struct */ {0, 184, 184} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields64[] = { struct fieldinfo db_txn_stat_fields64[] = {
......
...@@ -19,7 +19,7 @@ struct fieldinfo db_env_fields64[] = { ...@@ -19,7 +19,7 @@ struct fieldinfo db_env_fields64[] = {
{"void (*set_errcall) (DB_ENV *, void (*)(const DB_ENV *, const char *, const char *))", 600, 8}, {"void (*set_errcall) (DB_ENV *, void (*)(const DB_ENV *, const char *, const char *))", 600, 8},
{"void (*set_errfile) (DB_ENV *, FILE*)", 616, 8}, {"void (*set_errfile) (DB_ENV *, FILE*)", 616, 8},
{"void (*set_errpfx) (DB_ENV *, const char *)", 632, 8}, {"void (*set_errpfx) (DB_ENV *, const char *)", 632, 8},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 648, 8}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 648, 8},
{"int (*set_flags) (DB_ENV *, u_int32_t, int)", 656, 8}, {"int (*set_flags) (DB_ENV *, u_int32_t, int)", 656, 8},
{"int (*set_tmp_dir) (DB_ENV *, const char *)", 768, 8}, {"int (*set_tmp_dir) (DB_ENV *, const char *)", 768, 8},
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 784, 8}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 784, 8},
...@@ -33,10 +33,11 @@ struct fieldinfo db_env_fields64[] = { ...@@ -33,10 +33,11 @@ struct fieldinfo db_env_fields64[] = {
{"int (*set_lk_max) (DB_ENV *, u_int32_t)", 960, 8}, {"int (*set_lk_max) (DB_ENV *, u_int32_t)", 960, 8},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 968, 8}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 968, 8},
{"int (*set_lk_max_locks) (DB_ENV *, u_int32_t)", 976, 8}, {"int (*set_lk_max_locks) (DB_ENV *, u_int32_t)", 976, 8},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 1088, 8}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 1088, 8},
{"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 1096, 8}, {"int (*set_cachesize) (DB_ENV *, u_int32_t, u_int32_t, int)", 1096, 8},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1328, 8}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1328, 8},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1336, 8}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1336, 8},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 1344, 8},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1352, 8}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1352, 8},
{0, 1400, 1400} /* size of whole struct */ {0, 1400, 1400} /* size of whole struct */
}; };
...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields64[] = { ...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields64[] = {
{"int (*abort) (DB_TXN *)", 176, 8}, {"int (*abort) (DB_TXN *)", 176, 8},
{"int (*commit) (DB_TXN*, u_int32_t)", 184, 8}, {"int (*commit) (DB_TXN*, u_int32_t)", 184, 8},
{"u_int32_t (*id) (DB_TXN *)", 200, 8}, {"u_int32_t (*id) (DB_TXN *)", 200, 8},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 208, 8},
{0, 240, 240} /* size of whole struct */ {0, 240, 240} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields64[] = { struct fieldinfo db_txn_stat_fields64[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 616, 8}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 616, 8},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 624, 8}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 624, 8},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 632, 8}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 632, 8},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 664, 8}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 664, 8},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 704, 8}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 704, 8},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 744, 8}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 744, 8},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 784, 8}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 784, 8},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 968, 8}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 968, 8},
...@@ -37,6 +37,7 @@ struct fieldinfo db_env_fields64[] = { ...@@ -37,6 +37,7 @@ struct fieldinfo db_env_fields64[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1616, 8}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1616, 8},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1632, 8}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1632, 8},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1640, 8}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1640, 8},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 1648, 8},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1656, 8}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1656, 8},
{0, 1696, 1696} /* size of whole struct */ {0, 1696, 1696} /* size of whole struct */
}; };
...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields64[] = { ...@@ -85,6 +86,7 @@ struct fieldinfo db_txn_fields64[] = {
{"int (*abort) (DB_TXN *)", 184, 8}, {"int (*abort) (DB_TXN *)", 184, 8},
{"int (*commit) (DB_TXN*, u_int32_t)", 192, 8}, {"int (*commit) (DB_TXN*, u_int32_t)", 192, 8},
{"u_int32_t (*id) (DB_TXN *)", 216, 8}, {"u_int32_t (*id) (DB_TXN *)", 216, 8},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 224, 8},
{0, 264, 264} /* size of whole struct */ {0, 264, 264} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields64[] = { struct fieldinfo db_txn_stat_fields64[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 624, 8}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 624, 8},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 632, 8}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 632, 8},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 640, 8}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 640, 8},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 672, 8}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 672, 8},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 712, 8}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 712, 8},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 752, 8}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 752, 8},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 792, 8}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 792, 8},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 968, 8}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 968, 8},
...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields64[] = { ...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields64[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1720, 8}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1720, 8},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1736, 8}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1736, 8},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1744, 8}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1744, 8},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 1752, 8},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1760, 8}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1760, 8},
{0, 1800, 1800} /* size of whole struct */ {0, 1800, 1800} /* size of whole struct */
}; };
...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields64[] = { ...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields64[] = {
{"int (*abort) (DB_TXN *)", 184, 8}, {"int (*abort) (DB_TXN *)", 184, 8},
{"int (*commit) (DB_TXN*, u_int32_t)", 192, 8}, {"int (*commit) (DB_TXN*, u_int32_t)", 192, 8},
{"u_int32_t (*id) (DB_TXN *)", 216, 8}, {"u_int32_t (*id) (DB_TXN *)", 216, 8},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 224, 8},
{0, 264, 264} /* size of whole struct */ {0, 264, 264} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields64[] = { struct fieldinfo db_txn_stat_fields64[] = {
......
...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = { ...@@ -14,8 +14,8 @@ struct fieldinfo db_env_fields64[] = {
{"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 648, 8}, {"int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t)", 648, 8},
{"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 656, 8}, {"int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t)", 656, 8},
{"void (*err) (const DB_ENV *, int, const char *, ...)", 664, 8}, {"void (*err) (const DB_ENV *, int, const char *, ...)", 664, 8},
{"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 696, 8}, {"int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *)", 696, 8},
{"int (*get_flags) (DB_ENV *, u_int32_t *)", 744, 8}, {"int (*get_flags) (DB_ENV *, u_int32_t *)", 744, 8},
{"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 784, 8}, {"int (*get_lg_max) (DB_ENV *, u_int32_t*)", 784, 8},
{"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 824, 8}, {"int (*get_lk_max_locks) (DB_ENV *, u_int32_t *)", 824, 8},
{"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 1008, 8}, {"int (*log_archive) (DB_ENV *, char **[], u_int32_t)", 1008, 8},
...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields64[] = { ...@@ -36,6 +36,7 @@ struct fieldinfo db_env_fields64[] = {
{"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1792, 8}, {"int (*set_verbose) (DB_ENV *, u_int32_t, int)", 1792, 8},
{"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1808, 8}, {"int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t)", 1808, 8},
{"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1816, 8}, {"int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t)", 1816, 8},
{"int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)", 1824, 8},
{"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1832, 8}, {"int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t)", 1832, 8},
{0, 1872, 1872} /* size of whole struct */ {0, 1872, 1872} /* size of whole struct */
}; };
...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields64[] = { ...@@ -84,6 +85,7 @@ struct fieldinfo db_txn_fields64[] = {
{"int (*abort) (DB_TXN *)", 192, 8}, {"int (*abort) (DB_TXN *)", 192, 8},
{"int (*commit) (DB_TXN*, u_int32_t)", 200, 8}, {"int (*commit) (DB_TXN*, u_int32_t)", 200, 8},
{"u_int32_t (*id) (DB_TXN *)", 224, 8}, {"u_int32_t (*id) (DB_TXN *)", 224, 8},
{"int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE])", 232, 8},
{0, 272, 272} /* size of whole struct */ {0, 272, 272} /* size of whole struct */
}; };
struct fieldinfo db_txn_stat_fields64[] = { struct fieldinfo db_txn_stat_fields64[] = {
......
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -213,19 +215,19 @@ struct __toku_db_env { ...@@ -213,19 +215,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -238,8 +240,8 @@ struct __toku_db_env { ...@@ -238,8 +240,8 @@ struct __toku_db_env {
int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t); int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t);
int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t); int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t);
void (*err) (const DB_ENV *, int, const char *, ...); void (*err) (const DB_ENV *, int, const char *, ...);
int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *); int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *);
int (*get_flags) (DB_ENV *, u_int32_t *); int (*get_flags) (DB_ENV *, u_int32_t *);
int (*get_lg_max) (DB_ENV *, u_int32_t*); int (*get_lg_max) (DB_ENV *, u_int32_t*);
int (*get_lk_max_locks) (DB_ENV *, u_int32_t *); int (*get_lk_max_locks) (DB_ENV *, u_int32_t *);
int (*log_archive) (DB_ENV *, char **[], u_int32_t); int (*log_archive) (DB_ENV *, char **[], u_int32_t);
...@@ -260,6 +262,7 @@ struct __toku_db_env { ...@@ -260,6 +262,7 @@ struct __toku_db_env {
int (*set_verbose) (DB_ENV *, u_int32_t, int); int (*set_verbose) (DB_ENV *, u_int32_t, int);
int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t); int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t);
int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t); int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t);
int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags);
int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t); int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t);
}; };
struct __toku_db_key_range { struct __toku_db_key_range {
...@@ -354,13 +357,14 @@ struct __toku_db_txn { ...@@ -354,13 +357,14 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/;
DB_TXN *parent; DB_TXN *parent;
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void *api_internal; void *api_internal;
int (*abort) (DB_TXN *); int (*abort) (DB_TXN *);
int (*commit) (DB_TXN*, u_int32_t); int (*commit) (DB_TXN*, u_int32_t);
u_int32_t (*id) (DB_TXN *); u_int32_t (*id) (DB_TXN *);
int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE]);
}; };
struct __toku_db_txn_stat { struct __toku_db_txn_stat {
u_int32_t st_nactive; u_int32_t st_nactive;
......
#ifndef _DB_H #ifndef _DB_H
#define _DB_H #define _DB_H
/* This code generated by make_db_h. Copyright (c) 2007, 2008 Tokutek */ /* This code generated by make_db_h. Copyright (c) 2007-2011 Tokutek */
#ident "Copyright (c) 2007, 2008 Tokutek Inc. All rights reserved." #ident "Copyright (c) 2007-2011 Tokutek Inc. All rights reserved."
#include <sys/types.h> #include <sys/types.h>
/*stdio is needed for the FILE* in db->verify*/ /*stdio is needed for the FILE* in db->verify*/
#include <stdio.h> #include <stdio.h>
...@@ -23,6 +23,7 @@ extern "C" { ...@@ -23,6 +23,7 @@ extern "C" {
#define TOKU_OFF_T_DEFINED #define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t; typedef int64_t toku_off_t;
#endif #endif
#define DB_GID_SIZE 128
typedef struct __toku_db_env DB_ENV; typedef struct __toku_db_env DB_ENV;
typedef struct __toku_db_key_range DB_KEY_RANGE; typedef struct __toku_db_key_range DB_KEY_RANGE;
typedef struct __toku_db_lsn DB_LSN; typedef struct __toku_db_lsn DB_LSN;
...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE; ...@@ -32,6 +33,7 @@ typedef struct __toku_db_txn_active DB_TXN_ACTIVE;
typedef struct __toku_db_txn_stat DB_TXN_STAT; typedef struct __toku_db_txn_stat DB_TXN_STAT;
typedef struct __toku_dbc DBC; typedef struct __toku_dbc DBC;
typedef struct __toku_dbt DBT; typedef struct __toku_dbt DBT;
typedef struct __toku_db_preplist { DB_TXN *txn; uint8_t gid[DB_GID_SIZE]; } DB_PREPLIST;
typedef u_int32_t db_recno_t; typedef u_int32_t db_recno_t;
typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*); typedef int(*YDB_CALLBACK_FUNCTION)(DBT const*, DBT const*, void*);
#include <tdb-internal.h> #include <tdb-internal.h>
...@@ -213,19 +215,19 @@ struct __toku_db_env { ...@@ -213,19 +215,19 @@ struct __toku_db_env {
int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags); int (*create_loader) (DB_ENV *env, DB_TXN *txn, DB_LOADER **blp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t dbt_flags[/*N*/], uint32_t loader_flags);
int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags); int (*create_indexer) (DB_ENV *env, DB_TXN *txn, DB_INDEXER **idxrp, DB *src_db, int N, DB *dbs[/*N*/], uint32_t db_flags[/*N*/], uint32_t indexer_flags);
int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*put_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, DBT *vals, uint32_t *flags_array) /* insert into multiple DBs */;
int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put); int (*set_generate_row_callback_for_put) (DB_ENV *env, generate_row_for_put_func generate_row_for_put);
int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*del_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
const DBT *src_key, const DBT *src_val, const DBT *src_key, const DBT *src_val,
uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */; uint32_t num_dbs, DB **db_array, DBT *keys, uint32_t *flags_array) /* delete from multiple DBs */;
int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del); int (*set_generate_row_callback_for_del) (DB_ENV *env, generate_row_for_del_func generate_row_for_del);
int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn, int (*update_multiple) (DB_ENV *env, DB *src_db, DB_TXN *txn,
DBT *old_src_key, DBT *old_src_data, DBT *old_src_key, DBT *old_src_data,
DBT *new_src_key, DBT *new_src_data, DBT *new_src_key, DBT *new_src_data,
uint32_t num_dbs, DB **db_array, uint32_t *flags_array, uint32_t num_dbs, DB **db_array, uint32_t *flags_array,
uint32_t num_keys, DBT *keys, uint32_t num_keys, DBT *keys,
uint32_t num_vals, DBT *vals) /* update multiple DBs */; uint32_t num_vals, DBT *vals) /* update multiple DBs */;
int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */; int (*get_redzone) (DB_ENV *env, int *redzone) /* get the redzone limit */;
int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */; int (*set_redzone) (DB_ENV *env, int redzone) /* set the redzone limit in percent of total space */;
int (*set_lk_max_memory) (DB_ENV *env, uint64_t max); int (*set_lk_max_memory) (DB_ENV *env, uint64_t max);
...@@ -238,8 +240,8 @@ struct __toku_db_env { ...@@ -238,8 +240,8 @@ struct __toku_db_env {
int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t); int (*dbremove) (DB_ENV *, DB_TXN *, const char *, const char *, u_int32_t);
int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t); int (*dbrename) (DB_ENV *, DB_TXN *, const char *, const char *, const char *, u_int32_t);
void (*err) (const DB_ENV *, int, const char *, ...); void (*err) (const DB_ENV *, int, const char *, ...);
int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *); int (*get_cachesize) (DB_ENV *, u_int32_t *, u_int32_t *, int *);
int (*get_flags) (DB_ENV *, u_int32_t *); int (*get_flags) (DB_ENV *, u_int32_t *);
int (*get_lg_max) (DB_ENV *, u_int32_t*); int (*get_lg_max) (DB_ENV *, u_int32_t*);
int (*get_lk_max_locks) (DB_ENV *, u_int32_t *); int (*get_lk_max_locks) (DB_ENV *, u_int32_t *);
int (*log_archive) (DB_ENV *, char **[], u_int32_t); int (*log_archive) (DB_ENV *, char **[], u_int32_t);
...@@ -260,6 +262,7 @@ struct __toku_db_env { ...@@ -260,6 +262,7 @@ struct __toku_db_env {
int (*set_verbose) (DB_ENV *, u_int32_t, int); int (*set_verbose) (DB_ENV *, u_int32_t, int);
int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t); int (*txn_begin) (DB_ENV *, DB_TXN *, DB_TXN **, u_int32_t);
int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t); int (*txn_checkpoint) (DB_ENV *, u_int32_t, u_int32_t, u_int32_t);
int (*txn_recover) (DB_ENV *, DB_PREPLIST preplist[/*count*/], long count, /*out*/ long *retp, u_int32_t flags);
int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t); int (*txn_stat) (DB_ENV *, DB_TXN_STAT **, u_int32_t);
}; };
struct __toku_db_key_range { struct __toku_db_key_range {
...@@ -354,13 +357,14 @@ struct __toku_db_txn { ...@@ -354,13 +357,14 @@ struct __toku_db_txn {
DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/; DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/;
DB_TXN *parent; DB_TXN *parent;
int (*txn_stat)(DB_TXN *, struct txn_stat **); int (*txn_stat)(DB_TXN *, struct txn_stat **);
struct { void *next, *prev; } open_txns; struct toku_list open_txns;
int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*); int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*); int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
void *api_internal; void *api_internal;
int (*abort) (DB_TXN *); int (*abort) (DB_TXN *);
int (*commit) (DB_TXN*, u_int32_t); int (*commit) (DB_TXN*, u_int32_t);
u_int32_t (*id) (DB_TXN *); u_int32_t (*id) (DB_TXN *);
int (*prepare) (DB_TXN*, u_int8_t gid[DB_GID_SIZE]);
}; };
struct __toku_db_txn_stat { struct __toku_db_txn_stat {
u_int32_t st_nactive; u_int32_t st_nactive;
......
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