diff options
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r-- | mysys/mf_iocache.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 03d11c6f6af..908f5c65cf7 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -554,7 +554,7 @@ int _my_b_read(register IO_CACHE *info, uchar *Buffer, size_t Count) if (Count) { /* We couldn't fulfil the request. Return, how much we got. */ - info->error= left_length; + info->error= (int) left_length; DBUG_RETURN(1); } length=0; /* Didn't read any chars */ @@ -1291,7 +1291,7 @@ read_append_buffer: info->append_read_pos += copy_len; Count -= copy_len; if (Count) - info->error = save_count - Count; + info->error= (int) (save_count - Count); /* Fill read buffer with data from write buffer */ memcpy(info->buffer, info->append_read_pos, @@ -1674,8 +1674,8 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count, { /* Of no overlap, write everything without buffering */ if (pos + Count <= info->pos_in_file) - return mysql_file_pwrite(info->file, Buffer, Count, pos, - info->myflags | MY_NABP); + return (int)mysql_file_pwrite(info->file, Buffer, Count, pos, + info->myflags | MY_NABP); /* Write the part of the block that is before buffer */ length= (uint) (info->pos_in_file - pos); if (mysql_file_pwrite(info->file, Buffer, length, pos, info->myflags | MY_NABP)) @@ -1683,9 +1683,6 @@ int my_block_write(register IO_CACHE *info, const uchar *Buffer, size_t Count, Buffer+=length; pos+= length; Count-= length; -#ifndef HAVE_PREAD - info->seek_not_done=1; -#endif } /* Check if we want to write inside the used part of the buffer.*/ @@ -1853,6 +1850,7 @@ int end_io_cache(IO_CACHE *info) info->type= TYPE_NOT_SET; mysql_mutex_destroy(&info->append_buffer_lock); } + info->share= 0; DBUG_RETURN(error); } /* end_io_cache */ |