diff options
Diffstat (limited to 'storage/myisam/mi_check.c')
-rw-r--r-- | storage/myisam/mi_check.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index 3f3c60a4249..88c6a4837e4 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -2139,7 +2139,7 @@ int filecopy(HA_CHECK *param, File to,File from,my_off_t start, DBUG_ENTER("filecopy"); buff_length=(ulong) MY_MIN(param->write_buffer_length,length); - if (!(buff=my_malloc(buff_length,MYF(0)))) + if (!(buff=my_malloc(mi_key_memory_filecopy, buff_length, MYF(0)))) { buff=tmp_buff; buff_length=IO_SIZE; } @@ -2294,8 +2294,8 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info, mysql_file_seek(param->read_cache.file, 0L, MY_SEEK_END, MYF(0)); sort_param.wordlist=NULL; - init_alloc_root(&sort_param.wordroot, "sort", FTPARSER_MEMROOT_ALLOC_SIZE, 0, - MYF(param->malloc_flags)); + init_alloc_root(mi_key_memory_MI_SORT_PARAM_wordroot, &sort_param.wordroot, + FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(param->malloc_flags)); if (share->data_file_type == DYNAMIC_RECORD) length=MY_MAX(share->base.min_pack_length+1,share->base.min_block_length); @@ -2789,7 +2789,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, if (share->options & HA_OPTION_COMPRESS_RECORD) set_if_bigger(max_pack_reclength, share->max_pack_length); if (!(sort_param=(MI_SORT_PARAM *) - my_malloc((uint) share->base.keys * + my_malloc(mi_key_memory_MI_SORT_PARAM, (uint) share->base.keys * (sizeof(MI_SORT_PARAM) + max_pack_reclength), MYF(MY_ZEROFILL)))) { @@ -2872,8 +2872,8 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, uint ft_max_word_len_for_sort=FT_MAX_WORD_LEN_FOR_SORT* sort_param[i].keyinfo->seg->charset->mbmaxlen; sort_param[i].key_length+=ft_max_word_len_for_sort-HA_FT_MAXBYTELEN; - init_alloc_root(&sort_param[i].wordroot, "sort", - FTPARSER_MEMROOT_ALLOC_SIZE, 0, + init_alloc_root(mi_key_memory_MI_SORT_PARAM_wordroot, + &sort_param[i].wordroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(param->malloc_flags)); } } @@ -3717,7 +3717,8 @@ int sort_write_record(MI_SORT_PARAM *sort_param) MI_DYN_DELETE_BLOCK_HEADER; if (sort_info->buff_length < reclength) { - if (!(sort_info->buff=my_realloc(sort_info->buff, (uint) reclength, + if (!(sort_info->buff=my_realloc(mi_key_memory_SORT_INFO_buffer, + sort_info->buff, (uint) reclength, MYF(MY_FREE_ON_ERROR | MY_WME | MY_ALLOW_ZERO_PTR)))) DBUG_RETURN(1); @@ -3934,7 +3935,8 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a) sort_info->info->s->rec_reflength) && (sort_info->info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD))) - ft_buf=(SORT_FT_BUF *)my_malloc(sort_param->keyinfo->block_length + + ft_buf=(SORT_FT_BUF *)my_malloc(mi_key_memory_SORT_FT_BUF, + sort_param->keyinfo->block_length + sizeof(SORT_FT_BUF), MYF(MY_WME)); if (!ft_buf) @@ -4205,7 +4207,8 @@ static SORT_KEY_BLOCKS *alloc_key_blocks(HA_CHECK *param, uint blocks, SORT_KEY_BLOCKS *block; DBUG_ENTER("alloc_key_blocks"); - if (!(block=(SORT_KEY_BLOCKS*) my_malloc((sizeof(SORT_KEY_BLOCKS)+ + if (!(block=(SORT_KEY_BLOCKS*) my_malloc(mi_key_memory_SORT_KEY_BLOCKS, + (sizeof(SORT_KEY_BLOCKS)+ buffer_length+IO_SIZE)*blocks, MYF(0)))) { |