summaryrefslogtreecommitdiff
path: root/sql/mf_iocache_encr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mf_iocache_encr.cc')
-rw-r--r--sql/mf_iocache_encr.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/mf_iocache_encr.cc b/sql/mf_iocache_encr.cc
index 9724ca4e19e..d2e6d554ba7 100644
--- a/sql/mf_iocache_encr.cc
+++ b/sql/mf_iocache_encr.cc
@@ -49,8 +49,8 @@ static int my_b_encr_read(IO_CACHE *info, uchar *Buffer, size_t Count)
if (pos_in_file == info->end_of_file)
{
- info->read_pos= info->read_end= info->buffer;
- info->pos_in_file= pos_in_file;
+ /* reading past EOF should not empty the cache */
+ info->read_pos= info->read_end;
info->error= 0;
DBUG_RETURN(MY_TEST(Count));
}