diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-23 16:18:09 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-23 16:18:09 +0100 |
commit | 682da0aa750c059a4f81fadcdf42c9211602eda7 (patch) | |
tree | 965c7ee5c9d87a7158ee74b50edf147ebb67a27a /sql | |
parent | a260b155542179bec75a6bbe1e430bea57b70ad6 (diff) | |
download | mariadb-git-682da0aa750c059a4f81fadcdf42c9211602eda7.tar.gz |
cleanup: use MYF() for mysys flags
Diffstat (limited to 'sql')
-rw-r--r-- | sql/event_data_objects.cc | 2 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 2 | ||||
-rw-r--r-- | sql/ha_ndbcluster_binlog.cc | 2 | ||||
-rw-r--r-- | sql/ha_partition.cc | 6 | ||||
-rw-r--r-- | sql/log.cc | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 10 | ||||
-rw-r--r-- | sql/rpl_filter.cc | 2 | ||||
-rw-r--r-- | sql/rpl_handler.cc | 2 | ||||
-rw-r--r-- | sql/rpl_handler.h | 2 | ||||
-rw-r--r-- | sql/rpl_mi.cc | 2 | ||||
-rw-r--r-- | sql/rpl_tblmap.cc | 2 | ||||
-rw-r--r-- | sql/rpl_utility.cc | 2 | ||||
-rw-r--r-- | sql/sp_head.cc | 10 | ||||
-rw-r--r-- | sql/sp_pcontext.cc | 20 | ||||
-rw-r--r-- | sql/sql_acl.cc | 14 | ||||
-rw-r--r-- | sql/sql_array.h | 2 | ||||
-rw-r--r-- | sql/sql_audit.cc | 2 | ||||
-rw-r--r-- | sql/sql_base.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.cc | 2 | ||||
-rw-r--r-- | sql/sql_class.h | 4 | ||||
-rw-r--r-- | sql/sql_lex.h | 2 | ||||
-rw-r--r-- | sql/sql_plugin.cc | 10 | ||||
-rw-r--r-- | sql/sql_servers.cc | 2 | ||||
-rw-r--r-- | sql/sql_show.cc | 6 | ||||
-rw-r--r-- | sql/sql_trigger.cc | 4 | ||||
-rw-r--r-- | sql/sql_udf.cc | 2 | ||||
-rw-r--r-- | sql/table.cc | 6 | ||||
-rw-r--r-- | sql/tztime.cc | 6 |
28 files changed, 65 insertions, 65 deletions
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); |