mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Fixed a compiler failure and removed some warnings in windows
extra/replace.c: Removed compiler warning sql/unireg.cc: Removed compiler warning storage/maria/ma_blockrec.c: Removed compiler warning storage/maria/ma_dynrec.c: Fixed compiler failure storage/maria/ma_unique.c: Removed compiler warning storage/myisam/mi_check.c: Removed compiler warning storage/myisam/mi_checksum.c: Removed compiler warning
This commit is contained in:
parent
599eb0dc86
commit
800a278fd0
7 changed files with 16 additions and 15 deletions
|
@ -265,7 +265,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
|||
if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
|
||||
MYF(MY_WME))))
|
||||
{
|
||||
my_free(pa->typelib.type_names);
|
||||
my_free((void*) pa->typelib.type_names);
|
||||
DBUG_RETURN (-1);
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
|
@ -327,7 +327,7 @@ static void free_pointer_array(reg1 POINTER_ARRAY *pa)
|
|||
if (pa->typelib.count)
|
||||
{
|
||||
pa->typelib.count=0;
|
||||
my_free(pa->typelib.type_names);
|
||||
my_free((void*) pa->typelib.type_names);
|
||||
pa->typelib.type_names=0;
|
||||
my_free(pa->str);
|
||||
}
|
||||
|
|
|
@ -971,7 +971,7 @@ static bool pack_fields(File file, List<Create_field> &create_fields,
|
|||
while ((field=it++))
|
||||
{
|
||||
char *pos= strmov((char*) buff,field->field_name);
|
||||
*pos++=NAMES_SEP_CHAR;
|
||||
* (uchar*) pos++= (uchar) NAMES_SEP_CHAR;
|
||||
if (i == create_fields.elements-1)
|
||||
*pos++=0;
|
||||
if (mysql_file_write(file, buff, (size_t) (pos-(char*) buff), MYF_RW))
|
||||
|
|
|
@ -3248,8 +3248,9 @@ static my_bool write_block_record(MARIA_HA *info,
|
|||
blob_length-= (blob_length % FULL_PAGE_SIZE(block_size));
|
||||
if (blob_length)
|
||||
{
|
||||
memcpy(&log_array_pos->str, record + tmp_column->offset + length,
|
||||
sizeof(uchar*));
|
||||
memcpy((void*) &log_array_pos->str,
|
||||
record + tmp_column->offset + length,
|
||||
sizeof(uchar*));
|
||||
log_array_pos->length= blob_length;
|
||||
log_entry_length+= blob_length;
|
||||
log_array_pos++;
|
||||
|
@ -5344,6 +5345,7 @@ int _ma_scan_restore_block_record(MARIA_HA *info,
|
|||
info Maria handler
|
||||
record Store found here
|
||||
record_pos Value stored in info->cur_row.next_pos after last call
|
||||
This is offset inside the current pagebuff
|
||||
skip_deleted
|
||||
|
||||
NOTES
|
||||
|
@ -5381,7 +5383,7 @@ restart_record_read:
|
|||
/* Ensure that scan.dir and record_pos are in sync */
|
||||
DBUG_ASSERT(info->scan.dir == dir_entry_pos(info->scan.page_buff,
|
||||
share->block_size,
|
||||
record_pos));
|
||||
(uint) record_pos));
|
||||
|
||||
/* Search for a valid directory entry (not 0) */
|
||||
while (!(offset= uint2korr(info->scan.dir)))
|
||||
|
@ -5977,12 +5979,12 @@ static size_t fill_update_undo_parts(MARIA_HA *info, const uchar *oldrec,
|
|||
{
|
||||
uint size_length= column->length - portable_sizeof_char_ptr;
|
||||
old_column_length= _ma_calc_blob_length(size_length, old_column_pos);
|
||||
memcpy(&old_column_pos, oldrec + column->offset + size_length,
|
||||
memcpy((void*) &old_column_pos, oldrec + column->offset + size_length,
|
||||
sizeof(old_column_pos));
|
||||
if (!new_column_is_empty)
|
||||
{
|
||||
new_column_length= _ma_calc_blob_length(size_length, new_column_pos);
|
||||
memcpy(&new_column_pos, newrec + column->offset + size_length,
|
||||
memcpy((void*) &new_column_pos, newrec + column->offset + size_length,
|
||||
sizeof(old_column_pos));
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1594,9 +1594,8 @@ my_bool _ma_cmp_dynamic_record(register MARIA_HA *info,
|
|||
MARIA_BLOCK_INFO block_info;
|
||||
my_bool error= 1;
|
||||
size_t buffer_length;
|
||||
LINT_INIT(buffer_length);
|
||||
|
||||
DBUG_ENTER("_ma_cmp_dynamic_record");
|
||||
LINT_INIT(buffer_length);
|
||||
|
||||
if (info->opt_flag & WRITE_CACHE_USED)
|
||||
{
|
||||
|
|
|
@ -135,7 +135,7 @@ ha_checksum _ma_unique_hash(MARIA_UNIQUEDEF *def, const uchar *record)
|
|||
else if (keyseg->flag & HA_BLOB_PART)
|
||||
{
|
||||
uint tmp_length= _ma_calc_blob_length(keyseg->bit_start,pos);
|
||||
memcpy(&pos,pos+keyseg->bit_start,sizeof(char*));
|
||||
memcpy((void*) &pos,pos+keyseg->bit_start,sizeof(char*));
|
||||
if (!length || length > tmp_length)
|
||||
length=tmp_length; /* The whole blob */
|
||||
}
|
||||
|
@ -231,8 +231,8 @@ my_bool _ma_unique_comp(MARIA_UNIQUEDEF *def, const uchar *a, const uchar *b,
|
|||
set_if_smaller(a_length, keyseg->length);
|
||||
set_if_smaller(b_length, keyseg->length);
|
||||
}
|
||||
memcpy(&pos_a, pos_a+keyseg->bit_start, sizeof(char*));
|
||||
memcpy(&pos_b, pos_b+keyseg->bit_start, sizeof(char*));
|
||||
memcpy((void*) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
|
||||
memcpy((void*) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
|
||||
}
|
||||
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
|
||||
type == HA_KEYTYPE_VARTEXT2)
|
||||
|
|
|
@ -1536,7 +1536,7 @@ int mi_repair(HA_CHECK *param, register MI_INFO *info,
|
|||
|
||||
if (!param->using_global_keycache)
|
||||
(void) init_key_cache(dflt_key_cache, param->key_cache_block_size,
|
||||
param->use_buffers, 0, 0, 0);
|
||||
(size_t) param->use_buffers, 0, 0, 0);
|
||||
|
||||
if (init_io_cache(¶m->read_cache,info->dfile,
|
||||
(uint) param->read_buffer_length,
|
||||
|
|
|
@ -40,7 +40,7 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf)
|
|||
length=_mi_calc_blob_length(column->length-
|
||||
portable_sizeof_char_ptr,
|
||||
buf);
|
||||
memcpy(&pos, buf+column->length - portable_sizeof_char_ptr,
|
||||
memcpy((void*) &pos, buf+column->length - portable_sizeof_char_ptr,
|
||||
sizeof(char*));
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue