summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
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 af1e0830aee..635e544d367 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -614,6 +614,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
{
/* End of file. Return, what we did copy from the buffer. */
info->error= (int) left_length;
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
@@ -631,6 +632,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
*/
info->error= (read_length == (size_t) -1 ? -1 :
(int) (read_length+left_length));
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
Count-=length;
@@ -683,6 +685,7 @@ int _my_b_cache_read(IO_CACHE *info, uchar *Buffer, size_t Count)
/* For a read error, return -1, otherwise, what we got in total. */
info->error= length == (size_t) -1 ? -1 : (int) (length+left_length);
info->read_pos=info->read_end=info->buffer;
+ info->seek_not_done=1;
DBUG_RETURN(1);
}
/*
@@ -1925,6 +1928,7 @@ void die(const char* fmt, ...)
fprintf(stderr,"Error:");
vfprintf(stderr, fmt,va_args);
fprintf(stderr,", errno=%d\n", errno);
+ va_end(va_args);
exit(1);
}