mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
Bug#18463911 : SERVER CRASHES ON CREATING A TEMP TABLE WITH
CERTAIN MAX_HEAP_TABLE_SIZE VALUES Followup patch to fix failure on Window machine.
This commit is contained in:
parent
f499292522
commit
dd31a2c27b
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
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.
|
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;
|
block->recbuffer;
|
||||||
if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME))))
|
if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME))))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -240,7 +240,7 @@ static void init_block(HP_BLOCK *block, uint reclength, ulong min_records,
|
||||||
records_in_block= max_records / 10;
|
records_in_block= max_records / 10;
|
||||||
if (records_in_block < 10 && max_records)
|
if (records_in_block < 10 && max_records)
|
||||||
records_in_block= 10;
|
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))
|
(my_default_record_cache_size-sizeof(HP_PTRS)*HP_MAX_LEVELS))
|
||||||
records_in_block= (my_default_record_cache_size - sizeof(HP_PTRS) *
|
records_in_block= (my_default_record_cache_size - sizeof(HP_PTRS) *
|
||||||
HP_MAX_LEVELS) / recbuffer + 1;
|
HP_MAX_LEVELS) / recbuffer + 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue