diff options
Diffstat (limited to 'sql/mf_iocache_encr.cc')
-rw-r--r-- | sql/mf_iocache_encr.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/mf_iocache_encr.cc b/sql/mf_iocache_encr.cc index ae314d826a0..546e0fe03a0 100644 --- a/sql/mf_iocache_encr.cc +++ b/sql/mf_iocache_encr.cc @@ -57,7 +57,7 @@ static int my_b_encr_read(IO_CACHE *info, uchar *Buffer, size_t Count) if (info->seek_not_done) { - size_t wpos; + my_off_t wpos; pos_offset= pos_in_file % info->buffer_length; pos_in_file-= pos_offset; @@ -92,7 +92,7 @@ static int my_b_encr_read(IO_CACHE *info, uchar *Buffer, size_t Count) DBUG_RETURN(1); } - elength= wlength - (ebuffer - wbuffer); + elength= wlength - (uint)(ebuffer - wbuffer); set_iv(iv, pos_in_file, crypt_data->inbuf_counter); if (encryption_crypt(ebuffer, elength, info->buffer, &length, @@ -106,7 +106,7 @@ static int my_b_encr_read(IO_CACHE *info, uchar *Buffer, size_t Count) DBUG_ASSERT(length <= info->buffer_length); - copied= MY_MIN(Count, length - pos_offset); + copied= MY_MIN(Count, (size_t)(length - pos_offset)); memcpy(Buffer, info->buffer + pos_offset, copied); Count-= copied; @@ -120,7 +120,7 @@ static int my_b_encr_read(IO_CACHE *info, uchar *Buffer, size_t Count) if (wlength < crypt_data->block_length && pos_in_file < info->end_of_file) { - info->error= pos_in_file - old_pos_in_file; + info->error= (int)(pos_in_file - old_pos_in_file); DBUG_RETURN(1); } } while (Count); @@ -184,7 +184,7 @@ static int my_b_encr_write(IO_CACHE *info, const uchar *Buffer, size_t Count) my_errno= 1; DBUG_RETURN(info->error= -1); } - wlength= elength + ebuffer - wbuffer; + wlength= elength + (uint)(ebuffer - wbuffer); if (length == info->buffer_length) { |