MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF error and corrupt index

fix of incorrect 10.3 merge
This commit is contained in:
Oleksandr Byelkin 2019-01-24 10:43:27 +01:00
parent e9ba165bcb
commit 45c47a04bd

View File

@ -115,12 +115,15 @@ init_functions(IO_CACHE* info)
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read;
info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write;
info->myflags&= ~MY_FULL_IO;
break;
case TYPE_NOT_SET:
DBUG_ASSERT(0);
break;
}
if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND)
info->myflags|= MY_FULL_IO;
else
info->myflags&= ~MY_FULL_IO;
}
@ -297,10 +300,6 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
}
info->inited=info->aio_result.pending=0;
#endif
if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND)
info->myflags|= MY_FULL_IO;
else
info->myflags&= ~MY_FULL_IO;
DBUG_RETURN(0);
} /* init_io_cache */
@ -469,8 +468,6 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
{
info->read_end=info->write_pos;
info->end_of_file=my_b_tell(info);
/* Ensure we will read all data */
info->myflags|= MY_FULL_IO;
/*
Trigger a new seek only if we have a valid
file handle.
@ -485,7 +482,6 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
info->seek_not_done=1;
}
info->end_of_file = ~(my_off_t) 0;
info->myflags&= ~MY_FULL_IO;
}
pos=info->request_pos+(seek_offset-info->pos_in_file);
if (type == WRITE_CACHE)