diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2019-01-24 10:43:27 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2019-01-24 10:43:27 +0100 |
commit | 19a82a9f2a107af99d66c0f6d6cc489c108c88eb (patch) | |
tree | 29de7ef6f7067778748844d15c5791e86976605c | |
parent | 778192454eba32f7b1f041026b3124d3de9c61c3 (diff) | |
download | mariadb-git-bb-10.3-MDEV-17401.tar.gz |
MDEV-17401: LOAD DATA from very big file into MyISAM table results in EOF error and corrupt indexbb-10.3-MDEV-17401
fix of incorrect 10.3 merge
-rw-r--r-- | mysys/mf_iocache.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 4f22921aeff..b09760cd98d 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -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) |