STATUS
------
Patch approved.
REQUESTS
--------
1. Long line in comments.
DETAILS
-------
Rafal Somla wrote:
> 2858 Rafal Somla 2009-08-11
> Bug #42999 - If BACKUP to pipe fails, pipe will be removed
>
> In case BACKUP operation is aborted before completion (e.g., due to an error),
> Backup_restore_ctx::close() method removes the backup image file which was
> created when backup stream was opened. An exception is backup to a named pipe
> which is never created but should exist prior to invoking BACKUP command.
>
> Before this patch, the code did not make exception for named pipes which were
> removed like regular files. The patch adds logic for detecting this exception
> and correctly handling named pipes.
> @ mysql-test/suite/backup/t/backup_pipe.test
> Added scenario testing the issue.
> @ sql/backup/kernel.cc
> In Backup_restore_ctx::close() call Stream::close() or Stream::remove() as
> appropriate. Move error reporting code into the latter methods.
[1] Please keep lines to <= 80 characters in length.
> @ sql/backup/stream.cc
> - Make stream methods report status via integer return code, not a bool
> value.
> - Remove unused rewind() methods.
> - Move error reporting from kernel.cc to close() methods.
> - Implementation of Output_stream::remove() method.
> @ sql/backup/stream.h
> - Make stream methods report status via integer return code, not a bool
> value.
> - Add remove() method to stream class.
> - Delete unused rewind() methods.
...
Chuck