summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-23 16:18:09 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-23 16:18:09 +0100
commit682da0aa750c059a4f81fadcdf42c9211602eda7 (patch)
tree965c7ee5c9d87a7158ee74b50edf147ebb67a27a
parenta260b155542179bec75a6bbe1e430bea57b70ad6 (diff)
downloadmariadb-git-682da0aa750c059a4f81fadcdf42c9211602eda7.tar.gz
cleanup: use MYF() for mysys flags
-rw-r--r--client/completion_hash.cc2
-rw-r--r--client/mysql.cc2
-rw-r--r--client/mysqlbinlog.cc4
-rw-r--r--client/mysqlcheck.c4
-rw-r--r--client/mysqldump.c2
-rw-r--r--client/mysqltest.cc8
-rw-r--r--extra/comp_err.c4
-rw-r--r--extra/resolve_stack_dump.c2
-rw-r--r--libmysql/libmysql.c4
-rw-r--r--libmysqld/emb_qcache.cc2
-rw-r--r--libmysqld/lib_sql.cc2
-rw-r--r--mysys/default.c6
-rw-r--r--mysys/ma_dyncol.c2
-rw-r--r--mysys/mf_tempdir.c2
-rw-r--r--mysys/my_lib.c8
-rw-r--r--mysys/tree.c3
-rw-r--r--mysys/waiting_threads.c4
-rw-r--r--sql-common/client.c2
-rw-r--r--sql-common/client_plugin.c2
-rw-r--r--sql/event_data_objects.cc2
-rw-r--r--sql/ha_ndbcluster.cc2
-rw-r--r--sql/ha_ndbcluster_binlog.cc2
-rw-r--r--sql/ha_partition.cc6
-rw-r--r--sql/log.cc2
-rw-r--r--sql/mysqld.cc10
-rw-r--r--sql/rpl_filter.cc2
-rw-r--r--sql/rpl_handler.cc2
-rw-r--r--sql/rpl_handler.h2
-rw-r--r--sql/rpl_mi.cc2
-rw-r--r--sql/rpl_tblmap.cc2
-rw-r--r--sql/rpl_utility.cc2
-rw-r--r--sql/sp_head.cc10
-rw-r--r--sql/sp_pcontext.cc20
-rw-r--r--sql/sql_acl.cc14
-rw-r--r--sql/sql_array.h2
-rw-r--r--sql/sql_audit.cc2
-rw-r--r--sql/sql_base.cc2
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_class.h4
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_plugin.cc10
-rw-r--r--sql/sql_servers.cc2
-rw-r--r--sql/sql_show.cc6
-rw-r--r--sql/sql_trigger.cc4
-rw-r--r--sql/sql_udf.cc2
-rw-r--r--sql/table.cc6
-rw-r--r--sql/tztime.cc6
-rw-r--r--storage/csv/ha_tina.cc4
-rw-r--r--storage/federated/ha_federated.cc4
-rw-r--r--storage/federatedx/federatedx_io_mysql.cc2
-rw-r--r--storage/federatedx/ha_federatedx.cc6
-rw-r--r--storage/maria/ma_bitmap.c2
-rw-r--r--storage/maria/ma_blockrec.c2
-rw-r--r--storage/maria/ma_check.c4
-rw-r--r--storage/maria/ma_ft_nlq_search.c2
-rw-r--r--storage/maria/ma_ft_parser.c4
-rw-r--r--storage/maria/ma_loghandler.c6
-rw-r--r--storage/maria/ma_open.c2
-rw-r--r--storage/maria/ma_sort.c4
-rw-r--r--storage/maria/ma_write.c4
-rw-r--r--storage/maria/maria_pack.c2
-rw-r--r--storage/maria/unittest/sequence_storage.c2
-rw-r--r--storage/myisam/ft_boolean_search.c4
-rw-r--r--storage/myisam/ft_nlq_search.c2
-rw-r--r--storage/myisam/ft_parser.c4
-rw-r--r--storage/myisam/ft_stopwords.c2
-rw-r--r--storage/myisam/mi_check.c4
-rw-r--r--storage/myisam/mi_write.c4
-rw-r--r--storage/myisam/myisampack.c2
-rw-r--r--storage/myisam/sort.c4
-rw-r--r--storage/myisammrg/ha_myisammrg.cc2
71 files changed, 136 insertions, 137 deletions
diff --git a/client/completion_hash.cc b/client/completion_hash.cc
index 1a8bc4d5035..c170b69de2d 100644
--- a/client/completion_hash.cc
+++ b/client/completion_hash.cc
@@ -49,7 +49,7 @@ int completion_hash_init(HashTable *ht, uint nSize)
ht->initialized = 0;
return FAILURE;
}
- init_alloc_root(&ht->mem_root, 8192, 0, 0);
+ init_alloc_root(&ht->mem_root, 8192, 0, MYF(0));
ht->pHashFunction = hashpjw;
ht->nTableSize = nSize;
ht->initialized = 1;
diff --git a/client/mysql.cc b/client/mysql.cc
index c4cfcc4f1ff..38054668411 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1157,7 +1157,7 @@ int main(int argc,char *argv[])
}
glob_buffer.realloc(512);
completion_hash_init(&ht, 128);
- init_alloc_root(&hash_mem_root, 16384, 0, 0);
+ init_alloc_root(&hash_mem_root, 16384, 0, MYF(0));
bzero((char*) &mysql, sizeof(mysql));
if (sql_connect(current_host,current_db,current_user,opt_password,
opt_silent))
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 95e2066cf41..87198347b10 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -279,7 +279,7 @@ public:
int init()
{
return my_init_dynamic_array(&file_names, sizeof(File_name_record),
- 100, 100, 0);
+ 100, 100, MYF(0));
}
void init_by_dir_name(const char *dir)
@@ -2393,7 +2393,7 @@ int main(int argc, char** argv)
my_init_time(); // for time functions
- init_alloc_root(&s_mem_root, 16384, 0, 0);
+ init_alloc_root(&s_mem_root, 16384, 0, MYF(0));
if (load_defaults("my", load_groups, &argc, &argv))
exit(1);
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index eb2bed9d13f..8d1122dc0fd 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -995,9 +995,9 @@ int main(int argc, char **argv)
if (opt_auto_repair &&
(my_init_dynamic_array(&tables4repair, sizeof(char)*(NAME_LEN*2+2),16,
- 64, 0) ||
+ 64, MYF(0)) ||
my_init_dynamic_array(&tables4rebuild, sizeof(char)*(NAME_LEN*2+2),16,
- 64, 0)))
+ 64, MYF(0))))
goto end;
if (opt_alldbs)
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 583524a43d8..2b94e65aa0b 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -4583,7 +4583,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
if (init_dumping(db, init_dumping_tables))
DBUG_RETURN(1);
- init_alloc_root(&root, 8192, 0, 0);
+ init_alloc_root(&root, 8192, 0, MYF(0));
if (!(dump_tables= pos= (char**) alloc_root(&root, tables * sizeof(char *))))
die(EX_EOM, "alloc_root failure.");
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index a60c8da93bf..9082beed884 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8899,7 +8899,7 @@ int main(int argc, char **argv)
cur_block->ok= TRUE; /* Outer block should always be executed */
cur_block->cmd= cmd_none;
- my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, 0);
+ my_init_dynamic_array(&q_lines, sizeof(struct st_command*), 1024, 1024, MYF(0));
if (my_hash_init2(&var_hash, 64, charset_info,
128, 0, 0, get_var_key, var_free, MYF(0)))
@@ -8929,7 +8929,7 @@ int main(int argc, char **argv)
#endif
init_dynamic_string(&ds_res, "", 2048, 2048);
- init_alloc_root(&require_file_root, 1024, 1024, 0);
+ init_alloc_root(&require_file_root, 1024, 1024, MYF(0));
parse_args(argc, argv);
@@ -9873,7 +9873,7 @@ struct st_replace_regex* init_replace_regex(char* expr)
/* my_malloc() will die on fail with MY_FAE */
res=(struct st_replace_regex*)my_malloc(
sizeof(*res)+expr_len ,MYF(MY_FAE+MY_WME));
- my_init_dynamic_array(&res->regex_arr,sizeof(struct st_regex), 128, 128, 0);
+ my_init_dynamic_array(&res->regex_arr,sizeof(struct st_regex), 128, 128, MYF(0));
buf= (char*)res + sizeof(*res);
expr_end= expr + expr_len;
@@ -10928,7 +10928,7 @@ void dynstr_append_sorted(DYNAMIC_STRING* ds, DYNAMIC_STRING *ds_input,
if (!*start)
DBUG_VOID_RETURN; /* No input */
- my_init_dynamic_array(&lines, sizeof(const char*), 32, 32, 0);
+ my_init_dynamic_array(&lines, sizeof(const char*), 32, 32, MYF(0));
if (keep_header)
{
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 7476578204a..6d696bcb1d2 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -894,7 +894,7 @@ static struct errors *generate_empty_message(uint d_code)
if (!(new_error= (struct errors *) my_malloc(sizeof(*new_error),
MYF(MY_WME))))
return(0);
- if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 1, 0))
+ if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 1, MYF(0)))
return(0); /* OOM: Fatal error */
new_error->er_name= NULL;
@@ -928,7 +928,7 @@ static struct errors *parse_error_string(char *str, int er_count)
MYF(MY_WME))))
DBUG_RETURN(0);
- if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0, 0))
+ if (my_init_dynamic_array(&new_error->msg, sizeof(struct message), 0, 0, MYF(0)))
DBUG_RETURN(0); /* OOM: Fatal error */
/* getting the error name */
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index c7f33d2723b..576710e0bde 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -223,7 +223,7 @@ static void init_sym_table()
{
char buf[512];
if (my_init_dynamic_array(&sym_table, sizeof(SYM_ENTRY), INIT_SYM_TABLE,
- INC_SYM_TABLE, 0))
+ INC_SYM_TABLE, MYF(0)))
die("Failed in my_init_dynamic_array() -- looks like out of memory problem");
while (fgets(buf, sizeof(buf), fp_sym))
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 5ca4e1085ee..69fce429ab9 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1520,8 +1520,8 @@ mysql_stmt_init(MYSQL *mysql)
DBUG_RETURN(NULL);
}
- init_alloc_root(&stmt->mem_root, 2048, 2048, MY_THREAD_SPECIFIC);
- init_alloc_root(&stmt->result.alloc, 4096, 4096, MY_THREAD_SPECIFIC);
+ init_alloc_root(&stmt->mem_root, 2048, 2048, MYF(MY_THREAD_SPECIFIC));
+ init_alloc_root(&stmt->result.alloc, 4096, 4096, MYF(MY_THREAD_SPECIFIC));
stmt->result.alloc.min_malloc= sizeof(MYSQL_ROWS);
mysql->stmts= list_add(mysql->stmts, &stmt->list);
stmt->list.data= stmt;
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc
index 7f73c6c4aeb..abb0631ebfb 100644
--- a/libmysqld/emb_qcache.cc
+++ b/libmysqld/emb_qcache.cc
@@ -415,7 +415,7 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
if (!data)
goto err;
- init_alloc_root(&data->alloc, 8192,0,0);
+ init_alloc_root(&data->alloc, 8192,0,MYF(0));
f_alloc= &data->alloc;
data->fields= src->load_int();
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 8ffeaebb17b..291ce336046 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -634,7 +634,7 @@ void init_embedded_mysql(MYSQL *mysql, int client_flag)
mysql->server_version= server_version;
mysql->client_flag= client_flag;
//mysql->server_capabilities= client_flag;
- init_alloc_root(&mysql->field_alloc, 8192, 0, 0);
+ init_alloc_root(&mysql->field_alloc, 8192, 0, MYF(0));
}
/**
diff --git a/mysys/default.c b/mysys/default.c
index 94609ba4539..a90f428eca5 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -520,7 +520,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
uint args_sep= my_getopt_use_args_separator ? 1 : 0;
DBUG_ENTER("load_defaults");
- init_alloc_root(&alloc, 512, 0, 0);
+ init_alloc_root(&alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
goto err;
/*
@@ -566,7 +566,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
for (; *groups ; groups++)
group.count++;
- if (my_init_dynamic_array(&args, sizeof(char*),*argc, 32, 0))
+ if (my_init_dynamic_array(&args, sizeof(char*),*argc, 32, MYF(0)))
goto err;
ctx.alloc= &alloc;
@@ -1043,7 +1043,7 @@ void my_print_default_files(const char *conf_file)
{
const char **dirs;
MEM_ROOT alloc;
- init_alloc_root(&alloc, 512, 0, 0);
+ init_alloc_root(&alloc, 512, 0, MYF(0));
if ((dirs= init_default_directories(&alloc)) == NULL)
{
diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c
index 2441243c132..ec94c17dfdb 100644
--- a/mysys/ma_dyncol.c
+++ b/mysys/ma_dyncol.c
@@ -2410,7 +2410,7 @@ dynamic_column_list(DYNAMIC_COLUMN *str, DYNAMIC_ARRAY *array_of_uint)
return ER_DYNCOL_FORMAT;
if (my_init_dynamic_array(array_of_uint, sizeof(uint), header.column_count,
- 0, 0))
+ 0, MYF(0)))
return ER_DYNCOL_RESOURCE;
for (i= 0, read= header.header;
diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c
index bd42002ae86..f8450a100e5 100644
--- a/mysys/mf_tempdir.c
+++ b/mysys/mf_tempdir.c
@@ -30,7 +30,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist)
DBUG_PRINT("enter", ("pathlist: %s", pathlist ? pathlist : "NULL"));
mysql_mutex_init(key_TMPDIR_mutex, &tmpdir->mutex, MY_MUTEX_INIT_FAST);
- if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5, 0))
+ if (my_init_dynamic_array(&tmpdir->full_list, sizeof(char*), 1, 5, MYF(0)))
goto err;
if (!pathlist || !pathlist[0])
{
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 543d96455ff..9c8655338c1 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -123,13 +123,13 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
if (my_init_dynamic_array(dir_entries_storage, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
- MyFlags))
+ MYF(MyFlags)))
{
my_free(buffer);
goto error;
}
init_alloc_root(names_storage, NAMES_START_SIZE, NAMES_START_SIZE,
- MyFlags);
+ MYF(MyFlags));
/* MY_DIR structure is allocated and completly initialized at this point */
result= (MY_DIR*)buffer;
@@ -266,12 +266,12 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
if (my_init_dynamic_array(dir_entries_storage, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
- MyFlags))
+ MYF(MyFlags)))
{
my_free(buffer);
goto error;
}
- init_alloc_root(names_storage, NAMES_START_SIZE, NAMES_START_SIZE, MyFlags);
+ init_alloc_root(names_storage, NAMES_START_SIZE, NAMES_START_SIZE, MYF(MyFlags));
/* MY_DIR structure is allocated and completly initialized at this point */
result= (MY_DIR*)buffer;
diff --git a/mysys/tree.c b/mysys/tree.c
index b8c951df4cf..fe2d3f45d57 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -129,8 +129,7 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
}
if (!(tree->with_delete= test(my_flags & MY_TREE_WITH_DELETE)))
{
- init_alloc_root(&tree->mem_root, default_alloc_size, 0,
- my_flags);
+ init_alloc_root(&tree->mem_root, default_alloc_size, 0, MYF(my_flags));
tree->mem_root.min_malloc= sizeof(TREE_ELEMENT)+tree->size_of_element;
}
DBUG_VOID_RETURN;
diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c
index 7d7fcb69da0..21b2a9ac78a 100644
--- a/mysys/waiting_threads.c
+++ b/mysys/waiting_threads.c
@@ -403,7 +403,7 @@ static void wt_resource_init(uchar *arg)
bzero(rc, sizeof(*rc));
rc_rwlock_init(rc);
mysql_cond_init(key_WT_RESOURCE_cond, &rc->cond, 0);
- my_init_dynamic_array(&rc->owners, sizeof(WT_THD *), 0, 5, 0);
+ my_init_dynamic_array(&rc->owners, sizeof(WT_THD *), 0, 5, MYF(0));
DBUG_VOID_RETURN;
}
@@ -509,7 +509,7 @@ void wt_thd_lazy_init(WT_THD *thd, const ulong *ds, const ulong *ts,
thd->deadlock_search_depth_long= dl;
thd->timeout_long= tl;
/* dynamic array is also initialized lazily - without memory allocations */
- my_init_dynamic_array(&thd->my_resources, sizeof(WT_RESOURCE *), 0, 5, 0);
+ my_init_dynamic_array(&thd->my_resources, sizeof(WT_RESOURCE *), 0, 5, MYF(0));
#ifndef DBUG_OFF
thd->name= my_thread_name();
#endif
diff --git a/sql-common/client.c b/sql-common/client.c
index 675774b26a7..0423b44e26f 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -1170,7 +1170,7 @@ static int add_init_command(struct st_mysql_options *options, const char *cmd)
{
options->init_commands= (DYNAMIC_ARRAY*)my_malloc(sizeof(DYNAMIC_ARRAY),
MYF(MY_WME));
- my_init_dynamic_array(options->init_commands,sizeof(char*),5, 5, 0);
+ my_init_dynamic_array(options->init_commands,sizeof(char*),5, 5, MYF(0));
}
if (!(tmp= my_strdup(cmd,MYF(MY_WME))) ||
diff --git a/sql-common/client_plugin.c b/sql-common/client_plugin.c
index bc0cff85eb6..5b59c4e0e71 100644
--- a/sql-common/client_plugin.c
+++ b/sql-common/client_plugin.c
@@ -251,7 +251,7 @@ int mysql_client_plugin_init()
bzero(&mysql, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */
pthread_mutex_init(&LOCK_load_client_plugin, MY_MUTEX_INIT_SLOW);
- init_alloc_root(&mem_root, 128, 128, 0);
+ init_alloc_root(&mem_root, 128, 128, MYF(0));
bzero(&plugin_list, sizeof(plugin_list));
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index a5dac4c154b..14b1003d308 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -209,7 +209,7 @@ Event_basic::Event_basic()
{
DBUG_ENTER("Event_basic::Event_basic");
/* init memory root */
- init_sql_alloc(&mem_root, 256, 512, 0);
+ init_sql_alloc(&mem_root, 256, 512, MYF(0));
dbname.str= name.str= NULL;
dbname.length= name.length= 0;
time_zone= NULL;
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 44d384e7f2d..6fc30fa4fa0 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -8649,7 +8649,7 @@ NDB_SHARE *ndbcluster_get_share(const char *key, TABLE *table,
MEM_ROOT **root_ptr=
my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC);
MEM_ROOT *old_root= *root_ptr;
- init_sql_alloc(&share->mem_root, 1024, 0, 0);
+ init_sql_alloc(&share->mem_root, 1024, 0, MYF(0));
*root_ptr= &share->mem_root; // remember to reset before return
share->state= NSS_INITIAL;
/* enough space for key, db, and table_name */
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index e7582d695ce..2b72ffef9bf 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -3964,7 +3964,7 @@ restart:
my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC);
MEM_ROOT *old_root= *root_ptr;
MEM_ROOT mem_root;
- init_sql_alloc(&mem_root, 4096, 0, 0);
+ init_sql_alloc(&mem_root, 4096, 0, MYF(0));
List<Cluster_schema> post_epoch_log_list;
List<Cluster_schema> post_epoch_unlock_list;
*root_ptr= &mem_root;
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index e28c461f4ce..9a9f0b537f7 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -168,7 +168,7 @@ ha_partition::ha_partition(handlerton *hton, TABLE_SHARE *share)
:handler(hton, share)
{
DBUG_ENTER("ha_partition::ha_partition(table)");
- init_alloc_root(&m_mem_root, 512, 512, 0);
+ init_alloc_root(&m_mem_root, 512, 512, MYF(0));
init_handler_variables();
DBUG_VOID_RETURN;
}
@@ -190,7 +190,7 @@ ha_partition::ha_partition(handlerton *hton, partition_info *part_info)
{
DBUG_ENTER("ha_partition::ha_partition(part_info)");
DBUG_ASSERT(part_info);
- init_alloc_root(&m_mem_root, 512, 512, 0);
+ init_alloc_root(&m_mem_root, 512, 512, MYF(0));
init_handler_variables();
m_part_info= part_info;
m_create_handler= TRUE;
@@ -217,7 +217,7 @@ ha_partition::ha_partition(handlerton *hton, TABLE_SHARE *share,
:handler(hton, share)
{
DBUG_ENTER("ha_partition::ha_partition(clone)");
- init_alloc_root(&m_mem_root, 512, 512, 0);
+ init_alloc_root(&m_mem_root, 512, 512, MYF(0));
init_handler_variables();
m_part_info= part_info_arg;
m_create_handler= TRUE;
diff --git a/sql/log.cc b/sql/log.cc
index c6d91b1f67e..9d476e2a262 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -8311,7 +8311,7 @@ int TC_LOG_BINLOG::recover(LOG_INFO *linfo, const char *last_log_name,
sizeof(my_xid), 0, 0, MYF(0)))
goto err1;
- init_alloc_root(&mem_root, TC_LOG_PAGE_SIZE, TC_LOG_PAGE_SIZE, 0);
+ init_alloc_root(&mem_root, TC_LOG_PAGE_SIZE, TC_LOG_PAGE_SIZE, MYF(0));
fdle->flags&= ~LOG_EVENT_BINLOG_IN_USE_F; // abort on the first error
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ca68f8c9ae2..b2c8a842283 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1121,7 +1121,7 @@ private:
void Buffered_logs::init()
{
- init_alloc_root(&m_root, 1024, 0, 0);
+ init_alloc_root(&m_root, 1024, 0, MYF(0));
}
void Buffered_logs::cleanup()
@@ -4761,7 +4761,7 @@ int mysqld_main(int argc, char **argv)
my_getopt_skip_unknown= TRUE;
/* prepare all_early_options array */
- my_init_dynamic_array(&all_early_options, sizeof(my_option), 100, 25, 0);
+ my_init_dynamic_array(&all_early_options, sizeof(my_option), 100, 25, MYF(0));
sys_var_add_options(&all_early_options, sys_var::PARSE_EARLY);
add_terminator(&all_early_options);
@@ -5355,7 +5355,7 @@ static void bootstrap(MYSQL_FILE *file)
THD *thd= new THD;
thd->bootstrap=1;
- my_net_init(&thd->net,(st_vio*) 0, 0);
+ my_net_init(&thd->net,(st_vio*) 0, MYF(0));
thd->max_client_packet_length= thd->net.max_packet;
thd->security_ctx->master_access= ~(ulong)0;
thd->thread_id= thd->variables.pseudo_thread_id= thread_id++;
@@ -7249,7 +7249,7 @@ static int option_cmp(my_option *a, my_option *b)
static void print_help()
{
MEM_ROOT mem_root;
- init_alloc_root(&mem_root, 4096, 4096, 0);
+ init_alloc_root(&mem_root, 4096, 4096, MYF(0));
pop_dynamic(&all_options);
sys_var_add_options(&all_options, sys_var::PARSE_EARLY);
@@ -7941,7 +7941,7 @@ static int get_options(int *argc_ptr, char ***argv_ptr)
/* prepare all_options array */
my_init_dynamic_array(&all_options, sizeof(my_option),
array_elements(my_long_options),
- array_elements(my_long_options)/4, 0);
+ array_elements(my_long_options)/4, MYF(0));
for (my_option *opt= my_long_options;
opt < my_long_options + array_elements(my_long_options) - 1;
opt++)
diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc
index b44c3c7504c..f2bd036896d 100644
--- a/sql/rpl_filter.cc
+++ b/sql/rpl_filter.cc
@@ -573,7 +573,7 @@ void
Rpl_filter::init_table_rule_array(DYNAMIC_ARRAY* a, bool* a_inited)
{
my_init_dynamic_array(a, sizeof(TABLE_RULE_ENT*), TABLE_RULE_ARR_SIZE,
- TABLE_RULE_ARR_SIZE, 0);
+ TABLE_RULE_ARR_SIZE, MYF(0));
*a_inited = 1;
}
diff --git a/sql/rpl_handler.cc b/sql/rpl_handler.cc
index 07eeef57842..258dae0edb2 100644
--- a/sql/rpl_handler.cc
+++ b/sql/rpl_handler.cc
@@ -189,7 +189,7 @@ void delegates_destroy()
DYNAMIC_ARRAY *plugins= &s.plugins; \
plugin_ref *plugins_buffer= s.plugins_buffer; \
my_init_dynamic_array2(plugins, sizeof(plugin_ref), \
- plugins_buffer, 8, 8, 0); \
+ plugins_buffer, 8, 8, MYF(0)); \
read_lock(); \
Observer_info_iterator iter= observer_info_iter(); \
Observer_info *info= iter++; \
diff --git a/sql/rpl_handler.h b/sql/rpl_handler.h
index e955707f5c3..e028fb49808 100644
--- a/sql/rpl_handler.h
+++ b/sql/rpl_handler.h
@@ -124,7 +124,7 @@ public:
inited= FALSE;
if (my_rwlock_init(&lock, NULL))
return;
- init_sql_alloc(&memroot, 1024, 0, 0);
+ init_sql_alloc(&memroot, 1024, 0, MYF(0));
inited= TRUE;
}
~Delegate()
diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc
index 73a2e26faba..5348a94b35b 100644
--- a/sql/rpl_mi.cc
+++ b/sql/rpl_mi.cc
@@ -61,7 +61,7 @@ Master_info::Master_info(LEX_STRING *connection_name_arg,
my_casedn_str(system_charset_info, cmp_connection_name.str);
}
- my_init_dynamic_array(&ignore_server_ids, sizeof(::server_id), 16, 16, 0);
+ my_init_dynamic_array(&ignore_server_ids, sizeof(::server_id), 16, 16, MYF(0));
bzero((char*) &file, sizeof(file));
mysql_mutex_init(key_master_info_run_lock, &run_lock, MY_MUTEX_INIT_FAST);
mysql_mutex_init(key_master_info_data_lock, &data_lock, MY_MUTEX_INIT_FAST);
diff --git a/sql/rpl_tblmap.cc b/sql/rpl_tblmap.cc
index 92d8ca228b0..7b55911d887 100644
--- a/sql/rpl_tblmap.cc
+++ b/sql/rpl_tblmap.cc
@@ -46,7 +46,7 @@ table_mapping::table_mapping()
offsetof(entry,table_id),sizeof(ulong),
0,0,0);
/* We don't preallocate any block, this is consistent with m_free=0 above */
- init_alloc_root(&m_mem_root, TABLE_ID_HASH_SIZE*sizeof(entry), 0, 0);
+ init_alloc_root(&m_mem_root, TABLE_ID_HASH_SIZE*sizeof(entry), 0, MYF(0));
DBUG_VOID_RETURN;
}
diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc
index 321aead841e..1b9e744bcc1 100644
--- a/sql/rpl_utility.cc
+++ b/sql/rpl_utility.cc
@@ -1117,7 +1117,7 @@ bool event_checksum_test(uchar *event_buf, ulong event_len, uint8 alg)
Deferred_log_events::Deferred_log_events(Relay_log_info *rli) : last_added(NULL)
{
- my_init_dynamic_array(&array, sizeof(Log_event *), 32, 16, 0);
+ my_init_dynamic_array(&array, sizeof(Log_event *), 32, 16, MYF(0));
}
Deferred_log_events::~Deferred_log_events()
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 1d6aa73fdb0..57e7877cc34 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -510,7 +510,7 @@ sp_head::operator new(size_t size) throw()
MEM_ROOT own_root;
sp_head *sp;
- init_sql_alloc(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC, 0);
+ init_sql_alloc(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC, MYF(0));
sp= (sp_head *) alloc_root(&own_root, size);
if (sp == NULL)
DBUG_RETURN(NULL);
@@ -594,7 +594,7 @@ sp_head::init(LEX *lex)
types of stored procedures to simplify reset_lex()/restore_lex() code.
*/
lex->trg_table_fields.empty();
- my_init_dynamic_array(&m_instr, sizeof(sp_instr *), 16, 8, 0);
+ my_init_dynamic_array(&m_instr, sizeof(sp_instr *), 16, 8, MYF(0));
m_param_begin= NULL;
m_param_end= NULL;
@@ -1254,7 +1254,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
DBUG_RETURN(TRUE);
/* init per-instruction memroot */
- init_sql_alloc(&execute_mem_root, MEM_ROOT_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&execute_mem_root, MEM_ROOT_BLOCK_SIZE, 0, MYF(0));
DBUG_ASSERT(!(m_flags & IS_INVOKED));
m_flags|= IS_INVOKED;
@@ -1711,7 +1711,7 @@ sp_head::execute_trigger(THD *thd,
TODO: we should create sp_rcontext once per command and reuse it
on subsequent executions of a trigger.
*/
- init_sql_alloc(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0, MYF(0));
thd->set_n_backup_active_arena(&call_arena, &backup_arena);
if (!(nctx= new sp_rcontext(m_pcont, 0, octx)) ||
@@ -1828,7 +1828,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
TODO: we should create sp_rcontext once per command and reuse
it on subsequent executions of a function/trigger.
*/
- init_sql_alloc(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&call_mem_root, MEM_ROOT_BLOCK_SIZE, 0, MYF(0));
thd->set_n_backup_active_arena(&call_arena, &backup_arena);
if (!(nctx= new sp_rcontext(m_pcont, return_value_fld, octx)) ||
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index cdafc5cd819..f11daeecb7b 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -62,19 +62,19 @@ sp_pcontext::sp_pcontext()
{
(void) my_init_dynamic_array(&m_vars, sizeof(sp_variable_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_case_expr_id_lst, sizeof(int),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_conds, sizeof(sp_cond_type_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_cursors, sizeof(LEX_STRING),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_handlers, sizeof(sp_cond_type_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
m_label.empty();
m_children.empty();
@@ -90,19 +90,19 @@ sp_pcontext::sp_pcontext(sp_pcontext *prev, label_scope_type label_scope)
{
(void) my_init_dynamic_array(&m_vars, sizeof(sp_variable_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_case_expr_id_lst, sizeof(int),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_conds, sizeof(sp_cond_type_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_cursors, sizeof(LEX_STRING),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
(void) my_init_dynamic_array(&m_handlers, sizeof(sp_cond_type_t *),
PCONTEXT_ARRAY_INIT_ALLOC,
- PCONTEXT_ARRAY_INCREMENT_ALLOC, 0);
+ PCONTEXT_ARRAY_INCREMENT_ALLOC, MYF(0));
m_label.empty();
m_children.empty();
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 9fa908c43e2..2d1493b17de 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -749,13 +749,13 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
acl_cache->clear(1); // Clear locked hostname cache
- init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (init_read_record(&read_record_info,thd,table= tables[0].table,NULL,1,0,
FALSE))
goto end;
table->use_all_columns();
- (void) my_init_dynamic_array(&acl_hosts,sizeof(ACL_HOST), 20, 50, 0);
+ (void) my_init_dynamic_array(&acl_hosts,sizeof(ACL_HOST), 20, 50, MYF(0));
while (!(read_record_info.read_record(&read_record_info)))
{
ACL_HOST host;
@@ -807,7 +807,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
goto end;
table->use_all_columns();
- (void) my_init_dynamic_array(&acl_users,sizeof(ACL_USER), 50, 100, 0);
+ (void) my_init_dynamic_array(&acl_users,sizeof(ACL_USER), 50, 100, MYF(0));
password_length= table->field[2]->field_length /
table->field[2]->charset()->mbmaxlen;
if (password_length < SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
@@ -1009,7 +1009,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
goto end;
table->use_all_columns();
- (void) my_init_dynamic_array(&acl_dbs,sizeof(ACL_DB), 50, 100, 0);
+ (void) my_init_dynamic_array(&acl_dbs,sizeof(ACL_DB), 50, 100, MYF(0));
while (!(read_record_info.read_record(&read_record_info)))
{
ACL_DB db;
@@ -1067,7 +1067,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
freeze_size(&acl_dbs);
(void) my_init_dynamic_array(&acl_proxy_users, sizeof(ACL_PROXY_USER),
- 50, 100, 0);
+ 50, 100, MYF(0));
if (tables[3].table)
{
init_read_record(&read_record_info, thd, table= tables[3].table, NULL, 1,
@@ -1722,7 +1722,7 @@ static void init_check_host(void)
{
DBUG_ENTER("init_check_host");
(void) my_init_dynamic_array(&acl_wild_hosts,sizeof(struct acl_host_and_ip),
- acl_users.elements, 1, 0);
+ acl_users.elements, 1, MYF(0));
(void) my_hash_init(&acl_check_hosts,system_charset_info,
acl_users.elements, 0, 0,
(my_hash_get_key) check_get_key, 0, 0);
@@ -4412,7 +4412,7 @@ my_bool grant_reload(THD *thd)
opertion possible in case of failure.
*/
old_mem= memex;
- init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0));
if ((return_val= grant_load(thd, tables)))
{ // Error. Revert to old hash
diff --git a/sql/sql_array.h b/sql/sql_array.h
index 18881d2c345..f07126bc0ef 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -101,7 +101,7 @@ public:
Dynamic_array(uint prealloc=16, uint increment=16)
{
my_init_dynamic_array(&array, sizeof(Elem), prealloc, increment,
- MY_THREAD_SPECIFIC);
+ MYF(MY_THREAD_SPECIFIC));
}
Elem& at(int idx)
diff --git a/sql/sql_audit.cc b/sql/sql_audit.cc
index 4403034bca8..f1f991242e7 100644
--- a/sql/sql_audit.cc
+++ b/sql/sql_audit.cc
@@ -156,7 +156,7 @@ static my_bool acquire_plugins(THD *thd, plugin_ref plugin, void *arg)
{
/* specify some reasonable initialization defaults */
my_init_dynamic_array(&thd->audit_class_plugins,
- sizeof(plugin_ref), 16, 16, 0);
+ sizeof(plugin_ref), 16, 16, MYF(0));
}
/* lock the plugin and add it to the list */
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index fd0d0603395..58b13d4cd8a 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -4973,7 +4973,7 @@ bool open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags,
anything yet, to avoid penalty for statements which don't use views
and thus new .FRM format.
*/
- init_sql_alloc(&new_frm_mem, 8024, 0, 0);
+ init_sql_alloc(&new_frm_mem, 8024, 0, MYF(0));
thd->current_tablenr= 0;
restart:
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 1d0d23a2390..44102aaf3bc 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -935,7 +935,7 @@ THD::THD()
/* For user vars replication*/
if (opt_bin_log)
my_init_dynamic_array(&user_var_events,
- sizeof(BINLOG_USER_VAR_EVENT *), 16, 16, 0);
+ sizeof(BINLOG_USER_VAR_EVENT *), 16, 16, MYF(0));
else
bzero((char*) &user_var_events, sizeof(user_var_events));
diff --git a/sql/sql_class.h b/sql/sql_class.h
index f10b517a606..9d00d3ff905 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1429,7 +1429,7 @@ public:
m_locked_tables_count(0)
{
init_sql_alloc(&m_locked_tables_root, MEM_ROOT_BLOCK_SIZE, 0,
- MY_THREAD_SPECIFIC);
+ MYF(MY_THREAD_SPECIFIC));
}
void unlock_locked_tables(THD *thd);
~Locked_tables_list()
@@ -1886,7 +1886,7 @@ public:
bzero((char*)this, sizeof(*this));
xid_state.xid.null();
init_sql_alloc(&mem_root, ALLOC_ROOT_MIN_BLOCK_SIZE, 0,
- MY_THREAD_SPECIFIC);
+ MYF(MY_THREAD_SPECIFIC));
}
} transaction;
Global_read_lock global_read_lock;
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index e1c0940c461..be7cdd8ca1d 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -305,7 +305,7 @@ struct LEX_MASTER_INFO
{
bzero(this, sizeof(*this));
my_init_dynamic_array(&repl_ignore_server_ids,
- sizeof(::server_id), 0, 16, 0);
+ sizeof(::server_id), 0, 16, MYF(0));
}
void reset()
{
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index e24b43c0cf6..d1c12ee4f83 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1114,7 +1114,7 @@ static bool plugin_add(MEM_ROOT *tmp_root,
plugin_array_version++;
if (my_hash_insert(&plugin_hash[plugin->type], (uchar*)tmp_plugin_ptr))
tmp_plugin_ptr->state= PLUGIN_IS_FREED;
- init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096, 0);
+ init_alloc_root(&tmp_plugin_ptr->mem_root, 4096, 4096, MYF(0));
if (name->str)
DBUG_RETURN(FALSE); // all done
@@ -1507,8 +1507,8 @@ int plugin_init(int *argc, char **argv, int flags)
init_plugin_psi_keys();
#endif
- init_alloc_root(&plugin_mem_root, 4096, 4096, 0);
- init_alloc_root(&tmp_root, 4096, 4096, 0);
+ init_alloc_root(&plugin_mem_root, 4096, 4096, MYF(0));
+ init_alloc_root(&tmp_root, 4096, 4096, MYF(0));
if (my_hash_init(&bookmark_hash, &my_charset_bin, 16, 0, 0,
get_bookmark_hash_key, NULL, HASH_UNIQUE))
@@ -1518,9 +1518,9 @@ int plugin_init(int *argc, char **argv, int flags)
mysql_mutex_init(key_LOCK_plugin, &LOCK_plugin, MY_MUTEX_INIT_FAST);
if (my_init_dynamic_array(&plugin_dl_array,
- sizeof(struct st_plugin_dl *),16,16,0) ||
+ sizeof(struct st_plugin_dl *), 16, 16, MYF(0)) ||
my_init_dynamic_array(&plugin_array,
- sizeof(struct st_plugin_int *),16,16,0))
+ sizeof(struct st_plugin_int *), 16, 16, MYF(0)))
goto err;
for (i= 0; i < MYSQL_MAX_PLUGIN_TYPE_NUM; i++)
diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc
index 63f3e6c9d63..b5b7f9866c5 100644
--- a/sql/sql_servers.cc
+++ b/sql/sql_servers.cc
@@ -209,7 +209,7 @@ static bool servers_load(THD *thd, TABLE_LIST *tables)
my_hash_reset(&servers_cache);
free_root(&mem, MYF(0));
- init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (init_read_record(&read_record_info,thd,table=tables[0].table,NULL,1,0,
FALSE))
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index f9458fa8588..5a414ad7b48 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -458,7 +458,7 @@ bool
ignore_db_dirs_init()
{
return my_init_dynamic_array(&ignore_db_dirs_array, sizeof(LEX_STRING *),
- 0, 0, 0);
+ 0, 0, MYF(0));
}
@@ -2676,7 +2676,7 @@ int add_status_vars(SHOW_VAR *list)
if (status_vars_inited)
mysql_mutex_lock(&LOCK_status);
if (!all_status_vars.buffer && // array is not allocated yet - do it now
- my_init_dynamic_array(&all_status_vars, sizeof(SHOW_VAR), 200, 20, 0))
+ my_init_dynamic_array(&all_status_vars, sizeof(SHOW_VAR), 200, 20, MYF(0)))
{
res= 1;
goto err;
@@ -4399,7 +4399,7 @@ static int fill_schema_table_from_frm(THD *thd, TABLE_LIST *tables,
if (schema_table->i_s_requested_object & OPEN_TRIGGER_ONLY)
{
- init_sql_alloc(&tbl.mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&tbl.mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (!Table_triggers_list::check_n_load(thd, db_name->str,
table_name->str, &tbl, 1))
{
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index fa509835dae..d7d902bc6b0 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -1779,7 +1779,7 @@ bool Table_triggers_list::drop_all_triggers(THD *thd, char *db, char *name)
DBUG_ENTER("drop_all_triggers");
bzero(&table, sizeof(table));
- init_sql_alloc(&table.mem_root, 8192, 0, 0);
+ init_sql_alloc(&table.mem_root, 8192, 0, MYF(0));
if (Table_triggers_list::check_n_load(thd, db, name, &table, 1))
{
@@ -1999,7 +1999,7 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db,
DBUG_ENTER("change_table_name");
bzero(&table, sizeof(table));
- init_sql_alloc(&table.mem_root, 8192, 0, 0);
+ init_sql_alloc(&table.mem_root, 8192, 0, MYF(0));
/*
This method interfaces the mysql server code protected by
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 9832f240fb5..c792dca873c 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -151,7 +151,7 @@ void udf_init()
mysql_rwlock_init(key_rwlock_THR_LOCK_udf, &THR_LOCK_udf);
- init_sql_alloc(&mem, UDF_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&mem, UDF_ALLOC_BLOCK_SIZE, 0, MYF(0));
THD *new_thd = new THD;
if (!new_thd ||
my_hash_init(&udf_hash,system_charset_info,32,0,0,get_hash_key, NULL, 0))
diff --git a/sql/table.cc b/sql/table.cc
index 6fc6bd44b22..3755f0d25ff 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -307,7 +307,7 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
path_length= build_table_filename(path, sizeof(path) - 1,
table_list->db,
table_list->table_name, "", 0);
- init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (multi_alloc_root(&mem_root,
&share, sizeof(*share),
&key_buff, key_length,
@@ -340,7 +340,7 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
share->free_tables.empty();
share->m_flush_tickets.empty();
- init_sql_alloc(&share->stats_cb.mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&share->stats_cb.mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0));
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
mysql_mutex_init(key_TABLE_SHARE_LOCK_ha_data,
@@ -2358,7 +2358,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
outparam->db_stat= db_stat;
outparam->write_row_record= NULL;
- init_sql_alloc(&outparam->mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, 0);
+ init_sql_alloc(&outparam->mem_root, TABLE_ALLOC_BLOCK_SIZE, 0, MYF(0));
if (outparam->alias.copy(alias, strlen(alias), table_alias_charset))
goto err;
diff --git a/sql/tztime.cc b/sql/tztime.cc
index 525fc96241c..ad5deea7b25 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1637,7 +1637,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
my_hash_free(&tz_names);
goto end;
}
- init_sql_alloc(&tz_storage, 32 * 1024, 0, 0);
+ init_sql_alloc(&tz_storage, 32 * 1024, 0, MYF(0));
mysql_mutex_init(key_tz_LOCK, &tz_LOCK, MY_MUTEX_INIT_FAST);
tz_inited= 1;
@@ -2599,7 +2599,7 @@ main(int argc, char **argv)
}
else
{
- init_alloc_root(&tz_storage, 32768, 0, 0);
+ init_alloc_root(&tz_storage, 32768, 0, MYF(0));
if (strcmp(argv[1], "--leap") == 0)
{
@@ -2676,7 +2676,7 @@ main(int argc, char **argv)
MY_INIT(argv[0]);
- init_alloc_root(&tz_storage, 32768, 0);
+ init_alloc_root(&tz_storage, 32768, MYF(0));
/* let us set some well known timezone */
setenv("TZ", "MET", 1);
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index 9c749a9f67c..50e639881c5 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -497,7 +497,7 @@ ha_tina::ha_tina(handlerton *hton, TABLE_SHARE *table_arg)
buffer.set((char*)byte_buffer, IO_SIZE, &my_charset_bin);
chain= chain_buffer;
file_buff= new Transparent_file();
- init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0, 0);
+ init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
@@ -961,7 +961,7 @@ int ha_tina::open(const char *name, int mode, uint open_options)
*/
thr_lock_data_init(&share->lock, &lock, (void*) this);
ref_length= sizeof(my_off_t);
- init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0, 0);
+ init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0, MYF(0));
share->lock.get_status= tina_get_status;
share->lock.update_status= tina_update_status;
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 65ae11790a0..262e0c8de7c 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -1515,7 +1515,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
*/
query.length(0);
- init_alloc_root(&mem_root, 256, 0, 0);
+ init_alloc_root(&mem_root, 256, 0, MYF(0));
mysql_mutex_lock(&federated_mutex);
@@ -1656,7 +1656,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
ref_length= sizeof(MYSQL_RES *) + sizeof(MYSQL_ROW_OFFSET);
DBUG_PRINT("info", ("ref_length: %u", ref_length));
- my_init_dynamic_array(&results, sizeof(MYSQL_RES *), 4, 4, 0);
+ my_init_dynamic_array(&results, sizeof(MYSQL_RES *), 4, 4, MYF(0));
reset();
DBUG_RETURN(0);
diff --git a/storage/federatedx/federatedx_io_mysql.cc b/storage/federatedx/federatedx_io_mysql.cc
index dc61d7ccc41..effbe899e7f 100644
--- a/storage/federatedx/federatedx_io_mysql.cc
+++ b/storage/federatedx/federatedx_io_mysql.cc
@@ -136,7 +136,7 @@ federatedx_io_mysql::federatedx_io_mysql(FEDERATEDX_SERVER *aserver)
bzero(&mysql, sizeof(MYSQL));
bzero(&savepoints, sizeof(DYNAMIC_ARRAY));
- my_init_dynamic_array(&savepoints, sizeof(SAVEPT), 16, 16, 0);
+ my_init_dynamic_array(&savepoints, sizeof(SAVEPT), 16, 16, MYF(0));
DBUG_VOID_RETURN;
}
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc
index 1947390e6da..9ec68a13039 100644
--- a/storage/federatedx/ha_federatedx.cc
+++ b/storage/federatedx/ha_federatedx.cc
@@ -1519,7 +1519,7 @@ static FEDERATEDX_SERVER *get_server(FEDERATEDX_SHARE *share, TABLE *table)
mysql_mutex_assert_owner(&federatedx_mutex);
- init_alloc_root(&mem_root, 4096, 4096, 0);
+ init_alloc_root(&mem_root, 4096, 4096, MYF(0));
fill_server(&mem_root, &tmp_server, share, table ? table->s->table_charset : 0);
@@ -1577,7 +1577,7 @@ static FEDERATEDX_SHARE *get_share(const char *table_name, TABLE *table)
query.length(0);
bzero(&tmp_share, sizeof(tmp_share));
- init_alloc_root(&mem_root, 256, 0, 0);
+ init_alloc_root(&mem_root, 256, 0, MYF(0));
mysql_mutex_lock(&federatedx_mutex);
@@ -1791,7 +1791,7 @@ int ha_federatedx::open(const char *name, int mode, uint test_if_locked)
DBUG_PRINT("info", ("ref_length: %u", ref_length));
- my_init_dynamic_array(&results, sizeof(FEDERATEDX_IO_RESULT*), 4, 4, 0);
+ my_init_dynamic_array(&results, sizeof(FEDERATEDX_IO_RESULT*), 4, 4, MYF(0));
reset();
diff --git a/storage/maria/ma_bitmap.c b/storage/maria/ma_bitmap.c
index 00d79b54dd1..e3668d3c8d3 100644
--- a/storage/maria/ma_bitmap.c
+++ b/storage/maria/ma_bitmap.c
@@ -239,7 +239,7 @@ my_bool _ma_bitmap_init(MARIA_SHARE *share, File file,
if (((bitmap->map= (uchar*) my_malloc(size, MYF(MY_WME))) == NULL) ||
my_init_dynamic_array(&bitmap->pinned_pages,
- sizeof(MARIA_PINNED_PAGE), 1, 1, 0))
+ sizeof(MARIA_PINNED_PAGE), 1, 1, MYF(0)))
return 1;
bitmap->block_size= share->block_size;
diff --git a/storage/maria/ma_blockrec.c b/storage/maria/ma_blockrec.c
index 0f49175905a..55b9a137050 100644
--- a/storage/maria/ma_blockrec.c
+++ b/storage/maria/ma_blockrec.c
@@ -528,7 +528,7 @@ my_bool _ma_init_block_record(MARIA_HA *info)
if (my_init_dynamic_array(&info->bitmap_blocks,
sizeof(MARIA_BITMAP_BLOCK), default_extents,
- 64, 0))
+ 64, MYF(0)))
goto err;
info->cur_row.extents_buffer_length= default_extents * ROW_EXTENT_SIZE;
if (!(info->cur_row.extents= my_malloc(info->cur_row.extents_buffer_length,
diff --git a/storage/maria/ma_check.c b/storage/maria/ma_check.c
index 88ec6362853..ab9080c40fb 100644
--- a/storage/maria/ma_check.c
+++ b/storage/maria/ma_check.c
@@ -3766,7 +3766,7 @@ int maria_repair_by_sort(HA_CHECK *param, register MARIA_HA *info,
param->read_cache.end_of_file= sort_info.filelength;
sort_param.wordlist=NULL;
init_alloc_root(&sort_param.wordroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0,
- param->malloc_flags);
+ MYF(param->malloc_flags));
sort_param.key_cmp=sort_key_cmp;
sort_param.lock_in_memory=maria_lock_memory;
@@ -4404,7 +4404,7 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
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,
- param->malloc_flags);
+ MYF(param->malloc_flags));
}
}
sort_info.total_keys=i;
diff --git a/storage/maria/ma_ft_nlq_search.c b/storage/maria/ma_ft_nlq_search.c
index ad859382bfc..c6d9c2411c6 100644
--- a/storage/maria/ma_ft_nlq_search.c
+++ b/storage/maria/ma_ft_nlq_search.c
@@ -240,7 +240,7 @@ FT_INFO *maria_ft_init_nlq_search(MARIA_HA *info, uint keynr, uchar *query,
bzero(&wtree,sizeof(wtree));
init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp,
- NULL, NULL, 0);
+ NULL, NULL, MYF(0));
maria_ft_parse_init(&wtree, aio.charset);
ftparser_param->flags= 0;
diff --git a/storage/maria/ma_ft_parser.c b/storage/maria/ma_ft_parser.c
index 78f3591d6e9..81b5ea5119c 100644
--- a/storage/maria/ma_ft_parser.c
+++ b/storage/maria/ma_ft_parser.c
@@ -255,7 +255,7 @@ void maria_ft_parse_init(TREE *wtree, CHARSET_INFO *cs)
DBUG_ENTER("maria_ft_parse_init");
if (!is_tree_inited(wtree))
init_tree(wtree,0,0,sizeof(FT_WORD),(qsort_cmp2)&FT_WORD_cmp, NULL,
- (void*) cs, 0);
+ (void*) cs, MYF(0));
DBUG_VOID_RETURN;
}
@@ -348,7 +348,7 @@ MYSQL_FTPARSER_PARAM* maria_ftparser_alloc_param(MARIA_HA *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, 0);
+ init_alloc_root(&info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
}
diff --git a/storage/maria/ma_loghandler.c b/storage/maria/ma_loghandler.c
index de998ca9a2c..56926c048d8 100644
--- a/storage/maria/ma_loghandler.c
+++ b/storage/maria/ma_loghandler.c
@@ -3629,10 +3629,10 @@ my_bool translog_init_with_table(const char *directory,
mysql_rwlock_init(key_TRANSLOG_DESCRIPTOR_open_files_lock,
&log_descriptor.open_files_lock) ||
my_init_dynamic_array(&log_descriptor.open_files,
- sizeof(TRANSLOG_FILE*), 10, 10, 0) ||
+ sizeof(TRANSLOG_FILE*), 10, 10, MYF(0)) ||
my_init_dynamic_array(&log_descriptor.unfinished_files,
sizeof(struct st_file_counter),
- 10, 10, 0))
+ 10, 10, MYF(0)))
goto err;
log_descriptor.min_need_file= 0;
log_descriptor.min_file_number= 0;
@@ -5528,7 +5528,7 @@ translog_write_variable_record_mgroup(LSN *lsn,
if (my_init_dynamic_array(&groups,
sizeof(struct st_translog_group_descriptor),
- 10, 10, 0))
+ 10, 10, MYF(0)))
{
translog_unlock();
DBUG_PRINT("error", ("init array failed"));
diff --git a/storage/maria/ma_open.c b/storage/maria/ma_open.c
index 493551c002e..88422e3dc5f 100644
--- a/storage/maria/ma_open.c
+++ b/storage/maria/ma_open.c
@@ -160,7 +160,7 @@ static MARIA_HA *maria_clone_internal(MARIA_SHARE *share, const char *name,
if (my_init_dynamic_array(&info.pinned_pages,
sizeof(MARIA_PINNED_PAGE),
max(share->base.blobs*2 + 4,
- MARIA_MAX_TREE_LEVELS*3), 16, 0))
+ MARIA_MAX_TREE_LEVELS*3), 16, MYF(0)))
goto err;
diff --git a/storage/maria/ma_sort.c b/storage/maria/ma_sort.c
index 7894c56fc21..4bc179c3008 100644
--- a/storage/maria/ma_sort.c
+++ b/storage/maria/ma_sort.c
@@ -164,7 +164,7 @@ int _ma_create_index_by_sort(MARIA_SORT_PARAM *info, my_bool no_messages,
HA_FT_MAXBYTELEN, MYF(0))))
{
if (my_init_dynamic_array(&buffpek, sizeof(BUFFPEK), maxbuffer,
- maxbuffer/2, 0))
+ maxbuffer/2, MYF(0)))
{
my_free(sort_keys);
sort_keys= 0;
@@ -397,7 +397,7 @@ pthread_handler_t _ma_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, 0))
+ maxbuffer, maxbuffer/2, MYF(0)))
{
my_free(sort_keys);
sort_keys= (uchar **) NULL; /* for err: label */
diff --git a/storage/maria/ma_write.c b/storage/maria/ma_write.c
index ca0b39537a2..752741d0a5e 100644
--- a/storage/maria/ma_write.c
+++ b/storage/maria/ma_write.c
@@ -881,7 +881,7 @@ ChangeSet@1.2562, 2008-04-09 07:41:40+02:00, serg@janus.mylan +9 -0
/* 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, 0);
+ my_init_dynamic_array(info->ft1_to_ft2, ft2len, 300, 50, MYF(0));
/*
Now, adding all keys from the page to dynarray
@@ -1767,7 +1767,7 @@ int maria_init_bulk_insert(MARIA_HA *info, ulong cache_size, ha_rows rows)
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2)keys_compare,
- (tree_element_free) keys_free, (void *)params++, 0);
+ (tree_element_free) keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
diff --git a/storage/maria/maria_pack.c b/storage/maria/maria_pack.c
index 0bc68f95d1e..40686995378 100644
--- a/storage/maria/maria_pack.c
+++ b/storage/maria/maria_pack.c
@@ -799,7 +799,7 @@ static HUFF_COUNTS *init_huff_count(MARIA_HA *info,my_off_t records)
This is accomplished by '-1' as the element size.
*/
init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL,
- NULL, 0);
+ NULL, MYF(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/maria/unittest/sequence_storage.c b/storage/maria/unittest/sequence_storage.c
index 6a39cca5055..4563ea76c64 100644
--- a/storage/maria/unittest/sequence_storage.c
+++ b/storage/maria/unittest/sequence_storage.c
@@ -33,7 +33,7 @@ my_bool seq_storage_reader_init(SEQ_STORAGE *seq, const char *file)
seq->pos= 0;
if ((fd= my_fopen(file, O_RDONLY, MYF(MY_WME))) == NULL)
return 1;
- if (my_init_dynamic_array(&seq->seq, sizeof(ulong), 10, 10, 0))
+ if (my_init_dynamic_array(&seq->seq, sizeof(ulong), 10, 10, MYF(0)))
return 1;
for(;;)
diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c
index 1b31b4b1da3..70a7037a446 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,MYF(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, 0);
+ init_alloc_root(&ftb->mem_root, 1024, 1024, MYF(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 e7e27870762..9524b6f1833 100644
--- a/storage/myisam/ft_nlq_search.c
+++ b/storage/myisam/ft_nlq_search.c
@@ -249,7 +249,7 @@ 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,
- NULL, NULL, 0);
+ NULL, NULL, MYF(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 5d271f4d361..0e89d7d1b3a 100644
--- a/storage/myisam/ft_parser.c
+++ b/storage/myisam/ft_parser.c
@@ -250,7 +250,7 @@ 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,
- (void*)cs, 0);
+ (void*)cs, MYF(0));
DBUG_VOID_RETURN;
}
@@ -342,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, 0);
+ init_alloc_root(&info->ft_memroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0, MYF(0));
}
return info->ftparser_param;
}
diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c
index 84eda800f6a..45441c17bbb 100644
--- a/storage/myisam/ft_stopwords.c
+++ b/storage/myisam/ft_stopwords.c
@@ -62,7 +62,7 @@ int ft_init_stopwords()
DBUG_RETURN(-1);
init_tree(stopwords3,0,0,sizeof(FT_STOPWORD),(qsort_cmp2)&FT_STOPWORD_cmp,
(ft_stopword_file ? (tree_element_free)&FT_STOPWORD_free : 0),
- NULL, 0);
+ NULL, MYF(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 29b513b1451..056aff5a72b 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -2300,7 +2300,7 @@ int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
sort_param.wordlist=NULL;
init_alloc_root(&sort_param.wordroot, FTPARSER_MEMROOT_ALLOC_SIZE, 0,
- param->malloc_flags);
+ MYF(param->malloc_flags));
if (share->data_file_type == DYNAMIC_RECORD)
length=max(share->base.min_pack_length+1,share->base.min_block_length);
@@ -2871,7 +2871,7 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
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,
- param->malloc_flags);
+ MYF(param->malloc_flags));
}
}
sort_info.total_keys=i;
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 5d218ecf0d2..60ea7757827 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, 0);
+ my_init_dynamic_array(info->ft1_to_ft2, ft2len, 300, 50, MYF(0));
/*
now, adding all keys from the page to dynarray
@@ -1014,7 +1014,7 @@ int mi_init_bulk_insert(MI_INFO *info, ulong cache_size, ha_rows rows)
cache_size * key[i].maxlength,
cache_size * key[i].maxlength, 0,
(qsort_cmp2)keys_compare,
- (tree_element_free) keys_free, (void *)params++, 0);
+ (tree_element_free) keys_free, (void *)params++, MYF(0));
}
else
info->bulk_insert[i].root=0;
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index c1a2cd496e5..6ce88db87f5 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -817,7 +817,7 @@ static HUFF_COUNTS *init_huff_count(MI_INFO *info,my_off_t records)
This is accomplished by '-1' as the element size.
*/
init_tree(&count[i].int_tree,0,0,-1,(qsort_cmp2) compare_tree, NULL,
- NULL, 0);
+ NULL, MYF(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 f5c0f04d877..4af45ea02e9 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, 0))
+ maxbuffer/2, MYF(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, 0))
+ maxbuffer, maxbuffer/2, MYF(0)))
{
my_free(sort_keys);
sort_keys= (uchar **) NULL; /* for err: label */
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index e930007af02..1883a3955cc 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -120,7 +120,7 @@ ha_myisammrg::ha_myisammrg(handlerton *hton, TABLE_SHARE *table_arg)
:handler(hton, table_arg), file(0), is_cloned(0)
{
init_sql_alloc(&children_mem_root,
- FN_REFLEN + ALLOC_ROOT_MIN_BLOCK_SIZE, 0, 0);
+ FN_REFLEN + ALLOC_ROOT_MIN_BLOCK_SIZE, 0, MYF(0));
}