From d9340d6c8e1b227044fc90bc40c5da1d1f6b0dcc Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 27 May 2015 00:18:20 +0200 Subject: MDEV-8126 encryption for temp files IO_CACHE tempfiles encryption --- mysys/mf_iocache2.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysys/mf_iocache2.c') diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c index 5443d5c21c5..93caa7bc74a 100644 --- a/mysys/mf_iocache2.c +++ b/mysys/mf_iocache2.c @@ -182,6 +182,13 @@ void my_b_seek(IO_CACHE *info,my_off_t pos) int my_b_pread(IO_CACHE *info, uchar *Buffer, size_t Count, my_off_t pos) { + if (info->myflags & MY_ENCRYPT) + { + my_b_seek(info, pos); + return my_b_read(info, Buffer, Count); + } + + /* backward compatibility behavior. XXX remove it? */ if (mysql_file_pread(info->file, Buffer, Count, pos, info->myflags | MY_NABP)) return info->error= -1; return 0; -- cgit v1.2.1