compilation error on windows

conversion from 'my_off_t' to '::size_t', possible loss of data
This commit is contained in:
Sergei Golubchik 2018-02-06 00:20:46 +01:00
parent 775a8a0e4b
commit d429f60770

View file

@ -114,7 +114,7 @@ int mi_lock_database(MI_INFO *info, int lock_type)
if (myisam_flush)
{
if (share->file_map)
my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
my_msync(info->dfile, share->file_map, (size_t)share->mmaped_length, MS_SYNC);
if (mysql_file_sync(share->kfile, MYF(0)))
mark_crashed= error= my_errno;
if (mysql_file_sync(info->dfile, MYF(0)))
@ -529,7 +529,7 @@ int _mi_writeinfo(register MI_INFO *info, uint operation)
if (myisam_flush)
{
if (share->file_map)
my_msync(info->dfile, share->file_map, share->mmaped_length, MS_SYNC);
my_msync(info->dfile, share->file_map, (size_t)share->mmaped_length, MS_SYNC);
mysql_file_sync(share->kfile, 0);
mysql_file_sync(info->dfile, 0);
}