summaryrefslogtreecommitdiff
path: root/mysys/mf_iocache.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 13:27:12 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-03-03 13:27:12 +0200
commitadc91387e3add6d9c850b7c2a44760deaceb3638 (patch)
treec772c6339d2f715a1a50766e30790307e0658f3e /mysys/mf_iocache.c
parentbc28b305e538774eae4152b300cd323e9a724393 (diff)
parent29c776cfd1e560846e394f39d79ae43ff7d70c61 (diff)
downloadmariadb-git-adc91387e3add6d9c850b7c2a44760deaceb3638.tar.gz
Merge 10.0 into 10.1
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r--mysys/mf_iocache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 4afe74da077..510278c8a4d 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -1876,6 +1876,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
It's currently safe to call this if one has called init_io_cache()
on the 'info' object, even if init_io_cache() failed.
This function is also safe to call twice with the same handle.
+ Note that info->file is not reset as the caller may still use ut for my_close()
RETURN
0 ok
@@ -1905,10 +1906,12 @@ int end_io_cache(IO_CACHE *info)
if (info->type == SEQ_READ_APPEND)
{
/* Destroy allocated mutex */
- info->type= TYPE_NOT_SET;
mysql_mutex_destroy(&info->append_buffer_lock);
}
info->share= 0;
+ info->type= TYPE_NOT_SET; /* Ensure that flush_io_cache() does nothing */
+ info->write_end= 0; /* Ensure that my_b_write() fails */
+ info->write_function= 0; /* my_b_write will crash if used */
DBUG_RETURN(error);
} /* end_io_cache */