summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache2.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-05-26 22:09:40 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-02 18:53:37 +0200
commit318c826e932af69a864726efd24819d1cfa8dc8a (patch)
tree40e65f0d235464bd3c71e5a84bc972bc95b75535 /mysys/mf_iocache2.c
parent6309a30dc96f6c3615b8c5609f07f9bc3898352c (diff)
downloadmariadb-git-318c826e932af69a864726efd24819d1cfa8dc8a.tar.gz
always use my_b_pread() instead of mysql_file_pread()
when working with IO_CACHE's, don't access IO_CACHE::file directly
Diffstat (limited to 'mysys/mf_iocache2.c')
-rw-r--r--mysys/mf_iocache2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index a642e112fa0..5443d5c21c5 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -180,6 +180,12 @@ void my_b_seek(IO_CACHE *info,my_off_t pos)
DBUG_VOID_RETURN;
}
+int my_b_pread(IO_CACHE *info, uchar *Buffer, size_t Count, my_off_t pos)
+{
+ if (mysql_file_pread(info->file, Buffer, Count, pos, info->myflags | MY_NABP))
+ return info->error= -1;
+ return 0;
+}
/*
Read a string ended by '\n' into a buffer of 'max_length' size.