summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-10-12 09:07:05 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-11-02 18:01:49 +0100
commitb68d8a05d326bed43aefa73d717c0307278ca6bb (patch)
tree9f38bc4b9e24f24f52c6e21444fa429df3f29e87 /mysys/mf_iocache.c
parentb7eca63620df2d4626faa54a171cf0a190cf6924 (diff)
downloadmariadb-git-b68d8a05d326bed43aefa73d717c0307278ca6bb.tar.gz
MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF error and corrupt index
my_read fixed as in higher versions. my_pread made as my_read aware of partial read of huge chunks of files MY_FULL_IO enabled for file operations
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index bd71e2ae527..9a051cf6a9e 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -282,6 +282,10 @@ 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 */