summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2008-05-17 12:53:47 +0500
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2008-05-17 12:53:47 +0500
commitf197f3abb40c8af4687e7535e9dc53bf4621b939 (patch)
tree14912bca5b392586418943e5f220efabbd62a5ea /sql/handler.cc
parenteee5b972581f8aac8490c7b57209808bc2068daf (diff)
downloadmariadb-git-f197f3abb40c8af4687e7535e9dc53bf4621b939.tar.gz
Bug #36705 key_buffer_size of >= 2G allocates all availabel virtual memory on 64-bit wondo.
temporary variables of 'long' types were used to store ulong values, that causes init_key_cache to receive distorted parameters sql/handler.cc: Bug #36705 key_buffer_size of >= 2G allocates all availabel virtual memory on 64-bit wondo. types of temporary variables changed to match init_key_cache() parameters
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 40b85a0901c..0de772e366b 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -2350,8 +2350,8 @@ int ha_init_key_cache(const char *name, KEY_CACHE *key_cache)
if (!key_cache->key_cache_inited)
{
pthread_mutex_lock(&LOCK_global_system_variables);
- long tmp_buff_size= (long) key_cache->param_buff_size;
- long tmp_block_size= (long) key_cache->param_block_size;
+ ulong tmp_buff_size= (ulong) key_cache->param_buff_size;
+ uint tmp_block_size= (uint) key_cache->param_block_size;
uint division_limit= key_cache->param_division_limit;
uint age_threshold= key_cache->param_age_threshold;
pthread_mutex_unlock(&LOCK_global_system_variables);