diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-01-26 01:13:41 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-01-26 01:13:41 +0100 |
commit | 9b76e2843b5bdb57c35ec99c506711af0645684d (patch) | |
tree | 56bccb1bc8eb8aa441fd5683614c196e29b9c1ff /mysys | |
parent | 06a37d37a192fe13bc8a7148ae74fd9d154e4be4 (diff) | |
parent | 3b1b665fcbe1b9ae7ee0d627105cfb69c9886179 (diff) | |
download | mariadb-git-9b76e2843b5bdb57c35ec99c506711af0645684d.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysys')
-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 6150473c2f0..3794d2fe4dc 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) |