diff options
author | jani@rhols221.adsl.netsonic.fi <> | 2004-01-15 06:48:31 +0200 |
---|---|---|
committer | jani@rhols221.adsl.netsonic.fi <> | 2004-01-15 06:48:31 +0200 |
commit | 1cc08ed699959ed5b2470e4f09b181aa31125e32 (patch) | |
tree | 3ef89ceb8695d59c4ed45acaa76c1c2d1990f34d /mysys/mf_iocache.c | |
parent | d12020880d294aaa04fd5351878ec23b85947cd9 (diff) | |
download | mariadb-git-1cc08ed699959ed5b2470e4f09b181aa31125e32.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
Diffstat (limited to 'mysys/mf_iocache.c')
-rw-r--r-- | mysys/mf_iocache.c | 4 |
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 |