summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2004-01-15 06:48:31 +0200
committerunknown <jani@rhols221.adsl.netsonic.fi>2004-01-15 06:48:31 +0200
commit484cf319c541e3fe49b667dff41099df30a0f947 (patch)
tree3ef89ceb8695d59c4ed45acaa76c1c2d1990f34d /mysys
parent3ad098661aa69f7f6be36cd0c54ee44ee21cbe74 (diff)
downloadmariadb-git-484cf319c541e3fe49b667dff41099df30a0f947.tar.gz
Fixed Bug#2123, mysqld segmentation faulted when it tried to
open a file that already existed. The problem was that end_io_cache() was called even if init_io_cache() was not. This affected both OUTFILE and DUMPFILE (both fixed). Sometimes wrongly aligned pointer was freed, sometimes mysqld core dumped. Other problem was that select_dump::send_error removed the dumpfile, even if it was created by an earlier run, or by some other program, if the file permissions just permitted it. Fixed it so that the file will only be deleted, if an error occurred, but the file was created by mysqld just a moment ago, in that thread. On the other hand, select_export did not handle the corresponding garbage file at all. Both fixed. After these fixes, a big part of the select_export::prepare and select_dump::prepare code became identical. Merged the code into a new function called create_file(), which is now called by the two latter functions. Regards, Jani mysys/mf_iocache.c: Fixed a bug in comment.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/mf_iocache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index b5c80d9482f..1dd3108e151 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -1175,8 +1175,8 @@ int _flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
info IO_CACHE Handle to free
NOTES
- It's currently safe to call this if one has called io_cache_init()
- on the 'info' object, even if io_cache_init() failed.
+ 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.
RETURN