summaryrefslogtreecommitdiff
path: root/sql/mf_iocache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mf_iocache.cc')
-rw-r--r--sql/mf_iocache.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index bf2f2c37409..24af439961e 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -57,7 +57,8 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
/* There is no file in net_reading */
info->file= file;
- info->pre_read = info->post_read = 0;
+ info->pre_close = info->pre_read = info->post_read = 0;
+ info->arg = 0;
if (!cachesize)
if (! (cachesize= my_default_record_cache_size))
DBUG_RETURN(1); /* No cache requested */
@@ -681,7 +682,10 @@ int flush_io_cache(IO_CACHE *info)
int end_io_cache(IO_CACHE *info)
{
int error=0;
+ IO_CACHE_CALLBACK pre_close;
DBUG_ENTER("end_io_cache");
+ if((pre_close=info->pre_close))
+ (*pre_close)(info);
if (info->buffer)
{
if (info->file != -1) /* File doesn't exist */