diff options
author | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-06-26 10:08:55 +0530 |
---|---|---|
committer | Arun Kuruvila <arun.kuruvila@oracle.com> | 2014-06-26 10:08:55 +0530 |
commit | 76d3e3bccbc059d688bb2ff4340a72a7f4c47514 (patch) | |
tree | a4515b0f0e5db86941ffaefbbff81ce76c97a841 /storage/heap | |
parent | cdf72d51c631aecb46505ff94cdb9ef667d4444c (diff) | |
download | mariadb-git-76d3e3bccbc059d688bb2ff4340a72a7f4c47514.tar.gz |
Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH
CERTAIN MAX_HEAP_TABLE_SIZE VALUES
Followup patch to fix failure on Window machine.
Diffstat (limited to 'storage/heap')
-rw-r--r-- | storage/heap/hp_block.c | 2 | ||||
-rw-r--r-- | storage/heap/hp_create.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/heap/hp_block.c b/storage/heap/hp_block.c index 33590e31af4..f16b30aa47a 100644 --- a/storage/heap/hp_block.c +++ b/storage/heap/hp_block.c @@ -75,7 +75,7 @@ int hp_get_new_block(HP_BLOCK *block, size_t *alloc_length) This doesn't add much overhead - with current values of sizeof(HP_PTRS) and my_default_record_cache_size we get about 1/128 unused memory. */ - *alloc_length= sizeof(HP_PTRS)* i + (ulong) block->records_in_block * + *alloc_length= sizeof(HP_PTRS)* i + (ulonglong) block->records_in_block * block->recbuffer; if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME)))) return 1; diff --git a/storage/heap/hp_create.c b/storage/heap/hp_create.c index f62eae1bd74..93928cd479e 100644 --- a/storage/heap/hp_create.c +++ b/storage/heap/hp_create.c @@ -240,7 +240,7 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records, records_in_block= max_records / 10; if (records_in_block < 10 && max_records) records_in_block= 10; - if (!records_in_block || (ulong) records_in_block * recbuffer > + if (!records_in_block || (ulonglong) records_in_block * recbuffer > (my_default_record_cache_size-sizeof(HP_PTRS)*HP_MAX_LEVELS)) records_in_block= (my_default_record_cache_size - sizeof(HP_PTRS) * HP_MAX_LEVELS) / recbuffer + 1; |