summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/ft_boolean_search.c4
-rw-r--r--storage/myisam/ft_nlq_search.c4
-rw-r--r--storage/myisam/ft_parser.c5
-rw-r--r--storage/myisam/ft_stopwords.c3
-rw-r--r--storage/myisam/mi_check.c6
-rw-r--r--storage/myisam/mi_write.c6
-rw-r--r--storage/myisam/myisamlog.c5
-rw-r--r--storage/myisam/myisampack.c4
-rw-r--r--storage/myisam/sort.c4
9 files changed, 22 insertions, 19 deletions
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index 8b61e1dc4f2..1b31b4b1da3 100644
--- a/storage/myisam/ft_boolean_search.c
+++ b/storage/myisam/ft_boolean_search.c
@@ -550,7 +550,7 @@ static void _ftb_init_index_search(FT_INFO *ftb)
/* 4 */
if (!is_tree_inited(& ftb->no_dupes))
init_tree(& ftb->no_dupes,0,0,sizeof(my_off_t),
- _ftb_no_dupes_cmp,0,0,0);
+ _ftb_no_dupes_cmp,0,0,0);
else
reset_tree(& ftb->no_dupes);
}
@@ -583,7 +583,7 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query,
bzero(& ftb->no_dupes, sizeof(TREE));
ftb->last_word= 0;
- init_alloc_root(&ftb->mem_root, 1024, 1024);
+ init_alloc_root(&ftb->mem_root, 1024, 1024, 0);
ftb->queue.max_elements= 0;
if (!(ftbe=(FTB_EXPR *)alloc_root(&ftb->mem_root, sizeof(FTB_EXPR))))
goto err;
diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c
index bafa7064e28..e7e27870762 100644
--- a/storage/myisam/ft_nlq_search.c
+++ b/storage/myisam/ft_nlq_search.c
@@ -248,8 +248,8 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query,
bzero(&wtree,sizeof(wtree));
- init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,0,
- NULL, NULL);
+ init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,
+ NULL, NULL, 0);
ft_parse_init(&wtree, aio.charset);
ftparser_param->flags= 0;
diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c
index c534a9a060b..5d271f4d361 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -249,7 +249,8 @@ void ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
{
DBUG_ENTER("ft_parse_init");
if (!is_tree_inited(wtree))
- init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp,0,0,(void*)cs);
+ init_tree(wtree, 0, 0, sizeof(FT_WORD), (qsort_cmp2)&FT_WORD_cmp, 0,
+ (void*)cs, 0);
DBUG_VOID_RETURN;
}
@@ -341,7 +342,7 @@ MYSQL_FTPARSER_PARAM* ftparser_alloc_param(MI_INFO *info)
info->ftparser_param= (MYSQL_FTPARSER_PARAM *)
my_malloc(MAX_PARAM_NR * sizeof(MYSQL_FTPARSER_PARAM) *
info->s->ftkeys, MYF(MY_WME | MY_ZEROFILL));
- init_alloc_root(&info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0);
+ init_alloc_root(&info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, 0);
}
return info->ftparser_param;
}
diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c
index 8f6f9308d3c..84eda800f6a 100644
--- a/storage/myisam/ft_stopwords.c
+++ b/storage/myisam/ft_stopwords.c
@@ -61,9 +61,8 @@ int ft_init_stopwords()
if (!(stopwords3=(TREE *)my_malloc(sizeof(TREE),MYF(0))))
DBUG_RETURN(-1);
init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp,
- 0,
(ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0),
- NULL);
+ NULL, 0);
/*
Stopword engine currently does not support tricky
character sets UCS2, UTF16, UTF32.
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index ef3a6bc2864..29b513b1451 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -2299,7 +2299,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, FTPARSER_MEMROOT_ALLOC_SIZE, 0);
+ init_alloc_root(&sort_param.wordroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0,
+ param->malloc_flags);
if (share->data_file_type == DYNAMIC_RECORD)
length=max(share->base.min_pack_length+1,share->base.min_block_length);
@@ -2869,7 +2870,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, FTPARSER_MEMROOT_ALLOC_SIZE, 0);
+ init_alloc_root(&sort_param[i].wordroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0,
+ param->malloc_flags);
}
}
sort_info.total_keys=i;
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 70cc96d0cba..5d218ecf0d2 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -544,7 +544,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
/* yup. converting */
info->ft1_to_ft2=(DYNAMIC_ARRAY *)
my_malloc(sizeof(DYNAMIC_ARRAY), MYF(MY_WME));
- my_init_dynamic_array(info->ft1_to_ft2, ft2len, 300, 50);
+ my_init_dynamic_array(info->ft1_to_ft2, ft2len, 300, 50, 0);
/*
now, adding all keys from the page to dynarray
@@ -1013,8 +1013,8 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
init_tree(&info->bulk_insert[i],
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
- (qsort_cmp2)keys_compare, 0,
- (tree_element_free) keys_free, (void *)params++);
+ (qsort_cmp2)keys_compare,
+ (tree_element_free) keys_free, (void *)params++, 0);
}
else
info->bulk_insert[i].root=0;
diff --git a/storage/myisam/myisamlog.c b/storage/myisam/myisamlog.c
index 3314f1b94ac..1624213851b 100644
--- a/storage/myisam/myisamlog.c
+++ b/storage/myisam/myisamlog.c
@@ -329,8 +329,9 @@ static int examine_log(char * file_name, char **table_names)
init_io_cache(&cache,file,0,READ_CACHE,start_offset,0,MYF(0));
bzero((uchar*) com_count,sizeof(com_count));
- init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,1,
- (tree_element_free) file_info_free, NULL);
+ init_tree(&tree,0,0,sizeof(file_info),(qsort_cmp2) file_info_compare,
+ (tree_element_free) file_info_free, NULL,
+ MYF(MY_TREE_WITH_DELETE));
(void) init_key_cache(dflt_key_cache,KEY_CACHE_BLOCK_SIZE,KEY_CACHE_SIZE,
0, 0, 0);
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 5d6b03ff4b8..c1a2cd496e5 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -816,8 +816,8 @@ static HUFF_COUNTS *init_huff_count(MI_INFO *info,my_off_t records)
'tree_pos'. It's keys are implemented by pointers into 'tree_buff'.
This is accomplished by '-1' as the element size.
*/
- init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree,0, NULL,
- NULL);
+ init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL,
+ NULL, 0);
if (records && type != FIELD_BLOB && type != FIELD_VARCHAR)
count[i].tree_pos=count[i].tree_buff =
my_malloc(count[i].field_length > 1 ? tree_buff_length : 2,
diff --git a/storage/myisam/sort.c b/storage/myisam/sort.c
index 2c4639b3143..f5c0f04d877 100644
--- a/storage/myisam/sort.c
+++ b/storage/myisam/sort.c
@@ -165,7 +165,7 @@ int _create_index_by_sort(MI_SORT_PARAM *info,my_bool no_messages,
HA_FT_MAXBYTELEN, MYF(0))))
{
if (my_init_dynamic_array(&buffpek, sizeof(BUFFPEK), maxbuffer,
- maxbuffer/2))
+ maxbuffer/2, 0))
{
my_free(sort_keys);
sort_keys= 0;
@@ -389,7 +389,7 @@ pthread_handler_t thr_find_all_keys(void *arg)
HA_FT_MAXBYTELEN : 0), MYF(0))))
{
if (my_init_dynamic_array(&sort_param->buffpek, sizeof(BUFFPEK),
- maxbuffer, maxbuffer/2))
+ maxbuffer, maxbuffer/2, 0))
{
my_free(sort_keys);
sort_keys= (uchar **) NULL; /* for err: label */