List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:June 19 2008 4:15pm
Subject:bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012
View as plain text  
#At file:///home/svoj/devel/mysql/BUG37012/mysql-6.0-backup/

 2638 Sergey Vojtovich	2008-06-19
      BUG#37012 - Online backup: Can't backup to a pipe.
      
      It was impossible to backup to a pipe. Backup code refuse
      to overwrite existing files no matter if they're regular files
      or named pipes.
      
      This fix allows to write backup image to existing named pipe.
modified:
  sql/backup/stream.cc

per-file messages:
  sql/backup/stream.cc
    Allow to write to existing named pipe.
=== modified file 'sql/backup/stream.cc'
--- a/sql/backup/stream.cc	2008-03-04 16:06:28 +0000
+++ b/sql/backup/stream.cc	2008-06-19 14:15:01 +0000
@@ -1,4 +1,5 @@
 #include "../mysql_priv.h"
+#include "my_dir.h"
 
 #include "backup_stream.h"
 #include "stream.h"
@@ -214,7 +215,12 @@ bool Output_stream::init()
 */
 bool Output_stream::open()
 {
+  MY_STAT stat_info;
   close();
+  /* Allow to write to existing named pipe */
+  if (my_stat(m_path.c_ptr(), &stat_info, MYF(0)) &&
+      MY_S_ISFIFO(stat_info.st_mode))
+    m_flags&= ~(O_CREAT|O_EXCL|O_TRUNC);
 
   bool ret= Stream::open();
 

Thread
bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Sergey Vojtovich19 Jun
  • Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Rafal Somla23 Jun
  • Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Øystein Grøvlen25 Jun
    • Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Rafal Somla26 Jun
      • Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Øystein Grøvlen27 Jun
        • Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Rafal Somla27 Jun
Re: bzr commit into mysql-6.0-backup branch (svoj:2638) Bug#37012Øystein Grøvlen26 Jun