diff options
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/sql/table.cc b/sql/table.cc index 4e6f2ae2860..a58623f0036 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -896,7 +896,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if (mysql_file_pread(file, buff, n_length, record_offset + share->reclength, MYF(MY_NABP))) { - my_free(buff, MYF(0)); + my_free(buff); goto err; } share->connect_string.length= uint2korr(buff); @@ -905,7 +905,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, share->connect_string. length))) { - my_free(buff, MYF(0)); + my_free(buff); goto err; } next_chunk+= share->connect_string.length + 2; @@ -926,7 +926,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, plugin_data(tmp_plugin, handlerton *))) { /* bad file, legacy_db_type did not match the name */ - my_free(buff, MYF(0)); + my_free(buff); goto err; } /* @@ -956,7 +956,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, error= 8; my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-partition"); - my_free(buff, MYF(0)); + my_free(buff); goto err; } plugin_unlock(NULL, share->db_plugin); @@ -972,7 +972,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, error= 8; name.str[name.length]=0; my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str); - my_free(buff, MYF(0)); + my_free(buff); goto err; /* purecov: end */ } @@ -989,7 +989,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, memdup_root(&share->mem_root, next_chunk + 4, partition_info_str_len + 1))) { - my_free(buff, MYF(0)); + my_free(buff); goto err; } } @@ -997,7 +997,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if (partition_info_str_len) { DBUG_PRINT("info", ("WITH_PARTITION_STORAGE_ENGINE is not defined")); - my_free(buff, MYF(0)); + my_free(buff); goto err; } #endif @@ -1035,7 +1035,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, { DBUG_PRINT("error", ("fulltext key uses parser that is not defined in .frm")); - my_free(buff, MYF(0)); + my_free(buff); goto err; } parser_name.str= (char*) next_chunk; @@ -1046,7 +1046,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if (! keyinfo->parser) { my_error(ER_PLUGIN_IS_NOT_LOADED, MYF(0), parser_name.str); - my_free(buff, MYF(0)); + my_free(buff); goto err; } } @@ -1058,19 +1058,19 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, { DBUG_PRINT("error", ("long table comment is not defined in .frm")); - my_free(buff, MYF(0)); + my_free(buff); goto err; } share->comment.length = uint2korr(next_chunk); if (! (share->comment.str= strmake_root(&share->mem_root, (char*)next_chunk + 2, share->comment.length))) { - my_free(buff, MYF(0)); + my_free(buff); goto err; } next_chunk+= 2 + share->comment.length; } - my_free(buff, MYF(0)); + my_free(buff); } share->key_block_size= uint2korr(head+62); @@ -1586,7 +1586,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, } else share->primary_key= MAX_KEY; - x_free((uchar*) disk_buff); + my_free(disk_buff); disk_buff=0; if (new_field_pack_flag <= 1) { @@ -1658,7 +1658,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, share->error= error; share->open_errno= my_errno; share->errarg= errarg; - x_free((uchar*) disk_buff); + my_free(disk_buff); delete crypted; delete handler_file; my_hash_free(&share->name_hash); @@ -2010,7 +2010,7 @@ partititon_err: outparam->file= 0; // For easier error checking outparam->db_stat=0; free_root(&outparam->mem_root, MYF(0)); // Safe to call on bzero'd root - my_free((char*) outparam->alias, MYF(MY_ALLOW_ZERO_PTR)); + my_free((void *) outparam->alias); DBUG_RETURN (error); } @@ -2032,7 +2032,7 @@ int closefrm(register TABLE *table, bool free_share) if (table->db_stat) error=table->file->close(); - my_free((char*) table->alias, MYF(MY_ALLOW_ZERO_PTR)); + my_free((void *) table->alias); table->alias= 0; if (table->field) { @@ -2127,14 +2127,14 @@ static ulong get_form_pos(File file, uchar *head) if (mysql_file_read(file, buf, length+names*4, MYF(MY_NABP))) { - x_free(buf); + my_free(buf); DBUG_RETURN(0); } pos= buf+length; ret_value= uint4korr(pos); - my_free(buf, MYF(0)); + my_free(buf); DBUG_RETURN(ret_value); } @@ -2151,11 +2151,11 @@ int read_string(File file, uchar**to, size_t length) { DBUG_ENTER("read_string"); - x_free(*to); + my_free(*to); if (!(*to= (uchar*) my_malloc(length+1,MYF(MY_WME))) || mysql_file_read(file, *to, length, MYF(MY_NABP))) { - x_free(*to); /* purecov: inspected */ + my_free(*to); /* purecov: inspected */ *to= 0; /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ } |