mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
de47452c10
git-svn-id: file:///svn/tokudb@276 c7de825b-a66e-492c-adef-691d508d4ae1
35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
#ifndef BRT_H
|
|
#define BRT_H
|
|
|
|
// This must be first to make the 64-bit file mode work right in Linux
|
|
#define _FILE_OFFSET_BITS 64
|
|
#include "brttypes.h"
|
|
|
|
#include "ybt.h"
|
|
#include "../include/db.h"
|
|
#include "cachetable.h"
|
|
typedef struct brt *BRT;
|
|
int open_brt (const char *fname, const char *dbname, int is_create, BRT *, int nodesize, CACHETABLE, int(*)(DB*,const DBT*,const DBT*));
|
|
//int brt_create (BRT **, int nodesize, int n_nodes_in_cache); /* the nodesize and n_nodes in cache really should be separately configured. */
|
|
//int brt_open (BRT *, char *fname, char *dbname);
|
|
int brt_insert (BRT brt, DBT *k, DBT *v, DB*db);
|
|
int brt_lookup (BRT brt, DBT *k, DBT *v, DB*db);
|
|
int close_brt (BRT);
|
|
int dump_brt (BRT brt);
|
|
void brt_fsync (BRT); /* fsync, but don't clear the caches. */
|
|
|
|
void brt_flush (BRT); /* fsync and clear the caches. */
|
|
|
|
int brt_create_cachetable (CACHETABLE *t, int n_cachlines /* Pass 0 if you want the default. */);
|
|
|
|
extern int brt_debug_mode;
|
|
int verify_brt (BRT brt);
|
|
|
|
int show_brt_blocknumbers(BRT);
|
|
|
|
typedef struct brt_cursor *BRT_CURSOR;
|
|
int brt_cursor (BRT, BRT_CURSOR*);
|
|
int brt_c_get (BRT_CURSOR cursor, DBT *kbt, DBT *vbt, int brtc_flags);
|
|
int brt_cursor_close (BRT_CURSOR curs);
|
|
|
|
#endif
|