summaryrefslogtreecommitdiff
path: root/sql/ha_berkeley.cc
diff options
context:
space:
mode:
authorunknown <andrey@lmy004.>2005-11-12 11:56:16 +0100
committerunknown <andrey@lmy004.>2005-11-12 11:56:16 +0100
commit029fb8741ce9c977c4661283238af3599373199d (patch)
treefa3b8789af1c14d18979cd6039fe8458a3a07621 /sql/ha_berkeley.cc
parent2d4711a1b25d36dc4ca5b68b32eab06a9469a474 (diff)
downloadmariadb-git-029fb8741ce9c977c4661283238af3599373199d.tar.gz
2 More --bdb variables (fix for bug #14895)
- added bdb-cache-parts - modified bdb-cache-size to support more than 4G - added bdb-region-size (size of memory pool for storing file names used in transaction) sql/ha_berkeley.cc: - added bdb-cache-parts - modified bdb-cache-size to support more than 4G - added bdb-region-size (size of memory pool for storing file names used in transaction) sql/ha_berkeley.h: - added bdb-cache-parts - modified bdb-cache-size to support more than 4G - added bdb-region-size (size of memory pool for storing file names used in transaction) sql/mysqld.cc: - added bdb-cache-parts - modified bdb-cache-size to support more than 4G - added bdb-region-size (size of memory pool for storing file names used in transaction) sql/set_var.cc: - added bdb-cache-parts - modified bdb-cache-size to support more than 4G - added bdb-region-size (size of memory pool for storing file names used in transaction)
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r--sql/ha_berkeley.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index eeca6cb1657..e45d0592578 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -78,9 +78,11 @@ const char *ha_berkeley_ext=".db";
bool berkeley_shared_data=0;
u_int32_t berkeley_init_flags= DB_PRIVATE | DB_RECOVER, berkeley_env_flags=0,
berkeley_lock_type=DB_LOCK_DEFAULT;
-ulong berkeley_cache_size, berkeley_log_buffer_size, berkeley_log_file_size=0;
+ulong berkeley_log_buffer_size=0 , berkeley_log_file_size=0;
+ulonglong berkeley_cache_size= 0;
char *berkeley_home, *berkeley_tmpdir, *berkeley_logdir;
long berkeley_lock_scan_time=0;
+ulong berkeley_region_size=0, berkeley_cache_parts=1;
ulong berkeley_trans_retry=1;
ulong berkeley_max_lock;
pthread_mutex_t bdb_mutex;
@@ -204,10 +206,17 @@ bool berkeley_init(void)
DB_VERB_DEADLOCK | DB_VERB_RECOVERY,
1);
- db_env->set_cachesize(db_env, 0, berkeley_cache_size, 0);
+ if (berkeley_cache_size > (uint) ~0)
+ db_env->set_cachesize(db_env, berkeley_cache_size / (1024*1024L*1024L),
+ berkeley_cache_size % (1024L*1024L*1024L),
+ berkeley_cache_parts);
+ else
+ db_env->set_cachesize(db_env, 0, berkeley_cache_size, berkeley_cache_parts);
+
db_env->set_lg_max(db_env, berkeley_log_file_size);
db_env->set_lg_bsize(db_env, berkeley_log_buffer_size);
db_env->set_lk_detect(db_env, berkeley_lock_type);
+ db_env->set_lg_regionmax(db_env, berkeley_region_size);
if (berkeley_max_lock)
db_env->set_lk_max(db_env, berkeley_max_lock);