summaryrefslogtreecommitdiff
path: root/mysys/mf_cache.c
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2000-11-15 23:00:06 +0200
committerunknown <monty@narttu.mysql.fi>2000-11-15 23:00:06 +0200
commit9a846a52ae62f701c2d54d3f468e2ead393acf91 (patch)
tree622092bf596b26a1f762020729c03d573a5b216d /mysys/mf_cache.c
parentf3d2341f1f30384d92b285c1e421d8c599ee2b79 (diff)
downloadmariadb-git-9a846a52ae62f701c2d54d3f468e2ead393acf91.tar.gz
changed to use IO_CACHE instead of FILE
BitKeeper/deleted/.del-mf_reccache.c: ***MISSING WEAVE*** Docs/manual.texi: Fix licence information + update changelog client/mysqlimport.c: Fixed typo client/sql_string.cc: Added support for IO_CACHE client/sql_string.h: Added support for IO_CACHE include/my_sys.h: More options for IO_CACHE mysql.proj: Update mysys/Makefile.am: Remoced mf_reccache.c mysys/mf_cache.c: Fixed return value on error and optimzed used of write cache files mysys/mf_iocache.c: More options for IO_CACHE mysys/my_vsnprintf.c: Optimized code sql/mf_iocache.cc: merge with mf_iocache.c sql/net_pkg.cc: cleanup sql/sql_class.cc: Support for transaction safe log files sql/sql_string.cc: Added support for IO_CACHE sql/sql_string.h: Added support for IO_CACHE sql/time.cc: cleanup BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'mysys/mf_cache.c')
-rw-r--r--mysys/mf_cache.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mysys/mf_cache.c b/mysys/mf_cache.c
index 2c197f6fd20..ff29926ac50 100644
--- a/mysys/mf_cache.c
+++ b/mysys/mf_cache.c
@@ -74,7 +74,7 @@ my_bool open_cached_file(IO_CACHE *cache, const char* dir, const char *prefix,
}
my_free(cache->dir, MYF(MY_ALLOW_ZERO_PTR));
my_free(cache->prefix,MYF(MY_ALLOW_ZERO_PTR));
- DBUG_RETURN(0);
+ DBUG_RETURN(1);
}
/* Create the temporary file */
@@ -101,10 +101,12 @@ void close_cached_file(IO_CACHE *cache)
DBUG_ENTER("close_cached_file");
if (my_b_inited(cache))
{
+ File file=cache->file;
+ cache->file= -1; /* Don't flush data */
(void) end_io_cache(cache);
- if (cache->file >= 0)
+ if (file >= 0)
{
- (void) my_close(cache->file,MYF(0));
+ (void) my_close(file,MYF(0));
#ifdef CANT_DELETE_OPEN_FILES
if (cache->file_name)
{