From c83bd8f03dc6525f11a8c3b44f405f229795b523 Mon Sep 17 00:00:00 2001 From: Rich Prohaska Date: Wed, 2 Jan 2008 16:00:18 +0000 Subject: [PATCH] stubs waiting for locking to be implemented. addresses #230 git-svn-id: file:///svn/tokudb@1467 c7de825b-a66e-492c-adef-691d508d4ae1 --- cxx/dbenv.cpp | 14 ++++++++++++++ include/db_cxx.h | 17 +++++++++++++---- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/cxx/dbenv.cpp b/cxx/dbenv.cpp index 250829f6845..45fd87915fe 100644 --- a/cxx/dbenv.cpp +++ b/cxx/dbenv.cpp @@ -119,3 +119,17 @@ void DbEnv::set_errcall(void (*db_errcall_fcn)(const DbEnv *, const char *, cons errcall = db_errcall_fcn; the_env->set_errcall(the_env, toku_db_env_errcall_c); } + +// locking not yet implemented + +int DbEnv::set_lk_max_locks(u_int32_t max_locks) { + return 0; +} + +int DbEnv::set_lk_max_lockers(u_int32_t max_lockers) { + return 0; +} + +int DbEnv::set_lk_max_objects(u_int32_t max_objects) { + return 0; +} diff --git a/include/db_cxx.h b/include/db_cxx.h index ce386d59a20..b5b526740dc 100644 --- a/include/db_cxx.h +++ b/include/db_cxx.h @@ -153,10 +153,6 @@ class DbEnv { int open(const char *, u_int32_t, int); int set_cachesize(u_int32_t, u_int32_t, int); int set_flags(u_int32_t, int); -#if DB_VERSION_MAJOR<4 || (DB_VERSION_MAJOR==4 && DB_VERSION_MINOR<=4) - // set_lk_max is only defined for versions up to 4.4 - int set_lk_max(u_int32_t); -#endif int txn_begin(DbTxn *, DbTxn **, u_int32_t); int set_data_dir(const char *dir); void set_errpfx(const char *errpfx); @@ -164,6 +160,19 @@ class DbEnv { void set_errfile(FILE *errfile); void set_errcall(void (*)(const DbEnv *, const char *, const char *)); + // locking +#if DB_VERSION_MAJOR<4 || (DB_VERSION_MAJOR==4 && DB_VERSION_MINOR<=4) + // set_lk_max is only defined for versions up to 4.4 + int set_lk_max(u_int32_t); +#endif + int set_lk_max_locks(u_int32_t); + int get_lk_max_locks(u_int32_t *); + int set_lk_max_lockers(u_int32_t); + int get_lk_max_lockers(u_int32_t *); + int set_lk_max_objects(u_int32_t); + int get_lk_max_objects(u_int32_t *); + +// somewhat_private: int do_no_exceptions; // This should be private!!! void (*errcall)(const DbEnv *, const char *, const char *);